25 # define _CRT_SECURE_NO_WARNINGS 27 # pragma warning(4 : 4996) 28 # pragma warning(4 : 4267) 29 # pragma warning(4 : 4244) 40 # define lseek _lseeki64 41 # define fsync _commit 42 # define mkdir(dir, mode) _mkdir(dir) 43 # define strcasecmp _stricmp 44 # define strncasecmp _strnicmp 45 # define srandom srand 46 # define random() (rand() * (RAND_MAX+1) + rand()) 47 # define sleep(X) Sleep((X)*1000) 48 # define getpagesize() 4096 50 # include <sys/param.h> 79 # define NULL ((void *)0) 83 #define MEGABYTE 1000000 84 #define GIGABYTE 1000000000 86 #define KIBIBYTE (1 << 10) 87 #define MEBIBYTE (1 << 20) 88 #define GIBIBYTE (1 << 30) 111 #define MAX_RETRY 10000 113 #define PATH_MAX 4096 116 #define DELIMITERS " \t\r\n=" 117 #define FILENAME_DELIMITER '@' 120 #define HERE fprintf(stdout, "** LINE %d (TASK=%d) **\n", \ 126 #define IOR_format "%016llx" 135 #define WARN_RESET(MSG, TO_STRUCT_PTR, FROM_STRUCT_PTR, MEMBER) do { \ 136 (TO_STRUCT_PTR)->MEMBER = (FROM_STRUCT_PTR)->MEMBER; \ 138 fprintf(stdout, "ior WARNING: %s. Using value of %d.\n", \ 139 MSG, (TO_STRUCT_PTR)->MEMBER); \ 145 #define WARN(MSG) do { \ 146 if (verbose > VERBOSE_2) { \ 147 fprintf(stdout, "ior WARNING: %s, (%s:%d).\n", \ 148 MSG, __FILE__, __LINE__); \ 150 fprintf(stdout, "ior WARNING: %s.\n", MSG); \ 156 #define EWARN(MSG) do { \ 157 if (verbose > VERBOSE_2) { \ 158 fprintf(stdout, "ior WARNING: %s, errno %d, %s (%s:%d).\n", \ 159 MSG, errno, strerror(errno), __FILE__, __LINE__); \ 161 fprintf(stdout, "ior WARNING: %s, errno %d, %s \n", \ 162 MSG, errno, strerror(errno)); \ 169 #define ERR(MSG) do { \ 170 fprintf(stdout, "ior ERROR: %s, errno %d, %s (%s:%d)\n", \ 171 MSG, errno, strerror(errno), __FILE__, __LINE__); \ 173 MPI_Abort(MPI_COMM_WORLD, -1); \ 178 #define ERR_SIMPLE(MSG) do { \ 179 fprintf(stdout, "ior ERROR: %s, (%s:%d)\n", \ 180 MSG, __FILE__, __LINE__); \ 182 MPI_Abort(MPI_COMM_WORLD, -1); \ 192 #define MPI_CHECK(MPI_STATUS, MSG) do { \ 193 char resultString[MPI_MAX_ERROR_STRING]; \ 196 if (MPI_STATUS != MPI_SUCCESS) { \ 197 MPI_Error_string(MPI_STATUS, resultString, &resultLength); \ 198 fprintf(stdout, "ior ERROR: %s, MPI %s, (%s:%d)\n", \ 199 MSG, resultString, __FILE__, __LINE__); \ 201 MPI_Abort(MPI_COMM_WORLD, -1); \ 221 extern int uname(
struct utsname *name);
long long int IOR_offset_t