IOR
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.

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 *)
 

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 599 of file aiori-HDF5.c.

References 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 128 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 459 of file aiori-HDF5.c.

References 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 432 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 591 of file aiori-HDF5.c.

References MPIIO_GetFileSize().

Here is the call graph for this function:

◆ HDF5_GetVersion()

static char * HDF5_GetVersion ( )
static

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

References WARN.

◆ HDF5_Open()

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

◆ 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 529 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 117 of file aiori-HDF5.c.

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

◆ dataSpace

hid_t dataSpace

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

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

◆ fileDataSpace

hid_t fileDataSpace

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

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

◆ hdf5_aiori

ior_aiori_t hdf5_aiori
Initial value:
= {
.name = "HDF5",
.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,
}
static int HDF5_Access(const char *, int, IOR_param_t *)
Definition: aiori-HDF5.c:599
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
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
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:134
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:129
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
static char * HDF5_GetVersion()
Definition: aiori-HDF5.c:467
static void HDF5_Delete(char *, IOR_param_t *)
Definition: aiori-HDF5.c:459
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

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

◆ memDataSpace

hid_t memDataSpace

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

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

◆ newlyOpenedFile

int newlyOpenedFile

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

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

◆ xferPropList

hid_t xferPropList
static

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

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