Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync 1.14 branch with develop #3705

Merged
merged 25 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a3e2311
Address nagfor exceptions stoppage. (#3658)
brtnfld Oct 11, 2023
c4a9b32
Simplify. (#3659)
hyoklee Oct 12, 2023
90ea5ac
Add expedited testing support to t_filters_parallel (#3665)
jhendersonHDF Oct 12, 2023
6fc9d82
Remove clang warnings (#3656)
hyoklee Oct 13, 2023
43d91bd
Fixes test failure for gfortran -O2 and -O3, -fdefault-real-16 (#3662)
brtnfld Oct 13, 2023
625daf5
Fix link error on clang17/gfortran13/macOS-13 (#3666) (#3671)
hyoklee Oct 13, 2023
442f15e
Correct fortran CMake generator expressions (#3670)
byrnHDF Oct 14, 2023
73692ee
Add AOCC GitHub Action (#3504) (#3657)
hyoklee Oct 14, 2023
459598c
Fix uninitialized subfiling test variable (#3675)
derobins Oct 15, 2023
71fb6ba
Add support for AOCC & Flang w/ the Autotools (#3674)
derobins Oct 15, 2023
49ed7eb
Fix a strncpy call to use dest size not src (#3677)
derobins Oct 15, 2023
267719b
Remove CANBE_UNUSED() from subfiling VFD (#3678)
derobins Oct 16, 2023
263b8b0
Suppress MPI_Waitall warnings w/ MPICH (#3680)
derobins Oct 16, 2023
1324276
Fix a possible NULL pointer dereference in tests (#3676)
derobins Oct 16, 2023
468e087
Fix printf warnings in t_mpi (#3679)
derobins Oct 16, 2023
3561e2b
Fix invalid memory access in S3 comms (#3681)
derobins Oct 16, 2023
c3b8078
Add Doxygen for H5Pset_fapl_sec2() (#3685)
derobins Oct 16, 2023
72a5f2b
switch to using time function instead of date function (#3690)
brtnfld Oct 17, 2023
3e22157
Initialize API context MPI types to MPI_BYTE (#3688)
jhendersonHDF Oct 17, 2023
1872b1c
Add test info output to t_filters_parallel (#3696)
jhendersonHDF Oct 17, 2023
85a530b
Suppress format string warnings in subfiling test (#3699)
derobins Oct 17, 2023
5c9d76c
Fix unused variable in tselect.c (#3701)
derobins Oct 17, 2023
e686637
Fix unused variable warning in H5F_sfile_assert_num (#3700)
derobins Oct 17, 2023
224936b
Restore floating-point suffixes in tests (#3698)
derobins Oct 17, 2023
0e3d667
Sync with changes from develop
jhendersonHDF Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/linux-auto-aocc-ompi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: linux autotools aocc ompi

on:
push:
pull_request:
branches:
- hdf5_1_14
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install System dependencies
run: |
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin build-essential libncurses-dev libquadmath0 libstdc++6 libxml2
- name: Install AOCC 4.1.0
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-1/aocc-compiler-4.1.0.tar
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
bash install.sh
source /home/runner/work/hdf5/hdf5/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Install OpenMPI 4.1.5
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/lib:/usr/local/lib
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz
tar zxvf openmpi-4.1.5.tar.gz
cd openmpi-4.1.5
./configure CC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/bin/clang FC=/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/bin/flang --prefix=/usr/local
make
sudo make install
- name: Install HDF5
env:
NPROCS: 2
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/lib:/usr/local/lib/openmpi:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/lib:/usr/local/lib/openmpi:/usr/local/lib
export PATH=/usr/local/bin:$PATH
./autogen.sh
./configure --prefix=/tmp --enable-parallel --enable-shared CC=/usr/local/bin/mpicc LDFLAGS="-L/home/runner/work/hdf5/hdf5/aocc-compiler-4.1.0/lib -L/usr/local/lib/openmpi"
make -j
make check -j
make install
make uninstall
7 changes: 1 addition & 6 deletions CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
endif ()
else ()
if (BUILD_ZLIB_WITH_FETCHCONTENT)
# Only tgz files available
ORIGINAL_ZLIB_LIBRARY ("TGZ")
message (VERBOSE "HDF5_ZLIB is built from fetch content")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
message (VERBOSE "Filter HDF5_ZLIB is built")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
Expand Down
1 change: 1 addition & 0 deletions config/clang-cxxflags
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ load_clang_arguments()
done)
IFS=' ' echo "$*"
}

# Get the compiler version in a way that works for clang++
# unless a compiler version is already known
#
Expand Down
139 changes: 139 additions & 0 deletions config/clang-fflags
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# -*- shell-script -*-
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# [email protected].


# This file should be sourced into configure if the compiler is the
# Clang Fortran compiler (flang) or a derivative. It is careful not to do
# anything if the compiler is not Clang; otherwise 'cc_flags_set' is set
# to 'yes'
#

# Get the compiler version in a way that works for clang
# unless a compiler version is already known
#
# cc_vendor: The compiler name: flang
# cc_version: Version number: 6.0.0, 7.3.0, ... 10.0.1
#
if test "X-" = "X-$f9x_flags_set"; then
# flang -v will return version number following "clang"
f9x_version="`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 |\
grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
if test -n "$f9x_version"; then
f9x_vendor="flang"
fi
if test "X-" != "X-$f9x_version"; then

# Get the compiler version numbers
f9x_vers_major=`echo $f9x_version | cut -f1 -d.`
f9x_vers_minor=`echo $f9x_version | cut -f2 -d.`
f9x_vers_patch=`echo $f9x_version | cut -f3 -d.`
test -n "$f9x_vers_major" || f9x_vers_major=0
test -n "$f9x_vers_minor" || f9x_vers_minor=0
test -n "$f9x_vers_patch" || f9x_vers_patch=0
fi
fi

if test "X-flang" = "X-$f9x_vendor"; then

echo "compiler '$FC' is $f9x_vendor-$f9x_version"

FC_BASENAME=flang
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""

###############################
# Architecture-specific flags #
###############################

arch=
# Nothing currently. (Uncomment code below and modify to add any)
#case "$host_os-$host_cpu" in
# *-i686)
# arch="-march=i686"
# ;;
#esac

H5_FCFLAGS="$H5_FCFLAGS $arch"

##############
# Production #
##############

PROD_FCFLAGS=

#########
# Debug #
#########

DEBUG_FCFLAGS=

########################
# Enhanced Diagnostics #
########################

NO_DIAGS_FCFLAGS=
DIAGS_FCFLAGS=

###########
# Symbols #
###########

NO_SYMBOLS_FCFLAGS=
SYMBOLS_FCFLAGS=

#############
# Profiling #
#############

PROFILE_FCFLAGS=

################
# Optimization #
################

HIGH_OPT_FCFLAGS="-O3"
NO_OPT_FCFLAGS="-O0"
DEBUG_OPT_FCFLAGS="-O0"

############
# Warnings #
############

###########
# General #
###########

# We don't use OpenMP, so don't link to it
H5_FCFLAGS="$H5_FCFLAGS -nomp"

######################
# Developer warnings #
######################

NO_DEVELOPER_WARNING_FCFLAGS=
DEVELOPER_WARNING_FCFLAGS=

#############################
# Version-specific warnings #
#############################

#################
# Flags are set #
#################
f9x_flags_set=yes
fi

# Clear f9x info if no flags set
if test "X$f9x_flags_set" = "X"; then
f9x_vendor=
f9x_version=
fi
5 changes: 5 additions & 0 deletions config/cmake/HDFFortranCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERS
endif ()
endif ()

if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
message (STATUS "... Select IEEE floating-point mode full")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ieee=full")
endif ()

if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
Expand Down
7 changes: 5 additions & 2 deletions config/linux-gnulibc1
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ else
fc_version_info=`$FC -V | grep Absoft`
;;
# The NAG compiler
nagfor*|nagftn*)
*nagfor*|*nagftn*)
RM='rm -f'
tmpfile=/tmp/cmpver.$$
$FC -V >& $tmpfile
Expand Down Expand Up @@ -122,6 +122,9 @@ fi
# Figure out Intel FC compiler flags
. $srcdir/config/intel-fflags

# Figure out Clang FC compiler flags
. $srcdir/config/clang-fflags

case $FC_BASENAME in
#
# Absoft compiler
Expand Down Expand Up @@ -163,7 +166,7 @@ case $FC_BASENAME in
# NOTE: The default is -ieee=stop, which will cause problems
# when the H5T module performs floating-point type
# introspection
H5_FCFLAGS="$H5_FCFLAGS -ieee=full"
AM_FCFLAGS="$AM_FCFLAGS -ieee=full"
FSEARCH_DIRS=""

# Production
Expand Down
9 changes: 6 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4225,15 +4225,18 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
;;
esac

### libtool does not pass the correct argument linking (-Wl,-Wl,,) for the NAG Fortran compiler
### libtool does not pass the correct linker options for some Fortran compilers
### on Linux (other OSs have not been tested).
### Therefore, detect if we are using the NAG Fortran compiler, and replace the wl="-Wl," for Fortran to
### wl="-Wl,-Wl,," in the libtool file. (HDFFV-10037)
case "`uname`" in
Linux*)
### NAG Fortran needs to replace "-Wl," with "-Wl,-Wl,," (HDFFV-10037)
if test "X$FC_BASENAME" = "Xnagfor"; then
cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,-Wl,,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
fi
### Flang needs to replace "", with "-Wl," (avoids unknown option: -soname issues)
if test "X$FC_BASENAME" = "Xflang"; then
cat libtool | awk '/BEGIN LIBTOOL TAG CONFIG: FC/{flag=1}flag&&/wl=/{$NF="wl=\"-Wl,\"";flag=0}1' > libtool.tmp && mv -f libtool.tmp libtool && chmod 755 libtool
fi
;;
esac
fi
Expand Down
27 changes: 18 additions & 9 deletions fortran/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ set (F2003_examples

foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
target_compile_options(f90_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
target_compile_options(f90_ex_${example}
PRIVATE
"${HDF5_CMAKE_Fortran_FLAGS}"
"$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>")
# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>")
# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>")
if(MSVC)
set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
Expand Down Expand Up @@ -76,9 +79,12 @@ endforeach ()

foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
target_compile_options(f03_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
target_compile_options(f03_ex_${example}
PRIVATE
"${HDF5_CMAKE_Fortran_FLAGS}"
"$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>")
# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>")
# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>")
if(MSVC)
set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
Expand Down Expand Up @@ -117,9 +123,12 @@ endforeach ()

if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_compile_options(f90_ex_ph5example PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
target_compile_options(f90_ex_ph5example
PRIVATE
"${HDF5_CMAKE_Fortran_FLAGS}"
"$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>")
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>")
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>")
if(MSVC)
set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
Expand Down
8 changes: 3 additions & 5 deletions fortran/examples/ph5example.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
PROGRAM DATASET

USE HDF5 ! This module contains all necessary modules
USE MPI

IMPLICIT NONE

INCLUDE 'mpif.h'
CHARACTER(LEN=10), PARAMETER :: default_fname = "sds.h5" ! Default name
CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name

Expand Down Expand Up @@ -72,10 +72,8 @@ PROGRAM DATASET
CALL h5pset_fapl_mpio_f(plist_id, comm, info, error)

!
! Figure out the filename to use. If your system does not support
! getenv, comment that statement with this,
! filename = ""
CALL getenv("HDF5_PARAPREFIX", filename)
! Figure out the filename to use.
CALL get_environment_variable("HDF5_PARAPREFIX", filename)
fnamelen = LEN_TRIM(filename)
if ( fnamelen == 0 ) then
filename = default_fname
Expand Down
Loading