-
Notifications
You must be signed in to change notification settings - Fork 33
/
.gitlab-ci.yml
131 lines (122 loc) · 3.18 KB
/
.gitlab-ci.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
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
---
stages:
- test
- benchmark
- upload
variables:
JUWELS_ACCOUNT: "cstma"
JUWELS_PROJECT: "ccstma"
prepare_JUWELS:
stage: benchmark
rules:
- if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-benchmarks\]/
id_tokens:
CI_JOB_JWT:
aud: https://gitlab.jsc.fz-juelich.de
SITE_ID_TOKEN:
aud: https://gitlab.jsc.fz-juelich.de
tags:
- jacamar
- juwels
- login
- shell
script:
- mkdir -p benchmarks
- module --force purge
- module load Stages/2024
- module load GCC
- module load OpenMPI
- module load FFTW
- module load mpi4py
- module load SciPy-Stack
- module load CuPy
- jutil env activate -p ${JUWELS_PROJECT}
- python -m venv --clear $SCRATCH/.venv/pySDC
- source $SCRATCH/.venv/pySDC/bin/activate
- pip install -e .
- pip install pytest-benchmark coverage
- git submodule add -f https://github.com/brownbaerchen/mpi4py-fft.git
- cd mpi4py-fft
- git checkout cupy_implementation
- FFTW_LIBRARY_DIR="/p/software/juwels/stages/2024/software/FFTW/3.3.10-GCC-12.3.0/lib64" pip install --force-reinstall .
- cd ../
test_JUWELS:
stage: benchmark
needs:
- prepare_JUWELS
rules:
- if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-benchmarks\]/
id_tokens:
CI_JOB_JWT:
aud: https://gitlab.jsc.fz-juelich.de
SITE_ID_TOKEN:
aud: https://gitlab.jsc.fz-juelich.de
tags:
- jacamar
- juwels
- login
- shell
allow_failure:
exit_codes:
- 100
parallel:
matrix:
- SHELL_SCRIPT: ['benchmark', 'cupy']
artifacts:
when: always
paths:
- coverage_*.dat
- sbatch.err
- sbatch.out
before_script:
- mkdir -p benchmarks
- module --force purge
- module load Stages/2024
- module load GCC
- module load OpenMPI
- module load FFTW
- module load mpi4py
- module load SciPy-Stack
- module load CuPy
- jutil env activate -p ${JUWELS_PROJECT}
- source $SCRATCH/.venv/pySDC/bin/activate
script:
- bash etc/check_node_avail.sh || PARTITION_AVAIL=$?
- if [ -n "$PARTITION_AVAIL" ] ; then exit $PARTITION_AVAIL ; fi
# - touch benchmarks/output.json
- echo $SYSTEMNAME
- sbatch --wait etc/juwels_${SHELL_SCRIPT}.sh
- touch .coverage.empty
- python -m coverage combine
- mv .coverage coverage_${SHELL_SCRIPT}.dat
- echo "Following Errors occured:"
- cat sbatch.err
- echo "Following was written to stdout:"
- cat sbatch.out
benchmark:
image: mambaorg/micromamba
stage: benchmark
when: manual
tags:
- docker
id_tokens:
CI_JOB_JWT:
aud: https://gitlab.jsc.fz-juelich.de
SITE_ID_TOKEN:
aud: https://gitlab.jsc.fz-juelich.de
rules:
- if: $CI_COMMIT_MESSAGE !~ /.*\[CI-no-benchmarks\]/
artifacts:
paths:
- benchmarks
before_script:
- micromamba create --yes -f etc/environment-base.yml
- eval "$(micromamba shell hook --shell=bash)"
- micromamba activate pySDC
- micromamba install -c conda-forge git
- git config --global --add safe.directory '*'
script:
- mkdir -p benchmarks
- >-
pytest --continue-on-collection-errors -v pySDC/tests -m "benchmark"
--benchmark-json=benchmarks/output.json