summaryrefslogtreecommitdiffstats
path: root/testpar/t_subfiling_vfd.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-05-02 05:25:48 (GMT)
committerGitHub <noreply@github.com>2023-05-02 05:25:48 (GMT)
commit6eb021b68a8b46bbc89844713f014e6ba729ca7d (patch)
tree25a971cb952841ac796db4f72a4be850ac2ce437 /testpar/t_subfiling_vfd.c
parentda46fdbf50984636aeac936386068939a3760fe4 (diff)
downloadhdf5-6eb021b68a8b46bbc89844713f014e6ba729ca7d.zip
hdf5-6eb021b68a8b46bbc89844713f014e6ba729ca7d.tar.gz
hdf5-6eb021b68a8b46bbc89844713f014e6ba729ca7d.tar.bz2
Sync with develop (#2871)
Diffstat (limited to 'testpar/t_subfiling_vfd.c')
-rw-r--r--testpar/t_subfiling_vfd.c68
1 files changed, 54 insertions, 14 deletions
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c
index 85df3bd..f827aa5 100644
--- a/testpar/t_subfiling_vfd.c
+++ b/testpar/t_subfiling_vfd.c
@@ -425,7 +425,10 @@ test_stripe_sizes(void)
VRFY(tmp_filename, "HDmalloc succeeded");
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
- VRFY((dxpl_id >= 0), "DCPL creation succeeded");
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
for (size_t i = 0; i < SUBF_NITER; i++) {
H5FD_subfiling_params_t cfg;
@@ -1011,12 +1014,19 @@ test_read_different_stripe_size(void)
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
char *tmp_filename = NULL;
void *buf = NULL;
curr_nerrors = nerrors;
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
+
if (MAINPROCESS)
TESTING_2("file re-opening with different stripe size");
@@ -1066,7 +1076,7 @@ test_read_different_stripe_size(void)
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
- VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
HDfree(buf);
@@ -1133,7 +1143,7 @@ test_read_different_stripe_size(void)
buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE));
VRFY(buf, "HDcalloc succeeded");
- VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset read succeeded");
for (size_t i = 0; i < count[0]; i++) {
@@ -1185,6 +1195,7 @@ test_read_different_stripe_size(void)
}
H5E_END_TRY;
+ VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
HDfree(tmp_filename);
@@ -1214,11 +1225,18 @@ test_subfiling_precreate_rank_0(void)
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
curr_nerrors = nerrors;
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
+
if (MAINPROCESS)
TESTING_2("file pre-creation on rank 0");
@@ -1278,7 +1296,7 @@ test_subfiling_precreate_rank_0(void)
for (size_t i = 0; i < dset_dims[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((i / n_elements_per_rank) + (i % n_elements_per_rank));
- VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
HDfree(buf);
@@ -1357,7 +1375,7 @@ test_subfiling_precreate_rank_0(void)
buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE));
VRFY(buf, "HDcalloc succeeded");
- VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset read succeeded");
for (size_t i = 0; i < n_elements_per_rank; i++) {
@@ -1380,6 +1398,7 @@ test_subfiling_precreate_rank_0(void)
H5E_END_TRY;
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
+ VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
CHECK_PASSED();
}
@@ -1405,11 +1424,18 @@ test_subfiling_write_many_read_one(void)
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
curr_nerrors = nerrors;
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
+
if (MAINPROCESS)
TESTING_2("reading back file with single MPI rank");
@@ -1461,7 +1487,7 @@ test_subfiling_write_many_read_one(void)
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
- VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
HDfree(buf);
@@ -1486,7 +1512,7 @@ test_subfiling_write_many_read_one(void)
buf = HDcalloc(1, target_size);
VRFY(buf, "HDcalloc succeeded");
- VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
for (size_t i = 0; i < (size_t)mpi_size; i++) {
@@ -1516,6 +1542,7 @@ test_subfiling_write_many_read_one(void)
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded");
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
CHECK_PASSED();
}
@@ -1543,11 +1570,18 @@ test_subfiling_write_many_read_few(void)
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
curr_nerrors = nerrors;
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
+
if (MAINPROCESS)
TESTING_2("reading back file with fewer MPI ranks than written with");
@@ -1609,7 +1643,7 @@ test_subfiling_write_many_read_few(void)
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
- VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
HDfree(buf);
@@ -1664,7 +1698,7 @@ test_subfiling_write_many_read_few(void)
buf = HDcalloc(1, target_size);
VRFY(buf, "HDcalloc succeeded");
- VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
for (size_t i = 0; i < (size_t)mpi_size; i++) {
@@ -1699,6 +1733,7 @@ test_subfiling_write_many_read_few(void)
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded");
VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded");
+ VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
CHECK_PASSED();
}
@@ -1727,6 +1762,7 @@ test_subfiling_h5fuse(void)
hid_t file_id = H5I_INVALID_HID;
hid_t fapl_id = H5I_INVALID_HID;
hid_t dset_id = H5I_INVALID_HID;
+ hid_t dxpl_id = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
void *buf = NULL;
int skip_test = 0;
@@ -1734,6 +1770,12 @@ test_subfiling_h5fuse(void)
curr_nerrors = nerrors;
+ dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_id >= 0), "DXPL creation succeeded");
+
+ /* Set selection I/O mode on DXPL */
+ VRFY((H5Pset_selection_io(dxpl_id, H5D_SELECTION_IO_MODE_ON) >= 0), "H5Pset_selection_io succeeded");
+
if (MAINPROCESS)
TESTING_2("h5fuse utility");
@@ -1826,7 +1868,7 @@ test_subfiling_h5fuse(void)
for (size_t i = 0; i < count[0]; i++)
((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i);
- VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0),
"Dataset write succeeded");
HDfree(buf);
@@ -1899,7 +1941,7 @@ test_subfiling_h5fuse(void)
buf = HDcalloc(1, target_size);
VRFY(buf, "HDcalloc succeeded");
- VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) >= 0),
+ VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0),
"Dataset read succeeded");
for (size_t i = 0; i < (size_t)mpi_size; i++) {
@@ -1969,6 +2011,7 @@ test_subfiling_h5fuse(void)
}
VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded");
+ VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded");
mpi_code_g = MPI_Barrier(comm_g);
VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded");
@@ -2132,9 +2175,6 @@ main(int argc, char **argv)
H5open();
- /* Enable selection I/O using internal temporary workaround */
- H5_use_selection_io_g = TRUE;
-
if (MAINPROCESS) {
HDprintf("Testing Subfiling VFD functionality\n");
}