-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 2.92 KB
/
linux_nvhpc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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
env:
NVIDIA_HPC_SDK_URL1: https://developer.download.nvidia.com/hpc-sdk/21.9/nvhpc-21-9_21.9_amd64.deb
NVIDIA_HPC_SDK_URL2: https://developer.download.nvidia.com/hpc-sdk/21.9/nvhpc-2021_21.9_amd64.deb
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: |
# wget "$NVIDIA_HPC_SDK_URL1" "$NVIDIA_HPC_SDK_URL2"
# sudo apt-get install ./nvhpc-21-9_21.9_amd64.deb ./nvhpc-2021_21.9_amd64.deb
# 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
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
ctest --output-on-failure