00001 #ifndef FUPERMOD_DEBUG_H_
00002 #define FUPERMOD_DEBUG_H_
00003
00004 #include <stdio.h>
00005 #include <libgen.h>
00006
00013 #define DEBUG_MPI 0
00014 #define DEBUG 0
00015 #define CHECK_25D 1
00016 #define CHECK_CANNON 1
00017 #define NOT_USED(x) ( (void)(x) )
00018
00019 #define info_print(level, row, col, fmt, args...) \
00020 do { if (level <= DEBUG) fprintf(stderr, "%s:%d:%s(): processor (%zu,%zu) " fmt,\
00021 basename(__FILE__), \
00022 __LINE__, __func__, row, col, \
00023 ##args); \
00024 } while (0)
00025
00026 #if DEBUG
00027 #define debug_print(level, row, col, fmt, args...) \
00028 do {
00029 } while (0)
00030 #else
00031
00032 #define debug_print(level, row, col, fmt, args...) \
00033 do { if (level <= DEBUG) fprintf(stderr, "%s:%d:%s(): processor (%zu,%zu) " fmt,\
00034 basename(__FILE__), \
00035 __LINE__, __func__, row, col, \
00036 ##args); \
00037 } while (0)
00038 #endif
00039
00040 #define debug_print_rank(level, rank, fmt, args...) \
00041 do { if (level <= DEBUG) fprintf(stderr, "%s:%d:%s(): processor (%zu) " fmt,\
00042 basename(__FILE__), \
00043 __LINE__, __func__, rank, \
00044 ##args); \
00045 } while (0)
00046
00051 #endif