diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2023-11-16 16:12:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 16:12:45 (GMT) |
commit | ed31aaca798353f205bdd05290d4fe8c5e978778 (patch) | |
tree | 0d5183c225350de80ad72b65d578527d0089960a /testpar/t_filters_parallel.c | |
parent | ef39882fa1e13740d2530c7a0637bd1f1a822b68 (diff) | |
download | hdf5-ed31aaca798353f205bdd05290d4fe8c5e978778.zip hdf5-ed31aaca798353f205bdd05290d4fe8c5e978778.tar.gz hdf5-ed31aaca798353f205bdd05290d4fe8c5e978778.tar.bz2 |
Implement selection vector I/O with collective chunk filling (#3826)
* Changes for ECP-344: Implement selection vector I/O with collective chunk filling.
Also fix a bug in H5FD__mpio_write_vector() to account for fixed size optimization
when computing max address.
* Fixes based on PR review comments:
For H5Dchunk.c: fix H5MM_xfree()
For H5FDmpio.c:
1) Revert the fix to H5FD__mpio_write_vector()
2) Apply the patch from Neil on the proper length of s_sizes reported by H5FD__mpio_vector_build_types()
* Put back the logic of dividing up the work among all the mpi ranks similar to the
original H5D__chunk_collective_fill() routine.
* Add a test to verify the fix for the illegal reference problem in H5FD__mpio_write_vector().
Diffstat (limited to 'testpar/t_filters_parallel.c')
-rw-r--r-- | testpar/t_filters_parallel.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 6c05408..f60431b 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -547,8 +547,9 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo /* Verify selection I/O mode on rank 0 */ if (mpi_rank == 0) { - /* No actual I/O performed, only reported I/O will be from allocation, even if "no" datasets were - * involved (num_dsets == 0 implies the call was expected to fail, but it fails after allocation). + /* No actual I/O performed, the only reported I/O will be from allocation which is vector I/O, + * even if "no" datasets were involved (num_dsets == 0 implies the call was expected to fail, + * but it fails after allocation). * Also if the test mode is mixed filtered and unfiltered and the call did not fail, then there * will always be an I/O callback made with raw data. This is because unfiltered datasets fall * back to scalar I/O when mixed with filtered, and scalar I/O reports an I/O call was made even @@ -557,9 +558,18 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo * filtered dataset with no selection. Vector I/O does report an I/O call was made if passed a raw * data element of size 0, so this is consistent. */ if (!any_io) { - if (did_alloc || (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED)) + if (did_alloc && (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED)) { + VRFY((H5D_VECTOR_IO | H5D_SCALAR_IO) == actual_sel_io_mode_reduced, + "verified actual selection I/O mode was vector and scalar I/O"); + } + else if (did_alloc) { + VRFY(H5D_VECTOR_IO == actual_sel_io_mode_reduced, + "verified actual selection I/O mode was vector I/O"); + } + else if (num_dsets > 0 && test_mode == USE_MULTIPLE_DATASETS_MIXED_FILTERED) { VRFY(H5D_SCALAR_IO == actual_sel_io_mode_reduced, "verified actual selection I/O mode was scalar I/O"); + } else VRFY(0 == actual_sel_io_mode_reduced, "verified actual selection I/O mode was 0 (no I/O)"); @@ -588,19 +598,18 @@ verify_chunk_opt_status(size_t num_dsets, test_mode_t test_mode, bool any_io, bo switch (test_mode) { case USE_SINGLE_DATASET: case USE_MULTIPLE_DATASETS: - /* Collective case with only filtered datasets. If we performed allocation then there - * should be scalar I/O for allocation in addition to vector I/O for the actual data. - * If we're reading from an unallocated dataset then there should be no actual I/O. - * Otherwise there should only be vector I/O. */ - if (did_alloc) - VRFY((H5D_SCALAR_IO | H5D_VECTOR_IO) == actual_sel_io_mode_reduced, - "verified actual selection I/O mode was scalar and vector I/O"); - else if (unalloc_read) + /* Collective case with only filtered datasets. + * If we're reading from an unallocated dataset then there + * should be no actual I/O. + * Otherwise, only vector I/O is reported whether or not + * allocation happened. */ + if (unalloc_read) VRFY(0 == actual_sel_io_mode_reduced, "verified actual selection I/O mode was 0 (no I/O)"); - else + else { /* did_alloc || !unalloc_read */ VRFY(H5D_VECTOR_IO == actual_sel_io_mode_reduced, "verified actual selection I/O mode was vector I/O"); + } break; case USE_MULTIPLE_DATASETS_MIXED_FILTERED: |