Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into locking_protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
qkoziol committed Oct 18, 2024
2 parents 2f379d2 + 4a10a06 commit 4c9b00c
Show file tree
Hide file tree
Showing 37 changed files with 450 additions and 357 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/h5py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
./spack/bin/spack install py-h5py@master+mpi ^[email protected]
./spack/bin/spack install py-pytest
./spack/bin/spack install py-ipython
./spack/bin/spack install py-pytest-mpi
spack load py-h5py
spack load py-pytest
spack load py-ipython
pip install pytest-mpi
spack load py-pytest-mpi
python -c "import h5py; h5py.run_tests(); print(h5py.version.info);"
7 changes: 4 additions & 3 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ jobs:
- name: CMake Run Package
run: cpack -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
if: ${{ inputs.build_mode != 'Debug' }}

- name: List files in the space
run: |
Expand All @@ -279,20 +280,20 @@ jobs:
name: zip-vs2022_cl-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF5-*-win64.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'windows-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') }}
if: ${{ (matrix.os == 'windows-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') && ( inputs.build_mode != 'Debug') }}

- name: Save published binary (linux)
uses: actions/upload-artifact@v4
with:
name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') }}
if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') && ( inputs.build_mode != 'Debug') }}

- name: Save published binary (Mac_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-macos14_clang-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') }}
if: ${{ (matrix.os == 'macos-latest') && (inputs.thread_safety != 'TS') && (inputs.concurrent != 'CC') && ( inputs.build_mode != 'Debug') }}
2 changes: 1 addition & 1 deletion CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
# on the target. The target returned is: ZLIB::ZLIB
get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
string (REGEX REPLACE "^lib" "" libname ${libname})
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME ${libname})
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
endif ()
else ()
Expand Down
4 changes: 4 additions & 0 deletions bin/h5cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if test -s "$arg"; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
4 changes: 4 additions & 0 deletions c++/src/h5c++.in
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
2 changes: 1 addition & 1 deletion c++/test/tattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ test_attr(const void *params)

