Skip to content

Commit

Permalink
Merge remote-tracking branch 'canonical/develop' into add_testing_nvh…
Browse files Browse the repository at this point in the history
…pc_ci
  • Loading branch information
derobins committed Aug 26, 2024
2 parents 7354c27 + 00b0d3a commit d429b81
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 44 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ jobs:
name: "Autotools TestExpress Workflows"
uses: ./.github/workflows/testxpr-auto.yml

call-release-auto-julia:
name: "Autotools Julia Workflows"
uses: ./.github/workflows/julia-auto.yml
with:
build_mode: "production"

# workflow-msys2-autotools:
# name: "CMake msys2 Workflows"
# uses: ./.github/workflows/msys2-auto.yml
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,8 @@ jobs:
name: "CMake TestExpress Workflows"
uses: ./.github/workflows/testxpr-cmake.yml


call-release-cmake-julia:
name: "CMake Julia Workflows"
uses: ./.github/workflows/julia-cmake.yml
with:
build_mode: "Release"
3 changes: 2 additions & 1 deletion .github/workflows/intel-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
$GITHUB_WORKSPACE/configure \
--enable-build-mode=${{ inputs.build_mode }} \
--enable-shared \
--disable-fortran
--enable-cxx \
--enable-fortran
- name: Autotools Build
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/intel-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
--log-level=VERBOSE \
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja --log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_CPP_LIB:BOOL=ON \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
$GITHUB_WORKSPACE
${{ github.workspace }}
- name: CMake Build (Linux)
shell: bash
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
Set-Location -Path "${{ runner.workspace }}\\build"
cmake -C ${{ github.workspace }}/config/cmake/cacheinit.cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} -DHDF5_BUILD_FORTRAN=ON -DLIBAEC_USE_LOCALCONTENT=OFF -DZLIB_USE_LOCALCONTENT=OFF ${{ github.workspace }}
cmake -C ${{ github.workspace }}/config/cmake/cacheinit.cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_CPP_LIB=ON -DLIBAEC_USE_LOCALCONTENT=OFF -DZLIB_USE_LOCALCONTENT=OFF ${{ github.workspace }}
- name: CMake Build (Windows)
shell: pwsh
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/julia-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: hdf5 dev autotools julia

on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
required: true
type: string

permissions:
contents: read

jobs:
julia_build_and_test:
name: "julia ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/[email protected]

- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool libtool-bin libaec-dev
sudo apt-get install doxygen graphviz
sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2
sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential
- name: Autotools Configure
shell: bash
run: |
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
--enable-build-mode=${{ inputs.build_mode }} \
--disable-fortran \
--enable-shared \
--disable-parallel \
--prefix=/tmp
- name: Autotools Build
shell: bash
run: |
make -j3
working-directory: ${{ runner.workspace }}/build

- name: Install HDF5
shell: bash
run: |
make install
working-directory: ${{ runner.workspace }}/build

- name: Install julia
uses: julia-actions/setup-julia@latest
with:
version: '1.6'
arch: 'x64'

- name: Get julia hdf5 source
uses: actions/[email protected]
with:
repository: JuliaIO/HDF5.jl
path: .

- name: Generate LocalPreferences
run: |
echo '[HDF5]' >> LocalPreferences.toml
echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml
echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml
- uses: julia-actions/julia-buildpkg@latest

- name: Julia Run Tests
uses: julia-actions/julia-runtest@latest
env:
JULIA_DEBUG: Main
82 changes: 82 additions & 0 deletions .github/workflows/julia-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: hdf5 dev CMake julia

on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
required: true
type: string

permissions:
contents: read

jobs:
julia_build_and_test:
name: "julia ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/[email protected]

- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install ninja-build doxygen graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
sudo apt install -y libaec-dev zlib1g-dev wget curl bzip2 flex bison cmake libzip-dev openssl build-essential
- name: CMake Configure
shell: bash
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_BUILD_FORTRAN:BOOL=OFF \
-DHDF5_BUILD_JAVA:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX=/tmp \
$GITHUB_WORKSPACE
- name: CMake Build
shell: bash
run: |
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build

- name: Install HDF5
shell: bash
run: |
cmake --install .
working-directory: ${{ runner.workspace }}/build

- name: Install julia
uses: julia-actions/setup-julia@latest
with:
version: '1.6'
arch: 'x64'

- name: Get julia hdf5 source
uses: actions/[email protected]
with:
repository: JuliaIO/HDF5.jl
path: .

- name: Generate LocalPreferences
run: |
echo '[HDF5]' >> LocalPreferences.toml
echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml
echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml
- uses: julia-actions/julia-buildpkg@latest

