IOR
aiori-HDF5.c
Go to the documentation of this file.
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4 /******************************************************************************\
5 * *
6 * Copyright (c) 2003, The Regents of the University of California *
7 * See the file COPYRIGHT for a complete copyright notice and license. *
8 * *
9 ********************************************************************************
10 *
11 * Implement abstract I/O interface for HDF5.
12 *
13 \******************************************************************************/
14 
15 #ifdef HAVE_CONFIG_H
16 #include "config.h"
17 #endif
18 
19 #include <stdio.h> /* only for fprintf() */
20 #include <stdlib.h>
21 #include <sys/stat.h>
22 /* HDF5 routines here still use the old 1.6 style. Nothing wrong with that but
23  * save users the trouble of passing this flag through configure */
24 #define H5_USE_16_API
25 #include <hdf5.h>
26 #include <mpi.h>
27 
28 #include "aiori.h" /* abstract IOR interface */
29 #include "utilities.h"
30 #include "iordef.h"
31 
32 #define NUM_DIMS 1 /* number of dimensions to data set */
33 
34 /******************************************************************************/
35 /*
36  * HDF5_CHECK will display a custom error message and then exit the program
37  */
38 
39 /*
40  * should use MPI_Abort(), not exit(), in this macro; some versions of
41  * MPI, however, hang with HDF5 property lists et al. left unclosed
42  */
43 
44 /*
45  * for versions later than hdf5-1.6, the H5Eget_[major|minor]() functions
46  * have been deprecated and replaced with H5Eget_msg()
47  */
48 #if H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6
49 #define HDF5_CHECK(HDF5_RETURN, MSG) do { \
50  char resultString[1024]; \
51  \
52  if (HDF5_RETURN < 0) { \
53  fprintf(stdout, "** error **\n"); \
54  fprintf(stdout, "ERROR in %s (line %d): %s.\n", \
55  __FILE__, __LINE__, MSG); \
56  strcpy(resultString, H5Eget_major((H5E_major_t)HDF5_RETURN)); \
57  if (strcmp(resultString, "Invalid major error number") != 0) \
58  fprintf(stdout, "HDF5 %s\n", resultString); \
59  strcpy(resultString, H5Eget_minor((H5E_minor_t)HDF5_RETURN)); \
60  if (strcmp(resultString, "Invalid minor error number") != 0) \
61  fprintf(stdout, "%s\n", resultString); \
62  fprintf(stdout, "** exiting **\n"); \
63  exit(-1); \
64  } \
65 } while(0)
66 #else /* ! (H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6) */
67 #define HDF5_CHECK(HDF5_RETURN, MSG) do { \
68  \
69  if (HDF5_RETURN < 0) { \
70  fprintf(stdout, "** error **\n"); \
71  fprintf(stdout, "ERROR in %s (line %d): %s.\n", \
72  __FILE__, __LINE__, MSG); \
73  /* \
74  * H5Eget_msg(hid_t mesg_id, H5E_type_t* mesg_type, \
75  * char* mesg, size_t size) \
76  */ \
77  fprintf(stdout, "** exiting **\n"); \
78  exit(-1); \
79  } \
80 } while(0)
81 #endif /* H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6 */
82 /**************************** P R O T O T Y P E S *****************************/
83 
85 static void SetupDataSet(void *, IOR_param_t *);
86 static void *HDF5_Create(char *, IOR_param_t *);
87 static void *HDF5_Open(char *, IOR_param_t *);
88 static IOR_offset_t HDF5_Xfer(int, void *, IOR_size_t *,
90 static void HDF5_Close(void *, IOR_param_t *);
91 static void HDF5_Delete(char *, IOR_param_t *);
92 static char* HDF5_GetVersion();
93 static void HDF5_Fsync(void *, IOR_param_t *);
94 static IOR_offset_t HDF5_GetFileSize(IOR_param_t *, MPI_Comm, char *);
95 static int HDF5_Access(const char *, int, IOR_param_t *);
96 
97 /************************** D E C L A R A T I O N S ***************************/
98 
100  .name = "HDF5",
101  .create = HDF5_Create,
102  .open = HDF5_Open,
103  .xfer = HDF5_Xfer,
104  .close = HDF5_Close,
105  .delete = HDF5_Delete,
106  .get_version = HDF5_GetVersion,
107  .fsync = HDF5_Fsync,
108  .get_file_size = HDF5_GetFileSize,
109  .statfs = aiori_posix_statfs,
110  .mkdir = aiori_posix_mkdir,
111  .rmdir = aiori_posix_rmdir,
112  .access = HDF5_Access,
113  .stat = aiori_posix_stat,
114 };
115 
116 static hid_t xferPropList; /* xfer property list */
117 hid_t dataSet; /* data set id */
118 hid_t dataSpace; /* data space id */
119 hid_t fileDataSpace; /* file data space id */
120 hid_t memDataSpace; /* memory data space id */
121 int newlyOpenedFile; /* newly opened file */
122 
123 /***************************** F U N C T I O N S ******************************/
124 
125 /*
126  * Create and open a file through the HDF5 interface.
127  */
128 static void *HDF5_Create(char *testFileName, IOR_param_t * param)
129 {
130  return HDF5_Open(testFileName, param);
131 }
132 
133 /*
134  * Open a file through the HDF5 interface.
135  */
136 static void *HDF5_Open(char *testFileName, IOR_param_t * param)
137 {
138  hid_t accessPropList, createPropList;
139  hsize_t memStart[NUM_DIMS],
140  dataSetDims[NUM_DIMS],
141  memStride[NUM_DIMS],
142  memCount[NUM_DIMS], memBlock[NUM_DIMS], memDataSpaceDims[NUM_DIMS];
143  int tasksPerDataSet;
144  unsigned fd_mode = (unsigned)0;
145  hid_t *fd;
146  MPI_Comm comm;
147  MPI_Info mpiHints = MPI_INFO_NULL;
148 
149  fd = (hid_t *) malloc(sizeof(hid_t));
150  if (fd == NULL)
151  ERR("malloc() failed");
152  /*
153  * HDF5 uses different flags than those for POSIX/MPIIO
154  */
155  if (param->open == WRITE) { /* WRITE flags */
156  param->openFlags = IOR_TRUNC;
157  } else { /* READ or check WRITE/READ flags */
158  param->openFlags = IOR_RDONLY;
159  }
160 
161  /* set IOR file flags to HDF5 flags */
162  /* -- file open flags -- */
163  if (param->openFlags & IOR_RDONLY) {
164  fd_mode |= H5F_ACC_RDONLY;
165  }
166  if (param->openFlags & IOR_WRONLY) {
167  fprintf(stdout, "File write only not implemented in HDF5\n");
168  }
169  if (param->openFlags & IOR_RDWR) {
170  fd_mode |= H5F_ACC_RDWR;
171  }
172  if (param->openFlags & IOR_APPEND) {
173  fprintf(stdout, "File append not implemented in HDF5\n");
174  }
175  if (param->openFlags & IOR_CREAT) {
176  fd_mode |= H5F_ACC_CREAT;
177  }
178  if (param->openFlags & IOR_EXCL) {
179  fd_mode |= H5F_ACC_EXCL;
180  }
181  if (param->openFlags & IOR_TRUNC) {
182  fd_mode |= H5F_ACC_TRUNC;
183  }
184  if (param->openFlags & IOR_DIRECT) {
185  fprintf(stdout, "O_DIRECT not implemented in HDF5\n");
186  }
187 
188  /* set up file creation property list */
189  createPropList = H5Pcreate(H5P_FILE_CREATE);
190  HDF5_CHECK(createPropList, "cannot create file creation property list");
191  /* set size of offset and length used to address HDF5 objects */
192  HDF5_CHECK(H5Pset_sizes
193  (createPropList, sizeof(hsize_t), sizeof(hsize_t)),
194  "cannot set property list properly");
195 
196  /* set up file access property list */
197  accessPropList = H5Pcreate(H5P_FILE_ACCESS);
198  HDF5_CHECK(accessPropList, "cannot create file access property list");
199 
200  /*
201  * someday HDF5 implementation will allow subsets of MPI_COMM_WORLD
202  */
203  /* store MPI communicator info for the file access property list */
204  if (param->filePerProc) {
205  comm = MPI_COMM_SELF;
206  } else {
207  comm = testComm;
208  }
209 
210  SetHints(&mpiHints, param->hintsFileName);
211  /*
212  * note that with MP_HINTS_FILTERED=no, all key/value pairs will
213  * be in the info object. The info object that is attached to
214  * the file during MPI_File_open() will only contain those pairs
215  * deemed valid by the implementation.
216  */
217  /* show hints passed to file */
218  if (rank == 0 && param->showHints) {
219  fprintf(stdout, "\nhints passed to access property list {\n");
220  ShowHints(&mpiHints);
221  fprintf(stdout, "}\n");
222  }
223  HDF5_CHECK(H5Pset_fapl_mpio(accessPropList, comm, mpiHints),
224  "cannot set file access property list");
225 
226  /* set alignment */
227  HDF5_CHECK(H5Pset_alignment(accessPropList, param->setAlignment,
228  param->setAlignment),
229  "cannot set alignment");
230 
231 #ifdef HAVE_H5PSET_ALL_COLL_METADATA_OPS
232  if (param->collective_md) {
233  /* more scalable metadata */
234 
235  HDF5_CHECK(H5Pset_all_coll_metadata_ops(accessPropList, 1),
236  "cannot set collective md read");
237  HDF5_CHECK(H5Pset_coll_metadata_write(accessPropList, 1),
238  "cannot set collective md write");
239  }
240 #endif
241 
242  /* open file */
243  if (param->open == WRITE) { /* WRITE */
244  *fd = H5Fcreate(testFileName, fd_mode,
245  createPropList, accessPropList);
246  HDF5_CHECK(*fd, "cannot create file");
247  } else { /* READ or CHECK */
248  *fd = H5Fopen(testFileName, fd_mode, accessPropList);
249  HDF5_CHECK(*fd, "cannot open file");
250  }
251 
252  /* show hints actually attached to file handle */
253  if (param->showHints || (1) /* WEL - this needs fixing */ ) {
254  if (rank == 0
255  && (param->showHints) /* WEL - this needs fixing */ ) {
256  WARN("showHints not working for HDF5");
257  }
258  } else {
259  MPI_Info mpiHintsCheck = MPI_INFO_NULL;
260  hid_t apl;
261  apl = H5Fget_access_plist(*fd);
262  HDF5_CHECK(H5Pget_fapl_mpio(apl, &comm, &mpiHintsCheck),
263  "cannot get info object through HDF5");
264  if (rank == 0) {
265  fprintf(stdout,
266  "\nhints returned from opened file (HDF5) {\n");
267  ShowHints(&mpiHintsCheck);
268  fprintf(stdout, "}\n");
269  if (1 == 1) { /* request the MPIIO file handle and its hints */
270  MPI_File *fd_mpiio;
271  HDF5_CHECK(H5Fget_vfd_handle
272  (*fd, apl, (void **)&fd_mpiio),
273  "cannot get MPIIO file handle");
274  if (mpiHintsCheck != MPI_INFO_NULL)
275  MPI_Info_free(&mpiHintsCheck);
276  MPI_CHECK(MPI_File_get_info
277  (*fd_mpiio, &mpiHintsCheck),
278  "cannot get info object through MPIIO");
279  fprintf(stdout,
280  "\nhints returned from opened file (MPIIO) {\n");
281  ShowHints(&mpiHintsCheck);
282  fprintf(stdout, "}\n");
283  if (mpiHintsCheck != MPI_INFO_NULL)
284  MPI_Info_free(&mpiHintsCheck);
285  }
286  }
287  MPI_CHECK(MPI_Barrier(testComm), "barrier error");
288  }
289 
290  /* this is necessary for resetting various parameters
291  needed for reopening and checking the file */
293 
294  HDF5_CHECK(H5Pclose(createPropList),
295  "cannot close creation property list");
296  HDF5_CHECK(H5Pclose(accessPropList),
297  "cannot close access property list");
298 
299  /* create property list for serial/parallel access */
300  xferPropList = H5Pcreate(H5P_DATASET_XFER);
301  HDF5_CHECK(xferPropList, "cannot create transfer property list");
302 
303  /* set data transfer mode */
304  if (param->collective) {
305  HDF5_CHECK(H5Pset_dxpl_mpio(xferPropList, H5FD_MPIO_COLLECTIVE),
306  "cannot set collective data transfer mode");
307  } else {
308  HDF5_CHECK(H5Pset_dxpl_mpio
309  (xferPropList, H5FD_MPIO_INDEPENDENT),
310  "cannot set independent data transfer mode");
311  }
312 
313  /* set up memory data space for transfer */
314  memStart[0] = (hsize_t) 0;
315  memCount[0] = (hsize_t) 1;
316  memStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
317  memBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
318  memDataSpaceDims[0] = (hsize_t) param->transferSize;
319  memDataSpace = H5Screate_simple(NUM_DIMS, memDataSpaceDims, NULL);
320  HDF5_CHECK(memDataSpace, "cannot create simple memory data space");
321 
322  /* define hyperslab for memory data space */
323  HDF5_CHECK(H5Sselect_hyperslab(memDataSpace, H5S_SELECT_SET,
324  memStart, memStride, memCount,
325  memBlock), "cannot create hyperslab");
326 
327  /* set up parameters for fpp or different dataset count */
328  if (param->filePerProc) {
329  tasksPerDataSet = 1;
330  } else {
331  if (param->individualDataSets) {
332  /* each task in segment has single data set */
333  tasksPerDataSet = 1;
334  } else {
335  /* share single data set across all tasks in segment */
336  tasksPerDataSet = param->numTasks;
337  }
338  }
339  dataSetDims[0] = (hsize_t) ((param->blockSize / sizeof(IOR_size_t))
340  * tasksPerDataSet);
341 
342  /* create a simple data space containing information on size
343  and shape of data set, and open it for access */
344  dataSpace = H5Screate_simple(NUM_DIMS, dataSetDims, NULL);
345  HDF5_CHECK(dataSpace, "cannot create simple data space");
346  if (mpiHints != MPI_INFO_NULL)
347  MPI_Info_free(&mpiHints);
348 
349  return (fd);
350 }
351 
352 /*
353  * Write or read access to file using the HDF5 interface.
354  */
355 static IOR_offset_t HDF5_Xfer(int access, void *fd, IOR_size_t * buffer,
356  IOR_offset_t length, IOR_param_t * param)
357 {
358  static int firstReadCheck = FALSE, startNewDataSet;
359  IOR_offset_t segmentPosition, segmentSize;
360 
361  /*
362  * this toggle is for the read check operation, which passes through
363  * this function twice; note that this function will open a data set
364  * only on the first read check and close only on the second
365  */
366  if (access == READCHECK) {
367  if (firstReadCheck == TRUE) {
368  firstReadCheck = FALSE;
369  } else {
370  firstReadCheck = TRUE;
371  }
372  }
373 
374  /* determine by offset if need to start new data set */
375  if (param->filePerProc == TRUE) {
376  segmentPosition = (IOR_offset_t) 0;
377  segmentSize = param->blockSize;
378  } else {
379  segmentPosition =
380  (IOR_offset_t) ((rank + rankOffset) % param->numTasks)
381  * param->blockSize;
382  segmentSize =
383  (IOR_offset_t) (param->numTasks) * param->blockSize;
384  }
385  if ((IOR_offset_t) ((param->offset - segmentPosition) % segmentSize) ==
386  0) {
387  /*
388  * ordinarily start a new data set, unless this is the
389  * second pass through during a read check
390  */
391  startNewDataSet = TRUE;
392  if (access == READCHECK && firstReadCheck != TRUE) {
393  startNewDataSet = FALSE;
394  }
395  }
396 
397  /* create new data set */
398  if (startNewDataSet == TRUE) {
399  /* if just opened this file, no data set to close yet */
400  if (newlyOpenedFile != TRUE) {
401  HDF5_CHECK(H5Dclose(dataSet), "cannot close data set");
402  HDF5_CHECK(H5Sclose(fileDataSpace),
403  "cannot close file data space");
404  }
405  SetupDataSet(fd, param);
406  }
407 
408  SeekOffset(fd, param->offset, param);
409 
410  /* this is necessary to reset variables for reaccessing file */
411  startNewDataSet = FALSE;
413 
414  /* access the file */
415  if (access == WRITE) { /* WRITE */
416  HDF5_CHECK(H5Dwrite(dataSet, H5T_NATIVE_LLONG,
418  xferPropList, buffer),
419  "cannot write to data set");
420  } else { /* READ or CHECK */
421  HDF5_CHECK(H5Dread(dataSet, H5T_NATIVE_LLONG,
423  xferPropList, buffer),
424  "cannot read from data set");
425  }
426  return (length);
427 }
428 
429 /*
430  * Perform fsync().
431  */
432 static void HDF5_Fsync(void *fd, IOR_param_t * param)
433 {
434  ;
435 }
436 
437 /*
438  * Close a file through the HDF5 interface.
439  */
440 static void HDF5_Close(void *fd, IOR_param_t * param)
441 {
442  if (param->fd_fppReadCheck == NULL) {
443  HDF5_CHECK(H5Dclose(dataSet), "cannot close data set");
444  HDF5_CHECK(H5Sclose(dataSpace), "cannot close data space");
445  HDF5_CHECK(H5Sclose(fileDataSpace),
446  "cannot close file data space");
447  HDF5_CHECK(H5Sclose(memDataSpace),
448  "cannot close memory data space");
449  HDF5_CHECK(H5Pclose(xferPropList),
450  " cannot close transfer property list");
451  }
452  HDF5_CHECK(H5Fclose(*(hid_t *) fd), "cannot close file");
453  free(fd);
454 }
455 
456 /*
457  * Delete a file through the HDF5 interface.
458  */
459 static void HDF5_Delete(char *testFileName, IOR_param_t * param)
460 {
461  return(MPIIO_Delete(testFileName, param));
462 }
463 
464 /*
465  * Determine api version.
466  */
467 static char * HDF5_GetVersion()
468 {
469  static char version[1024] = {0};
470  if(version[0]) return version;
471 
472  unsigned major, minor, release;
473  if (H5get_libversion(&major, &minor, &release) < 0) {
474  WARN("cannot get HDF5 library version");
475  } else {
476  sprintf(version, "%u.%u.%u", major, minor, release);
477  }
478 #ifndef H5_HAVE_PARALLEL
479  strcat(version, " (Serial)");
480 #else /* H5_HAVE_PARALLEL */
481  strcat(version, " (Parallel)");
482 #endif /* not H5_HAVE_PARALLEL */
483  return version;
484 }
485 
486 /*
487  * Seek to offset in file using the HDF5 interface and set up hyperslab.
488  */
490  IOR_param_t * param)
491 {
492  IOR_offset_t segmentSize;
493  hsize_t hsStride[NUM_DIMS], hsCount[NUM_DIMS], hsBlock[NUM_DIMS];
494  hsize_t hsStart[NUM_DIMS];
495 
496  if (param->filePerProc == TRUE) {
497  segmentSize = (IOR_offset_t) param->blockSize;
498  } else {
499  segmentSize =
500  (IOR_offset_t) (param->numTasks) * param->blockSize;
501  }
502 
503  /* create a hyperslab representing the file data space */
504  if (param->individualDataSets) {
505  /* start at zero offset if not */
506  hsStart[0] = (hsize_t) ((offset % param->blockSize)
507  / sizeof(IOR_size_t));
508  } else {
509  /* start at a unique offset if shared */
510  hsStart[0] =
511  (hsize_t) ((offset % segmentSize) / sizeof(IOR_size_t));
512  }
513  hsCount[0] = (hsize_t) 1;
514  hsStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
515  hsBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
516 
517  /* retrieve data space from data set for hyperslab */
518  fileDataSpace = H5Dget_space(dataSet);
519  HDF5_CHECK(fileDataSpace, "cannot get data space from data set");
520  HDF5_CHECK(H5Sselect_hyperslab(fileDataSpace, H5S_SELECT_SET,
521  hsStart, hsStride, hsCount, hsBlock),
522  "cannot select hyperslab");
523  return (offset);
524 }
525 
526 /*
527  * Create HDF5 data set.
528  */
529 static void SetupDataSet(void *fd, IOR_param_t * param)
530 {
531  char dataSetName[MAX_STR];
532  hid_t dataSetPropList;
533  int dataSetID;
534  static int dataSetSuffix = 0;
535 
536  /* may want to use an extendable dataset (H5S_UNLIMITED) someday */
537  /* may want to use a chunked dataset (H5S_CHUNKED) someday */
538 
539  /* need to reset suffix counter if newly-opened file */
540  if (newlyOpenedFile)
541  dataSetSuffix = 0;
542 
543  /* may want to use individual access to each data set someday */
544  if (param->individualDataSets) {
545  dataSetID = (rank + rankOffset) % param->numTasks;
546  } else {
547  dataSetID = 0;
548  }
549 
550  sprintf(dataSetName, "%s-%04d.%04d", "Dataset", dataSetID,
551  dataSetSuffix++);
552 
553  if (param->open == WRITE) { /* WRITE */
554  /* create data set */
555  dataSetPropList = H5Pcreate(H5P_DATASET_CREATE);
556  /* check if hdf5 available */
557 #if defined (H5_VERS_MAJOR) && defined (H5_VERS_MINOR)
558  /* no-fill option not available until hdf5-1.6.x */
559 #if (H5_VERS_MAJOR > 0 && H5_VERS_MINOR > 5)
560  if (param->noFill == TRUE) {
561  if (rank == 0 && verbose >= VERBOSE_1) {
562  fprintf(stdout, "\nusing 'no fill' option\n");
563  }
564  HDF5_CHECK(H5Pset_fill_time(dataSetPropList,
565  H5D_FILL_TIME_NEVER),
566  "cannot set fill time for property list");
567  }
568 #else
569  char errorString[MAX_STR];
570  sprintf(errorString, "'no fill' option not available in %s",
571  test->apiVersion);
572  ERR(errorString);
573 #endif
574 #else
575  WARN("unable to determine HDF5 version for 'no fill' usage");
576 #endif
577  dataSet =
578  H5Dcreate(*(hid_t *) fd, dataSetName, H5T_NATIVE_LLONG,
579  dataSpace, dataSetPropList);
580  HDF5_CHECK(dataSet, "cannot create data set");
581  } else { /* READ or CHECK */
582  dataSet = H5Dopen(*(hid_t *) fd, dataSetName);
583  HDF5_CHECK(dataSet, "cannot create data set");
584  }
585 }
586 
587 /*
588  * Use MPIIO call to get file size.
589  */
590 static IOR_offset_t
591 HDF5_GetFileSize(IOR_param_t * test, MPI_Comm testComm, char *testFileName)
592 {
593  return(MPIIO_GetFileSize(test, testComm, testFileName));
594 }
595 
596 /*
597  * Use MPIIO call to check for access.
598  */
599 static int HDF5_Access(const char *path, int mode, IOR_param_t *param)
600 {
601  return(MPIIO_Access(path, mode, param));
602 }
static int HDF5_Access(const char *, int, IOR_param_t *)
Definition: aiori-HDF5.c:599
IOR_offset_t setAlignment
Definition: ior.h:165
int showHints
Definition: ior.h:126
#define ERR(MSG)
Definition: iordef.h:169
void ShowHints(MPI_Info *mpiHints)
Definition: utilities.c:303
int filePerProc
Definition: ior.h:104
static void * HDF5_Create(char *, IOR_param_t *)
Definition: aiori-HDF5.c:128
static void * HDF5_Open(char *, IOR_param_t *)
Definition: aiori-HDF5.c:136
int noFill
Definition: ior.h:164
static void HDF5_Fsync(void *, IOR_param_t *)
Definition: aiori-HDF5.c:432
static IOR_offset_t HDF5_Xfer(int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
Definition: aiori-HDF5.c:355
IOR_offset_t transferSize
Definition: ior.h:118
ior_aiori_t hdf5_aiori
Definition: aiori-HDF5.c:99
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:134
#define READCHECK
Definition: iordef.h:98
#define HDF5_CHECK(HDF5_RETURN, MSG)
Definition: aiori-HDF5.c:67
#define IOR_APPEND
Definition: aiori.h:36
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:129
#define IOR_RDONLY
Definition: aiori.h:33
unsigned int openFlags
Definition: ior.h:85
#define WRITE
Definition: iordef.h:95
#define NUM_DIMS
Definition: aiori-HDF5.c:32
static IOR_offset_t HDF5_GetFileSize(IOR_param_t *, MPI_Comm, char *)
Definition: aiori-HDF5.c:591
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
Definition: aiori.c:104
#define IOR_CREAT
Definition: aiori.h:37
#define IOR_EXCL
Definition: aiori.h:39
char * hintsFileName
Definition: ior.h:92
MPI_Comm testComm
Definition: utilities.c:61
#define IOR_TRUNC
Definition: aiori.h:38
#define MPI_CHECK(MPI_STATUS, MSG)
Definition: iordef.h:192
static hid_t xferPropList
Definition: aiori-HDF5.c:116
hid_t dataSet
Definition: aiori-HDF5.c:117
Definition: ior.h:47
void * fd_fppReadCheck
Definition: ior.h:141
void MPIIO_Delete(char *testFileName, IOR_param_t *param)
Definition: aiori-MPIIO.c:409
static IOR_param_t param
Definition: mdtest.c:153
static IOR_offset_t SeekOffset(void *, IOR_offset_t, IOR_param_t *)
Definition: aiori-HDF5.c:489
int MPIIO_Access(const char *path, int mode, IOR_param_t *param)
Definition: aiori-MPIIO.c:69
#define IOR_WRONLY
Definition: aiori.h:34
static char * HDF5_GetVersion()
Definition: aiori-HDF5.c:467
#define FALSE
Definition: iordef.h:71
int rankOffset
Definition: utilities.c:58
int newlyOpenedFile
Definition: aiori-HDF5.c:121
hid_t dataSpace
Definition: aiori-HDF5.c:118
long long int IOR_size_t
Definition: iordef.h:124
#define WARN(MSG)
Definition: iordef.h:145
hid_t memDataSpace
Definition: aiori-HDF5.c:120
int numTasks
Definition: ior.h:94
int individualDataSets
Definition: ior.h:163
#define MAX_STR
Definition: iordef.h:109
static void HDF5_Delete(char *, IOR_param_t *)
Definition: aiori-HDF5.c:459
int collective
Definition: ior.h:115
IOR_offset_t offset
Definition: ior.h:119
int open
Definition: ior.h:101
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
Definition: aiori.c:144
static void HDF5_Close(void *, IOR_param_t *)
Definition: aiori-HDF5.c:440
void SetHints(MPI_Info *mpiHints, char *hintsFileName)
Definition: utilities.c:242
#define IOR_RDWR
Definition: aiori.h:35
#define VERBOSE_1
Definition: iordef.h:103
int verbose
Definition: utilities.c:60
char * name
Definition: aiori.h:67
long long int IOR_offset_t
Definition: iordef.h:123
hid_t fileDataSpace
Definition: aiori-HDF5.c:119
int rank
Definition: utilities.c:57
IOR_offset_t blockSize
Definition: ior.h:117
#define TRUE
Definition: iordef.h:75
#define IOR_DIRECT
Definition: aiori.h:40
static void SetupDataSet(void *, IOR_param_t *)
Definition: aiori-HDF5.c:529
IOR_offset_t MPIIO_GetFileSize(IOR_param_t *test, MPI_Comm testComm, char *testFileName)
Definition: aiori-MPIIO.c:472
#define NULL
Definition: iordef.h:79