Skip to content

Commit

Permalink
Merge branch 'HDFGroup:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee authored Mar 25, 2024
2 parents 1d5540f + 987fd8b commit 7527fbf
Show file tree
Hide file tree
Showing 108 changed files with 1,496 additions and 1,091 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/abi-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ jobs:
with:
name: abi-reports
path: |
${{ runner.workspace }}/buildabi/${{ inputs.file_base }}.html.abi.reports
${{ runner.workspace }}/buildabi/${{ inputs.file_base }}.html.abi.reports.tar.gz
12 changes: 0 additions & 12 deletions .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ jobs:
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: Set file base name (Linux)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
Expand Down Expand Up @@ -187,12 +181,6 @@ jobs:
run: |
ls -l ${{ github.workspace }}/HDF_Group/HDF5
- name: Set file base name (MacOS)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
- name: List files for the space (MacOS)
run: |
ls ${{ github.workspace }}
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ name: hdf5 dev ctest runs
on:
workflow_call:
inputs:
snap_name:
description: 'The name in the source tarballs'
type: string
required: false
default: hdfsrc
file_base:
description: "The common base name of the source tarballs"
required: true
Expand Down Expand Up @@ -46,11 +51,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash
Expand Down Expand Up @@ -129,11 +134,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -253,11 +258,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -333,11 +338,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -413,11 +418,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash
Expand Down Expand Up @@ -502,11 +507,11 @@ jobs:
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "hdfsrc")
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE")
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
needs: call-workflow-tarball
uses: ./.github/workflows/cmake-ctest.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
preset_name: ci-StdShar
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
# use_tag: snapshot
use_environ: snapshots
#use_tag: snapshot
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

call-workflow-abi:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,18 @@ jobs:

- name: Create sha256 sums for files
run: |
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip > sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip > ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
- name: Store snapshot name
run: |
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
sha256sums.txt
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Release tag
Expand All @@ -222,7 +222,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
sha256sums.txt
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: List files for the space (Linux)
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ jobs:
needs: log-the-inputs
uses: ./.github/workflows/tarball.yml
with:
use_tag: ${{ inputs.use_tag }}
use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }}
use_environ: release

call-workflow-ctest:
needs: call-workflow-tarball
uses: ./.github/workflows/cmake-ctest.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
preset_name: ci-StdShar
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
snap_name: hdf5-${{ needs.call-workflow-tarball.outputs.source_base }}
use_environ: release

call-workflow-abi:
Expand All @@ -58,8 +59,8 @@ jobs:
uses: ./.github/workflows/release-files.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
file_branch: ${{ needs.log-the-inputs.outputs.rel_tag }}
file_sha: ${{ needs.log-the-inputs.outputs.rel_tag }}
file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }}
use_environ: release

1 change: 1 addition & 0 deletions .github/workflows/remove-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
token: ${{ github.token }}
tag: "${{ inputs.use_tag }}"
assets: |
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
has_changes:
description: "Whether there were changes the previous day"
value: ${{ jobs.check_commits.outputs.has_changes }}
source_base:
description: "The common base name of the source tarballs"
value: ${{ jobs.create_tarball.outputs.source_base }}
file_base:
description: "The common base name of the source tarballs"
value: ${{ jobs.create_tarball.outputs.file_base }}
Expand Down Expand Up @@ -80,6 +83,7 @@ jobs:
if: ${{ ((inputs.use_environ == 'snapshots') && (needs.check_commits.outputs.has_changes == 'true')) || (inputs.use_environ == 'release') }}
outputs:
file_base: ${{ steps.set-file-base.outputs.FILE_BASE }}
source_base: ${{ steps.version.outputs.SOURCE_TAG }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
Expand All @@ -96,47 +100,47 @@ jobs:
id: version
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
echo "TAG_VERSION=$(bin/h5vers)" >> $GITHUB_OUTPUT
echo "SOURCE_TAG=$(bin/h5vers)" >> $GITHUB_OUTPUT
- name: Set file base name
id: set-file-base
run: |
if [[ '${{ inputs.use_environ }}' == 'snapshots' && '${{ needs.check_commits.outputs.has_changes }}' == 'true' ]]
if [[ '${{ inputs.use_environ }}' == 'snapshots' ]]
then
FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}")
else
if [[ '${{ inputs.use_tag }}' == 'snapshot' ]]
then
FILE_NAME_BASE=$(echo "${{ inputs.use_tag }}")
FILE_NAME_BASE=$(echo "snapshot")
else
FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}")
FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.SOURCE_TAG }}")
fi
fi
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
shell: bash

