Skip to content

Commit

Permalink
Merge remote-tracking branch 'canonical/develop' into aws_13m_securit…
Browse files Browse the repository at this point in the history
…y_fixes
  • Loading branch information
Dana Robinson committed Mar 26, 2024
2 parents 636bf02 + 724eaaf commit b1f9707
Show file tree
Hide file tree
Showing 61 changed files with 1,360 additions and 674 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main-auto-spc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,10 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \
$GITHUB_WORKSPACE/configure \
--enable-build-mode=debug \
--enable-warnings-as-errors \
--enable-deprecated-symbols \
--with-default-api-version=v114 \
--enable-shared \
Expand Down Expand Up @@ -478,8 +480,10 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
CFLAGS=-Werror $GITHUB_WORKSPACE/configure \
CFLAGS=-Werror JAVACFLAGS=-Werror JNIFLAGS=-Werror \
$GITHUB_WORKSPACE/configure \
--enable-build-mode=production \
--enable-warnings-as-errors \
--enable-deprecated-symbols \
--with-default-api-version=v114 \
--enable-shared \
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ jobs:

# CMake gets libaec from fetchcontent

- name: Install Dependencies (Windows)
run: choco install ninja
if: matrix.os == 'windows-latest'

- name: Install Dependencies (macOS)
run: brew install ninja
if: matrix.os == 'macos-13'
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check Markdown links

on:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,6 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
if (HDF5_BUILD_FORTRAN)
include (${HDF_RESOURCES_DIR}/HDFUseFortran.cmake)

message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
Expand Down Expand Up @@ -1147,16 +1145,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
endif ()
endif ()

