this commits includes several changes which should have been done in
multiple steps: - the functions for inquiring datasets and attributes do not return an HDF5 type any more but an enum of type h5_types_t. This change was required for the Python module. - bugfix in reading attributes: See https://git.psi.ch/H5hut/src/issues/4 - several consts and macros have been moved from the public C-API to the core API - more consitent file naming - several 'private' function have been moved to their 'private' header files as 'static inline'. - minor formatting changes
This commit is contained in:
+11
-7
@@ -471,6 +471,7 @@ void h5u_test_read2(void)
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
void h5u_test_read3(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
@@ -478,7 +479,11 @@ void h5u_test_read3(void)
|
||||
h5_int64_t status;
|
||||
|
||||
TEST("Opening file once, read-only, MPI-POSIX VFD");
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY | H5_VFD_MPIO_POSIX, H5_PROP_DEFAULT);
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, prop);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
@@ -492,6 +497,7 @@ void h5u_test_read3(void)
|
||||
status = H5CloseFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
#endif
|
||||
|
||||
void h5u_test_read4(void)
|
||||
{
|
||||
@@ -503,16 +509,14 @@ void h5u_test_read4(void)
|
||||
|
||||
TEST("Opening file twice, read-only, MPI-IO Independent VFD");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY | H5_VFD_MPIO_INDEPENDENT, props);
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
file2 = H5OpenFile(FILENAME, H5_O_RDONLY | H5_VFD_MPIO_INDEPENDENT, props);
|
||||
file2 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file2);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
/* from write.c */
|
||||
void h5u_test_write1(void);
|
||||
void h5u_test_write2(void);
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
void h5u_test_write3(void);
|
||||
#endif
|
||||
void h5u_test_write4(void);
|
||||
|
||||
/* from read.c */
|
||||
@@ -38,8 +40,10 @@ int main(int argc, char **argv)
|
||||
AddTest("read1", h5u_test_read1, NULL, "Read 32-bit data", NULL);
|
||||
AddTest("write2", h5u_test_write2, NULL, "Write 32-bit strided data", NULL);
|
||||
AddTest("read2", h5u_test_read2, NULL, "Read 32-bit strided data", NULL);
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
AddTest("write3", h5u_test_write3, NULL, "Write 64-bit strided data", NULL);
|
||||
AddTest("read3", h5u_test_read3, NULL, "Read 64-bit strided data", NULL);
|
||||
#endif
|
||||
AddTest("write4", h5u_test_write4, NULL, "Write 64-bit data", NULL);
|
||||
AddTest("read4", h5u_test_read4, NULL, "Read 64-bit data", NULL);
|
||||
|
||||
|
||||
+9
-15
@@ -360,8 +360,6 @@ void h5u_test_write1(void)
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
@@ -388,8 +386,6 @@ void h5u_test_write2(void)
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_APPENDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
@@ -411,6 +407,7 @@ void h5u_test_write2(void)
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
void h5u_test_write3(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
@@ -420,12 +417,10 @@ void h5u_test_write3(void)
|
||||
|
||||
TEST("Opening file once, write-truncate, MPI-POSIX VFD");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY | H5_VFD_MPIO_POSIX, props);
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -443,6 +438,7 @@ void h5u_test_write3(void)
|
||||
status = H5CloseFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
#endif
|
||||
|
||||
void h5u_test_write4(void)
|
||||
{
|
||||
@@ -455,16 +451,14 @@ void h5u_test_write4(void)
|
||||
|
||||
TEST("Opening file twice, write-append + read-only, MPI-IO Independent VFD");
|
||||
props = H5CreateFileProp ();
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_APPENDONLY | H5_VFD_MPIO_INDEPENDENT, props);
|
||||
file1 = H5OpenFile(FILENAME, H5_O_APPENDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
file2 = H5OpenFile(FILENAME, H5_O_RDONLY | H5_VFD_MPIO_INDEPENDENT, props);
|
||||
file2 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file2);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user