IOR
Macros | Typedefs | Enumerations | Variables
iordef.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <mpi.h>
#include <sys/param.h>
#include <unistd.h>
#include <limits.h>
Include dependency graph for iordef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FALSE   0
 
#define TRUE   1
 
#define NULL   ((void *)0)
 
#define KILOBYTE   1000
 
#define MEGABYTE   1000000
 
#define GIGABYTE   1000000000
 
#define KIBIBYTE   (1 << 10)
 
#define MEBIBYTE   (1 << 20)
 
#define GIBIBYTE   (1 << 30)
 
#define BASE_TWO   0
 
#define BASE_TEN   1
 
#define WRITE   0
 
#define WRITECHECK   1
 
#define READ   2
 
#define READCHECK   3
 
#define CHECK   4
 
#define VERBOSE_0   0
 
#define VERBOSE_1   1
 
#define VERBOSE_2   2
 
#define VERBOSE_3   3
 
#define VERBOSE_4   4
 
#define VERBOSE_5   5
 
#define MAX_STR   1024 /* max string length */
 
#define MAX_HINTS   16 /* max number of hints */
 
#define MAX_RETRY   10000 /* max retries for POSIX xfer */
 
#define PATH_MAX   4096
 
#define DELIMITERS   " \t\r\n=" /* ReadScript() */
 
#define FILENAME_DELIMITER   '@' /* ParseFileName() */
 
#define HERE
 
#define IOR_format   "%016llx"
 
#define WARN_RESET(MSG, TO_STRUCT_PTR, FROM_STRUCT_PTR, MEMBER)
 
#define WARN(MSG)
 
#define EWARN(MSG)
 
#define ERR(MSG)
 
#define ERR_SIMPLE(MSG)
 
#define MPI_CHECK(MPI_STATUS, MSG)
 

Typedefs

typedef long long int IOR_offset_t
 
typedef long long int IOR_size_t
 

Enumerations

enum  OutputFormat_t { OUTPUT_DEFAULT, OUTPUT_CSV, OUTPUT_JSON }
 

Variables

int numTasks
 
int rank
 
int rankOffset
 
int verbose
 

Macro Definition Documentation

◆ BASE_TEN

#define BASE_TEN   1

Definition at line 92 of file iordef.h.

Referenced by HumanReadable().

◆ BASE_TWO

#define BASE_TWO   0

Definition at line 91 of file iordef.h.

Referenced by HumanReadable(), and ShowSetup().

◆ CHECK

#define CHECK   4

Definition at line 99 of file iordef.h.

◆ DELIMITERS

#define DELIMITERS   " \t\r\n=" /* ReadScript() */

Definition at line 116 of file iordef.h.

◆ ERR

#define ERR (   MSG)

◆ ERR_SIMPLE

#define ERR_SIMPLE (   MSG)
Value:
do { \
fprintf(stdout, "ior ERROR: %s, (%s:%d)\n", \
MSG, __FILE__, __LINE__); \
fflush(stdout); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} while (0)

Definition at line 178 of file iordef.h.

Referenced by hdfs_connect(), HDFS_Delete(), HDFS_GetFileSize(), ParseCommandLine(), S3_Close_internal(), S3_Create_Or_Open_internal(), S3_Xfer_internal(), and TestIoSys().

◆ EWARN

#define EWARN (   MSG)
Value:
do { \
if (verbose > VERBOSE_2) { \
fprintf(stdout, "ior WARNING: %s, errno %d, %s (%s:%d).\n", \
MSG, errno, strerror(errno), __FILE__, __LINE__); \
} else { \
fprintf(stdout, "ior WARNING: %s, errno %d, %s \n", \
MSG, errno, strerror(errno)); \
} \
fflush(stdout); \
} while (0)
int verbose
Definition: utilities.c:60
#define VERBOSE_2
Definition: iordef.h:104
int errno

Definition at line 156 of file iordef.h.

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

◆ FALSE

#define FALSE   0

◆ FILENAME_DELIMITER

#define FILENAME_DELIMITER   '@' /* ParseFileName() */

Definition at line 117 of file iordef.h.

Referenced by ParseFileName().

◆ GIBIBYTE

#define GIBIBYTE   (1 << 30)

Definition at line 88 of file iordef.h.

Referenced by HumanReadable(), and ValidateTests().

◆ GIGABYTE

#define GIGABYTE   1000000000

Definition at line 84 of file iordef.h.

Referenced by HumanReadable().

◆ HERE

#define HERE
Value:
fprintf(stdout, "** LINE %d (TASK=%d) **\n", \
__LINE__, rank);
int rank
Definition: utilities.c:57

Definition at line 120 of file iordef.h.

◆ IOR_format

#define IOR_format   "%016llx"

Definition at line 126 of file iordef.h.

Referenced by DumpBuffer().

◆ KIBIBYTE

#define KIBIBYTE   (1 << 10)

Definition at line 86 of file iordef.h.

Referenced by PrintReducedResult().

◆ KILOBYTE

#define KILOBYTE   1000

Definition at line 82 of file iordef.h.

◆ MAX_HINTS

#define MAX_HINTS   16 /* max number of hints */

Definition at line 110 of file iordef.h.

Referenced by DistributeHints().

◆ MAX_RETRY

#define MAX_RETRY   10000 /* max retries for POSIX xfer */

Definition at line 111 of file iordef.h.

Referenced by HDFS_Xfer(), IME_Xfer(), and POSIX_Xfer().

