46 #if defined(Ifpack_SHOW_DEPRECATED_WARNINGS)
48 #warning "The Ifpack package is deprecated"
53 #define FMAX(a,b) ((FABS(a)) > (FABS(b)) ? (FABS(a)) : (FABS(b)))
57 #define MAX(a,b) ((a) > (b) ? (a) : (b))
61 #define MIN(a,b) ((a)<(b)?(a):(b))
65 #define ABS(x) (((x)<0)?(-(x)):(x))
69 #define FABS(a) ((a) < 0 ? -(a) : a)
73 #define _MATLAB_ZERO_ 1e-100
83 #define ASSERT_DH(ptr) \
86 sprintf(msgBuf_dh, "%s is NULL", ptr); \
87 SET_V_ERROR(msgBuf_dh); \
93 #define CHECK_MPI_V_ERROR(errCode) \
97 MPI_Error_string(errCode, msgBuf_dh, &len); \
98 setError_dh(msgBuf_dh, __FUNC__, __FILE__, __LINE__); \
103 #define CHECK_MPI_ERROR(errCode) \
107 MPI_Error_string(errCode, msgBuf_dh, &len); \
108 setError_dh(msgBuf_dh, __FUNC__, __FILE__, __LINE__); \
114 #define CHECK_MPI_V_ERROR(errCode) \
117 setError_dh("MPI error!", __FUNC__, __FILE__, __LINE__); \
118 printErrorMsg(stderr); \
119 MPI_Abort(comm_dh, -1); \
123 #define CHECK_MPI_ERROR(errCode) \
126 setError_dh("MPI error!", __FUNC__, __FILE__, __LINE__); \
127 printErrorMsg(stderr); \
128 MPI_Abort(comm_dh, -1); \
132 #define SET_V_ERROR(msg) \
133 { setError_dh(msg, __FUNC__, __FILE__, __LINE__); \
134 printErrorMsg(stderr); \
135 MPI_Abort(comm_dh, -1); \
138 #define SET_ERROR(retval, msg) \
139 { setError_dh(msg, __FUNC__, __FILE__, __LINE__); \
140 printErrorMsg(stderr); \
141 MPI_Abort(comm_dh, -1); \
144 #define CHECK_V_ERROR \
146 setError_dh("", __FUNC__, __FILE__, __LINE__); \
147 printErrorMsg(stderr); \
148 MPI_Abort(comm_dh, -1); \
151 #define CHECK_ERROR(retval) \
153 setError_dh("", __FUNC__, __FILE__, __LINE__); \
154 printErrorMsg(stderr); \
155 MPI_Abort(comm_dh, -1); \
162 #define SET_INFO(msg) setInfo_dh(msg, __FUNC__, __FILE__, __LINE__);
169 #define START_FUNC_DH \
170 dh_StartFunc(__FUNC__, __FILE__, __LINE__, 1); \
173 #define END_FUNC_DH \
175 dh_EndFunc(__FUNC__, 1);
177 #define END_FUNC_VAL(a) \
178 dh_EndFunc(__FUNC__, 1); \
182 #define START_FUNC_DH_2
183 #define END_FUNC_DH_2
184 #define END_FUNC_VAL_2(a) return a ;
187 #define START_FUNC_DH \
188 dh_StartFunc(__FUNC__, __FILE__, __LINE__, 1); \
189 if (logFuncsToStderr || logFuncsToFile)\
190 Error_dhStartFunc(__FUNC__, __FILE__, __LINE__); \
193 #define END_FUNC_DH \
194 dh_EndFunc(__FUNC__, 1); \
195 if (logFuncsToStderr || logFuncsToFile) \
196 Error_dhEndFunc(__FUNC__); \
200 #define START_FUNC_DH_2 \
201 dh_StartFunc(__FUNC__, __FILE__, __LINE__, 2); \
202 if (logFuncsToStderr || logFuncsToFile)\
203 Error_dhStartFunc(__FUNC__, __FILE__, __LINE__); \
206 #define END_FUNC_DH_2 \
207 dh_EndFunc(__FUNC__, 2); \
208 if (logFuncsToStderr || logFuncsToFile) \
209 Error_dhEndFunc(__FUNC__); \
214 #define END_FUNC_VAL(retval) \
215 dh_EndFunc(__FUNC__, 1); \
216 if (logFuncsToStderr || logFuncsToFile) \
217 Error_dhEndFunc(__FUNC__); \
221 #define END_FUNC_VAL_2(retval) \
222 dh_EndFunc(__FUNC__, 2); \
223 if (logFuncsToStderr || logFuncsToFile) \
224 Error_dhEndFunc(__FUNC__); \