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 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 EWARNF(FORMAT, ...)
 
#define EWARN(MSG)
 
#define ERRF(FORMAT, ...)
 
#define ERR(MSG)
 
#define ERR_SIMPLE(MSG)
 
#define MPI_CHECKF(MPI_STATUS, FORMAT, ...)
 
#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().

◆ DELIMITERS

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

Definition at line 115 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 190 of file iordef.h.

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

◆ ERRF

#define ERRF (   FORMAT,
  ... 
)
Value:
do { \
fprintf(stdout, "ior ERROR: " FORMAT ", errno %d, %s (%s:%d)\n", \
__VA_ARGS__, errno, strerror(errno), __FILE__, __LINE__); \
fflush(stdout); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} while (0)
int errno

Definition at line 175 of file iordef.h.

Referenced by POSIX_Close(), POSIX_Create(), POSIX_GetFileSize(), POSIX_Open(), POSIX_Xfer(), PrependDir(), and ValidateTests().

◆ EWARN

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

Definition at line 169 of file iordef.h.

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

◆ EWARNF

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

Definition at line 156 of file iordef.h.

Referenced by POSIX_Delete(), and POSIX_Fsync().

◆ FALSE

#define FALSE   0

◆ FILENAME_DELIMITER

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

Definition at line 116 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 119 of file iordef.h.

◆ IOR_format

#define IOR_format   "%016llx"

Definition at line 125 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 109 of file iordef.h.

Referenced by DistributeHints().

◆ MAX_RETRY

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

Definition at line 110 of file iordef.h.

Referenced by DFS_Xfer(), 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 
)

◆ MPI_CHECKF

#define MPI_CHECKF (   MPI_STATUS,
  FORMAT,
  ... 
)
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: " FORMAT ", MPI %s, (%s:%d)\n", \
__VA_ARGS__, resultString, __FILE__, __LINE__); \
fflush(stdout); \
MPI_Abort(MPI_COMM_WORLD, -1); \
} \
} while(0)

Definition at line 204 of file iordef.h.

Referenced by MPIIO_Delete().

◆ NULL

#define NULL   ((void *)0)

Definition at line 79 of file iordef.h.

Referenced by aiori_default(), aiori_select(), aiori_supported_apis(), airoi_create_all_module_options(), airoi_update_module_options(), aligned_buffer_alloc(), AllocResults(), bw_ops_values(), CEPHFS_Final(), CheckRunSettings(), collective_helper(), create_file(), create_remove_directory_tree(), createGlobalOptions(), CreateTest(), CurrentTimeString(), DAOS_Access(), DAOS_Close(), DAOS_Create(), DAOS_Delete(), DAOS_Fini(), DAOS_GetFileSize(), DAOS_Init(), DAOS_Open(), DAOS_Xfer(), DecodeDirective(), DestroyTests(), DFS_Access(), DFS_Create(), DFS_Delete(), DFS_Finalize(), DFS_GetFileSize(), DFS_Init(), DFS_Mkdir(), DFS_Open(), DFS_Rmdir(), DFS_Stat(), DFS_Xfer(), DistributeHints(), DUMMY_Create(), DUMMY_options(), DUMMY_Xfer(), ExtractHint(), file_hits_histogram(), FreeResults(), GetOffsetArrayRandom(), GetOffsetArraySequential(), GetTimeStamp(), Gfarm_create(), Gfarm_initialize(), Gfarm_open(), HandleDistribute(), HDF5_Close(), HDF5_Open(), HDF5_options(), HDFS_Create_Or_Open(), hdfs_disconnect(), HogMemory(), IME_Open(), IME_options(), init_IOR_Param_t(), init_or_fini(), InitTests(), ior_main(), ior_mmap_file(), ior_run(), lookup_insert_dir(), malloc_and_touch(), mdtest_init_args(), mdtest_iteration(), mdtest_read(), mdtest_run(), MMAP_Close(), MMAP_options(), MPIIO_Close(), NCMPI_Create(), NCMPI_Open(), option_parse(), option_parse_key_value(), option_parse_str(), option_parse_token(), parse_dirpath(), parse_filename(), ParseCommandLine(), ParseFileName(), ParseLine(), POSIX_Create(), POSIX_Open(), POSIX_options(), PrependDir(), print_help_section(), print_option_value(), print_value(), PrintHeader(), PrintKeyVal(), PrintLongSummaryAllTests(), PrintTimestamp(), RADOS_Access(), RADOS_Create_Or_Open(), RADOS_Delete(), RADOS_GetFileSize(), RADOS_Xfer(), ReadConfigScript(), ReadStoneWallingIterations(), S3_Close_internal(), S3_Create_Or_Open_internal(), safeMalloc(), SeedRandGen(), SetHints(), show_file_system_size(), ShowFileSystemSize(), StoreStoneWallingIterations(), TestIoSys(), updateParsedOptions(), and WriteOrReadSingle().

◆ PATH_MAX

#define PATH_MAX   4096

Definition at line 112 of file iordef.h.

Referenced by lookup_insert_dir(), and 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

◆ 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 106 of file iordef.h.

Referenced by CompareBuffers().

◆ 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(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 134 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(), WriteOrRead(), and WriteOrReadSingle().

Typedef Documentation

◆ IOR_offset_t

typedef long long int IOR_offset_t

Definition at line 122 of file iordef.h.

◆ IOR_size_t

typedef long long int IOR_size_t

Definition at line 123 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 59 of file utilities.c.