Skip to content

Commit

Permalink
ci: sync upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Aug 26, 2024
2 parents a27556f + fe7dca0 commit 45601c2
Show file tree
Hide file tree
Showing 37 changed files with 379 additions and 192 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/aocc-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,32 @@ jobs:
- name: Autotools Build
shell: bash
env:
NPROCS: 2
run: |
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
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: |
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
make check -j
cd test && make check -j2 && cd ..
cd tools && make check -j2 && cd ..
cd hl && make check -j2 && cd ..
working-directory: ${{ runner.workspace }}/build

- name: Autotools Install
- name: Autotools Run Parallel Tests
env:
NPROCS: 2
run: |
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
cd testpar && make check && cd ..
working-directory: ${{ runner.workspace }}/build

- name: Autotools Install
run: |
export PATH=/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/bin:/usr/local/bin:$PATH
make install
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/aocc-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,11 @@ jobs:
- name: CMake Run Tests
shell: bash
run: |
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
ctest . -E MPI_TEST --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build

- name: CMake Run Parallel Tests
shell: bash
run: |
ctest . -R MPI_TEST -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
2 changes: 1 addition & 1 deletion .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
id: setup-fortran
with:
compiler: gcc
version: 12
version: 14

- name: Run ctest (MacOS_latest)
id: run-ctest
Expand Down
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/checkout@v4.1.7

# 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 .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
id: setup-fortran
with:
compiler: gcc
version: 12
version: 14
if: ${{ matrix.os == 'macos-latest' }}

- name: Install Dependencies
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ HDF5 version 1.15.0 currently under development

[![develop cmake build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/cmake.yml?branch=develop&label=HDF5%20develop%20CMake%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/cmake.yml?query=branch%3Adevelop)
[![develop autotools build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/autotools.yml?branch=develop&label=HDF5%20develop%20Autotools%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/autotools.yml?query=branch%3Adevelop)
[![HDF-EOS5 build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/hdfeos5.yml?branch=develop&label=HDF-EOS5)](https://github.com/HDFGroup/hdf5/actions/workflows/hdfeos5.yml?query=branch%3Adevelop)
[![netCDF build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/netcdf.yml?branch=develop&label=netCDF)](https://github.com/HDFGroup/hdf5/actions/workflows/netcdf.yml?query=branch%3Adevelop)
[![h5py build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/h5py.yml?branch=develop&label=h5py)](https://github.com/HDFGroup/hdf5/actions/workflows/h5py.yml?query=branch%3Adevelop)
[![CVE regression](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/cve.yml?branch=develop&label=CVE)](https://github.com/HDFGroup/hdf5/actions/workflows/cve.yml?query=branch%3Adevelop)
Expand Down
56 changes: 34 additions & 22 deletions src/H5A.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ H5A__read_api_common(hid_t attr_id, hid_t dtype_id, void *buf, void **token_ptr,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf parameter can't be NULL");

/* Get attribute object pointer */
if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (*vol_obj_ptr = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute");

/* Read the attribute data */
Expand Down Expand Up @@ -1090,7 +1090,7 @@ H5Aget_space(hid_t attr_id)
FUNC_ENTER_API(H5I_INVALID_HID)

/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1134,7 +1134,7 @@ H5Aget_type(hid_t attr_id)
FUNC_ENTER_API(H5I_INVALID_HID)

/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1183,7 +1183,7 @@ H5Aget_create_plist(hid_t attr_id)
assert(H5P_LST_ATTRIBUTE_CREATE_ID_g != -1);

/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1218,7 +1218,7 @@ H5Aget_create_plist(hid_t attr_id)
DESCRIPTION
This function retrieves the name of an attribute for an attribute ID.
Up to 'buf_size' characters are stored in 'buf' followed by a '\0' string
Up to 'buf_size'-1 characters are stored in 'buf' followed by a '\0' string
terminator. If the name of the attribute is longer than 'buf_size'-1,
the string terminator is stored in the last position of the buffer to
properly terminate the string.
Expand All @@ -1234,7 +1234,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf /*out*/)
FUNC_ENTER_API((-1))

/* check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an attribute");
if (!buf && buf_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "buf cannot be NULL if buf_size is non-zero");
Expand All @@ -1258,20 +1258,32 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf /*out*/)
FUNC_LEAVE_API(ret_value)
} /* H5Aget_name() */

/*-------------------------------------------------------------------------
* Function: H5Aget_name_by_idx
*
* Purpose: Retrieve the name of an attribute, according to the
* order within an index.
*
* Same pattern of behavior as H5Iget_name.
*
* Return: Success: Non-negative length of name, with information
* in NAME buffer
* Failure: Negative
*
*-------------------------------------------------------------------------
*/
/*--------------------------------------------------------------------------
NAME
H5Aget_name_by_idx
PURPOSE
Retrieve the name of an attribute, according to the order within an index.
USAGE
ssize_t H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, n, name, size, lapl_id)
hid_t loc_id; IN: Object that attribute is attached to
const char *obj_name; IN: Name of the object relative to location
H5_index_t idx_type; IN: Type of index to use
H5_iter_order_t order; IN: Order to iterate over index
hsize_t n; IN: Index (0-based) of attribute to retrieve
char *name; IN: Buffer to store the name in
size_t size; IN: The size of the buffer to store the name in.
hid_t lapl_id; IN: Link access property list
RETURNS
This function returns the length of the attribute's name (which may be
longer than 'buf_size') on success or negative for failure.
DESCRIPTION
This function retrieves the name of an attribute given its index. Up
to 'buf_size'-1 characters are stored in 'buf' followed by a '\0' string
terminator. If the name of the attribute is longer than 'buf_size'-1,
the string terminator is stored in the last position of the buffer to
properly terminate the string.
--------------------------------------------------------------------------*/
ssize_t
H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
char *name /*out*/, size_t size, hid_t lapl_id)
Expand Down Expand Up @@ -1352,7 +1364,7 @@ H5Aget_storage_size(hid_t attr_id)
FUNC_ENTER_API(0)

/* Check arguments */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an attribute");

/* Set up VOL callback arguments */
Expand Down Expand Up @@ -1390,7 +1402,7 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/)
FUNC_ENTER_API(FAIL)

/* Check args */
if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
if (NULL == (vol_obj = H5VL_vol_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute");
if (!ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "attribute_info parameter cannot be NULL");
Expand Down
15 changes: 3 additions & 12 deletions src/H5Apublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,9 @@ H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char
* value.
*
* \details H5Aget_name() retrieves the name of an attribute specified by
* the identifier, \p attr_id. Up to \p buf_size characters are
* stored in \p buf followed by a \0 string terminator. If the
* name of the attribute is longer than (\p buf_size -1), the
* string terminator is stored in the last position of the buffer
* to properly terminate the string.
* the identifier, \p attr_id.
*
* If the user only wants to retrieve the name length, the
* values 0 and NULL should be passed for the parameters
* \p bufsize and \p buf.
* \details_namelen{attribute,H5Aget_name}
*
* \since 1.0.0
*
Expand Down Expand Up @@ -544,10 +538,7 @@ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
* traversal order, and a position in the index, \p idx_type,
* \p order and \p n, respectively.
*
* If the attribute name's size is unknown, the values 0 and NULL
* can be passed in for the parameters \p size and \p name. The
* function's return value will provide the correct value for
* \p size.
* \details_namelen{attribute,H5Aget_name_by_idx}
*
* The link access property list, \p lapl_id, may provide
* information regarding the properties of links required to access
Expand Down
Loading

0 comments on commit 45601c2

Please sign in to comment.