// Loop over using new group format
unsigned new_format;
for (new_format = FALSE; new_format <= TRUE; new_format++) {
for (new_format = false; new_format <= true; new_format++) {
FileAccPropList curr_fapl;

// Set the file access proplist for the type of format
Expand Down
6 changes: 3 additions & 3 deletions c++/test/tfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ test_file_info()
SUBTEST("File general information");

hsize_t out_threshold = 0; // Free space section threshold to get
hbool_t out_persist = FALSE; // Persist free-space read
hbool_t out_persist = false; // Persist free-space read
// File space handling strategy
H5F_fspace_strategy_t out_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;

Expand All @@ -869,7 +869,7 @@ test_file_info()
// Verify file space information.
verify_val(static_cast<long>(out_strategy), static_cast<long>(H5F_FSPACE_STRATEGY_FSM_AGGR),
"H5File::getFileInfo", __LINE__, __FILE__);
verify_val(out_persist, FALSE, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(out_persist, false, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(static_cast<long>(out_threshold), 1, "H5File::getFileInfo", __LINE__, __FILE__);

/* Retrieve file space page size */
Expand All @@ -884,7 +884,7 @@ test_file_info()
fcpl.setIstorek(F2_ISTORE);

hsize_t threshold = 5; // Free space section threshold to set
hbool_t persist = TRUE; // Persist free-space to set
hbool_t persist = true; // Persist free-space to set
H5F_fspace_strategy_t strategy = H5F_FSPACE_STRATEGY_PAGE;

fcpl.setFileSpaceStrategy(strategy, persist, threshold);
Expand Down
14 changes: 7 additions & 7 deletions c++/test/tlinks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ test_basic_links(hid_t fapl_id, hbool_t new_format)
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);

// Verify link existence
if (file.nameExists("dset1", LinkAccPropList::DEFAULT) != TRUE)
if (file.nameExists("dset1", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::nameExists", "dset1 doesn't exist");
if (file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
if (file.nameExists("grp1/soft", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::nameExists", "grp1/soft doesn't exist");
// Deprecated
if (file.exists("dset1", LinkAccPropList::DEFAULT) != TRUE)
if (file.exists("dset1", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::exists", "dset1 doesn't exist");
if (file.exists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
if (file.exists("grp1/soft", LinkAccPropList::DEFAULT) != true)
throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist");

// Verify link values
Expand Down Expand Up @@ -290,7 +290,7 @@ test_move(hid_t fapl_id, hbool_t new_format)

// Move a soft link across files, should succeed
grp_2.moveLink("soft", file_b, "soft_new_name");
if (file_b.exists("soft_new_name") != TRUE)
if (file_b.exists("soft_new_name") != true)
throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist");

// Move a group across groups in the same file while renaming it
Expand Down Expand Up @@ -429,7 +429,7 @@ test_copy(hid_t fapl_id, hbool_t new_format)

// Copy a soft link across files, should succeed
grp_2.copyLink("soft", file_b, "soft_new_name");
if (file_b.exists("soft_new_name") != TRUE)
if (file_b.exists("soft_new_name") != true)
throw InvalidActionException("H5File::exists", "soft_new_name doesn't exist");

// Move a group across groups in the same file while renaming it
Expand Down Expand Up @@ -730,7 +730,7 @@ test_links(const void *params)
throw Exception("test_links", "H5Pset_libver_bounds failed");

/* Loop over using new group format */
for (new_format = FALSE; new_format <= TRUE; new_format++) {
for (new_format = false; new_format <= true; new_format++) {
hid_t my_fapl_id;

/* Check for FAPL to use */
Expand Down
32 changes: 16 additions & 16 deletions c++/test/tobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,54 +169,54 @@ test_existance()

// Check if GROUP1 exists in the file
bool exists = file.nameExists(GROUP1);
verify_val(exists, TRUE, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
// Deprecated
exists = file.exists(GROUP1);
verify_val(exists, TRUE, "Group::exists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_1", __LINE__, __FILE__);

// Open GROUP1
Group grp1 = file.openGroup(GROUP1);

// Check if GROUP1_1 and GROUP1_2 exist in GROUP1
exists = grp1.nameExists(GROUP1_1);
verify_val(exists, TRUE, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_1", __LINE__, __FILE__);
exists = grp1.nameExists(GROUP1_2);
verify_val(exists, TRUE, "Group::nameExists GROUP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists GROUP1_2", __LINE__, __FILE__);
// Deprecated
exists = grp1.exists(GROUP1_1);
verify_val(exists, TRUE, "Group::exists GROUP1_1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_1", __LINE__, __FILE__);
exists = grp1.exists(GROUP1_2);
verify_val(exists, TRUE, "Group::exists GROUP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists GROUP1_2", __LINE__, __FILE__);

// Check if DSET_IN_GRP1 exists in GROUP1
exists = grp1.nameExists(DSET_IN_GRP1);
verify_val(exists, TRUE, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
// Deprecated
exists = grp1.exists(DSET_IN_GRP1);
verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);

// Open GROUP1_2
Group grp1_2 = grp1.openGroup(GROUP1_2);

// Check if DSET_IN_GRP1_2 exists in GROUP1_2
exists = grp1_2.nameExists(DSET_IN_GRP1_2);
verify_val(exists, TRUE, "Group::nameExists DSET_IN_GRP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists DSET_IN_GRP1_2", __LINE__, __FILE__);
// Deprecated
exists = grp1_2.exists(DSET_IN_GRP1_2);
verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1_2", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists DSET_IN_GRP1_2", __LINE__, __FILE__);

// Check if a dataset exists given dataset as location with full path name
DataSet dset1 = file.openDataSet(DSET_IN_FILE);
exists = dset1.nameExists("/Top Group/Dataset_in_Group_1");
verify_val(exists, TRUE, "Group::nameExists given dataset with full path name", __LINE__, __FILE__);
verify_val(exists, true, "Group::nameExists given dataset with full path name", __LINE__, __FILE__);

exists = grp1_2.nameExists(DSET_IN_GRP1);
verify_val(exists, FALSE, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, false, "Group::nameExists DSET_IN_GRP1", __LINE__, __FILE__);
// Deprecated
exists = dset1.exists("/Top Group/Dataset_in_Group_1");
verify_val(exists, TRUE, "Group::exists given dataset with full path name", __LINE__, __FILE__);
verify_val(exists, true, "Group::exists given dataset with full path name", __LINE__, __FILE__);
exists = grp1_2.exists(DSET_IN_GRP1);
verify_val(exists, FALSE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
verify_val(exists, false, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);

// Everything will be closed as they go out of scope

Expand Down Expand Up @@ -647,7 +647,7 @@ test_intermediate_groups()
} // Failure is ignored

// Create GROUP14NAME with the flag to create missing groups set
// to FALSE, should fail because group GROUP13NAME is missing
// to false, should fail because group GROUP13NAME is missing

// Reset flag to not create missing groups
lcpl.setCreateIntermediateGroup(false);
Expand All @@ -662,7 +662,7 @@ test_intermediate_groups()
catch (FileIException &expected2) {
} // Failure is ignored

// Set the flag to create missing groups set to TRUE
// Set the flag to create missing groups set to true
lcpl.setCreateIntermediateGroup(true);
crt_int_grps = lcpl.getCreateIntermediateGroup();
verify_val(crt_int_grps, true, "LinkCreatPropList::getCreateIntermediateGroup", __LINE__, __FILE__);
Expand Down
10 changes: 0 additions & 10 deletions doxygen/dox/ExamplesAPI.dox
Original file line number Diff line number Diff line change
Expand Up @@ -800,16 +800,6 @@ FORTRAN
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_lzf.ddl">h5ex_d_lzf.ddl</a></td>
</tr>
<tr>
<td>Read / Write Dataset using MAFISC Compression</td>
<td>
<a href="https://\SRCURL/HDF5Examples/C/H5FLT/h5ex_d_mafisc.c">C</a>
FORTRAN Java JavaObj MATLAB PyHigh PyLow
</td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.h5">h5ex_d_mafisc.h5</a></td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.tst">h5ex_d_mafisc.tst</a></td>
<td><a href="https://\SRCURL/HDF5Examples/C/H5FLT/tfiles/h5ex_d_mafisc.ddl">h5ex_d_mafisc.ddl</a></td>
</tr>
<tr>
<td>Read / Write Dataset using ZFP Compression</td>
<td>
<a href="https://\SRCURL/HDF5Examples/C/H5FLT/h5ex_d_zfp.c">C</a>
Expand Down
6 changes: 4 additions & 2 deletions fortran/src/H5Sff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,10 @@ END SUBROUTINE h5sset_extent_none_f
!! \param operator Flag, valid values are:
!! \li H5S_SELECT_SET_F
!! \li H5S_SELECT_OR_F
!! \li H5S_SELECT_AND_F
!! \li H5S_SELECT_XOR_F
!! \li H5S_SELECT_NOTB_F
!! \li H5S_SELECT_NOTA_F
!! \param start Array with hyperslab offsets, \Bold{0-based indices}.
!! \param count Number of blocks included in the hyperslab.
!! \param hdferr \fortran_error
Expand Down Expand Up @@ -1000,8 +1004,6 @@ END SUBROUTINE h5sselect_hyperslab_f
! H5S_SELECT_XOR_F
! H5S_SELECT_NOTB_F
! H5S_SELECT_NOTA_F
! H5S_SELECT_APPEND_F
! H5S_SELECT_PREPEND_F
! start - array with hyperslab offsets
! count - number of blocks included in the
! hyperslab
Expand Down
4 changes: 4 additions & 0 deletions fortran/src/h5fc.in
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ for arg in $@ ; do
qarg='"'"$arg"'"'
qargs="$qargs $qarg"
;;
*\ *)
qarg=$arg
qargs="$qargs $qarg"
;;
*)
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
Expand Down
Loading

0 comments on commit 4c9b00c

Please sign in to comment.