Amesos Package Browser (Single Doxygen Collection) Development
Amesos_ConfigDefs.h
Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //                Amesos: Direct Sparse Solver Package
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef AMESOS_CONFIGDEFS
00030 #define AMESOS_CONFIGDEFS
00031 
00032 #ifdef PACKAGE
00033 #undef PACKAGE
00034 #endif
00035 
00036 #ifdef PACKAGE_NAME
00037 #undef PACKAGE_NAME
00038 #endif
00039 
00040 #ifdef PACKAGE_BUGREPORT
00041 #undef PACKAGE_BUGREPORT
00042 #endif
00043 
00044 #ifdef PACKAGE_STRING
00045 #undef PACKAGE_STRING
00046 #endif
00047 
00048 #ifdef PACKAGE_TARNAME
00049 #undef PACKAGE_TARNAME
00050 #endif
00051 
00052 #ifdef PACKAGE_VERSION
00053 #undef PACKAGE_VERSION
00054 #endif
00055 
00056 #ifdef VERSION
00057 #undef VERSION
00058 #endif
00059 
00060 #ifdef F77_FUNC
00061 #undef F77_FUNC
00062 #endif
00063 
00064 #include "Amesos_config.h"
00065 #include "Epetra_ConfigDefs.h"
00066 #include <vector>
00067 
00068 #define AMESOS_PRINT(variable) { { \
00069                       if ( debug_ != 0) { std::cerr << "AMESOS_PRINT " << # variable << "= " << variable << ", " \
00070                            << __FILE__ << ", line " << __LINE__ << std::endl; }  }\
00071                    }
00072 
00073 // prints out an error message if variable is not zero,
00074 // and return this value. This is a copy of macro EPETRA_CHK_ERR,
00075 // here modified so that the user sees an "AMESOS ERROR" instead
00076 // of a possibly misleading "Epetra ERROR".
00077 
00078 #define AMESOS_CHK_ERR(a) { { int amesos_err = a; \
00079                               if ((amesos_err < 0 && Epetra_Object::GetTracebackMode() > 0) || \
00080                                   (amesos_err > 0 && Epetra_Object::GetTracebackMode() > 1)) { \
00081                       std::cerr << "AMESOS ERROR " << amesos_err << ", " \
00082                            << __FILE__ << ", line " << __LINE__ << std::endl; }\
00083                       if (amesos_err != 0) return(amesos_err);  }\
00084                    }
00085 //#define AMESOS_CHK_ERR(amesos_err) { EPETRA_CHK_ERR( amesos_err ) }
00086 
00087 // prints out an error message if variable is not zero,
00088 // returns void
00089 #define AMESOS_CHK_ERRV(amesos_err) \
00090 { if (amesos_err != 0) { \
00091   std::cerr << "AMESOS ERROR " << amesos_err << ", " \
00092     << __FILE__ << ", line " << __LINE__ << std::endl; \
00093     return;  } }
00094 
00095 // prints out an error message if variable is not zero,
00096 // returns void
00097 #define AMESOS_RETURN(amesos_err) \
00098 { \
00099   if (amesos_err != 0) \
00100     std::cerr << "AMESOS ERROR " << amesos_err << ", " \
00101       << __FILE__ << ", line " << __LINE__ << std::endl; \
00102   return(amesos_err);  }
00103 
00104 
00105 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines