Skip to content

Linux NVHPC GPU

Linux NVHPC GPU #10

Workflow file for this run

name: Linux NVHPC GPU
# triggered events (push, pull_request) for the master branch
on:
pull_request:
branches: [ master ]
types: [ labeled ]
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:
#if: ${{ github.event.label.name == 'GPU_Test' }}
name: Ubuntu NVHPC GPU Build
# Run on self-hosted
runs-on: self-hosted
steps:
## Install Lmod
#- name: Install Lmod
# run: |
# sudo apt-get update -y
# sudo apt-get install -y 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=on ..
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=on ..
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
## 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=on ..
# make
# ctest --output-on-failure -R gpu_kernel