- name: Create snapshot file base name
id: create-file-base
if: ${{ (inputs.use_environ == 'snapshots') && (needs.check_commits.outputs.has_changes == 'true') }}
if: ${{ (inputs.use_environ == 'snapshots') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/release -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip
shell: bash

- name: Create release file base name
id: create-rel-base
if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag != 'snapshot') }}
if: ${{ (inputs.use_environ == 'release') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/release -d $GITHUB_WORKSPACE gzip zip
shell: bash

- name: Create snapshot file base name
id: create-snap-base
if: ${{ (inputs.use_tag == 'snapshot') && (inputs.use_environ == 'release') }}
- name: Rename release file base name
id: ren-basename
if: ${{ (inputs.use_environ == 'release') && (inputs.use_tag == 'snapshot') }}
run: |
cd "$GITHUB_WORKSPACE/hdfsrc"
bin/release -d $GITHUB_WORKSPACE --branch ${{ inputs.use_tag }} gzip zip
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.tar.gz ${{ inputs.use_tag }}.tar.gz
mv hdf5-${{ steps.version.outputs.SOURCE_TAG }}.zip ${{ inputs.use_tag }}.zip
shell: bash

- name: List files in the repository
Expand Down
3 changes: 2 additions & 1 deletion HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data
INTEGER :: ret_val_func

ret_val_func = 0
ret_val = 0

name_string(1:10) = " "
len = 0
Expand Down Expand Up @@ -142,7 +143,7 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data
funptr = C_FUNLOC(op_func)
CALL h5literate_by_name_f(loc_id, name_string, H5_INDEX_NAME_F, H5_ITER_NATIVE_F, idx, &
funptr, ptr2, ret_val_func, status)

ret_val = INT(ret_val_func,C_INT)
ENDIF
WRITE(*,'(A)') space(1:spaces)//"}"
RETURN
Expand Down
26 changes: 17 additions & 9 deletions c++/test/tattr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1406,17 +1406,23 @@ test_attr_dtype_shared(FileAccPropList &fapl)
SUBTEST("Shared Datatypes with Attributes");

try {
h5_stat_size_t empty_filesize = 0; // Size of empty file
bool is_default_vfd_compat = false;

// Create a file
H5File fid1(FILE_DTYPE, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);

// Close file
fid1.close();

// Get size of file
h5_stat_size_t empty_filesize; // Size of empty file
empty_filesize = h5_get_file_size(FILE_DTYPE.c_str(), H5P_DEFAULT);
if (empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
h5_driver_is_default_vfd_compatible(H5P_DEFAULT, &is_default_vfd_compat);

if (is_default_vfd_compat) {
// Get size of file
empty_filesize = h5_get_file_size(FILE_DTYPE.c_str(), H5P_DEFAULT);
if (empty_filesize < 0)
TestErrPrintf("Line %d: file size wrong!\n", __LINE__);
}

// Open the file again
fid1.openFile(FILE_DTYPE, H5F_ACC_RDWR);
Expand Down Expand Up @@ -1533,10 +1539,12 @@ test_attr_dtype_shared(FileAccPropList &fapl)
// Close file
fid1.close();

// Check size of file
filesize = h5_get_file_size(FILE_DTYPE.c_str(), H5P_DEFAULT);
verify_val(static_cast<long>(filesize), static_cast<long>(empty_filesize), "Checking file size",
__LINE__, __FILE__);
if (is_default_vfd_compat) {
// Check size of file
filesize = h5_get_file_size(FILE_DTYPE.c_str(), H5P_DEFAULT);
verify_val(static_cast<long>(filesize), static_cast<long>(empty_filesize), "Checking file size",
__LINE__, __FILE__);
}

PASSED();
} // end try block
Expand Down
Loading

0 comments on commit 7527fbf

Please sign in to comment.