-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
112 lines (100 loc) · 2.68 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
variables:
BASE: ${CI_PROJECT_DIR}
threads: 32
default:
tags:
- muller-login01
interruptible: true
before_script:
- ml use /global/cfs/cdirs/m1759/wwei/nvhpc_23_7/modulefiles
- ml unload cudatoolkit
- ml gcc/12.2 cmake/3.24 nvhpc/23.7
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
variables:
install_prefix: ${CI_PROJECT_DIR}/merge_request_install
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
install_prefix: ${CI_PROJECT_DIR}/default_branch_install
- when: always
variables:
install_prefix: ${CI_PROJECT_DIR}/any_branch_install
.build_template: &build_template
stage: build
script:
- cd ${BASE}
- git clone --recursive https://github.com/NERSC/hpcpp.git hpcpp
- cd hpcpp
- mkdir -p build-${BUILD_TYPE}-${STDPAR_TYPE} && cd build-${BUILD_TYPE}-${STDPAR_TYPE}
- cmake -DCMAKE_CXX_COMPILER=$(which nvc++) -DCMAKE_C_COMPILER=$(which nvc) -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSTDPAR=${STDPAR_TYPE} -DOMP=${STDPAR_TYPE} ..
- make -j${threads}
artifacts:
paths:
- hpcpp/build-${BUILD_TYPE}-${STDPAR_TYPE}/
build-debug-gpu:
<<: *build_template
variables:
BUILD_TYPE: Debug
STDPAR_TYPE: gpu
build-debug-multicore:
<<: *build_template
variables:
BUILD_TYPE: Debug
STDPAR_TYPE: multicore
build-release-gpu:
<<: *build_template
variables:
BUILD_TYPE: Release
STDPAR_TYPE: gpu
build-release-multicore:
<<: *build_template
variables:
BUILD_TYPE: Release
STDPAR_TYPE: multicore
.test_template: &test_template
stage: test
script:
- cd ${BASE}/hpcpp/build-${BUILD_TYPE}-${STDPAR_TYPE}/apps/1d-stencil
- |
if [ "${STDPAR_TYPE}" = "gpu" ]; then
./1d-stdexec --sch gpu --size 10 --nt 10
./1d-stdpar --size 10 --nt 10
./1d-stdexec --sch multigpu --size 10 --nt 10
./1d-cuda --size 10 --nt 10
fi
- |
if [ "${STDPAR_TYPE}" = "multicore" ]; then
./1d-serial --size 10 --nt 10
./1d-omp --size 10 --nt 10
./1d-stdpar --size 10 --nt 10
./1d-stdexec --sch cpu --size 10 --nt 10
fi
test-debug-gpu:
<<: *test_template
variables:
BUILD_TYPE: Debug
STDPAR_TYPE: gpu
dependencies:
- build-debug-gpu
test-debug-multicore:
<<: *test_template
variables:
BUILD_TYPE: Debug
STDPAR_TYPE: multicore
dependencies:
- build-debug-multicore
test-release-gpu:
<<: *test_template
variables:
BUILD_TYPE: Release
STDPAR_TYPE: gpu
dependencies:
- build-release-gpu
test-release-multicore:
<<: *test_template
variables:
BUILD_TYPE: Release
STDPAR_TYPE: multicore
dependencies:
- build-release-multicore