◆ MAX_STR

#define MAX_STR   1024 /* max string length */

◆ MEBIBYTE

#define MEBIBYTE   (1 << 20)

◆ MEGABYTE

#define MEGABYTE   1000000

Definition at line 83 of file iordef.h.

Referenced by HumanReadable(), and PrintShortSummary().

◆ MPI_CHECK

#define MPI_CHECK (   MPI_STATUS,
  MSG 
)
Value:
do { \
char resultString[MPI_MAX_ERROR_STRING]; \
int resultLength; \
\
if (MPI_STATUS != MPI_SUCCESS) { \
MPI_Error_string(MPI_STATUS, resultString, &resultLength); \
fprintf(stdout, "ior ERROR: %s, MPI %s, (%s:%d)\n", \
MSG, resultString, __FILE__, __LINE__); \
fflush(stdout); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} \
} while(0)

Definition at line 192 of file iordef.h.

Referenced by CheckFileSize(), CountErrors(), DecodeDirective(), DisplayOutliers(), DistributeHints(), file_hits_histogram(), HDF5_Open(), HDFS_Create_Or_Open(), HDFS_GetFileSize(), HDFS_Xfer(), IME_GetFileSize(), IME_Xfer(), InitTests(), ior_main(), ior_run(), MPIIO_Close(), MPIIO_Delete(), MPIIO_GetFileSize(), MPIIO_GetVersion(), MPIIO_Xfer(), POSIX_Create(), POSIX_GetFileSize(), POSIX_Xfer(), RADOS_GetFileSize(), ReduceIterResults(), S3_Close_internal(), s3_connect(), S3_GetFileSize(), SeedRandGen(), SeekOffset(), SetHints(), ShowHints(), TestIoSys(), TimeDeviation(), and WriteOrRead().

◆ NULL

#define NULL   ((void *)0)

◆ PATH_MAX

#define PATH_MAX   4096

Definition at line 113 of file iordef.h.

Referenced by ShowFileSystemSize().

◆ READ

#define READ   2

◆ READCHECK

#define READCHECK   3

Definition at line 98 of file iordef.h.

Referenced by CompareBuffers(), HDF5_Xfer(), NCMPI_Xfer(), TestIoSys(), and WriteOrReadSingle().

◆ TRUE

#define TRUE   1

◆ VERBOSE_0

#define VERBOSE_0   0

◆ VERBOSE_1

#define VERBOSE_1   1

Definition at line 103 of file iordef.h.

Referenced by DelaySecs(), POSIX_Open(), PrintHeader(), SetupDataSet(), TestIoSys(), and WriteOrRead().

◆ VERBOSE_2

#define VERBOSE_2   2

◆ VERBOSE_3

#define VERBOSE_3   3

◆ VERBOSE_4

#define VERBOSE_4   4

◆ VERBOSE_5

#define VERBOSE_5   5

Definition at line 107 of file iordef.h.

Referenced by CompareBuffers().

◆ WARN

#define WARN (   MSG)
Value:
do { \
if (verbose > VERBOSE_2) { \
fprintf(stdout, "ior WARNING: %s, (%s:%d).\n", \
MSG, __FILE__, __LINE__); \
} else { \
fprintf(stdout, "ior WARNING: %s.\n", MSG); \
} \
fflush(stdout); \
} while (0)
int verbose
Definition: utilities.c:60
#define VERBOSE_2
Definition: iordef.h:104

Definition at line 145 of file iordef.h.

Referenced by aiori_select(), CountErrors(), DistributeHints(), HDF5_GetVersion(), HDF5_Open(), HDFS_GetFileSize(), hdfs_set_o_direct_flag(), IME_Delete(), IME_Fsync(), IME_GetFileSize(), IME_MkDir(), IME_RmDir(), IME_StatFS(), MPIIO_GetFileSize(), POSIX_GetFileSize(), RADOS_Create_Or_Open(), RADOS_GetFileSize(), RADOS_MkDir(), RADOS_RmDir(), RADOS_Stat(), RADOS_StatFS(), S3_GetFileSize(), S3_Xfer_internal(), set_o_direct_flag(), SetHints(), SetupDataSet(), and ValidateTests().

◆ 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(stdout, "ior WARNING: %s. Using value of %d.\n", \
MSG, (TO_STRUCT_PTR)->MEMBER); \
} \
fflush(stdout); \
} while (0)
int rank
Definition: utilities.c:57

Definition at line 135 of file iordef.h.

Referenced by ValidateTests().

◆ WRITE

#define WRITE   0

◆ WRITECHECK

#define WRITECHECK   1

Definition at line 96 of file iordef.h.

Referenced by CompareBuffers(), CountErrors(), TestIoSys(), and WriteOrReadSingle().

Typedef Documentation

◆ IOR_offset_t

typedef long long int IOR_offset_t

Definition at line 123 of file iordef.h.

◆ IOR_size_t

typedef long long int IOR_size_t

Definition at line 124 of file iordef.h.

Enumeration Type Documentation

◆ OutputFormat_t

Enumerator
OUTPUT_DEFAULT 
OUTPUT_CSV 
OUTPUT_JSON 

Definition at line 64 of file iordef.h.

Variable Documentation

◆ numTasks

int numTasks

◆ rank

int rank

Definition at line 57 of file utilities.c.

◆ rankOffset

int rankOffset

Definition at line 58 of file utilities.c.

◆ verbose

int verbose

Definition at line 60 of file utilities.c.