Merge pull request #880 from vchoi-hdfgroup/config_feature_vfd_swmr

Config feature vfd swmr
This commit is contained in:
vchoi-hdfgroup
2021-08-09 13:04:09 -05:00
committed by GitHub
2 changed files with 38 additions and 3 deletions

View File

@@ -1756,7 +1756,7 @@ vfd_swmr_enlarge_shadow_index(H5F_t *f)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "shadow-file allocation failed for index")
}
new_mdf_idx = HDmalloc(new_mdf_idx_len * sizeof(new_mdf_idx[0]));
new_mdf_idx = H5MM_calloc(new_mdf_idx_len * sizeof(new_mdf_idx[0]));
if (new_mdf_idx == NULL) {
(void)H5MV_free(f, idx_addr, idx_size);
@@ -1774,6 +1774,11 @@ vfd_swmr_enlarge_shadow_index(H5F_t *f)
ret_value = shared->mdf_idx = new_mdf_idx;
shared->mdf_idx_len = new_mdf_idx_len;
H5MM_xfree(f->shared->old_mdf_idx);
shared->old_mdf_idx = old_mdf_idx;
f->shared->old_mdf_idx_len = old_mdf_idx_len;
/* Postpone reclamation of the old index until max_lag ticks from now.
* It's only necessary to wait until after the new index is in place,
* so it's possible that some disused shadow storage will build up

View File

@@ -145,9 +145,9 @@ all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo
all_tests="${all_tests} groups groups_attrs groups_ops few_big many_small attrdset"
tests=${all_tests}
# For exhaustive run, add: os_groups_attrs, os_groups_ops, dsetops, dsetchks
# For exhaustive run, add: os_groups_attrs, os_groups_ops, os_groups_seg, dsetops, dsetchks
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
all_tests="${all_tests} os_groups_attrs os_groups_ops dsetops dsetchks"
all_tests="${all_tests} os_groups_attrs os_groups_ops os_groups_seg dsetops dsetchks"
fi
if [ $# -gt 0 ]; then
@@ -1007,6 +1007,36 @@ for options in ${os_grp_op_list[*]}; do
done
###############################################################################
#
# Setting for "os_groups_seg" test
#
# Only for exhaustive run
#
# Verify the segmentation fault is fixed when running with:
# --1,000,000 groups
# --as writer only
#
###############################################################################
#
#
GROUP_seg_n=1000000 # Number of groups when segmentation fault occurs
if [ ${do_os_groups_seg:-no} = no ]; then
continue
fi
echo launch vfd_swmr_group operations with old-style group: $GROUP_seg_n groups ......may take some time......
catch_out_err_and_rc vfd_swmr_group_writer \
../vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
# Collect exit code of the writer
if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
echo writer had error
nerrors=$((nerrors + 1))
fi
# Clean up output files
rm -f vfd_swmr_group_writer.{out,rc}
###############################################################################
#
# Setting for bigset (few_big and many_small) tests