Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/threading_updates' into non_rec_…
Browse files Browse the repository at this point in the history
…rwlock
  • Loading branch information
qkoziol committed Jul 24, 2024
2 parents ce70682 + b2e6e4d commit e5f8cbd
Show file tree
Hide file tree
Showing 16 changed files with 356 additions and 19 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ jobs:
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip hdf5
shell: pwsh

- name: Publish msi binary (Windows)
id: publish-ctest-msi-binary
run: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-MSVC/README.md -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.msi
cd "${{ runner.workspace }}/build"
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip hdf5
shell: pwsh

- name: List files in the space (Windows)
run: |
Get-ChildItem -Path ${{ github.workspace }}
Expand All @@ -113,6 +126,13 @@ jobs:
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- name: Save published msi binary (Windows)
uses: actions/upload-artifact@v4
with:
name: msi-vs2022_cl-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_linux:
# Linux (Ubuntu) w/ gcc + CMake
#
Expand Down Expand Up @@ -470,6 +490,19 @@ jobs:
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip hdf5
shell: pwsh

- name: Publish msi binary (Windows_intel)
id: publish-ctest-msi-binary
run: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/README.md -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.msi
cd "${{ runner.workspace }}/build"
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip hdf5
shell: pwsh

- name: List files in the space (Windows_intel)
run: |
Get-ChildItem -Path ${{ github.workspace }}
Expand All @@ -484,6 +517,13 @@ jobs:
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- name: Save published msi binary (Windows_intel)
uses: actions/upload-artifact@v4
with:
name: msi-vs2022_intel-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.msi.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_linux_intel:
# Linux (Ubuntu) w/ OneAPI + CMake
#
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-cmake-par.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/main-cmake-spc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ jobs:
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
Expand All @@ -235,12 +236,12 @@ jobs:
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_BUILD_JAVA=ON \
-DHDF5_BUILD_DOC=OFF \
-DLIBAEC_USE_LOCALCONTENT=ON \
-DZLIB_USE_LOCALCONTENT=ON \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_ENABLE_MIRROR_VFD:BOOL=ON \
-DHDF5_ENABLE_DIRECT_VFD:BOOL=ON \
-DHDF5_ENABLE_ROS3_VFD:BOOL=ON \
-DHDF5_USE_ZLIBNG:BOOL=ON \
-DHDF5_USE_ZLIB_NG:BOOL=ON \
$GITHUB_WORKSPACE
shell: bash

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: hdf5 publish files in HDF5 folder from branch to S3

# Triggers the workflow on demand
on:
workflow_dispatch:
inputs:
local_dir:
description: 'HDF5 local directory'
type: string
required: true
target_dir:
description: 'hdf5 target bucket directory'
type: string
required: true
permissions:
contents: read

jobs:
publish-tag:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
ref: '${{ github.head_ref || github.ref_name }}'

- name: List files for the space
run: |
ls -l ${{ github.workspace }}
ls ${{ github.workspace }}/HDF5
- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Sync dir to S3 bucket
run: |
aws s3 sync ./HDF5/${{ inputs.local_dir }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
aws s3 sync ./HDF5 s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/downloads --delete
- name: Uncompress source (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}.doxygen.tar.gz
run: tar -zxvf ${{ github.workspace }}/HDF5/${{ inputs.use_hdf }}.doxygen.tar.gz

- name: Sync userguide to S3 bucket
run: |
aws s3 sync ./doxygen s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation --delete
aws s3 sync ./HDF5/doxygen s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}/documentation/doxygen --delete
18 changes: 18 additions & 0 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ jobs:
name: zip-vs2022_cl-binary
path: ${{ github.workspace }}

- name: Get published msi binary (Windows)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: msi-vs2022_cl-binary
path: ${{ github.workspace }}

- name: Get published binary (MacOS)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
Expand Down Expand Up @@ -136,6 +142,12 @@ jobs:
name: zip-vs2022_intel-binary
path: ${{ github.workspace }}

- name: Get published msi binary (Windows_intel)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: msi-vs2022_intel-binary
path: ${{ github.workspace }}

