IOR
Data Structures | Macros | Functions | Variables
aiori-HDF5.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <hdf5.h>
#include <mpi.h>
#include "aiori.h"
#include "utilities.h"
#include "iordef.h"
Include dependency graph for aiori-HDF5.c:

Go to the source code of this file.

Data Structures

struct  HDF5_options_t
 

Macros

#define H5_USE_16_API
 
#define NUM_DIMS   1 /* number of dimensions to data set */
 
#define HDF5_CHECK(HDF5_RETURN, MSG)
 

Functions

static IOR_offset_t SeekOffset (void *, IOR_offset_t, IOR_param_t *)
 
static void SetupDataSet (void *, IOR_param_t *)
 
static void * HDF5_Create (char *, IOR_param_t *)
 
static void * HDF5_Open (char *, IOR_param_t *)
 
static IOR_offset_t HDF5_Xfer (int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
 
static void HDF5_Close (void *, IOR_param_t *)
 
static void HDF5_Delete (char *, IOR_param_t *)
 
static char * HDF5_GetVersion ()
 
static void HDF5_Fsync (void *, IOR_param_t *)
 
static IOR_offset_t HDF5_GetFileSize (IOR_param_t *, MPI_Comm, char *)
 
static int HDF5_Access (const char *, int, IOR_param_t *)
 
static option_helpHDF5_options (void **init_backend_options, void *init_values)
 

Variables

ior_aiori_t hdf5_aiori
 
static hid_t xferPropList
 
hid_t dataSet
 
hid_t dataSpace
 
hid_t fileDataSpace
 
hid_t memDataSpace
 
int newlyOpenedFile
 

Macro Definition Documentation

◆ H5_USE_16_API

#define H5_USE_16_API

Definition at line 24 of file aiori-HDF5.c.

◆ HDF5_CHECK

#define HDF5_CHECK (   HDF5_RETURN,
  MSG 
)
Value:
do { \
\
if (HDF5_RETURN < 0) { \
fprintf(stdout, "** error **\n"); \
fprintf(stdout, "ERROR in %s (line %d): %s.\n", \
__FILE__, __LINE__, MSG); \
/* \
* H5Eget_msg(hid_t mesg_id, H5E_type_t* mesg_type, \
* char* mesg, size_t size) \
*/ \
fprintf(stdout, "** exiting **\n"); \
exit(-1); \
} \
} while(0)

Definition at line 67 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Open(), HDF5_Xfer(), SeekOffset(), and SetupDataSet().

◆ NUM_DIMS

#define NUM_DIMS   1 /* number of dimensions to data set */

Definition at line 32 of file aiori-HDF5.c.

Referenced by HDF5_Open(), and SeekOffset().

Function Documentation

◆ HDF5_Access()

static int HDF5_Access ( const char *  path,
int  mode,
IOR_param_t param 
)
static

Definition at line 642 of file aiori-HDF5.c.

References IOR_param_t::dryRun, and MPIIO_Access().

Here is the call graph for this function:

◆ HDF5_Close()

static void HDF5_Close ( void *  fd,
IOR_param_t param 
)
static

◆ HDF5_Create()

static void * HDF5_Create ( char *  testFileName,
IOR_param_t param 
)
static

Definition at line 158 of file aiori-HDF5.c.

References HDF5_Open().

Here is the call graph for this function:

◆ HDF5_Delete()

static void HDF5_Delete ( char *  testFileName,
IOR_param_t param 
)
static

Definition at line 497 of file aiori-HDF5.c.

References IOR_param_t::dryRun, and MPIIO_Delete().

Here is the call graph for this function:

◆ HDF5_Fsync()

static void HDF5_Fsync ( void *  fd,
IOR_param_t param 
)
static

Definition at line 468 of file aiori-HDF5.c.

◆ HDF5_GetFileSize()

static IOR_offset_t HDF5_GetFileSize ( IOR_param_t test,
MPI_Comm  testComm,
char *  testFileName 
)
static

Definition at line 632 of file aiori-HDF5.c.

References IOR_param_t::dryRun, and MPIIO_GetFileSize().

Here is the call graph for this function:

◆ HDF5_GetVersion()

static char * HDF5_GetVersion ( )
static

Definition at line 508 of file aiori-HDF5.c.

References WARN.

◆ HDF5_Open()

static void * HDF5_Open ( char *  testFileName,
IOR_param_t param 
)
static

◆ HDF5_options()

static option_help* HDF5_options ( void **  init_backend_options,
void *  init_values 
)
static

Definition at line 103 of file aiori-HDF5.c.

References HDF5_options_t::collective_md, LAST_OPTION, NULL, o, and OPTION_FLAG.

◆ HDF5_Xfer()

static IOR_offset_t HDF5_Xfer ( int  access,
void *  fd,
IOR_size_t buffer,
IOR_offset_t  length,
IOR_param_t param 
)
static

◆ SeekOffset()

static IOR_offset_t SeekOffset ( void *  fd,
IOR_offset_t  offset,
IOR_param_t param 
)
static

◆ SetupDataSet()

static void SetupDataSet ( void *  fd,
IOR_param_t param 
)
static

Definition at line 570 of file aiori-HDF5.c.

References dataSet, dataSpace, ERR, HDF5_CHECK, IOR_param_t::individualDataSets, MAX_STR, newlyOpenedFile, IOR_param_t::noFill, IOR_param_t::numTasks, IOR_param_t::open, rank, rankOffset, TRUE, verbose, VERBOSE_1, WARN, and WRITE.

Referenced by HDF5_Xfer().

Here is the caller graph for this function:

Variable Documentation

◆ dataSet

hid_t dataSet

Definition at line 147 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Xfer(), SeekOffset(), and SetupDataSet().

◆ dataSpace

hid_t dataSpace

Definition at line 148 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Open(), and SetupDataSet().

◆ fileDataSpace

hid_t fileDataSpace

Definition at line 149 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Xfer(), and SeekOffset().

◆ hdf5_aiori

ior_aiori_t hdf5_aiori
Initial value:
= {
.name = "HDF5",
.name_legacy = NULL,
.create = HDF5_Create,
.open = HDF5_Open,
.xfer = HDF5_Xfer,
.close = HDF5_Close,
.delete = HDF5_Delete,
.get_version = HDF5_GetVersion,
.fsync = HDF5_Fsync,
.get_file_size = HDF5_GetFileSize,
.statfs = aiori_posix_statfs,
.access = HDF5_Access,
.get_options = HDF5_options
}
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
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
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
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:185
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:180
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
static char * HDF5_GetVersion()
Definition: aiori-HDF5.c:508
static void HDF5_Delete(char *, IOR_param_t *)
Definition: aiori-HDF5.c:497
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
#define NULL
Definition: iordef.h:79

Definition at line 127 of file aiori-HDF5.c.

◆ memDataSpace

hid_t memDataSpace

Definition at line 150 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Open(), and HDF5_Xfer().

◆ newlyOpenedFile

int newlyOpenedFile

Definition at line 151 of file aiori-HDF5.c.

Referenced by HDF5_Open(), HDF5_Xfer(), and SetupDataSet().

◆ xferPropList

hid_t xferPropList
static

Definition at line 146 of file aiori-HDF5.c.

Referenced by HDF5_Close(), HDF5_Open(), and HDF5_Xfer().