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 /************************** O P T I O N S *****************************/
98 typedef struct{
101 /***************************** F U N C T I O N S ******************************/
102 
103 static option_help * HDF5_options(void ** init_backend_options, void * init_values){
104  HDF5_options_t * o = malloc(sizeof(HDF5_options_t));
105 
106  if (init_values != NULL){
107  memcpy(o, init_values, sizeof(HDF5_options_t));
108  }else{
109  /* initialize the options properly */
110  o->collective_md = 0;
111  }
112 
113  *init_backend_options = o;
114 
115  option_help h [] = {
116  {0, "hdf5.collectiveMetadata", "Use collectiveMetadata (available since HDF5-1.10.0)", OPTION_FLAG, 'd', & o->collective_md},
118  };
119  option_help * help = malloc(sizeof(h));
120  memcpy(help, h, sizeof(h));
121  return help;
122 }
123 
124 
125 /************************** D E C L A R A T I O N S ***************************/
126 
128  .name = "HDF5",
129  .name_legacy = NULL,
130  .create = HDF5_Create,
131  .open = HDF5_Open,
132  .xfer = HDF5_Xfer,
133  .close = HDF5_Close,
134  .delete = HDF5_Delete,
135  .get_version = HDF5_GetVersion,
136  .fsync = HDF5_Fsync,
137  .get_file_size = HDF5_GetFileSize,
138  .statfs = aiori_posix_statfs,
139  .mkdir = aiori_posix_mkdir,
140  .rmdir = aiori_posix_rmdir,
141  .access = HDF5_Access,
142  .stat = aiori_posix_stat,
143  .get_options = HDF5_options
144 };
145 
146 static hid_t xferPropList; /* xfer property list */
147 hid_t dataSet; /* data set id */
148 hid_t dataSpace; /* data space id */
149 hid_t fileDataSpace; /* file data space id */
150 hid_t memDataSpace; /* memory data space id */
151 int newlyOpenedFile; /* newly opened file */
152 
153 /***************************** F U N C T I O N S ******************************/
154 
155 /*
156  * Create and open a file through the HDF5 interface.
157  */
158 static void *HDF5_Create(char *testFileName, IOR_param_t * param)
159 {
160  return HDF5_Open(testFileName, param);
161 }
162 
163 /*
164  * Open a file through the HDF5 interface.
165  */
166 static void *HDF5_Open(char *testFileName, IOR_param_t * param)
167 {
168  hid_t accessPropList, createPropList;
169  hsize_t memStart[NUM_DIMS],
170  dataSetDims[NUM_DIMS],
171  memStride[NUM_DIMS],
172  memCount[NUM_DIMS], memBlock[NUM_DIMS], memDataSpaceDims[NUM_DIMS];
173  int tasksPerDataSet;
174  unsigned fd_mode = (unsigned)0;
175  hid_t *fd;
176  MPI_Comm comm;
177  MPI_Info mpiHints = MPI_INFO_NULL;
178 
179  fd = (hid_t *) malloc(sizeof(hid_t));
180  if (fd == NULL)
181  ERR("malloc() failed");
182  /*
183  * HDF5 uses different flags than those for POSIX/MPIIO
184  */
185  if (param->open == WRITE) { /* WRITE flags */
186  param->openFlags = IOR_TRUNC;
187  } else { /* READ or check WRITE/READ flags */
188  param->openFlags = IOR_RDONLY;
189  }
190 
191  /* set IOR file flags to HDF5 flags */
192  /* -- file open flags -- */
193  if (param->openFlags & IOR_RDONLY) {
194  fd_mode |= H5F_ACC_RDONLY;
195  }
196  if (param->openFlags & IOR_WRONLY) {
197  fprintf(stdout, "File write only not implemented in HDF5\n");
198  }
199  if (param->openFlags & IOR_RDWR) {
200  fd_mode |= H5F_ACC_RDWR;
201  }
202  if (param->openFlags & IOR_APPEND) {
203  fprintf(stdout, "File append not implemented in HDF5\n");
204  }
205  if (param->openFlags & IOR_CREAT) {
206  fd_mode |= H5F_ACC_CREAT;
207  }
208  if (param->openFlags & IOR_EXCL) {
209  fd_mode |= H5F_ACC_EXCL;
210  }
211  if (param->openFlags & IOR_TRUNC) {
212  fd_mode |= H5F_ACC_TRUNC;
213  }
214  if (param->openFlags & IOR_DIRECT) {
215  fprintf(stdout, "O_DIRECT not implemented in HDF5\n");
216  }
217 
218  /* set up file creation property list */
219  createPropList = H5Pcreate(H5P_FILE_CREATE);
220  HDF5_CHECK(createPropList, "cannot create file creation property list");
221  /* set size of offset and length used to address HDF5 objects */
222  HDF5_CHECK(H5Pset_sizes
223  (createPropList, sizeof(hsize_t), sizeof(hsize_t)),
224  "cannot set property list properly");
225 
226  /* set up file access property list */
227  accessPropList = H5Pcreate(H5P_FILE_ACCESS);
228  HDF5_CHECK(accessPropList, "cannot create file access property list");
229 
230  /*
231  * someday HDF5 implementation will allow subsets of MPI_COMM_WORLD
232  */
233  /* store MPI communicator info for the file access property list */
234  if (param->filePerProc) {
235  comm = MPI_COMM_SELF;
236  } else {
237  comm = testComm;
238  }
239 
240  SetHints(&mpiHints, param->hintsFileName);
241  /*
242  * note that with MP_HINTS_FILTERED=no, all key/value pairs will
243  * be in the info object. The info object that is attached to
244  * the file during MPI_File_open() will only contain those pairs
245  * deemed valid by the implementation.
246  */
247  /* show hints passed to file */
248  if (rank == 0 && param->showHints) {
249  fprintf(stdout, "\nhints passed to access property list {\n");
250  ShowHints(&mpiHints);
251  fprintf(stdout, "}\n");
252  }
253  HDF5_CHECK(H5Pset_fapl_mpio(accessPropList, comm, mpiHints),
254  "cannot set file access property list");
255 
256  /* set alignment */
257  HDF5_CHECK(H5Pset_alignment(accessPropList, param->setAlignment,
258  param->setAlignment),
259  "cannot set alignment");
260 
261 #ifdef HAVE_H5PSET_ALL_COLL_METADATA_OPS
263  if (o->collective_md) {
264  /* more scalable metadata */
265 
266  HDF5_CHECK(H5Pset_all_coll_metadata_ops(accessPropList, 1),
267  "cannot set collective md read");
268  HDF5_CHECK(H5Pset_coll_metadata_write(accessPropList, 1),
269  "cannot set collective md write");
270  }
271 #endif
272 
273  /* open file */
274  if(! param->dryRun){
275  if (param->open == WRITE) { /* WRITE */
276  *fd = H5Fcreate(testFileName, fd_mode,
277  createPropList, accessPropList);
278  HDF5_CHECK(*fd, "cannot create file");
279  } else { /* READ or CHECK */
280  *fd = H5Fopen(testFileName, fd_mode, accessPropList);
281  HDF5_CHECK(*fd, "cannot open file");
282  }
283  }
284 
285  /* show hints actually attached to file handle */
286  if (param->showHints || (1) /* WEL - this needs fixing */ ) {
287  if (rank == 0
288  && (param->showHints) /* WEL - this needs fixing */ ) {
289  WARN("showHints not working for HDF5");
290  }
291  } else {
292  MPI_Info mpiHintsCheck = MPI_INFO_NULL;
293  hid_t apl;
294  apl = H5Fget_access_plist(*fd);
295  HDF5_CHECK(H5Pget_fapl_mpio(apl, &comm, &mpiHintsCheck),
296  "cannot get info object through HDF5");
297  if (rank == 0) {
298  fprintf(stdout,
299  "\nhints returned from opened file (HDF5) {\n");
300  ShowHints(&mpiHintsCheck);
301  fprintf(stdout, "}\n");
302  if (1 == 1) { /* request the MPIIO file handle and its hints */
303  MPI_File *fd_mpiio;
304  HDF5_CHECK(H5Fget_vfd_handle
305  (*fd, apl, (void **)&fd_mpiio),
306  "cannot get MPIIO file handle");
307  if (mpiHintsCheck != MPI_INFO_NULL)
308  MPI_Info_free(&mpiHintsCheck);
309  MPI_CHECK(MPI_File_get_info
310  (*fd_mpiio, &mpiHintsCheck),
311  "cannot get info object through MPIIO");
312  fprintf(stdout,
313  "\nhints returned from opened file (MPIIO) {\n");
314  ShowHints(&mpiHintsCheck);
315  fprintf(stdout, "}\n");
316  if (mpiHintsCheck != MPI_INFO_NULL)
317  MPI_Info_free(&mpiHintsCheck);
318  }
319  }
320  MPI_CHECK(MPI_Barrier(testComm), "barrier error");
321  }
322 
323  /* this is necessary for resetting various parameters
324  needed for reopening and checking the file */
326 
327  HDF5_CHECK(H5Pclose(createPropList),
328  "cannot close creation property list");
329  HDF5_CHECK(H5Pclose(accessPropList),
330  "cannot close access property list");
331 
332  /* create property list for serial/parallel access */
333  xferPropList = H5Pcreate(H5P_DATASET_XFER);
334  HDF5_CHECK(xferPropList, "cannot create transfer property list");
335 
336  /* set data transfer mode */
337  if (param->collective) {
338  HDF5_CHECK(H5Pset_dxpl_mpio(xferPropList, H5FD_MPIO_COLLECTIVE),
339  "cannot set collective data transfer mode");
340  } else {
341  HDF5_CHECK(H5Pset_dxpl_mpio
342  (xferPropList, H5FD_MPIO_INDEPENDENT),
343  "cannot set independent data transfer mode");
344  }
345 
346  /* set up memory data space for transfer */
347  memStart[0] = (hsize_t) 0;
348  memCount[0] = (hsize_t) 1;
349  memStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
350  memBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
351  memDataSpaceDims[0] = (hsize_t) param->transferSize;
352  memDataSpace = H5Screate_simple(NUM_DIMS, memDataSpaceDims, NULL);
353  HDF5_CHECK(memDataSpace, "cannot create simple memory data space");
354 
355  /* define hyperslab for memory data space */
356  HDF5_CHECK(H5Sselect_hyperslab(memDataSpace, H5S_SELECT_SET,
357  memStart, memStride, memCount,
358  memBlock), "cannot create hyperslab");
359 
360  /* set up parameters for fpp or different dataset count */
361  if (param->filePerProc) {
362  tasksPerDataSet = 1;
363  } else {
364  if (param->individualDataSets) {
365  /* each task in segment has single data set */
366  tasksPerDataSet = 1;
367  } else {
368  /* share single data set across all tasks in segment */
369  tasksPerDataSet = param->numTasks;
370  }
371  }
372  dataSetDims[0] = (hsize_t) ((param->blockSize / sizeof(IOR_size_t))
373  * tasksPerDataSet);
374 
375  /* create a simple data space containing information on size
376  and shape of data set, and open it for access */
377  dataSpace = H5Screate_simple(NUM_DIMS, dataSetDims, NULL);
378  HDF5_CHECK(dataSpace, "cannot create simple data space");
379  if (mpiHints != MPI_INFO_NULL)
380  MPI_Info_free(&mpiHints);
381 
382  return (fd);
383 }
384 
385 /*
386  * Write or read access to file using the HDF5 interface.
387  */
388 static IOR_offset_t HDF5_Xfer(int access, void *fd, IOR_size_t * buffer,
389  IOR_offset_t length, IOR_param_t * param)
390 {
391  static int firstReadCheck = FALSE, startNewDataSet;
392  IOR_offset_t segmentPosition, segmentSize;
393 
394  /*
395  * this toggle is for the read check operation, which passes through
396  * this function twice; note that this function will open a data set
397  * only on the first read check and close only on the second
398  */
399  if (access == READCHECK) {
400  if (firstReadCheck == TRUE) {
401  firstReadCheck = FALSE;
402  } else {
403  firstReadCheck = TRUE;
404  }
405  }
406 
407  /* determine by offset if need to start new data set */
408  if (param->filePerProc == TRUE) {
409  segmentPosition = (IOR_offset_t) 0;
410  segmentSize = param->blockSize;
411  } else {
412  segmentPosition =
413  (IOR_offset_t) ((rank + rankOffset) % param->numTasks)
414  * param->blockSize;
415  segmentSize =
416  (IOR_offset_t) (param->numTasks) * param->blockSize;
417  }
418  if ((IOR_offset_t) ((param->offset - segmentPosition) % segmentSize) ==
419  0) {
420  /*
421  * ordinarily start a new data set, unless this is the
422  * second pass through during a read check
423  */
424  startNewDataSet = TRUE;
425  if (access == READCHECK && firstReadCheck != TRUE) {
426  startNewDataSet = FALSE;
427  }
428  }
429 
430  if(param->dryRun)
431  return length;
432 
433  /* create new data set */
434  if (startNewDataSet == TRUE) {
435  /* if just opened this file, no data set to close yet */
436  if (newlyOpenedFile != TRUE) {
437  HDF5_CHECK(H5Dclose(dataSet), "cannot close data set");
438  HDF5_CHECK(H5Sclose(fileDataSpace),
439  "cannot close file data space");
440  }
441  SetupDataSet(fd, param);
442  }
443 
444  SeekOffset(fd, param->offset, param);
445 
446  /* this is necessary to reset variables for reaccessing file */
447  startNewDataSet = FALSE;
449 
450  /* access the file */
451  if (access == WRITE) { /* WRITE */
452  HDF5_CHECK(H5Dwrite(dataSet, H5T_NATIVE_LLONG,
454  xferPropList, buffer),
455  "cannot write to data set");
456  } else { /* READ or CHECK */
457  HDF5_CHECK(H5Dread(dataSet, H5T_NATIVE_LLONG,
459  xferPropList, buffer),
460  "cannot read from data set");
461  }
462  return (length);
463 }
464 
465 /*
466  * Perform fsync().
467  */
468 static void HDF5_Fsync(void *fd, IOR_param_t * param)
469 {
470  ;
471 }
472 
473 /*
474  * Close a file through the HDF5 interface.
475  */
476 static void HDF5_Close(void *fd, IOR_param_t * param)
477 {
478  if(param->dryRun)
479  return;
480  if (param->fd_fppReadCheck == NULL) {
481  HDF5_CHECK(H5Dclose(dataSet), "cannot close data set");
482  HDF5_CHECK(H5Sclose(dataSpace), "cannot close data space");
483  HDF5_CHECK(H5Sclose(fileDataSpace),
484  "cannot close file data space");
485  HDF5_CHECK(H5Sclose(memDataSpace),
486  "cannot close memory data space");
487  HDF5_CHECK(H5Pclose(xferPropList),
488  " cannot close transfer property list");
489  }
490  HDF5_CHECK(H5Fclose(*(hid_t *) fd), "cannot close file");
491  free(fd);
492 }
493 
494 /*
495  * Delete a file through the HDF5 interface.
496  */
497 static void HDF5_Delete(char *testFileName, IOR_param_t * param)
498 {
499  if(param->dryRun)
500  return
501  MPIIO_Delete(testFileName, param);
502  return;
503 }
504 
505 /*
506  * Determine api version.
507  */
508 static char * HDF5_GetVersion()
509 {
510  static char version[1024] = {0};
511  if(version[0]) return version;
512 
513  unsigned major, minor, release;
514  if (H5get_libversion(&major, &minor, &release) < 0) {
515  WARN("cannot get HDF5 library version");
516  } else {
517  sprintf(version, "%u.%u.%u", major, minor, release);
518  }
519 #ifndef H5_HAVE_PARALLEL
520  strcat(version, " (Serial)");
521 #else /* H5_HAVE_PARALLEL */
522  strcat(version, " (Parallel)");
523 #endif /* not H5_HAVE_PARALLEL */
524  return version;
525 }
526 
527 /*
528  * Seek to offset in file using the HDF5 interface and set up hyperslab.
529  */
531  IOR_param_t * param)
532 {
533  IOR_offset_t segmentSize;
534  hsize_t hsStride[NUM_DIMS], hsCount[NUM_DIMS], hsBlock[NUM_DIMS];
535  hsize_t hsStart[NUM_DIMS];
536 
537  if (param->filePerProc == TRUE) {
538  segmentSize = (IOR_offset_t) param->blockSize;
539  } else {
540  segmentSize =
541  (IOR_offset_t) (param->numTasks) * param->blockSize;
542  }
543 
544  /* create a hyperslab representing the file data space */
545  if (param->individualDataSets) {
546  /* start at zero offset if not */
547  hsStart[0] = (hsize_t) ((offset % param->blockSize)
548  / sizeof(IOR_size_t));
549  } else {
550  /* start at a unique offset if shared */
551  hsStart[0] =
552  (hsize_t) ((offset % segmentSize) / sizeof(IOR_size_t));
553  }
554  hsCount[0] = (hsize_t) 1;
555  hsStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
556  hsBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t));
557 
558  /* retrieve data space from data set for hyperslab */
559  fileDataSpace = H5Dget_space(dataSet);
560  HDF5_CHECK(fileDataSpace, "cannot get data space from data set");
561  HDF5_CHECK(H5Sselect_hyperslab(fileDataSpace, H5S_SELECT_SET,
562  hsStart, hsStride, hsCount, hsBlock),
563  "cannot select hyperslab");
564  return (offset);
565 }
566 
567 /*
568  * Create HDF5 data set.
569  */
570 static void SetupDataSet(void *fd, IOR_param_t * param)
571 {
572  char dataSetName[MAX_STR];
573  hid_t dataSetPropList;
574  int dataSetID;
575  static int dataSetSuffix = 0;
576 
577  /* may want to use an extendable dataset (H5S_UNLIMITED) someday */
578  /* may want to use a chunked dataset (H5S_CHUNKED) someday */
579 
580  /* need to reset suffix counter if newly-opened file */
581  if (newlyOpenedFile)
582  dataSetSuffix = 0;
583 
584  /* may want to use individual access to each data set someday */
585  if (param->individualDataSets) {
586  dataSetID = (rank + rankOffset) % param->numTasks;
587  } else {
588  dataSetID = 0;
589  }
590 
591  sprintf(dataSetName, "%s-%04d.%04d", "Dataset", dataSetID,
592  dataSetSuffix++);
593 
594  if (param->open == WRITE) { /* WRITE */
595  /* create data set */
596  dataSetPropList = H5Pcreate(H5P_DATASET_CREATE);
597  /* check if hdf5 available */
598 #if defined (H5_VERS_MAJOR) && defined (H5_VERS_MINOR)
599  /* no-fill option not available until hdf5-1.6.x */
600 #if (H5_VERS_MAJOR > 0 && H5_VERS_MINOR > 5)
601  if (param->noFill == TRUE) {
602  if (rank == 0 && verbose >= VERBOSE_1) {
603  fprintf(stdout, "\nusing 'no fill' option\n");
604  }
605  HDF5_CHECK(H5Pset_fill_time(dataSetPropList,
606  H5D_FILL_TIME_NEVER),
607  "cannot set fill time for property list");
608  }
609 #else
610  char errorString[MAX_STR];
611  sprintf(errorString, "'no fill' option not available in %s",
612  test->apiVersion);
613  ERR(errorString);
614 #endif
615 #else
616  WARN("unable to determine HDF5 version for 'no fill' usage");
617 #endif
618  dataSet =
619  H5Dcreate(*(hid_t *) fd, dataSetName, H5T_NATIVE_LLONG,
620  dataSpace, dataSetPropList);
621  HDF5_CHECK(dataSet, "cannot create data set");
622  } else { /* READ or CHECK */
623  dataSet = H5Dopen(*(hid_t *) fd, dataSetName);
624  HDF5_CHECK(dataSet, "cannot create data set");
625  }
626 }
627 
628 /*
629  * Use MPIIO call to get file size.
630  */
631 static IOR_offset_t
632 HDF5_GetFileSize(IOR_param_t * test, MPI_Comm testComm, char *testFileName)
633 {
634  if(test->dryRun)
635  return 0;
636  return(MPIIO_GetFileSize(test, testComm, testFileName));
637 }
638 
639 /*
640  * Use MPIIO call to check for access.
641  */
642 static int HDF5_Access(const char *path, int mode, IOR_param_t *param)
643 {
644  if(param->dryRun)
645  return 0;
646  return(MPIIO_Access(path, mode, param));
647 }
static option_help * HDF5_options(void **init_backend_options, void *init_values)
Definition: aiori-HDF5.c:103
static int HDF5_Access(const char *, int, IOR_param_t *)
Definition: aiori-HDF5.c:642
IOR_offset_t setAlignment
Definition: ior.h:173
int showHints
Definition: ior.h:132
#define ERR(MSG)
Definition: iordef.h:184
void ShowHints(MPI_Info *mpiHints)
Definition: utilities.c:515
#define LAST_OPTION
Definition: option.h:37
int filePerProc
Definition: ior.h:111
static void * HDF5_Create(char *, IOR_param_t *)
Definition: aiori-HDF5.c:158
static void * HDF5_Open(char *, IOR_param_t *)
Definition: aiori-HDF5.c:166
int noFill
Definition: ior.h:172
static void HDF5_Fsync(void *, IOR_param_t *)
Definition: aiori-HDF5.c:468
static IOR_offset_t HDF5_Xfer(int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
Definition: aiori-HDF5.c:388
IOR_offset_t transferSize
Definition: ior.h:125
ior_aiori_t hdf5_aiori
Definition: aiori-HDF5.c:127
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:185
#define READCHECK
Definition: iordef.h:98
#define HDF5_CHECK(HDF5_RETURN, MSG)
Definition: aiori-HDF5.c:67
#define IOR_APPEND
Definition: aiori.h:37
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:180
#define IOR_RDONLY
Definition: aiori.h:34
unsigned int openFlags
Definition: ior.h:88
#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:632
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
Definition: aiori.c:155
void * backend_options
Definition: ior.h:158
#define IOR_CREAT
Definition: aiori.h:38
#define IOR_EXCL
Definition: aiori.h:40
char * hintsFileName
Definition: ior.h:95
MPI_Comm testComm
Definition: utilities.c:60
#define IOR_TRUNC
Definition: aiori.h:39
#define MPI_CHECK(MPI_STATUS, MSG)
Definition: iordef.h:224
static hid_t xferPropList
Definition: aiori-HDF5.c:146
int dryRun
Definition: ior.h:98
hid_t dataSet
Definition: aiori-HDF5.c:147
Definition: ior.h:48
void * fd_fppReadCheck
Definition: ior.h:147
void MPIIO_Delete(char *testFileName, IOR_param_t *param)
Definition: aiori-MPIIO.c:431
static IOR_param_t param
Definition: mdtest.c:170
static IOR_offset_t SeekOffset(void *, IOR_offset_t, IOR_param_t *)
Definition: aiori-HDF5.c:530
int MPIIO_Access(const char *path, int mode, IOR_param_t *param)
Definition: aiori-MPIIO.c:70
#define IOR_WRONLY
Definition: aiori.h:35
static char * HDF5_GetVersion()
Definition: aiori-HDF5.c:508
#define FALSE
Definition: iordef.h:71
int rankOffset
Definition: utilities.c:58
int newlyOpenedFile
Definition: aiori-HDF5.c:151
hid_t dataSpace
Definition: aiori-HDF5.c:148
long long int IOR_size_t
Definition: iordef.h:123
#define WARN(MSG)
Definition: iordef.h:144
hid_t memDataSpace
Definition: aiori-HDF5.c:150
int numTasks
Definition: ior.h:99
int individualDataSets
Definition: ior.h:171
#define MAX_STR
Definition: iordef.h:108
static void HDF5_Delete(char *, IOR_param_t *)
Definition: aiori-HDF5.c:497
int collective
Definition: ior.h:122
IOR_offset_t offset
Definition: ior.h:126
int open
Definition: ior.h:108
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
Definition: aiori.c:195
static void HDF5_Close(void *, IOR_param_t *)
Definition: aiori-HDF5.c:476
void SetHints(MPI_Info *mpiHints, char *hintsFileName)
Definition: utilities.c:454
#define IOR_RDWR
Definition: aiori.h:36
#define VERBOSE_1
Definition: iordef.h:102
int verbose
Definition: utilities.c:59
char * name
Definition: aiori.h:68
long long int IOR_offset_t
Definition: iordef.h:122
hid_t fileDataSpace
Definition: aiori-HDF5.c:149
int rank
Definition: utilities.c:57
IOR_offset_t blockSize
Definition: ior.h:124
#define TRUE
Definition: iordef.h:75
#define IOR_DIRECT
Definition: aiori.h:41
static struct cephfs_options o
Definition: aiori-CEPHFS.c:48
static void SetupDataSet(void *, IOR_param_t *)
Definition: aiori-HDF5.c:570
IOR_offset_t MPIIO_GetFileSize(IOR_param_t *test, MPI_Comm testComm, char *testFileName)
Definition: aiori-MPIIO.c:496
#define NULL
Definition: iordef.h:79