-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (85 loc) · 2.9 KB
/
gpu_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
93
94
95
96
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-CI' }}
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
# Remove label
- name: Remove GPU-CI label
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: GPU-CI
# 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
# Test debug mode
# Turn this off because the compiler hangs while building in 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
ulimit -s hard
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