diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-10-18 19:44:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 19:44:42 (GMT) |
commit | 65e1bd8ce90d286bd4ffc1575414d775ae86a319 (patch) | |
tree | 5aeb6bc35ab0b6e0d8fe29b56bd9141c4f69bca3 /.github/workflows/nvhpc-cmake.yml | |
parent | fce7ce18697ecead37e75d3d05483ef995cf24dd (diff) | |
download | hdf5-65e1bd8ce90d286bd4ffc1575414d775ae86a319.zip hdf5-65e1bd8ce90d286bd4ffc1575414d775ae86a319.tar.gz hdf5-65e1bd8ce90d286bd4ffc1575414d775ae86a319.tar.bz2 |
Add NVidia compiler support and CI (#3686)
Diffstat (limited to '.github/workflows/nvhpc-cmake.yml')
-rw-r--r-- | .github/workflows/nvhpc-cmake.yml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/nvhpc-cmake.yml b/.github/workflows/nvhpc-cmake.yml new file mode 100644 index 0000000..489c0bb --- /dev/null +++ b/.github/workflows/nvhpc-cmake.yml @@ -0,0 +1,76 @@ +name: hdf5 dev 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 |