missing set file property functions implemented, bugfixes
This commit is contained in:
+42
-6
@@ -27,13 +27,49 @@ H5CreateFileProp (
|
||||
H5_API_RETURN (h5_create_prop (H5_PROP_FILE));
|
||||
}
|
||||
|
||||
|
||||
static inline h5_err_t
|
||||
H5SetPropFileMPIO (
|
||||
h5_prop_t prop,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t, "prop=%p, comm=%p", (void*)prop, comm);
|
||||
H5_API_RETURN (h5_set_prop_file_mpio (prop, comm));
|
||||
H5_API_RETURN (h5_set_prop_file_mpio_collective (prop, comm));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5SetPropFileMPIOCollective (
|
||||
h5_prop_t prop,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t, "prop=%p, comm=%p", (void*)prop, comm);
|
||||
H5_API_RETURN (h5_set_prop_file_mpio_collective (prop, comm));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5SetPropFileMPIOIndependent (
|
||||
h5_prop_t prop,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t, "prop=%p, comm=%p", (void*)prop, comm);
|
||||
H5_API_RETURN (h5_set_prop_file_mpio_independent (prop, comm));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5SetPropFileMPIOPosix (
|
||||
h5_prop_t prop,
|
||||
MPI_Comm* comm
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t, "prop=%p, comm=%p", (void*)prop, comm);
|
||||
H5_API_RETURN (h5_set_prop_file_mpio_posix (prop, comm));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
H5SetPropFileCoreVFD (
|
||||
h5_prop_t prop
|
||||
) {
|
||||
H5_API_ENTER (h5_err_t, "prop=%p", (void*)prop);
|
||||
H5_API_RETURN (h5_set_prop_file_core_vfd (prop));
|
||||
}
|
||||
|
||||
static inline h5_err_t
|
||||
@@ -55,8 +91,8 @@ H5SetPropFileAlign (
|
||||
use independent writes from overwhelming the underlying
|
||||
parallel file system.
|
||||
|
||||
Throttling only works with the H5_VFD_MPIPOSIX or
|
||||
H5_VFD_MPIIO_IND drivers and is only available in
|
||||
Throttling only works with the H5_VFD_MPIO_POSIX or
|
||||
H5_VFD_MPIO_INDEPENDENT drivers and is only available in
|
||||
the parallel library.
|
||||
|
||||
\return \c H5_SUCCESS or \c H5_FAILURE
|
||||
@@ -89,11 +125,11 @@ H5CloseProp (
|
||||
File mode flags are:
|
||||
- \c H5_O_RDONLY: Only reading allowed
|
||||
- \c H5_O_WRONLY: create new file, dataset must not exist
|
||||
- \c H5_O_APPEND: allows to append a new datasets to an existing file
|
||||
- \c H5_O_APPENDONLY: allows to append new data to an existing file
|
||||
- \c H5_O_RDWR: dataset may exist
|
||||
- \c H5_FS_LUSTRE - enable optimizations for the Lustre file system
|
||||
- \c H5_VFD_MPIPOSIX - use the HDF5 MPI-POSIX virtual file driver
|
||||
- \c H5_VFD_MPIIO_IND - use MPI-IO in indepedent mode
|
||||
- \c H5_VFD_MPIO_POSIX - use the HDF5 MPI-POSIX virtual file driver
|
||||
- \c H5_VFD_MPIO_INDEPENDENT - use MPI-IO in indepedent mode
|
||||
|
||||
The typical file extension is \c .h5.
|
||||
|
||||
|
||||
+23
-2
@@ -15,6 +15,15 @@
|
||||
|
||||
#define UNUSED_ARGUMENT(x) (void)x
|
||||
|
||||
// dummy MPI calls for serial code
|
||||
#if !defined (PARALLEL_IO)
|
||||
#define MPI_Init(argc, argv)
|
||||
#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; }
|
||||
#define MPI_Comm_rank(comm, myproc) { *myproc = 0; }
|
||||
#define MPI_Finalize()
|
||||
#define MPI_COMM_WORLD (0)
|
||||
#define MPI_COMM_SELF (1)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -42,15 +51,27 @@ h5_set_prop_file_align (
|
||||
h5_prop_t, const h5_int64_t);
|
||||
|
||||
h5_err_t
|
||||
h5_set_prop_file_mpio (
|
||||
h5_set_prop_file_mpio_collective (
|
||||
h5_prop_t, MPI_Comm* const);
|
||||
|
||||
h5_err_t
|
||||
h5_set_prop_file_mpio_independent (
|
||||
h5_prop_t, MPI_Comm* const);
|
||||
|
||||
h5_err_t
|
||||
h5_set_prop_file_mpio_posix (
|
||||
h5_prop_t, MPI_Comm* const);
|
||||
|
||||
h5_err_t
|
||||
h5_set_prop_file_core_vfd (
|
||||
h5_prop_t);
|
||||
|
||||
h5_err_t
|
||||
h5_close_prop (
|
||||
h5_prop_t);
|
||||
|
||||
h5_file_t
|
||||
h5_open_file (
|
||||
h5_open_file1 (
|
||||
const char*, const h5_int32_t, MPI_Comm, const h5_size_t);
|
||||
|
||||
h5_file_t
|
||||
|
||||
@@ -32,7 +32,7 @@ extern "C" {
|
||||
#define H5_DEBUG_MALLOC (1<<9)
|
||||
#define H5_DEBUG_CLIB (1<<10)
|
||||
|
||||
#define H5_DEBUG_ALL (-1)
|
||||
#define H5_DEBUG_ALL (-1 & ~0x3)
|
||||
|
||||
extern char* h5_rfmts[];
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ h5_warn (
|
||||
const char* fmt,
|
||||
...
|
||||
) {
|
||||
if (h5_debug_level >= 2) {
|
||||
if ((h5_debug_level & 0x3) >= 2) {
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
h5priv_vprintf (stderr, "W", h5_get_funcname(), fmt, ap);
|
||||
@@ -274,7 +274,7 @@ h5_info (
|
||||
const char* fmt,
|
||||
...
|
||||
) {
|
||||
if (h5_debug_level >= 3) {
|
||||
if ((h5_debug_level & 0x3) == 3) {
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
h5priv_vprintf (stdout, "I", h5_get_funcname(), fmt, ap);
|
||||
|
||||
@@ -20,20 +20,20 @@ extern "C" {
|
||||
|
||||
/*
|
||||
file modes:
|
||||
H5_O_RDONLY: only reading allowed
|
||||
H5_O_WRONLY: create new file, dataset must not exist
|
||||
H5_O_APPEND: allows to append a new datasets to an existing file
|
||||
H5_O_RDWR: dataset may exist
|
||||
H5_O_RDONLY: read data from existing file
|
||||
H5_O_WRONLY: create new file, if file not exists; write new or overwrite existing data
|
||||
H5_O_APPENDONLY: allows to append new data to an existing file
|
||||
H5_O_RDWR: create new file, if file not exists; read and (over-)write data
|
||||
*/
|
||||
#define H5_O_RDWR 0x00000001
|
||||
#define H5_O_RDONLY 0x00000002
|
||||
#define H5_O_WRONLY 0x00000004
|
||||
#define H5_O_APPEND 0x00000008
|
||||
#define H5_O_APPENDONLY 0x00000008
|
||||
|
||||
#define H5_VFD_MPIPOSIX 0x00000010
|
||||
#define H5_VFD_MPIIO_IND 0x00000020
|
||||
#define H5_VFD_INDEPENDENT H5_VFD_MPIIO_IND // obsolete(?)
|
||||
#define H5_VFD_CORE 0x00000040
|
||||
#define H5_VFD_MPIO_POSIX 0x00000010
|
||||
#define H5_VFD_MPIO_INDEPENDENT 0x00000020
|
||||
#define H5_VFD_MPIO_COLLECTIVE 0x00000040
|
||||
#define H5_VFD_CORE 0x00000080
|
||||
|
||||
#define H5_FLUSH_FILE 0x00001000
|
||||
#define H5_FLUSH_STEP 0x00002000
|
||||
@@ -101,9 +101,6 @@ struct h5_prop;
|
||||
typedef struct h5_prop* h5_prop_p;
|
||||
typedef uintptr_t h5_prop_t;
|
||||
|
||||
struct h5_prop_file;
|
||||
typedef struct h5_prop_file* h5_prop_file_p;
|
||||
|
||||
struct h5_file;
|
||||
typedef struct h5_file* h5_file_p;
|
||||
typedef uintptr_t h5_file_t;
|
||||
|
||||
Reference in New Issue
Block a user