defines macros for run termination or for warnings
More...
Go to the source code of this file.
defines macros for run termination or for warnings
Definition in file macros.h.
◆ Terminate
Value: { \
{ \
char termbuf1__[8000], termbuf2__[8000]; \
int thistask; \
MPI_Comm_rank(MPI_COMM_WORLD, &thistask); \
sprintf(termbuf1__, "Code termination on task=%d, function %s(), file %s, line %d", thistask, __FUNCTION__, __FILE__, \
__LINE__); \
sprintf(termbuf2__, __VA_ARGS__); \
printf("%s: %s\n", termbuf1__, termbuf2__); \
fflush(stdout); \
MPI_Abort(MPI_COMM_WORLD, 1); \
} \
exit(0); \
}
Definition at line 15 of file macros.h.
◆ warn
Value: { \
char termbuf1__[8000], termbuf2__[8000]; \
int thistask; \
MPI_Comm_rank(MPI_COMM_WORLD, &thistask); \
sprintf(termbuf1__, "Code warning on task=%d, function %s(), file %s, line %d", thistask, __FUNCTION__, __FILE__, __LINE__); \
sprintf(termbuf2__, __VA_ARGS__); \
printf("%s: %s\n", termbuf1__, termbuf2__); \
myflush(stdout); \
FILE *fd__ = fopen("WARNINGS", "w"); \
fclose(fd__); \
}
Definition at line 30 of file macros.h.