- name: Get published binary (Linux_intel)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
Expand Down Expand Up @@ -173,8 +185,10 @@ jobs:
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz >> ${{ 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 }}-win-vs2022_cl.msi.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 }}-win-vs2022_intel.msi.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: Create sha256 sums for files for nonversioned files
Expand Down Expand Up @@ -216,8 +230,10 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ 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 }}-win-vs2022_intel.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
Expand All @@ -242,8 +258,10 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ 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 }}-win-vs2022_intel.msi.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/remove-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.msi.zip
${{ 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 }}-win-vs2022_intel.msi.zip
15 changes: 14 additions & 1 deletion HDF5Examples/config/cmake/HDFExampleMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,20 @@ macro (HDF5_SUPPORT)
if (HDF_BUILD_JAVA AND HDF5_Java_FOUND)
if (${HDF5_BUILD_JAVA})
set (CMAKE_JAVA_INCLUDE_PATH "${CMAKE_JAVA_INCLUDE_PATH};${HDF5_JAVA_INCLUDE_DIRS}")
set (H5EX_JAVA_LIBRARY ${HDF5_JAVA_LIBRARY})
if (HDF5_BUILD_MODE)
string(TOUPPER "${HDF5_BUILD_MODE}" UPPER_BUILD_TYPE)
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME_${UPPER_BUILD_TYPE})
elseif (HDF_CFG_NAME)
string(TOUPPER "${HDF_CFG_NAME}" UPPER_BUILD_TYPE)
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME_${UPPER_BUILD_TYPE})
else()
get_target_property(libsoname ${HDF5_JAVA_LIBRARY} IMPORTED_SONAME)
endif()
get_filename_component (libname ${libsoname} NAME_WE)
string (REGEX REPLACE "^lib" "" libname ${libname})
message (STATUS "HDF5 lib:${HDF5_JAVA_LIBRARY} OR ${libsoname} OR ${libname}")
set (H5EX_JAVA_LIBRARY ${libname})
# set (H5EX_JAVA_LIBRARY $<TARGET_FILE_BASE_NAME:${HDF5_JAVA_LIBRARY}>)
set (H5EX_JAVA_LIBRARIES ${HDF5_JAVA_LIBRARY})
message (STATUS "HDF5 lib:${H5EX_JAVA_LIBRARY} jars:${HDF5_JAVA_INCLUDE_DIRS}}")
else ()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ are tentative.
| 1.14.5 | oss-fuzz fixes, ros3 VFD improvements |
| 1.14.6 | Last maintenance release of 1.14 |
| 1.16.0 | Complex number support, updated library defaults (cache sizes, etc.) |
| 2.0.0 | Multi-threaded HDF5, crashproofing / metadata journaling, Full (VFD) SWMR, encryption, digital signatures, semantic versioning |
| 2.0.0 | Multi-threaded HDF5, crashproofing / metadata journaling, Full (VFD) SWMR, encryption, digital signatures, sparse datasets, improved storage for variable-length datatypes, better Unicode support (especially on Windows), semantic versioning |

Some HDF5 2.0.0 features listed here may be released in a 1.16.x release.

Expand Down
2 changes: 2 additions & 0 deletions config/cmake/hdf5-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set (${HDF5_PACKAGE_NAME}_VALID_COMPONENTS
Tools
)

set (${HDF5_PACKAGE_NAME}_BUILD_MODE @HDF_CFG_NAME@)

#-----------------------------------------------------------------------------
# User Options
#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/H5D.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *s
FUNC_ENTER_API(FAIL)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(dataset_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dataset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier");
if (H5I_DATATYPE != H5I_get_type(type_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype identifier");
Expand Down
18 changes: 9 additions & 9 deletions src/H5F.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ H5Fget_create_plist(hid_t file_id)
FUNC_ENTER_API(H5I_INVALID_HID)

/* check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -164,7 +164,7 @@ H5Fget_access_plist(hid_t file_id)
FUNC_ENTER_API(H5I_INVALID_HID)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -439,7 +439,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file handle pointer");

/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1555,7 +1555,7 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags /*out*/)
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */

/* Get the internal file structure */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1594,7 +1594,7 @@ H5Fget_fileno(hid_t file_id, unsigned long *fnumber /*out*/)
H5VL_file_get_args_t vol_cb_args; /* Arguments to VOL callback */

/* Get the internal file structure */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1631,7 +1631,7 @@ H5Fget_freespace(hid_t file_id)
FUNC_ENTER_API((-1))

/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1789,7 +1789,7 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config ptr");

/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1827,7 +1827,7 @@ H5Fset_mdc_config(hid_t file_id, const H5AC_cache_config_t *config_ptr)
FUNC_ENTER_API(FAIL)

/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1959,7 +1959,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id)
FUNC_ENTER_API(FAIL)

/* Get the file object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id)))
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier");

/* Set up VOL callback arguments */
Expand Down
4 changes: 2 additions & 2 deletions src/H5TSbarrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ H5TS_barrier_wait(H5TS_barrier_t *barrier)
H5TS_atomic_fetch_add_uint(&barrier->generation, 1);
}
else {
/* Not the last thread, when for the generation to change */
/* Not the last thread, wait for the generation to change */
while (H5TS_atomic_load_uint(&barrier->generation) == my_generation)
;
H5TS_thread_yield();
}
}
#endif
Expand Down
Loading

0 comments on commit e5f8cbd

Please sign in to comment.