summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-21 01:08:49 (GMT)
committerGitHub <noreply@github.com>2023-10-21 01:08:49 (GMT)
commitb16808d35160fb0d22999447dbf53838d7918a7a (patch)
treeeaf7a8cb712da1f2b200f6b2f0a44ed538d50409 /src/H5Dio.c
parent302f54a566533615545f76af8f34f2665341539b (diff)
downloadhdf5-b16808d35160fb0d22999447dbf53838d7918a7a.zip
hdf5-b16808d35160fb0d22999447dbf53838d7918a7a.tar.gz
hdf5-b16808d35160fb0d22999447dbf53838d7918a7a.tar.bz2
Sync with develop (#3737)
* Correct ld in format strings in cmpd_dset.c (#3697) Removes clang warnings * Clean up comments. (#3695) * Add NVidia compiler support and CI (#3686) * Work around Theta system issue failure in links test (#3710) When the Subfiling VFD is enabled, the links test may try to initialize the Subfiling VFD and call MPI_Init_thread. On Theta, this appears to have an issue that will cause the links test to fail. Reworked the test to check for the same conditions in a more roundabout way that doesn't involved initializing the Subfiling VFD * Fix issue with unmatched messages in ph5diff (#3719) * provide an alternative to mapfile for older bash (#3717) * Attempt to quiet some warnings with cray compilers. (#3724) * Fix CMake VOL passthrough tests by copying files to correct directory (#3721) * Develop intel split (#3722) * Split intel compiler flags into sub-folders * Update Intel options for warnings * Mostly CMake, Autotools needs additional work * Fixes and adjustments to t_filters_parallel (#3714) Broadcast number of datasets to create in multi-dataset I/O cases so that interference with random number generation doesn't cause mismatches between ranks Set fill time for datasets to "never" by default and adjust on a per-test basis to avoid writing fill values to chunks when it's unnecessary Reduce number of loops run in some tests when performing multi-dataset I/O Fix an issue in the "fill time never" test where data verification could fill if file space reuse causes application buffers to be filled with chosen fill value when reading from datasets with uninitialized storage Skip multi-chunk I/O test configurations for multi-dataset I/O configurations when the TestExpress level is > 1 since those tests can be more stressful on the file system Disable use of persistent file free space management for now since it occasionally runs into an infinite loop in the library's free space management code * Suppress cast-qual warning in H5TB Fortran wrapper (#3728) This interface is fundamentally broken, const-wise. * Add new API function H5Pget_actual_select_io_mode() (#2974) This function allows the user to determine if the library performed selection I/O, vector I/O, or scalar (legacy) I/O during the last HDF5 operation performed with the provided DXPL. Expanded existing tests to check this functionality. * Test scripts now execute in-source with creation of tmp dir (#3723) Fixes a few issues created in #3580: * Fixes a problem where committed tools test files were deleted when cleaning after an in-source build * Fixes issues with test file paths in Autotools tools test scripts * Add -h and --help as flags in h5cc & h5fc (#3729) Adds these common help flags in addition to -help * Update the library version matrix for H5Pset_libver_bounds() (#3702) * Fixed #3524 Added 1.12, 1.14, and 1.16 to the table for libver bounds in the H5Pset_libver_bounds docs. * Remove references to LIBVER_V116 --------- Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Neil Fortner <fortnern@gmail.com> Co-authored-by: Glenn Song <43005495+glennsong09@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c76
1 files changed, 35 insertions, 41 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 2134ce1..611518d 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -143,17 +143,17 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
} /* end if */
#endif /*H5_HAVE_PARALLEL*/
- /* iterate over all dsets and construct I/O information necessary to do I/O */
+ /* Iterate over all dsets and construct I/O information necessary to do I/O */
for (i = 0; i < count; i++) {
haddr_t prev_tag = HADDR_UNDEF;
- /* check args */
+ /* Check args */
if (NULL == dset_info[i].dset)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset");
if (NULL == dset_info[i].dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file");
- /* set metadata tagging with dset oheader addr */
+ /* Set metadata tagging with dset oheader addr */
H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag);
/* Set up datatype info for operation */
@@ -173,10 +173,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].nelmts > 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer");
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer. */
dset_info[i].buf.vp = &fake_char;
} /* end if */
@@ -191,8 +188,8 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
* rapidly changing coordinates match up), but the I/O code still has
* difficulties with the notion.
*
- * To solve this, we check to see if H5S_select_shape_same() returns true,
- * and if the ranks of the mem and file spaces are different. If they are,
+ * To solve this, check if H5S_select_shape_same() returns true
+ * and the ranks of the mem and file spaces are different. If so,
* construct a new mem space that is equivalent to the old mem space, and
* use that instead.
*
@@ -347,7 +344,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].layout_ops.mdio_init) {
haddr_t prev_tag = HADDR_UNDEF;
- /* set metadata tagging with dset oheader addr */
+ /* Set metadata tagging with dset oheader addr */
H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag);
/* Make second phase IO init call */
@@ -396,7 +393,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].skip_io)
continue;
- /* set metadata tagging with dset oheader addr */
+ /* Set metadata tagging with dset object header addr */
H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag);
/* Invoke correct "high level" I/O routine */
@@ -553,18 +550,18 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (NULL == (store = (H5D_storage_t *)H5MM_malloc(count * sizeof(H5D_storage_t))))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset storage info array buffer");
- /* iterate over all dsets and construct I/O information */
+ /* Iterate over all dsets and construct I/O information */
for (i = 0; i < count; i++) {
bool should_alloc_space = false; /* Whether or not to initialize dataset's storage */
haddr_t prev_tag = HADDR_UNDEF;
- /* check args */
+ /* Check args */
if (NULL == dset_info[i].dset)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset");
if (NULL == dset_info[i].dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file");
- /* set metadata tagging with dset oheader addr */
+ /* Set metadata tagging with dset oheader addr */
H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag);
/* All filters in the DCPL must have encoding enabled. */
@@ -620,10 +617,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].nelmts > 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no input buffer");
- /* If the buffer is nil, and 0 element is selected, make a fake buffer.
- * This is for some MPI package like ChaMPIon on NCSA's tungsten which
- * doesn't support this feature.
- */
+ /* If the buffer is nil, and 0 element is selected, make a fake buffer. */
dset_info[i].buf.cvp = &fake_char;
} /* end if */
@@ -633,18 +627,18 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (!(H5S_has_extent(dset_info[i].mem_space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set");
- /* H5S_select_shape_same() has been modified to accept topologically
- * identical selections with different rank as having the same shape
- * (if the most rapidly changing coordinates match up), but the I/O
- * code still has difficulties with the notion.
+ /* H5S_select_shape_same() has been modified to accept topologically identical
+ * selections with different rank as having the same shape (if the most
+ * rapidly changing coordinates match up), but the I/O code still has
+ * difficulties with the notion.
*
- * To solve this, we check to see if H5S_select_shape_same() returns
- * true, and if the ranks of the mem and file spaces are different.
- * If they are, construct a new mem space that is equivalent to the
- * old mem space, and use that instead.
+ * To solve this, check if H5S_select_shape_same() returns true
+ * and the ranks of the mem and file spaces are different. If so,
+ * construct a new mem space that is equivalent to the old mem space, and
+ * use that instead.
*
- * Note that in general, this requires us to touch up the memory buffer
- * as well.
+ * Note that in general, this requires us to touch up the memory buffer as
+ * well.
*/
if (dset_info[i].nelmts > 0 &&
true == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
@@ -818,11 +812,11 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
"unable to allocate array of selected pieces");
}
- /* loop with serial & single-dset write IO path */
+ /* Loop with serial & single-dset write IO path */
for (i = 0; i < count; i++) {
assert(!dset_info[i].skip_io);
- /* set metadata tagging with dset oheader addr */
+ /* Set metadata tagging with dset oheader addr */
H5AC_tag(dset_info->dset->oloc.addr, &prev_tag);
/* Invoke correct "high level" I/O routine */
@@ -936,7 +930,7 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
FUNC_ENTER_PACKAGE_NOERR
- /* check args */
+ /* Check args */
assert(count > 0);
assert(dset_info);
assert(dset_info[0].dset->oloc.file);
@@ -1057,7 +1051,7 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
FUNC_ENTER_PACKAGE
- /* check args */
+ /* Check args */
assert(io_info);
assert(dset_info);
@@ -1151,7 +1145,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__typeinfo_init_phase2
*
- * Purpose: Continue initializing type info for all datasets after
+ * Purpose: Continues initializing type info for all datasets after
* calculating the max type size across all datasets, and
* before final determination of collective/independent in
* H5D__ioinfo_adjust(). Currently just checks to see if
@@ -1169,7 +1163,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
- /* check args */
+ /* Check args */
assert(io_info);
/* If selection I/O mode is default (auto), enable it here if the VFD supports it (it will be turned off
@@ -1238,7 +1232,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__ioinfo_adjust
*
- * Purpose: Adjust operation's I/O info for any parallel I/O, also
+ * Purpose: Adjusts operation's I/O info for any parallel I/O, also
* handle decision on selection I/O even in serial case
*
* Return: Non-negative on success/Negative on failure
@@ -1253,10 +1247,10 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
FUNC_ENTER_PACKAGE
- /* check args */
+ /* Check args */
assert(io_info);
- /* check the first dset, should exist either single or multi dset cases */
+ /* Check the first dset, should exist either single or multi dset cases */
assert(io_info->dsets_info[0].dset);
dset0 = io_info->dsets_info[0].dset;
assert(dset0->oloc.file);
@@ -1317,7 +1311,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
if (io_info->dsets_info[i].dset->shared->dcpl_cache.pline.nused > 0)
break;
- /* If the above loop didn't complete at least one dataset has a filter */
+ /* If the above loop didn't complete, at least one dataset has a filter */
if (i < io_info->count) {
int comm_size = 0;
@@ -1363,9 +1357,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__typeinfo_init_phase3
*
- * Purpose: Finish initializing type info for all datasets after
- * calculating the max type size across all datasets. And
- * after final collective/independent determination in
+ * Purpose: Finishes initializing type info for all datasets after
+ * calculating the max type size across all datasets and
+ * final collective/independent determination in
* H5D__ioinfo_adjust().
*
* Return: Non-negative on success/Negative on failure