test: use independent IO in h5u_test_{read,write}3() for hdf5 > 1.8.12
Since MPI-POSIX VFD has been removed from hdf5 > 1.8.12, but a test with stride data should be performed, we use independent IO instead for hdf5 > 1.8.12
This commit is contained in:
+13
-2
@@ -471,19 +471,31 @@ 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;
|
||||
h5_int64_t status;
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
TEST("Opening file once, read-only, MPI-POSIX VFD");
|
||||
#else
|
||||
TEST("Opening file once, read-only, MPI-IO Independent VFD");
|
||||
#endif
|
||||
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
|
||||
#if defined(H5_HAVE_PARALLEL)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
#else
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
#endif
|
||||
|
||||
#endif // H5_HAVE_PARALLEL
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -498,7 +510,6 @@ void h5u_test_read3(void)
|
||||
status = H5CloseFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
#endif
|
||||
|
||||
void h5u_test_read4(void)
|
||||
{
|
||||
|
||||
+13
-3
@@ -411,21 +411,32 @@ 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;
|
||||
h5_err_t status;
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
TEST("Opening file once, write-truncate, MPI-POSIX VFD");
|
||||
|
||||
#else
|
||||
TEST("Opening file once, write-truncate, MPI-IO Independent VFD");
|
||||
#endif
|
||||
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
|
||||
#if defined(H5_HAVE_PARALLEL)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
#if H5_VERSION_LE(1,8,12)
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
#else
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
#endif
|
||||
|
||||
#endif // H5_HAVE_PARALLEL
|
||||
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
|
||||
status = H5CheckFile(file1);
|
||||
@@ -444,7 +455,6 @@ void h5u_test_write3(void)
|
||||
status = H5CloseFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
}
|
||||
#endif
|
||||
|
||||
void h5u_test_write4(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user