#-----------------------------------------------------------------------------
# Check if Fortran's default real is double precision. If it is and HL is
# being built then configure should fail due to bug HDFFV-889.
#-----------------------------------------------------------------------------
if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB)
if (NOT H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ")
endif ()
endif ()

#-----------------------------------------------------------------------------
# Option to build HDF5 Java Library
#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Please make sure that you check the items applicable to your pull request:
* [ ] If changes were done to Autotools build, were they added to CMake and vice versa?
* [ ] Is the pull request applicable to any other branches? If yes, which ones? Please document it in the GitHub issue.
* [ ] Is the new code sufficiently documented for future maintenance?
* [ ] Does the new feature require a change to an existing API? See "API Compatibility Macros" document (https://portal.hdfgroup.org/display/HDF5/API+Compatibility+Macros)
* [ ] Does the new feature require a change to an existing API? See "API Compatibility Macros" document (https://docs.hdfgroup.org/hdf5/develop/api-compat-macros.html)
* Documentation
* [ ] Was the change described in the release_docs/RELEASE.txt file?
* [ ] Was the new function documented in the corresponding public header file using [Doxygen](https://hdfgroup.github.io/hdf5/develop/_r_m_t.html)?
Expand Down
48 changes: 33 additions & 15 deletions HDF5Examples/C/H5T/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if (HDF5_BUILD_TOOLS)
if (NOT ${example_name} STREQUAL "h5ex_t_convert")
if (${example_name} STREQUAL "h5ex_t_vlen" OR ${example_name} STREQUAL "h5ex_t_vlenatt")
if (HDF5_VERSION_STRING VERSION_GREATER_EQUAL "1.14.3")
if (${H5_LIBVER_DIR} EQUAL 16 AND ${example_name} STREQUAL "h5ex_t_vlenatt")
if ((${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16) AND ${example_name} STREQUAL "h5ex_t_vlenatt")
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
Expand All @@ -130,7 +130,7 @@ if (HDF5_BUILD_TOOLS)
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
endif ()
elseif (${H5_LIBVER_DIR} EQUAL 16)
elseif (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
Expand Down Expand Up @@ -180,7 +180,7 @@ if (HDF5_BUILD_TOOLS)
)
endif ()
elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12")
if (${H5_LIBVER_DIR} EQUAL 16)
if (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
Expand All @@ -196,12 +196,21 @@ if (HDF5_BUILD_TOOLS)
)
endif ()
else ()
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
if (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
else ()
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
endif ()
endif ()
else ()
if (HDF5_VERSION_MAJOR VERSION_EQUAL "1.8")
Expand Down Expand Up @@ -260,12 +269,21 @@ if (HDF5_BUILD_TOOLS)
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
else ()
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
if (${EXAMPLE_VARNAME}_USE_16_API)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
else ()
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
endif ()
endif ()
endif ()
endforeach ()
Expand Down
6 changes: 4 additions & 2 deletions HDF5Examples/FORTRAN/H5G/h5ex_g_traverse.F90
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data
CHARACTER(LEN=10) :: space
INTEGER :: spaces ! Number of whitespaces to prepend to output
INTEGER :: len
INTEGER :: ret_val_func

ret_val_func = 0
ret_val = 0

name_string(1:10) = " "
Expand Down Expand Up @@ -140,8 +142,8 @@ RECURSIVE INTEGER(KIND=C_INT) FUNCTION op_func(loc_id, name, info, operator_data
ptr2 = C_LOC(nextod%recurs)
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, status)

funptr, ptr2, ret_val_func, status)
ret_val = INT(ret_val_func,C_INT)
ENDIF
WRITE(*,'(A)') space(1:spaces)//"}"
RETURN
Expand Down
7 changes: 4 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_dataset.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ PROGRAM DATASET
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank

comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
CALL MPI_INIT(mpierror)
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_file_create.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ PROGRAM FILE_CREATE
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL

Expand Down
18 changes: 10 additions & 8 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_filtered_writes_no_sel.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MODULE filter
INTEGER , PARAMETER :: PATH_MAX = 512

! Global variables
INTEGER :: mpi_rank, mpi_size
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_rank, mpi_size

CONTAINS
!
Expand Down Expand Up @@ -91,10 +91,11 @@ SUBROUTINE cleanup(filename)

LOGICAL :: do_cleanup
INTEGER :: status
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror

CALL get_environment_variable("HDF5_NOCLEANUP", STATUS=status)
IF(status.EQ.0)THEN
CALL MPI_File_delete(filename, MPI_INFO_NULL, status)
CALL MPI_File_delete(filename, MPI_INFO_NULL, mpierror)
ENDIF

END SUBROUTINE cleanup
Expand Down Expand Up @@ -241,18 +242,19 @@ PROGRAM main
USE filter
IMPLICIT NONE

INTEGER :: comm = MPI_COMM_WORLD
INTEGER :: info = MPI_INFO_NULL
INTEGER(KIND=MPI_INTEGER_KIND) :: comm = MPI_COMM_WORLD
INTEGER(KIND=MPI_INTEGER_KIND) :: info = MPI_INFO_NULL
INTEGER(hid_t) :: file_id
INTEGER(hid_t) :: fapl_id
INTEGER(hid_t) :: dxpl_id
CHARACTER(LEN=PATH_MAX) :: par_prefix
CHARACTER(LEN=PATH_MAX) :: filename
INTEGER :: status
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror

CALL MPI_Init(status)
CALL MPI_Comm_size(comm, mpi_size, status)
CALL MPI_Comm_rank(comm, mpi_rank, status)
CALL MPI_Init(mpierror)
CALL MPI_Comm_size(comm, mpi_size, mpierror)
CALL MPI_Comm_rank(comm, mpi_rank, mpierror)

!
! Initialize HDF5 library and Fortran interfaces.
Expand Down Expand Up @@ -349,6 +351,6 @@ PROGRAM main
! ------------------------------------
CALL cleanup(filename)

CALL MPI_Finalize(status)
CALL MPI_Finalize(mpierror)

END PROGRAM main
6 changes: 3 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_chunk.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ PROGRAM DATASET_BY_CHUNK
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank

comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_col.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ PROGRAM DATASET_BY_COL
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank
comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
CALL MPI_INIT(mpierror)
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_pattern.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ PROGRAM DATASET_BY_PATTERN
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank

comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/FORTRAN/H5PAR/ph5_f90_hyperslab_by_row.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ PROGRAM DATASET_BY_ROW
!
! MPI definitions and calls.
!
INTEGER :: mpierror ! MPI error flag
INTEGER :: comm, info
INTEGER :: mpi_size, mpi_rank
INTEGER(KIND=MPI_INTEGER_KIND) :: mpierror ! MPI error flag
INTEGER(KIND=MPI_INTEGER_KIND) :: comm, info
INTEGER(KIND=MPI_INTEGER_KIND) :: mpi_size, mpi_rank

comm = MPI_COMM_WORLD
info = MPI_INFO_NULL
Expand Down
Loading

0 comments on commit b1f9707

Please sign in to comment.