summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-10-18 22:47:17 (GMT)
committerGitHub <noreply@github.com>2023-10-18 22:47:17 (GMT)
commit1a898e792ee629afa20962a136dbb239f9c8e774 (patch)
treea4c302d5045c869dc209a660002efb45354a90b9
parent14a2c9eb12b11e6f297aa48edc7b47c485a99429 (diff)
downloadhdf5-1a898e792ee629afa20962a136dbb239f9c8e774.zip
hdf5-1a898e792ee629afa20962a136dbb239f9c8e774.tar.gz
hdf5-1a898e792ee629afa20962a136dbb239f9c8e774.tar.bz2
Add NV flags and update CI (#3711)
-rw-r--r--.github/workflows/autotools.yml6
-rw-r--r--.github/workflows/cmake.yml6
-rw-r--r--.github/workflows/intel-auto.yml12
-rw-r--r--.github/workflows/intel-cmake.yml8
-rw-r--r--.github/workflows/linux-nvhpc-auto.yml58
-rw-r--r--.github/workflows/linux-nvhpc.yml56
-rw-r--r--.github/workflows/nvhpc-auto.yml87
-rw-r--r--.github/workflows/nvhpc-cmake.yml76
-rw-r--r--CTestConfig.cmake2
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake18
-rw-r--r--config/cmake/HDFCompilerFlags.cmake13
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake12
-rw-r--r--config/cmake/scripts/CTestScript.cmake12
-rw-r--r--config/linux-gnulibc14
-rw-r--r--config/nvidia-cxxflags101
-rw-r--r--config/nvidia-fflags139
-rw-r--r--config/nvidia-flags122
17 files changed, 599 insertions, 133 deletions
diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml
index ddc1a39..68d5a2f 100644
--- a/.github/workflows/autotools.yml
+++ b/.github/workflows/autotools.yml
@@ -52,3 +52,9 @@ jobs:
uses: ./.github/workflows/intel-auto.yml
with:
build_mode: "production"
+
+ call-release-auto-nvhpc:
+ name: "Autotools nvhpc Workflows"
+ uses: ./.github/workflows/nvhpc-auto.yml
+ with:
+ build_mode: "production"
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 4ca4f68..14fd9fd 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -44,3 +44,9 @@ jobs:
uses: ./.github/workflows/intel-cmake.yml
with:
build_mode: "Release"
+
+ call-release-cmake-nvhpc:
+ name: "CMake nvhpc Workflows"
+ uses: ./.github/workflows/nvhpc-cmake.yml
+ with:
+ build_mode: "Release"
diff --git a/.github/workflows/intel-auto.yml b/.github/workflows/intel-auto.yml
index ca6b047..0088703 100644
--- a/.github/workflows/intel-auto.yml
+++ b/.github/workflows/intel-auto.yml
@@ -13,14 +13,16 @@ permissions:
jobs:
Intel_build_and_test:
- name: "Intel ${{ inputs.build_mode }} -Werror (build only)"
+ name: "Intel ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
+
- name: Install Dependencies
- run: |
+ run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool libtool-bin libaec-dev
+
- name: Add oneAPI to apt
shell: bash
run: |
@@ -39,9 +41,9 @@ jobs:
sudo apt install -y intel-oneapi-mpi-devel
sudo apt-get install doxygen graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
- echo "CC=icx" >> $GITHUB_ENV
- echo "CXX=icpx" >> $GITHUB_ENV
- echo "FC=ifx" >> $GITHUB_ENV
+ echo "CC=icx" >> $GITHUB_ENV
+ echo "CXX=icpx" >> $GITHUB_ENV
+ echo "FC=ifx" >> $GITHUB_ENV
- name: Install oneAPI MKL library
shell: bash
diff --git a/.github/workflows/intel-cmake.yml b/.github/workflows/intel-cmake.yml
index 22db843..037eea6 100644
--- a/.github/workflows/intel-cmake.yml
+++ b/.github/workflows/intel-cmake.yml
@@ -14,7 +14,7 @@ permissions:
jobs:
Intel_build_and_test:
- name: "Intel ${{ inputs.build_mode }} -Werror (build only)"
+ name: "Intel ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -30,9 +30,9 @@ jobs:
- name: Install Linux Dependencies
run: |
- sudo apt update
- sudo apt-get install ninja-build doxygen graphviz
- sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
+ sudo apt update
+ sudo apt-get install ninja-build doxygen graphviz
+ sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
- name: install oneAPI dpcpp and fortran compiler
shell: bash
diff --git a/.github/workflows/linux-nvhpc-auto.yml b/.github/workflows/linux-nvhpc-auto.yml
deleted file mode 100644
index fe6653e..0000000
--- a/.github/workflows/linux-nvhpc-auto.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-name: linux autotools nvhpc
-
-on:
- workflow_dispatch:
- 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:
- - 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
- - name: Install NVHPC
- run: |
- curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
- echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
- sudo apt-get update -y
- sudo apt-get install -y nvhpc-23-7
- - name: Get Sources
- uses: actions/checkout@v4
- - name: Test HDF5
- env:
- NPROCS: 2
- run: |
- export NVHPCSDK=/opt/nvidia/hpc_sdk
- export OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++
- export OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc
- export OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran
- export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib
- export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
- export DESTDIR=/tmp
- ./autogen.sh
- ./configure CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpicc FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpifort FCFLAGS="-fPIC -fortranlibs" --enable-fortran --enable-shared --enable-parallel
- cat config.log
- make -j
- make check -j
- make install
- make uninstall
diff --git a/.github/workflows/linux-nvhpc.yml b/.github/workflows/linux-nvhpc.yml
deleted file mode 100644
index 17fa93c..0000000
--- a/.github/workflows/linux-nvhpc.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: linux CMake nvhpc
-
-on:
- workflow_dispatch:
- 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:
- - 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
- - name: Install NVHPC
- run: |
- curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
- echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
- sudo apt-get update -y
- sudo apt-get install -y nvhpc-23-7
- - name: Get Sources
- uses: actions/checkout@v4
- - name: Test HDF5
- env:
- FC: nvfortran
- CC: nvc
- FCFLAGS: -fPIC
- run: |
- export NVHPCSDK=/opt/nvidia/hpc_sdk
- export OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++
- export OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc
- export OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran
- export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib
- export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
- cmake -B build -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_PARALLEL:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=ON
- cat build/CMakeCache.txt
- cmake --build build
- ctest --test-dir build --output-on-failure
diff --git a/.github/workflows/nvhpc-auto.yml b/.github/workflows/nvhpc-auto.yml
new file mode 100644
index 0000000..ee96dfd
--- /dev/null
+++ b/.github/workflows/nvhpc-auto.yml
@@ -0,0 +1,87 @@
+name: hdf5 1.14 autotools nvhpc
+
+on:
+ workflow_call:
+ inputs:
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ nvhpc_build_and_test:
+ name: "nvhpc ${{ inputs.build_mode }}"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Dependencies
+ 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 m4 flex bison cmake libzip-dev openssl build-essential
+
+ - name: Install NVHPC
+ shell: bash
+ run: |
+ curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
+ echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
+ sudo apt-get update -y
+ sudo apt-get install -y nvhpc-23-7
+ echo "CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpicc" >> $GITHUB_ENV
+ echo "FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin/mpifort" >> $GITHUB_ENV
+ echo "NVHPCSDK=/opt/nvidia/hpc_sdk" >> $GITHUB_ENV
+ echo "OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++" >> $GITHUB_ENV
+ echo "OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc" >> $GITHUB_ENV
+ echo "OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran" >> $GITHUB_ENV
+ echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib" >> $GITHUB_ENV
+ echo "DESTDIR=/tmp" >> $GITHUB_ENV
+
+ - name: Autotools Configure
+ shell: bash
+ run: |
+ export RUNPARALLEL="mpiexec -np 2"
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure \
+ FCFLAGS="-fPIC -fortranlibs" \
+ --enable-build-mode=${{ inputs.build_mode }} \
+ --enable-fortran \
+ --enable-shared \
+ --enable-parallel
+ #cat config.log
+
+ # BUILD
+ - name: Autotools Build
+ shell: bash
+ run: |
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ make -j3
+ working-directory: ${{ runner.workspace }}/build
+
+ # RUN TESTS
+ # NORMAL
+ - name: Autotools Run Tests
+ run: |
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ make check -j
+ working-directory: ${{ runner.workspace }}/build
+
+ # INSTALL (note that this runs even when we don't run the tests)
+ - name: Autotools Install
+ run: |
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ make install
+ working-directory: ${{ runner.workspace }}/build
+
+# - name: Autotools Verify Install
+# run: |
+# export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+# make check-install
+# working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/nvhpc-cmake.yml b/.github/workflows/nvhpc-cmake.yml
new file mode 100644
index 0000000..8c7760e
--- /dev/null
+++ b/.github/workflows/nvhpc-cmake.yml
@@ -0,0 +1,76 @@
+name: hdf5 1.14 CMake nvhpc
+
+on:
+ workflow_call:
+ inputs:
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ nvhpc_build_and_test:
+ name: "nvhpc ${{ inputs.build_mode }}"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Linux dependencies
+ shell: bash
+ run: |
+ sudo apt 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: Install NVHPC
+ shell: bash
+ run: |
+ curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
+ echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
+ sudo apt-get update -y
+ sudo apt-get install -y nvhpc-23-7
+ echo "CC=nvc" >> $GITHUB_ENV
+ echo "FC=nvfortran" >> $GITHUB_ENV
+ echo "NVHPCSDK=/opt/nvidia/hpc_sdk" >> $GITHUB_ENV
+ echo "OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++" >> $GITHUB_ENV
+ echo "OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc" >> $GITHUB_ENV
+ echo "OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvfortran" >> $GITHUB_ENV
+ echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/lib" >> $GITHUB_ENV
+ echo "DESTDIR=/tmp" >> $GITHUB_ENV
+
+ - name: CMake Configure with nvc
+ shell: bash
+ run: |
+ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin:$PATH
+ 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=ON \
+ -DHDF5_BUILD_CPP_LIB:BOOL=OFF \
+ -DLIBAEC_USE_LOCALCONTENT=OFF \
+ -DZLIB_USE_LOCALCONTENT=OFF \
+ -DHDF5_BUILD_FORTRAN:BOOL=ON \
+ -DHDF5_ENABLE_ASSERTS:BOOL=ON \
+ -DMPIEXEC_MAX_NUMPROCS:STRING="2" \
+ $GITHUB_WORKSPACE
+ cat src/libhdf5.settings
+
+ # BUILD
+ - name: CMake Build
+ shell: bash
+ run: |
+ cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
+ working-directory: ${{ runner.workspace }}/build
+
+ # RUN TESTS
+# - name: CMake Run Tests
+# shell: bash
+# run: |
+# ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
+# working-directory: ${{ runner.workspace }}/build
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 02b34dd..9332de0 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -34,7 +34,7 @@ else ()
if (CDASH_LOCAL)
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114")
else ()
- set (CTEST_DROP_LOCATION "/submit.php?project=HDF5")
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114")
endif ()
endif ()
set (CTEST_DROP_SITE_CDASH TRUE)
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index e8a55ba..13f712d 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -49,6 +49,22 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_LOADED)
endif ()
endif ()
+if (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC" AND CMAKE_CXX_COMPILER_LOADED)
+ if (NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)
+ if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 11)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C11_STANDARD_COMPILE_OPTION}")
+ endif ()
+ endif ()
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Minform=warn")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Mbounds -gopt -g")
+ endif ()
+endif ()
+
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
@@ -97,7 +113,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 1dca910..a6bce98 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -47,6 +47,17 @@ if(_CLANG_MSVC_WINDOWS AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGN
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker -stack:20000000")
endif()
+if(CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Minform=warn")
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
+ endif ()
+ else ()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mbounds -g")
+ endif ()
+endif()
+
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
@@ -106,7 +117,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index e08df05..f207c70 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -41,7 +41,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
if (HDF5_ENABLE_BUILD_DIAGS)
@@ -56,6 +56,16 @@ 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 (CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mnoframe")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mbounds -Mchkptr -Mdclchk -g")
+ endif ()
+endif ()
if (NOT MSVC AND NOT MINGW)
# General flags
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index f277864..2a57db8 100644
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -202,14 +202,14 @@ endforeach ()
# Initialize the CTEST commands
#------------------------------
if (CMAKE_GENERATOR_TOOLSET)
- set (CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+ set (CTEST_CONFIGURE_TOOLSET "\"-T${CMAKE_GENERATOR_TOOLSET}\"")
else ()
- set (CTEST_CONFIGURE_TOOLSET "")
+ set (CTEST_CONFIGURE_TOOLSET)
endif()
if (CMAKE_GENERATOR_ARCHITECTURE)
- set (CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}")
+ set (CTEST_CONFIGURE_ARCHITECTURE "\"-A${CMAKE_GENERATOR_ARCHITECTURE}\"")
else ()
- set (CTEST_CONFIGURE_ARCHITECTURE "")
+ set (CTEST_CONFIGURE_ARCHITECTURE)
endif()
if (LOCAL_MEMCHECK_TEST)
if(LOCAL_USE_VALGRIND)
@@ -217,7 +217,7 @@ if (LOCAL_MEMCHECK_TEST)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
endif()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" ${CTEST_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\""
)
else ()
if (LOCAL_COVERAGE_TEST)
@@ -226,7 +226,7 @@ else ()
endif ()
endif ()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" ${CTEST_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\""
)
endif ()
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 7f3c339..7614b07 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -298,6 +298,7 @@ case $FC in
*pgf90*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'`
;;
+
*nagfor*|*nagftn*)
RM='rm -f'
tmpfile=/tmp/cmpver.$$
@@ -322,6 +323,9 @@ fi
# check if the compiler_version_info is already set
if test -z "$cxx_version_info"; then
case $CXX in
+ *nvc++*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'nvc++'`
+ ;;
*pgc++*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgc++'`
;;
diff --git a/config/nvidia-cxxflags b/config/nvidia-cxxflags
new file mode 100644
index 0000000..6becd26
--- /dev/null
+++ b/config/nvidia-cxxflags
@@ -0,0 +1,101 @@
+# -*- 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
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# NVIDIA nvc++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not NVIDIA; otherwise `cxx_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for NVIDIA nvc++
+# unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: nvc++
+# cxx_version: Version number: 5.0-2, 5.2-2
+#
+if test X = "X$cxx_flags_set"; then
+ cxx_version="`$CXX $CXXFLAGS -V 2>&1 |grep '^nvc++ '`"
+ if test X != "X$cxx_version"; then
+ cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*++\).*/\1/'`
+ cxx_version=`echo $cxx_version |sed 's/nvc++ \([-a-z0-9\.\-]*\).*/\1/'`
+ echo "compiler '$CXX' is NVIDIA $cxx_vendor-$cxx_version"
+
+ # Some version numbers
+ # NVIDIA version numbers are of the form: "major.minor-patch"
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d. | cut -f1 -d-`
+ cxx_vers_patch=`echo $cxx_version | cut -f2 -d. | cut -f2 -d-`
+ test -n "$cxx_vers_major" || cxx_vers_major=0
+ test -n "$cxx_vers_minor" || cxx_vers_minor=0
+ test -n "$cxx_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+ fi
+fi
+
+# Common PGI flags for various situations
+if test "X-nvc++" = "X-$cxx_vendor"; then
+
+ ###########
+ # General #
+ ###########
+
+ # Default to C++11 standard
+ H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11 -Minform=warn"
+
+ ##############
+ # Production #
+ ##############
+
+ PROD_CXXFLAGS=
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly in configure
+ # -g is handled by the symbols flags
+ DEBUG_CXXFLAGS="-Mbounds"
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CXXFLAGS="-Mprof=func,line"
+ # Use this for profiling with gprof
+ #PROFILE_CXXFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CXXFLAGS="-O4"
+ DEBUG_OPT_CXXFLAGS="-gopt -O2"
+ NO_OPT_CXXFLAGS="-O0"
+
+ #################
+ # Flags are set #
+ #################
+ cxx_flags_set=yes
+fi
+
+# Clear cxx info if no flags set
+if test "X-$cxx_flags_set" = "X-"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/nvidia-fflags b/config/nvidia-fflags
new file mode 100644
index 0000000..77677e1
--- /dev/null
+++ b/config/nvidia-fflags
@@ -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
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# NVIDIA nvfortran compiler or a derivative. It is careful not to do anything
+# if the compiler is not NVIDIA; otherwise `f9x_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for NVIDIA nvfortran
+# unless a compiler version is already known
+#
+# f9x_vendor: The compiler name: nvfortran
+# f9x_version: Version number:
+#
+if test X = "X$f9x_flags_set"; then
+ f9x_version="`$FC $FCFLAGS -V 2>&1 |grep '^nvfortran '`"
+ if test X != "X$f9x_version"; then
+ is_mpi="`$FC $FCFLAGS -help 2>&1 |grep 'link MPI'`"
+ f9x_vendor=`echo $f9x_version |sed 's/\([a-z0-9]*\).*/\1/'`
+ f9x_version=`echo $f9x_version |sed 's/nvfortran \([-a-z0-9\.\-]*\).*/\1/'`
+ echo "compiler '$FC' is NVIDIA $f9x_vendor-$f9x_version"
+
+ # Some version numbers
+ # NVIDIA version numbers are of the form: "major.minor-patch"
+ f9x_vers_major=`echo $f9x_version | cut -f1 -d.`
+ f9x_vers_minor=`echo $f9x_version | cut -f2 -d. | cut -f1 -d-`
+ f9x_vers_patch=`echo $f9x_version | cut -f2 -d. | cut -f2 -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
+ f9x_vers_all=`expr $f9x_vers_major '*' 1000000 + $f9x_vers_minor '*' 1000 + $f9x_vers_patch`
+ fi
+fi
+
+# Common NVIDIA flags for various situations
+if test "X-nvfortran" = "X-$f9x_vendor"; then
+
+ ###############################
+ # 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
+
+ # Host-specific flags
+ # Nothing currently. (Uncomment code below and modify to add any)
+ #case "`hostname`" in
+ # sleipnir.ncsa.uiuc.edu)
+ # arch="$arch -pipe"
+ # ;;
+ #esac
+
+ ##############
+ # Production #
+ ##############
+
+ # Check for MPI wrapper being used and tweak down compiler options
+ # Comment out the Tweaking since it caused problems to mpich1.2.6.
+ # Need to investigate the reasons to tweak.
+ #if test "X-" == "X-$is_mpi"; then
+ # PROD_FCFLAGS="-fast -s -Mnoframe"
+ #else
+ # PROD_FCFLAGS="-O2 -s"
+ #fi
+ PROD_FCFLAGS="-fast -Mnoframe -fPIC"
+
+ #########
+ # Debug #
+ #########
+
+ DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk -fPIC"
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_FCFLAGS="-s"
+ SYMBOLS_FCFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_FCFLAGS="-Mprof=func,line"
+ # Use this for profiling with gprof
+ #PROFILE_FCFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_FCFLAGS=
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ FC_BASENAME=nvfortran
+ Fortran_COMPILER_ID=NVIDIA
+ F9XSUFFIXFLAG=""
+ FSEARCH_DIRS=""
+ # Uncomment the following to add something specific for FCFLAGS.
+ #FCFLAGS="$FCFLAGS"
+
+
+
+ #################
+ # 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
+
diff --git a/config/nvidia-flags b/config/nvidia-flags
new file mode 100644
index 0000000..864c644
--- /dev/null
+++ b/config/nvidia-flags
@@ -0,0 +1,122 @@
+# -*- 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
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# NVIDIA nvc compiler or a derivative. It is careful not to do anything
+# if the compiler is not nvcc; otherwise `cc_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for nvc
+# unless a compiler version is already known
+#
+# cc_vendor: The compiler name: nvc
+# cc_version: Version number: 5.0-2, 5.2-2
+#
+if test X = "X$cc_flags_set"; then
+ cc_version="`$CC $CFLAGS -V 2>&1 |grep '^nvc '`"
+ if test X != "X$cc_version"; then
+ is_mpi="`$CC $CFLAGS -help 2>&1 |grep 'MPI'`"
+ cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
+ cc_version=`echo $cc_version |sed 's/nvc \([-a-z0-9\.\-]*\).*/\1/'`
+ echo "compiler '$CC' is NVIDIA $cc_vendor-$cc_version"
+
+ # Some version numbers
+ # NVIDIA version numbers are of the form: "major.minor-patch"
+ cc_vers_major=`echo $cc_version | cut -f1 -d.`
+ cc_vers_minor=`echo $cc_version | cut -f2 -d. | cut -f1 -d-`
+ cc_vers_patch=`echo $cc_version | cut -f2 -d. | cut -f2 -d-`
+ test -n "$cc_vers_major" || cc_vers_major=0
+ test -n "$cc_vers_minor" || cc_vers_minor=0
+ test -n "$cc_vers_patch" || cc_vers_patch=0
+ cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
+ fi
+fi
+
+# Common PGI flags for various situations
+if test "X-nvc" = "X-$cc_vendor" -o "X-nvcc" = "X-$cc_vendor"; then
+ # Insert section about version specific problems from compiler flags here,
+ # if necessary.
+
+ arch=
+ # Architecture-specific flags
+ # Nothing currently. (Uncomment code below and modify to add any)
+ #case "$host_os-$host_cpu" in
+ # *-i686)
+ # arch="-march=i686"
+ # ;;
+ #esac
+
+ # Host-specific flags
+ # Nothing currently. (Uncomment code below and modify to add any)
+ #case "`hostname`" in
+ # sleipnir.ncsa.uiuc.edu)
+ # arch="$arch -pipe"
+ # ;;
+ #esac
+
+ ###########
+ # General #
+ ###########
+
+ # Default to C99 standard.
+ H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CFLAGS="-fast"
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ DEBUG_CFLAGS="-Mbounds"
+
+ ###########
+ # Symbols #
+ ###########
+
+ NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CFLAGS="-Mprof=func,line"
+ # Use this for profiling with gprof
+ #PROFILE_CFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CFLAGS="-O1" # -O2+ currently has test failures.
+ DEBUG_OPT_CFLAGS="-gopt -O2"
+ NO_OPT_CFLAGS="-O0"
+
+ #################
+ # Flags are set #
+ #################
+ cc_flags_set=yes
+fi
+
+# Clear cc info if no flags set
+if test "X-$cc_flags_set" = "X-"; then
+ cc_vendor=
+ cc_version=
+fi