Amesos Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
Amesos_ConfigDefs.h
Go to the documentation of this file.
1// @HEADER
2// ***********************************************************************
3//
4// Amesos: Direct Sparse Solver Package
5// Copyright (2004) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// This library is free software; you can redistribute it and/or modify
11// it under the terms of the GNU Lesser General Public License as
12// published by the Free Software Foundation; either version 2.1 of the
13// License, or (at your option) any later version.
14//
15// This library is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18// Lesser General Public License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23// USA
24// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25//
26// ***********************************************************************
27// @HEADER
28
29#ifndef AMESOS_CONFIGDEFS
30#define AMESOS_CONFIGDEFS
31
32#ifdef PACKAGE
33#undef PACKAGE
34#endif
35
36#ifdef PACKAGE_NAME
37#undef PACKAGE_NAME
38#endif
39
40#ifdef PACKAGE_BUGREPORT
41#undef PACKAGE_BUGREPORT
42#endif
43
44#ifdef PACKAGE_STRING
45#undef PACKAGE_STRING
46#endif
47
48#ifdef PACKAGE_TARNAME
49#undef PACKAGE_TARNAME
50#endif
51
52#ifdef PACKAGE_VERSION
53#undef PACKAGE_VERSION
54#endif
55
56#ifdef VERSION
57#undef VERSION
58#endif
59
60#ifdef F77_FUNC
61#undef F77_FUNC
62#endif
63
64#include "Amesos_config.h"
65#include "Epetra_ConfigDefs.h"
66#include <vector>
67
68#define AMESOS_PRINT(variable) { { \
69 if ( debug_ != 0) { std::cerr << "AMESOS_PRINT " << # variable << "= " << variable << ", " \
70 << __FILE__ << ", line " << __LINE__ << std::endl; } }\
71 }
72
73// prints out an error message if variable is not zero,
74// and return this value. This is a copy of macro EPETRA_CHK_ERR,
75// here modified so that the user sees an "AMESOS ERROR" instead
76// of a possibly misleading "Epetra ERROR".
77
78#define AMESOS_CHK_ERR(a) { { int amesos_err = a; \
79 if ((amesos_err < 0 && Epetra_Object::GetTracebackMode() > 0) || \
80 (amesos_err > 0 && Epetra_Object::GetTracebackMode() > 1)) { \
81 std::cerr << "AMESOS ERROR " << amesos_err << ", " \
82 << __FILE__ << ", line " << __LINE__ << std::endl; }\
83 if (amesos_err != 0) return(amesos_err); }\
84 }
85//#define AMESOS_CHK_ERR(amesos_err) { EPETRA_CHK_ERR( amesos_err ) }
86
87// prints out an error message if variable is not zero,
88// returns void
89#define AMESOS_CHK_ERRV(amesos_err) \
90{ if (amesos_err != 0) { \
91 std::cerr << "AMESOS ERROR " << amesos_err << ", " \
92 << __FILE__ << ", line " << __LINE__ << std::endl; \
93 return; } }
94
95// prints out an error message if variable is not zero,
96// returns void
97#define AMESOS_RETURN(amesos_err) \
98{ \
99 if (amesos_err != 0) \
100 std::cerr << "AMESOS ERROR " << amesos_err << ", " \
101 << __FILE__ << ", line " << __LINE__ << std::endl; \
102 return(amesos_err); }
103
104
105#endif