Functions

File Handling
[H5hut C API]

Functions

h5_file_t * H5OpenFile (const char *filename, h5_int32_t flags, MPI_Comm comm)
h5_err_t H5CloseFile (h5_file_t *const f)
h5_err_t H5CheckFile (h5_file_t *const f)
int H5GetNumProcs (h5_file_t *const f)
h5_err_t H5SetThrottle (h5_file_t *f, int factor)

Function Documentation

h5_file_t* H5OpenFile ( const char *  filename,
h5_int32_t  flags,
MPI_Comm  comm 
)

Some conventions: Functions: Name: thisIsAFunction() Return values: negative value or NULL signals an error

Macros: UPPERCASE_WITH_UNDERSCORE

Note:
In function names we use the words get and store insteed of read and write, because no I/O is actually done in these functions.

Open file with name filename. This function is available in the parallel and serial version. In the serial case comm may have any value.

Returns:
File handle.
NULL on error.
Parameters:
filenamefile name
flagsfile open flags
commMPI communicator
h5_err_t H5CloseFile ( h5_file_t *const   f )

Close file.

Returns:
H5_SUCCESS or error code
Parameters:
ffile handle
h5_err_t H5CheckFile ( h5_file_t *const   f )

Close file.

Returns:
H5_SUCCESS or error code
Parameters:
ffile handle
int H5GetNumProcs ( h5_file_t *const   f )

Get the number of processors.

Parameters:
[in]fFile handle.
Returns:
Number of processors.
-1 on error.
h5_err_t H5SetThrottle ( h5_file_t *  f,
int  factor 
)

Set the `throttle` factor, which causes HDF5 write and read calls to be issued in that number of batches.

This can prevent large concurrency parallel applications that use independent writes from overwhelming the underlying parallel file system.

Throttling only works with the H5_VFD_MPIPOSIX or H5_VFD_INDEPENDENT drivers and is only available in the parallel library.

Returns:
H5_SUCCESS