-
Notifications
You must be signed in to change notification settings - Fork 4
167 lines (140 loc) · 4.2 KB
/
benchmarking.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
name: Run FastCaloSim Benchmarking
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run:
runs-on: ${{ matrix.runner-label }}
name: Run FastCaloSim
strategy:
matrix:
runner-label: [pm-login, exalearn5]
env:
LOG_DIR: ${{ github.workspace }}/logs/run
NERSC_CONTAINER_REGISTRY_USER: ${{ secrets.NERSC_CONTAINER_REGISTRY_USER }}
NERSC_CONTAINER_REGISTRY_PASSWORD: ${{ secrets.NERSC_CONTAINER_REGISTRY_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run FastCaloSim on Perlmutter
if: contains(runner.name, 'pm-login')
env:
RUNNER_LABEL: pm-login
FCS_DATAPATH: /global/cfs/cdirs/atlas/leggett/data/FastCaloSimInputs
run: |
cd ./scripts/run_scripts
./run_images.sh
- name: Run FastCaloSim on exalearn5
if: contains(runner.name, 'exalearn5')
env:
RUNNER_LABEL: exalearn5
FCS_DATAPATH: /local/scratch/cgleggett/data/FastCaloSimInputs
run: |
cd ./scripts/run_scripts
./run_images.sh
- name: Create tarball of log files
run: |
cd ${{ env.LOG_DIR }}
tar -czf ${{ github.workspace }}/log_files_${{ matrix.runner-label }}.tar.gz ./*.txt
- name: Upload log files
uses: actions/upload-artifact@v4
with:
name: Log Files - ${{ matrix.runner-label }}
path: log_files_${{ matrix.runner-label }}.tar.gz
postprocess:
runs-on: ubuntu-latest
name: Postprocess log files
needs: run
env:
LOG_DIR: ${{ github.workspace }}/logs/postprocess
INPUT_DIR: ${{ github.workspace }}/logs/run
OUTPUT_DIR: ${{ github.workspace }}/logs/postprocess
SCRIPT: ./postprocess.sh
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download pm-login log files
uses: actions/download-artifact@v4
with:
name: Log Files - pm-login
path: ${{ env.INPUT_DIR }}
- name: Download exalearn5 log files
uses: actions/download-artifact@v4
with:
name: Log Files - exalearn5
path: ${{ env.INPUT_DIR }}
- name: Untar and uncompress logs
run: |
for runner in pm-login exalearn5; do
tar -xzf ${{ github.workspace }}/logs/run/log_files_${runner}.tar.gz -C ${{ github.workspace }}/logs/run
done
- name: Debug input directory
run: |
ls -l ${{ env.INPUT_DIR }}
- name: Build hmatools image
run: |
cd ./hmatools/scripts
./build_image.sh
- name: Run hmatools postprocessing
run: |
cd ./hmatools/scripts
./run_image.sh
- name: Upload logfiles
if: always()
uses: actions/upload-artifact@v4
with:
name: Postprocess log file
path: ${{ env.LOG_DIR }}/*.txt
- name: Upload json files
if: always()
uses: actions/upload-artifact@v4
with:
name: FastCaloSim Results (JSON)
path: ${{ env.OUTPUT_DIR }}/*.json
- name: Cleanup workspace
run: rm -rf ${{ github.workspace }}/*
plot:
runs-on: ubuntu-latest
name: Plot results
needs: postprocess
env:
LOG_DIR: ${{ github.workspace }}/logs/plot
INPUT_DIR: ${{ github.workspace }}/logs/postprocess
OUTPUT_DIR: ${{ github.workspace }}/logs/plot
SCRIPT: ./plot.sh
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download json files
uses: actions/download-artifact@v4
with:
name: FastCaloSim Results (JSON)
path: ${{ env.INPUT_DIR }}
- name: Debug input directory
run: |
ls -l ${{ env.INPUT_DIR }}
- name: Build hmatools image
run: |
cd ./hmatools/scripts
./build_image.sh
- name: Run hmatools plotting
run: |
cd ./hmatools/scripts
./run_image.sh
- name: Upload logfiles
if: always()
uses: actions/upload-artifact@v4
with:
name: Plot log file
path: ${{ env.LOG_DIR }}/*.txt
- name: Upload plot files
if: always()
uses: actions/upload-artifact@v4
with:
name: Result plots
path: ${{ env.OUTPUT_DIR }}/*.png