Add NVHPC CI workflow for cpu #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux NVHPC | |
# triggered events (push, pull_request) for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
ubuntu_build: | |
name: Ubuntu NVHPC Build | |
# Run on ubuntu-latest | |
runs-on: ubuntu-latest | |
steps: | |
# Install Lmod | |
- name: Install Lmod | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install lmod | |
echo "source /usr/share/lmod/lmod/init/bash" >> ~/.bash_profile | |
source /usr/share/lmod/lmod/init/bash | |
module list | |
# Install NVIDIA HPC SDK | |
- name: Install NVIDIA HPC SDK | |
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-24-7 | |
# Check location of installed NVHPC compilers | |
- name: Check compiler install | |
run: | | |
source /usr/share/lmod/lmod/init/bash | |
module use /opt/nvidia/hpc_sdk/modulefiles | |
module load nvhpc | |
which nvc | |
which nvfortran | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Test debug mode | |
- name: Build gf debug | |
run: | | |
source /usr/share/lmod/lmod/init/bash | |
module use /opt/nvidia/hpc_sdk/modulefiles | |
module load nvhpc | |
cd ref | |
rm -rf build | |
mkdir build | |
cd build | |
#export OMP_NUM_THREADS=4 | |
cmake -DCMAKE_BUILD_TYPE=debug -DENABLE_GPU=off .. | |
make VERBOSE=1 | |
ctest --output-on-failure | |
# Test release mode | |
- name: Build gf release | |
run: | | |
source /usr/share/lmod/lmod/init/bash | |
module use /opt/nvidia/hpc_sdk/modulefiles | |
module load nvhpc | |
cd ref | |
rm -rf build | |
mkdir build | |
cd build | |
#export OMP_NUM_THREADS=4 | |
cmake -DCMAKE_BUILD_TYPE=release -DENABLE_GPU=off .. | |
make VERBOSE=1 | |
ctest --output-on-failure | |
# Debug session for failures | |
- | |
name: Debug session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 60 | |
with: | |
limit-access-to-actor: true |