IOR
Macros | Functions | Variables
aiori-debug.h File Reference
#include <stdio.h>
#include <mpi.h>
Include dependency graph for aiori-debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FAIL(...)   FailMessage(rank, ERROR_LOCATION, __VA_ARGS__)
 
#define WARN_RESET(MSG, TO_STRUCT_PTR, FROM_STRUCT_PTR, MEMBER)
 
#define WARN(MSG)
 
#define EWARNF(FORMAT, ...)
 
#define EWARN(MSG)
 
#define EINFO(FORMAT, ...)
 
#define ERRF(FORMAT, ...)
 
#define ERR_ERRNO(MSG)
 
#define ERR(MSG)
 
#define MPI_CHECKF(MPI_STATUS, FORMAT, ...)
 
#define MPI_CHECK(MPI_STATUS, MSG)
 

Functions

void FailMessage (int rank, const char *location, char *format,...)
 

Variables

FILE * out_logfile
 
int verbose
 
int aiori_warning_as_errors
 

Macro Definition Documentation

◆ EINFO

#define EINFO (   FORMAT,
  ... 
)
Value:
do { \
if (verbose > VERBOSE_2) { \
fprintf(out_logfile, "INFO: " FORMAT ", (%s:%d).\n", \
__VA_ARGS__, __FILE__, __LINE__); \
} else { \
fprintf(out_logfile, "INFO: " FORMAT "\n", \
__VA_ARGS__); \
} \
fflush(out_logfile); \
} while (0)
FILE * out_logfile
Definition: utilities.c:72
#define VERBOSE_2
Definition: iordef.h:94
int verbose
Definition: utilities.c:70

Definition at line 65 of file aiori-debug.h.

Referenced by POSIX_Open(), and POSIX_Xfer().

◆ ERR

#define ERR (   MSG)

◆ ERR_ERRNO

#define ERR_ERRNO (   MSG)
Value:
do { \
ERRF("%s", MSG); \
} while (0)

Definition at line 86 of file aiori-debug.h.

◆ ERRF

#define ERRF (   FORMAT,
  ... 
)
Value:
do { \
fprintf(out_logfile, "ERROR: " FORMAT ", (%s:%d)\n", \
__VA_ARGS__, __FILE__, __LINE__); \
fflush(out_logfile); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} while (0)
FILE * out_logfile
Definition: utilities.c:72

Definition at line 77 of file aiori-debug.h.

Referenced by aio_check_params(), aio_initialize(), complete_all(), compute_histogram(), HDF5_check_params(), IME_Close(), IME_GetFileSize(), POSIX_check_params(), POSIX_Close(), POSIX_Create(), POSIX_GetFileSize(), POSIX_Open(), POSIX_Xfer(), PrependDir(), return_position(), run_benchmark(), run_precreate(), store_position(), and submit_pending().

◆ EWARN

#define EWARN (   MSG)
Value:
do { \
EWARNF("%s", MSG); \
} while (0)

Definition at line 59 of file aiori-debug.h.

Referenced by CheckFileSize(), GetPlatformName(), HDFS_Delete(), HDFS_Fsync(), MMAP_Fsync(), MPIIO_Fsync(), POSIX_Create(), and PrintHeader().

◆ EWARNF

#define EWARNF (   FORMAT,
  ... 
)
Value:
do { \
if(aiori_warning_as_errors){ ERRF(FORMAT, __VA_ARGS__); } \
if (verbose > VERBOSE_2) { \
fprintf(out_logfile, "WARNING: " FORMAT ", (%s:%d).\n", \
__VA_ARGS__, __FILE__, __LINE__); \
} else { \
fprintf(out_logfile, "WARNING: " FORMAT "\n", \
__VA_ARGS__); \
} \
fflush(out_logfile); \
} while (0)
#define ERRF(FORMAT,...)
Definition: aiori-debug.h:77
FILE * out_logfile
Definition: utilities.c:72
#define VERBOSE_2
Definition: iordef.h:94
int verbose
Definition: utilities.c:70
int aiori_warning_as_errors
Definition: ior.c:85

Definition at line 45 of file aiori-debug.h.

Referenced by CheckFileSize(), collective_helper(), CompareData(), CountErrors(), create_file(), create_remove_directory_tree(), create_remove_dirs(), DisplayOutliers(), IME_Delete(), InitTests(), md_workbench_run(), mdtest_iteration(), mdtest_read(), mdtest_run(), mdtest_stat(), POSIX_check_params(), POSIX_Delete(), POSIX_Fsync(), POSIX_Rename(), POSIX_Xfer(), rename_dir_test(), run_benchmark(), test_initialize(), and TestIoSys().

◆ FAIL

#define FAIL (   ...)    FailMessage(rank, ERROR_LOCATION, __VA_ARGS__)

◆ MPI_CHECK

#define MPI_CHECK (   MPI_STATUS,
  MSG 
)

◆ MPI_CHECKF

#define MPI_CHECKF (   MPI_STATUS,
  FORMAT,
  ... 
)
Value:
do { \
char resultString[MPI_MAX_ERROR_STRING]; \
int resultLength; \
int checkf_mpi_status = MPI_STATUS; \
\
if (checkf_mpi_status != MPI_SUCCESS) { \
MPI_Error_string(checkf_mpi_status, resultString, &resultLength);\
fprintf(out_logfile, "ERROR: " FORMAT ", MPI %s, (%s:%d)\n", \
__VA_ARGS__, resultString, __FILE__, __LINE__); \
fflush(out_logfile); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} \
} while(0)
FILE * out_logfile
Definition: utilities.c:72

Definition at line 106 of file aiori-debug.h.

Referenced by MPIIO_Delete(), and MPIIO_Open().

◆ WARN

#define WARN (   MSG)

◆ WARN_RESET

#define WARN_RESET (   MSG,
  TO_STRUCT_PTR,
  FROM_STRUCT_PTR,
  MEMBER 
)
Value:
do { \
(TO_STRUCT_PTR)->MEMBER = (FROM_STRUCT_PTR)->MEMBER; \
if (rank == 0) { \
fprintf(out_logfile, "WARNING: %s. Using value of %d.\n", \
MSG, (TO_STRUCT_PTR)->MEMBER); \
} \
fflush(out_logfile); \
} while (0)
FILE * out_logfile
Definition: utilities.c:72
int rank
Definition: utilities.c:68

Definition at line 21 of file aiori-debug.h.

Referenced by ValidateTests().

Function Documentation

◆ FailMessage()

void FailMessage ( int  rank,
const char *  location,
char *  format,
  ... 
)

Definition at line 134 of file utilities.c.

References out_logfile, PrintTimestamp(), and testComm.

Here is the call graph for this function:

Variable Documentation

◆ aiori_warning_as_errors

int aiori_warning_as_errors

Definition at line 85 of file ior.c.

Referenced by InitTests(), mdtest_run(), and test_initialize().

◆ out_logfile

FILE* out_logfile

◆ verbose

int verbose