-
Notifications
You must be signed in to change notification settings - Fork 12
170 lines (166 loc) · 6.64 KB
/
table_render.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Sending test jobs to NERSC (cori / perlmutter)
# The ssh key needs to be updated frequently
name: Render table part in readme
on:
workflow_dispatch:
jobs:
docker-github-runner:
# Some issues with vasp5.4 when running with large number of cores (>=8)
# may not be reproduced in github-runner which only used 2 cores
defaults:
run:
shell: bash
runs-on: ubuntu-latest
container:
image: ulissigroup/kubeflow_vasp:extras-notebook
env:
VASP_PREFIX: "mpirun -np 2 --mca btl_vader_single_copy_mechanism none --mca mpi_cuda_support 0 --allow-run-as-root"
options: --user root --entrypoint /bin/bash
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Package install
run: |
python -m pip install -e .
- name: Run test (2 cores)
run: |
for ver in "vasp.5.4.4.pl2" "vasp.6.1.2_pgi_mkl" "vasp.6.2.0_pgi_mkl" "vasp.6.3.0_pgi_mkl"
do
export VASP_COMMAND="$VASP_PREFIX /opt/$ver/bin/vasp_std"
echo ${VASP_COMMAND}
echo "Testing VaspInteractive on $ver"
# Force using the standard python
python examples/ex00_vasp_test.py | tee tmp.out
RES=`sed -n "s/^Test result:\(.*\)$/\1/p" tmp.out`
echo $ver, $RES >> ulissi_docker.txt
rm tmp.out
done
dat=`date +"%Y-%m-%dT%H:%M:%S%z"`
echo "#Last updated: $dat" >> ulissi_docker.txt
cat ulissi_docker.txt
submit-nersc-jobs:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- host: cori
url: cori.nersc.gov
- host: perlmutter
url: perlmutter-p1.nersc.gov
# The login-only version is only used for shifter image testing
- host: perlmutter-login-only
url: perlmutter-p1.nersc.gov
env:
GIST_ID: afede700c2b7703c77e10e51333bfa75
steps:
# Copied from https://thepaulo.medium.com/scheduling-jobs-in-a-super-computer-cluster-using-github-actions-2ee83405cb69
- uses: actions/checkout@v2
- name: Get a short version of the GIT commit SHA to use in naming files
id: getshortsha
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Create local ssh key
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/nersc
chmod 600 ~/.ssh/nersc
ssh-keyscan -H ${{ matrix.url }} >> ~/.ssh/known_hosts
env:
SSH_KEY: ${{ secrets.NERSC_SSH_KEY }}
- name: Copy files Cori
run: |
echo $JID
scp -i ~/.ssh/nersc examples/command-test-examples/cori_hsw.sh \
${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }}:"\$SCRATCH/$JID-hsw.sh"
scp -i ~/.ssh/nersc examples/command-test-examples/cori_knl.sh \
${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }}:"\$SCRATCH/$JID-knl.sh"
if: ${{ matrix.host == 'cori' }}
env:
JID: ${{ github.run_id }}
- name: Copy files Perlmutter
run: |
echo $JID
scp -i ~/.ssh/nersc examples/command-test-examples/perlmutter_cpu.sh \
${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }}:"\$SCRATCH/$JID-cpu.sh"
scp -i ~/.ssh/nersc examples/command-test-examples/perlmutter_gpu.sh \
${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }}:"\$SCRATCH/$JID-gpu.sh"
if: ${{ matrix.host == 'perlmutter' }}
env:
JID: ${{ github.run_id }}
- name: Copy files Perlmutter-Login (shifter only)
run: |
scp -i ~/.ssh/nersc examples/command-test-examples/docker_image.sh \
${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }}:"\$SCRATCH/$JID-docker-img.sh"
if: ${{ matrix.host == 'perlmutter-login-only' }}
env:
JID: ${{ github.run_id }}
- name: Interactive job Cori
run: |
echo $JID $SHA
ssh -i ~/.ssh/nersc -tt ${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }} \
"echo 'GH_TOKEN=$GHT GIT_REF=$SHA GIST_ID=$GIST_ID bash \$SCRATCH/$JID-knl.sh' | salloc -N 1 -C knl -q interactive -t 00:8:00"
ssh -i ~/.ssh/nersc -tt ${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }} \
"echo 'GH_TOKEN=$GHT GIT_REF=$SHA GIST_ID=$GIST_ID bash \$SCRATCH/$JID-hsw.sh' | salloc -N 1 -C haswell -q interactive -t 00:8:00"
if: ${{ matrix.host == 'cori' }}
env:
JID: ${{ github.run_id }}
SHA: ${{ steps.getshortsha.outputs.sha_short }}
GHT: ${{ secrets.GIST_SECRET }}
- name: Interactive job Perlmutter
run: |
echo $JID $SHA
ssh -i ~/.ssh/nersc -t ${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }} \
"echo 'GH_TOKEN=$GHT GIT_REF=$SHA GIST_ID=$GIST_ID bash \$SCRATCH/$JID-cpu.sh' | salloc -N 1 -C cpu -q interactive -t 00:8:00"
ssh -i ~/.ssh/nersc -t ${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }} \
"echo 'GH_TOKEN=$GHT GIT_REF=$SHA GIST_ID=$GIST_ID bash \$SCRATCH/$JID-gpu.sh' | salloc -N 1 -C gpu -q interactive -A m2755_g -t 00:8:00"
if: ${{ matrix.host == 'perlmutter' }}
env:
JID: ${{ github.run_id }}
SHA: ${{ steps.getshortsha.outputs.sha_short }}
GHT: ${{ secrets.GIST_SECRET }}
- name: Testing Shifter on Perlmutter (login)
run: |
echo $JID $SHA
ssh -i ~/.ssh/nersc ${{ secrets.NERSC_USER_NAME }}@${{ matrix.url }} \
"shifter --image=ulissigroup/kubeflow_vasp:extras-notebook -e GIT_REF=$SHA -e GIST_ID=$GIST_ID -e GH_TOKEN=$GHT -- bash \$SCRATCH/$JID-docker-img.sh"
if: ${{ matrix.host == 'perlmutter-login-only' }}
env:
JID: ${{ github.run_id }}
SHA: ${{ steps.getshortsha.outputs.sha_short }}
GHT: ${{ secrets.GIST_SECRET }}
- name: Cleanup ssh key
run: |
rm -rf ~/.ssh
render-table:
needs: [submit-nersc-jobs, docker-github-runner]
if: ${{ always() }}
defaults:
run:
shell: bash
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: |
python -m pip install requests
- name: Output render part
run: |
python examples/command-test-examples/gist_to_table.py --update
git diff README.md
cat README.md
- name: Update readme in current branch
uses: EndBug/add-and-commit@v9
with:
add: 'README.md'
author_name: Action Bot
author_email: alchem0x2a@gmail.com
push: true