summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-11-15 23:32:49 (GMT)
committerGitHub <noreply@github.com>2023-11-15 23:32:49 (GMT)
commitaf8c1d1d872112ad741bbf05dda792c1626b93fd (patch)
tree3d2a1bc73ffc10fea7a5eaae2d746afb50597ce5 /config
parent07f7ae4991e138b1ba27b84df790a7ad56222921 (diff)
downloadhdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.zip
hdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.tar.gz
hdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.tar.bz2
Sync fixes for CI and presets (#3855)
* Sync fixes for CI and presets * Sync the Fortran build changes * Update fortran test file * Sync hl/fortran files * Merge the nvidia compiler flag changes * Update link * Update links to doxygen refs for 1.14
Diffstat (limited to 'config')
-rw-r--r--config/cmake-presets/hidden-presets.json81
-rw-r--r--config/cmake/HDFCompilerFlags.cmake38
-rw-r--r--config/cmake/examples/HDF5_Examples.cmake.in12
-rw-r--r--config/cmake/grepTest.cmake18
-rw-r--r--config/linux-gnulibc130
-rw-r--r--config/nvidia-flags6
6 files changed, 158 insertions, 27 deletions
diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json
index 12eefa1..901e83c 100644
--- a/config/cmake-presets/hidden-presets.json
+++ b/config/cmake-presets/hidden-presets.json
@@ -205,6 +205,28 @@
]
},
{
+ "name": "ci-x64-Debug-Intel",
+ "description": "Intel for x64 (Debug)",
+ "hidden": true,
+ "inherits": [
+ "ci-base",
+ "ci-x64",
+ "ci-Debug",
+ "ci-Intel"
+ ]
+ },
+ {
+ "name": "ci-x64-Release-Intel",
+ "description": "Intel for x64 (Release)",
+ "hidden": true,
+ "inherits": [
+ "ci-base",
+ "ci-x64",
+ "ci-Release",
+ "ci-Intel"
+ ]
+ },
+ {
"name": "ci-x64-Debug-MSVC-asan",
"description": "x64-Debug-MSVC with /fsanitize=address",
"hidden": true,
@@ -265,7 +287,8 @@
"hidden": true,
"inherits": [
"ci-base"
- ]
+ ],
+ "configuration": "Debug"
},
{
"name": "ci-x64-Release-MSVC",
@@ -273,7 +296,8 @@
"hidden": true,
"inherits": [
"ci-base"
- ]
+ ],
+ "configuration": "RelWithDebInfo"
},
{
"name": "ci-x64-Debug-Clang",
@@ -308,6 +332,24 @@
]
},
{
+ "name": "ci-x64-Debug-Intel",
+ "configurePreset": "ci-x64-Debug-Intel",
+ "hidden": true,
+ "inherits": [
+ "ci-base"
+ ],
+ "configuration": "Debug"
+ },
+ {
+ "name": "ci-x64-Release-Intel",
+ "configurePreset": "ci-x64-Release-Intel",
+ "hidden": true,
+ "inherits": [
+ "ci-base"
+ ],
+ "configuration": "RelWithDebInfo"
+ },
+ {
"name": "ci-x64-Debug-MSVC-asan",
"configurePreset": "ci-x64-Debug-MSVC-asan",
"hidden": true,
@@ -370,7 +412,8 @@
"hidden": true,
"inherits": [
"ci-base"
- ]
+ ],
+ "configuration": "Debug"
},
{
"name": "ci-x64-Release-MSVC",
@@ -378,7 +421,8 @@
"hidden": true,
"inherits": [
"ci-base"
- ]
+ ],
+ "configuration": "RelWithDebInfo"
},
{
"name": "ci-x64-Debug-Clang",
@@ -413,6 +457,22 @@
]
},
{
+ "name": "ci-x64-Debug-Intel",
+ "configurePreset": "ci-x64-Debug-Intel",
+ "hidden": true,
+ "inherits": [
+ "ci-base"
+ ]
+ },
+ {
+ "name": "ci-x64-Release-Intel",
+ "configurePreset": "ci-x64-Release-Intel",
+ "hidden": true,
+ "inherits": [
+ "ci-base"
+ ]
+ },
+ {
"name": "ci-x64-Debug-MSVC-asan",
"configurePreset": "ci-x64-Debug-MSVC-asan",
"hidden": true,
@@ -467,7 +527,8 @@
"inherits": "ci-base",
"generators": [
"ZIP"
- ]
+ ],
+ "configurations": ["RelWithDebInfo"]
},
{
"name": "ci-x64-Release-Clang",
@@ -486,6 +547,16 @@
"generators": [
"TGZ"
]
+ },
+ {
+ "name": "ci-x64-Release-Intel",
+ "configurePreset": "ci-x64-Release-Intel",
+ "hidden": true,
+ "inherits": "ci-base",
+ "generators": [
+ "TGZ"
+ ]
}
]
}
+
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index e7b9337..7bddad0 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -56,6 +56,44 @@ if (CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mbounds -g")
endif ()
+
+ # With at least NVHPC 23.5 - 23.9, compiling with -O2 or higher and -DNDEBUG
+ # appears to have issues that manifest in the tests as incorrect metadata
+ # checksums being read or memory being corrupted. Compiling without -DNDEBUG
+ # does not appear to have these issues, but is not ideal due to compiling in
+ # asserts and other library debug code. Compiling with -O1 also does not appear
+ # to have these issues, so set maximum optimization level to -O1 for now until
+ # it can be determined whether these issues are compiler-specific or issues
+ # in the library.
+ set (cmake_c_flags_minsizerel_edited "${CMAKE_C_FLAGS_MINSIZEREL}")
+ string (REPLACE "-O2" "" cmake_c_flags_minsizerel_edited "${cmake_c_flags_minsizerel_edited}")
+ string (REPLACE "-O3" "" cmake_c_flags_minsizerel_edited "${cmake_c_flags_minsizerel_edited}")
+ string (REPLACE "-O4" "" cmake_c_flags_minsizerel_edited "${cmake_c_flags_minsizerel_edited}")
+ string (REPLACE "-Ofast" "" cmake_c_flags_minsizerel_edited "${cmake_c_flags_minsizerel_edited}")
+ string (REPLACE "-fast" "" cmake_c_flags_minsizerel_edited "${cmake_c_flags_minsizerel_edited}")
+ string (STRIP "${cmake_c_flags_minsizerel_edited}" cmake_c_flags_minsizerel_edited)
+ string (PREPEND cmake_c_flags_minsizerel_edited "-O1 ")
+ set (CMAKE_C_FLAGS_MINSIZEREL "${cmake_c_flags_minsizerel_edited}")
+
+ set (cmake_c_flags_release_edited "${CMAKE_C_FLAGS_RELEASE}")
+ string (REPLACE "-O2" "" cmake_c_flags_release_edited "${cmake_c_flags_release_edited}")
+ string (REPLACE "-O3" "" cmake_c_flags_release_edited "${cmake_c_flags_release_edited}")
+ string (REPLACE "-O4" "" cmake_c_flags_release_edited "${cmake_c_flags_release_edited}")
+ string (REPLACE "-Ofast" "" cmake_c_flags_release_edited "${cmake_c_flags_release_edited}")
+ string (REPLACE "-fast" "" cmake_c_flags_release_edited "${cmake_c_flags_release_edited}")
+ string (STRIP "${cmake_c_flags_release_edited}" cmake_c_flags_release_edited)
+ string (PREPEND cmake_c_flags_release_edited "-O1 ")
+ set (CMAKE_C_FLAGS_RELEASE "${cmake_c_flags_release_edited}")
+
+ set (cmake_c_flags_relwithdebinfo_edited "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+ string (REPLACE "-O2" "" cmake_c_flags_relwithdebinfo_edited "${cmake_c_flags_relwithdebinfo_edited}")
+ string (REPLACE "-O3" "" cmake_c_flags_relwithdebinfo_edited "${cmake_c_flags_relwithdebinfo_edited}")
+ string (REPLACE "-O4" "" cmake_c_flags_relwithdebinfo_edited "${cmake_c_flags_relwithdebinfo_edited}")
+ string (REPLACE "-Ofast" "" cmake_c_flags_relwithdebinfo_edited "${cmake_c_flags_relwithdebinfo_edited}")
+ string (REPLACE "-fast" "" cmake_c_flags_relwithdebinfo_edited "${cmake_c_flags_relwithdebinfo_edited}")
+ string (STRIP "${cmake_c_flags_relwithdebinfo_edited}" cmake_c_flags_relwithdebinfo_edited)
+ string (PREPEND cmake_c_flags_relwithdebinfo_edited "-O1 ")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "${cmake_c_flags_relwithdebinfo_edited}")
endif ()
if (CMAKE_COMPILER_IS_GNUCC)
diff --git a/config/cmake/examples/HDF5_Examples.cmake.in b/config/cmake/examples/HDF5_Examples.cmake.in
index 2f3a649..8f28aae 100644
--- a/config/cmake/examples/HDF5_Examples.cmake.in
+++ b/config/cmake/examples/HDF5_Examples.cmake.in
@@ -53,7 +53,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${
if(NOT DEFINED INSTALLDIR)
if(WIN32)
- set(INSTALLDIR "%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@")
+ set(INSTALLDIR "\"%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@\"")
else()
set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
@@ -98,11 +98,11 @@ endif()
set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
### use a toolchain file (supported everywhere) ####
-if(NOT DEFINED CTEST_TOOLCHAIN_FILE)
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=@CTEST_TOOLCHAIN_FILE@")
-else()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=${CTEST_TOOLCHAIN_FILE}")
-endif()
+#if(NOT DEFINED CTEST_TOOLCHAIN_FILE)
+# set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=@CTEST_TOOLCHAIN_FILE@")
+#else()
+# set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=${CTEST_TOOLCHAIN_FILE}")
+#endif()
###############################################################################################################
# For any comments please contact cdashhelp@hdfgroup.org
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index 6e51dec..2ec8387 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -71,8 +71,8 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}")
# remove special output
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-string (FIND TEST_STREAM "_pmi_alps" "${TEST_FIND_RESULT}")
-if (TEST_FIND_RESULT GREATER 0)
+string (FIND TEST_STREAM "_pmi_alps" TEST_FIND_RESULT)
+if (TEST_FIND_RESULT GREATER -1)
string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
endif ()
@@ -169,12 +169,14 @@ else ()
# else grep the output with the reference
set (TEST_GREP_RESULT 0)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-
- # TEST_REFERENCE should always be matched
- string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
- string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT)
- if (NOT TEST_GREP_RESULT)
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ list (LENGTH TEST_STREAM test_len)
+ if (test_len GREATER 0)
+ # TEST_REFERENCE should always be matched
+ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
+ string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT)
+ if (NOT TEST_GREP_RESULT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+ endif ()
endif ()
endif ()
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 328f8d3..b4139ee 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -47,6 +47,9 @@ fi
# Figure out Clang C compiler flags
. $srcdir/config/clang-flags
+# Figure out NVHPC C compiler flags
+. $srcdir/config/nvidia-flags
+
# Use default Fortran 90 compiler according to what C compiler is used.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
@@ -58,6 +61,10 @@ if test "X-" = "X-$FC"; then
FC=pgf90
FC_BASENAME=pgf90
;;
+ nvc*)
+ FC=nvfortran
+ FC_BASENAME=nvfortran
+ ;;
icx*)
FC=ifx
FC_BASENAME=ifx
@@ -79,7 +86,7 @@ if test "X-" = "X-$FC"; then
else
case $FC in
# The PGI and Intel compilers are automatically detected below
- ifc*|ifort*|pgf90*)
+ ifc*|ifort*|pgf90*|nvfortran*)
;;
*f95*)
@@ -135,6 +142,9 @@ fi
# Figure out Clang FC compiler flags
. $srcdir/config/clang-fflags
+# Figure out NVHPC FC compiler flags
+. $srcdir/config/nvidia-fflags
+
case $FC_BASENAME in
#
# Absoft compiler
@@ -173,10 +183,7 @@ case $FC_BASENAME in
nagfor)
F9XSUFFIXFLAG=""
- # NOTE: The default is -ieee=stop, which will cause problems
- # when the H5T module performs floating-point type
- # introspection
- AM_FCFLAGS="$AM_FCFLAGS -ieee=full"
+ AM_FCFLAGS="$AM_FCFLAGS"
FSEARCH_DIRS=""
# Production
@@ -226,6 +233,9 @@ fi
# Figure out Clang CXX compiler flags
. $srcdir/config/clang-cxxflags
+# Figure out NVHPC CXX compiler flags
+. $srcdir/config/nvidia-cxxflags
+
# compiler version strings
# check if the compiler_version_info is already set
@@ -248,7 +258,11 @@ case $CC in
sed 's/\"/\\\"/g' |\
sed 's/^\([a-z]* \)/ built with \1/1'`
cc_version_info=`echo $cc_version_info`
- ;;
+ ;;
+
+ *nvc*)
+ cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'nvc'`
+ ;;
*icx*)
cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
@@ -322,6 +336,10 @@ case $FC in
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'`
;;
+ *nvfortran*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'nvfortran'`
+ ;;
+
*nagfor*|*nagftn*)
RM='rm -f'
tmpfile=/tmp/cmpver.$$
diff --git a/config/nvidia-flags b/config/nvidia-flags
index 864c644..c140edd 100644
--- a/config/nvidia-flags
+++ b/config/nvidia-flags
@@ -76,7 +76,8 @@ if test "X-nvc" = "X-$cc_vendor" -o "X-nvcc" = "X-$cc_vendor"; then
##############
# NDEBUG is handled explicitly by the configure script
- PROD_CFLAGS="-fast"
+ #PROD_CFLAGS="-fast"
+ PROD_CFLAGS="" # -fast implies -O2 and -O2+ currently has test failures.
#########
# Debug #
@@ -106,7 +107,8 @@ if test "X-nvc" = "X-$cc_vendor" -o "X-nvcc" = "X-$cc_vendor"; then
################
HIGH_OPT_CFLAGS="-O1" # -O2+ currently has test failures.
- DEBUG_OPT_CFLAGS="-gopt -O2"
+ #DEBUG_OPT_CFLAGS="-gopt -O2"
+ DEBUG_OPT_CFLAGS="-gopt -O1" # -O2+ currently has test failures.
NO_OPT_CFLAGS="-O0"
#################