- name: Julia Run Tests
uses: julia-actions/julia-runtest@latest
env:
JULIA_DEBUG: Main
26 changes: 24 additions & 2 deletions .github/workflows/main-auto-par.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ jobs:
- name: Get Sources
uses: actions/[email protected]

# AUTOTOOLS CONFIGURE
- name: Autotools Configure
env:
NPROCS: 2
run: |
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
Expand All @@ -71,7 +72,28 @@ jobs:
--with-szlib=yes
shell: bash

# BUILD
- name: Autotools Build
run: make -j3
working-directory: ${{ runner.workspace }}/build

# ph5diff tests are in the tools/tests directory so they will get run
# here, so leave NPROCS set here as well
- name: Autotools Run Tests
env:
NPROCS: 2
run: |
cd test && make check -j2 && cd ..
cd tools && make check -j2 && cd ..
cd hl && make check -j2 && cd ..
cd fortran/test && make check -j2 && cd ../..
working-directory: ${{ runner.workspace }}/build
if: ${{ inputs.thread_safety == 'disable' }}

- name: Autotools Run Parallel Tests
env:
NPROCS: 2
run: |
cd testpar && make check && cd ..
cd fortran/testpar && make check -j2 && cd ../..
working-directory: ${{ runner.workspace }}/build
if: ${{ inputs.thread_safety == 'disable' }}
13 changes: 13 additions & 0 deletions .github/workflows/main-cmake-par.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,16 @@ jobs:
- name: CMake Build
run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build

#
# RUN TESTS
#
- name: CMake Run Tests
run: ctest . -E MPI_TEST --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
if: ${{ matrix.run_tests && (inputs.thread_safety != 'TS') }}

- name: CMake Run Parallel Tests
run: ctest . -R MPI_TEST -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
if: ${{ matrix.run_tests && (inputs.thread_safety != 'TS') }}
2 changes: 1 addition & 1 deletion src/H5Centry.c
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
else
empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;

/* try to free up if necceary and if evictions are permitted. Note
/* try to free up if necessary and if evictions are permitted. Note
* that if evictions are enabled, we will call H5C__make_space_in_cache()
* regardless if the min_free_space requirement is not met.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/H5G.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
loc_params.obj_type = H5I_get_type(loc_id);

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier");

/* Create the group */
Expand Down Expand Up @@ -507,7 +507,7 @@ H5Gget_create_plist(hid_t group_id)
FUNC_ENTER_API(H5I_INVALID_HID)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP)))
if (NULL == (vol_obj = H5VL_vol_object_verify(group_id, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group ID");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -960,7 +960,7 @@ H5Gflush(hid_t group_id)
FUNC_ENTER_API(FAIL)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP)))
if (NULL == (vol_obj = H5VL_vol_object_verify(group_id, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID");

/* Set up collective metadata if appropriate */
Expand Down Expand Up @@ -998,7 +998,7 @@ H5Grefresh(hid_t group_id)
FUNC_ENTER_API(FAIL)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP)))
if (NULL == (vol_obj = H5VL_vol_object_verify(group_id, H5I_GROUP)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID");

/* Set up collective metadata if appropriate */
Expand Down
4 changes: 2 additions & 2 deletions src/H5L.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l

if (H5L_SAME_LOC != cur_loc_id)
/* Get the current location object */
if (NULL == (curr_vol_obj = (H5VL_object_t *)H5VL_vol_object(cur_loc_id)))
if (NULL == (curr_vol_obj = H5VL_vol_object(cur_loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
if (H5L_SAME_LOC != link_loc_id)
/* Get the new location object */
if (NULL == (link_vol_obj = (H5VL_object_t *)H5VL_vol_object(link_loc_id)))
if (NULL == (link_vol_obj = H5VL_vol_object(link_loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Make sure that the VOL connectors are the same */
Expand Down
12 changes: 6 additions & 6 deletions src/H5Ldeprec.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ H5Literate1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified");

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(group_id)))
if (NULL == (vol_obj = H5VL_vol_object(group_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down Expand Up @@ -248,7 +248,7 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down Expand Up @@ -325,7 +325,7 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down Expand Up @@ -416,7 +416,7 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H
loc_params.obj_type = H5I_get_type(loc_id);

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down Expand Up @@ -515,7 +515,7 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat
loc_params.obj_type = H5I_get_type(group_id);

/* Get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(group_id)))
if (NULL == (vol_obj = H5VL_vol_object(group_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down Expand Up @@ -604,7 +604,7 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info");

/* get the location object */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");

/* Check if the VOL object is a native VOL connector object */
Expand Down
Loading

0 comments on commit d429b81

Please sign in to comment.