xref: /honee/.gitlab-ci.yml (revision ec67caada05314f4db2ddaba5135cf85883a61d6)
1bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
2bedd5dcaSJeremy L Thompson# HONEE GitLab CI
3bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
4bedd5dcaSJeremy L Thompsonstages:
5bedd5dcaSJeremy L Thompson  - test:stage-lint
6f27266cbSJeremy L Thompson  - test:stage-full
7a3c4661bSJames Wright  - test:docs
8a3c4661bSJames Wright  - deploy
9bedd5dcaSJeremy L Thompson
10bedd5dcaSJeremy L Thompson.test-basic:
11bedd5dcaSJeremy L Thompson  interruptible: true
12bedd5dcaSJeremy L Thompson  only:
13bedd5dcaSJeremy L Thompson    refs:
14bedd5dcaSJeremy L Thompson      - web
15bedd5dcaSJeremy L Thompson      - merge_requests
16bedd5dcaSJeremy L Thompson
17bedd5dcaSJeremy L Thompson.test:
18bedd5dcaSJeremy L Thompson  extends: .test-basic
19bedd5dcaSJeremy L Thompson  only:
20bedd5dcaSJeremy L Thompson    refs:
21bedd5dcaSJeremy L Thompson      - web
22bedd5dcaSJeremy L Thompson      - merge_requests
23bedd5dcaSJeremy L Thompson      - main
24bedd5dcaSJeremy L Thompson      - release
25bedd5dcaSJeremy L Thompson  except:
26bedd5dcaSJeremy L Thompson    variables:
27bedd5dcaSJeremy L Thompson      # Skip if the No-Code label is attached to a merge request (i.e., documentation only)
28bedd5dcaSJeremy L Thompson      - $CI_MERGE_REQUEST_LABELS =~ /(^|,)No-Code($|,)/
29bedd5dcaSJeremy L Thompson  needs:
30bedd5dcaSJeremy L Thompson    - job: docker-build
31bedd5dcaSJeremy L Thompson      optional: true
32bedd5dcaSJeremy L Thompson
33bedd5dcaSJeremy L Thompson.docs:
34bedd5dcaSJeremy L Thompson  image: python:3.10
35bedd5dcaSJeremy L Thompson  before_script:
36bedd5dcaSJeremy L Thompson    - pip install -r doc/requirements.txt
37bedd5dcaSJeremy L Thompson    - apt-get update
38bedd5dcaSJeremy L Thompson    - apt-get install -y doxygen librsvg2-bin
39bedd5dcaSJeremy L Thompson
40bedd5dcaSJeremy L Thompson
41bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
42bedd5dcaSJeremy L Thompson# Test formatting and static analysis
43bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
44bedd5dcaSJeremy L Thompsonnoether-lint:
45bedd5dcaSJeremy L Thompson  stage: test:stage-lint
46bedd5dcaSJeremy L Thompson  extends: .test
47bedd5dcaSJeremy L Thompson  tags:
48bedd5dcaSJeremy L Thompson    - noether
49bedd5dcaSJeremy L Thompson    - shell
50bedd5dcaSJeremy L Thompson  needs: []
51bedd5dcaSJeremy L Thompson  script:
52bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
53bedd5dcaSJeremy L Thompson    # Environment
54c3a3f305SJeremy L Thompson    - export CC=gcc HIPCC=hipcc
55bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
56bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
57bedd5dcaSJeremy L Thompson    - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm
58bedd5dcaSJeremy L Thompson    # Libraries
59bedd5dcaSJeremy L Thompson    # -- libCEED
60bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
61bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
62bedd5dcaSJeremy L Thompson    # -- PETSc
63bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
64bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
65f421185eSJeremy L Thompson    - export PETSC_ARCH=arch-serial-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
66bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
67bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff
68bedd5dcaSJeremy L Thompson    # make with Werror, Wall, supress loop vectorization warnings
69bedd5dcaSJeremy L Thompson    - echo "-------------- make Werror ---------"
7074512b2dSJeremy L Thompson    - PEDANTIC=1 PEDANTICFLAGS="-Werror -Wall -Wno-pass-failed" make -j$NPROC_CPU
71bedd5dcaSJeremy L Thompson    # make format
72bedd5dcaSJeremy L Thompson    - echo "-------------- make format ---------" && export CLANG_FORMAT=clang-format-15 && $CLANG_FORMAT --version
73bedd5dcaSJeremy L Thompson    - make -j$NPROC_CPU format && git diff --color=always --exit-code
74bedd5dcaSJeremy L Thompson    # Clang-tidy
75bedd5dcaSJeremy L Thompson    - echo "-------------- clang-tidy ----------" && export CLANG_TIDY=clang-tidy-15 && $CLANG_TIDY --version
76f421185eSJeremy L Thompson    - PETSC_ARCH=arch-serial-hip make -j$NPROC_CPU tidy
77bedd5dcaSJeremy L Thompson    # Report status
78bedd5dcaSJeremy L Thompson    - touch .SUCCESS
79bedd5dcaSJeremy L Thompson
80bedd5dcaSJeremy L Thompson
81bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
82bedd5dcaSJeremy L Thompson# Test memory access assumptions
83bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
84bedd5dcaSJeremy L Thompsonnoether-memcheck:
85f27266cbSJeremy L Thompson  stage: test:stage-lint
86bedd5dcaSJeremy L Thompson  extends: .test
87bedd5dcaSJeremy L Thompson  tags:
88bedd5dcaSJeremy L Thompson    - noether
89bedd5dcaSJeremy L Thompson    - shell
90bedd5dcaSJeremy L Thompson  needs: []
91bedd5dcaSJeremy L Thompson  script:
92bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
93bedd5dcaSJeremy L Thompson    # Environment
94bedd5dcaSJeremy L Thompson    # -- NOTE: Coverage disabled because it doesn't play nice with the ASAN options
95bedd5dcaSJeremy L Thompson    - export CC=clang-15
96bedd5dcaSJeremy L Thompson    - export NPROC_POOL=8
97bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
98bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
99bedd5dcaSJeremy L Thompson    # Libraries
100bedd5dcaSJeremy L Thompson    # -- libCEED
101bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
102bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED-cpu && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
103bedd5dcaSJeremy L Thompson    # -- PETSc
104bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
105bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
106bedd5dcaSJeremy L Thompson    - export PETSC_ARCH=arch-serial-cpu-clang && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
107bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
108bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff
109bedd5dcaSJeremy L Thompson    # ASAN
110bedd5dcaSJeremy L Thompson    - echo "-------------- ASAN ----------------"
11103f5db93SJeremy L Thompson    - echo "ASAN intentionlly skipped, known leaks"
11203f5db93SJeremy L Thompson    # - export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak"
113bedd5dcaSJeremy L Thompson    - echo $AFLAGS
114bedd5dcaSJeremy L Thompson    # HONEE
115bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
116bedd5dcaSJeremy L Thompson    - make clean
11774512b2dSJeremy L Thompson    - make -j$NPROC_CPU
118bedd5dcaSJeremy L Thompson    # Test suite
119bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
120bedd5dcaSJeremy L Thompson    - echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
121bedd5dcaSJeremy L Thompson    # -- Memcheck libCEED CPU backend, serial
122e97df35aSJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL)) CEED_BACKENDS="/cpu/self/memcheck" JUNIT_BATCH="cpu-serial-memcheck" junit search=navierstokes
123bedd5dcaSJeremy L Thompson    # Report status
124bedd5dcaSJeremy L Thompson    - touch .SUCCESS
125bedd5dcaSJeremy L Thompson  artifacts:
126bedd5dcaSJeremy L Thompson    paths:
127bedd5dcaSJeremy L Thompson      - build/*.junit
128bedd5dcaSJeremy L Thompson    reports:
129bedd5dcaSJeremy L Thompson      junit: build/*.junit
130bedd5dcaSJeremy L Thompson      performance: performance.json
131bedd5dcaSJeremy L Thompson    expire_in: 28 days
132bedd5dcaSJeremy L Thompson
133bedd5dcaSJeremy L Thompson
134bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
135bedd5dcaSJeremy L Thompson# CPU testing on Noether
136bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
137bedd5dcaSJeremy L Thompsonnoether-cpu:
138f27266cbSJeremy L Thompson  stage: test:stage-full
139bedd5dcaSJeremy L Thompson  extends: .test
140bedd5dcaSJeremy L Thompson  tags:
141bedd5dcaSJeremy L Thompson    - noether
142bedd5dcaSJeremy L Thompson    - shell
143bedd5dcaSJeremy L Thompson  script:
144bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
145bedd5dcaSJeremy L Thompson    # Environment
146c3a3f305SJeremy L Thompson    - export COVERAGE=1 CC=gcc
147bedd5dcaSJeremy L Thompson    - export NPROC_POOL=4
148bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
149bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
150bedd5dcaSJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
151bedd5dcaSJeremy L Thompson    # Libraries
152bedd5dcaSJeremy L Thompson    # -- libCEED
153bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
154bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
155bedd5dcaSJeremy L Thompson    # -- PETSc
156bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
157bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
158f421185eSJeremy L Thompson    - export PETSC_ARCH=arch-parallel-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
159bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
160bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
161bedd5dcaSJeremy L Thompson    # HONEE
162bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
163bedd5dcaSJeremy L Thompson    - make clean
16474512b2dSJeremy L Thompson    - make -j$NPROC_CPU
165bedd5dcaSJeremy L Thompson    # Test suite
166bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
167bedd5dcaSJeremy L Thompson    - echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
168bedd5dcaSJeremy L Thompson    # -- Fastest libCEED CPU backend, parallel
169a447840aSJeremy L Thompson    - echo "Parallel tests skipped for now"
17067f3e659SJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
17167f3e659SJames Wright    - export SMARTREDIS_DIR=/home/phypid/SmartSimTestingSoftware/smartredis/install
172869763b2SJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial" junit search=navierstokes
17367f3e659SJames Wright    - spack unload py-torch@2.3+cuda && export USE_TORCH=0
17467f3e659SJames Wright    - source /home/phypid/SmartSimTestingSoftware/bin/activate
17567f3e659SJames Wright    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial" junit search="test-smartsim"
176bedd5dcaSJeremy L Thompson    # Report status
177bedd5dcaSJeremy L Thompson    - touch .SUCCESS
178bedd5dcaSJeremy L Thompson  after_script:
179bedd5dcaSJeremy L Thompson    - |
180bedd5dcaSJeremy L Thompson      if [ -f .SUCCESS ]; then
181bedd5dcaSJeremy L Thompson        gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml;
182bedd5dcaSJeremy L Thompson      fi
1832ef79a07SJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
184bedd5dcaSJeremy L Thompson  artifacts:
185bedd5dcaSJeremy L Thompson    paths:
186bedd5dcaSJeremy L Thompson      - coverage.xml
187bedd5dcaSJeremy L Thompson      - build/*.junit
188bedd5dcaSJeremy L Thompson    reports:
189bedd5dcaSJeremy L Thompson      coverage_report:
190bedd5dcaSJeremy L Thompson        coverage_format: cobertura
191bedd5dcaSJeremy L Thompson        path: coverage.xml
192bedd5dcaSJeremy L Thompson      junit: build/*.junit
193bedd5dcaSJeremy L Thompson      performance: performance.json
194bedd5dcaSJeremy L Thompson    expire_in: 28 days
195bedd5dcaSJeremy L Thompson
196bedd5dcaSJeremy L Thompson
197bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
19804c6cceaSJeremy L Thompson# CPU Int64 testing on Noether
19904c6cceaSJeremy L Thompson# ----------------------------------------------------------------------------------------
20004c6cceaSJeremy L Thompsonnoether-cpu-int64:
20104c6cceaSJeremy L Thompson  stage: test:stage-full
20204c6cceaSJeremy L Thompson  extends: .test
20304c6cceaSJeremy L Thompson  tags:
20404c6cceaSJeremy L Thompson    - noether
20504c6cceaSJeremy L Thompson    - shell
20604c6cceaSJeremy L Thompson  script:
20704c6cceaSJeremy L Thompson    - rm -f .SUCCESS
20804c6cceaSJeremy L Thompson    # Environment
209c3a3f305SJeremy L Thompson    - export COVERAGE=1 CC=gcc
21004c6cceaSJeremy L Thompson    - export NPROC_POOL=4
21104c6cceaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
21204c6cceaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
21304c6cceaSJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
21404c6cceaSJeremy L Thompson    # Libraries
21504c6cceaSJeremy L Thompson    # -- libCEED
21604c6cceaSJeremy L Thompson    - echo "-------------- libCEED -------------"
21704c6cceaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
21804c6cceaSJeremy L Thompson    # -- PETSc
21904c6cceaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
22004c6cceaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
22104c6cceaSJeremy L Thompson    - export PETSC_ARCH=arch-serial-cpu-int64 && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
22204c6cceaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
22304c6cceaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
22404c6cceaSJeremy L Thompson    # HONEE
22504c6cceaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
22604c6cceaSJeremy L Thompson    - make clean
22704c6cceaSJeremy L Thompson    - make -j$NPROC_CPU
22804c6cceaSJeremy L Thompson    # Test suite
22904c6cceaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
23004c6cceaSJeremy L Thompson    - echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
23104c6cceaSJeremy L Thompson    # -- Fastest libCEED CPU backend, serial
23267f3e659SJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
23367f3e659SJames Wright    - export SMARTREDIS_DIR=/home/phypid/SmartSimTestingSoftware/smartredis/install
23404c6cceaSJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial-int64" junit search=navierstokes
23567f3e659SJames Wright    - spack unload py-torch@2.3+cuda && export USE_TORCH=0
23667f3e659SJames Wright    - source /home/phypid/SmartSimTestingSoftware/bin/activate
23767f3e659SJames Wright    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial" junit search="test-py-smartsim_regression_framework"
23804c6cceaSJeremy L Thompson    # Report status
23904c6cceaSJeremy L Thompson    - touch .SUCCESS
24004c6cceaSJeremy L Thompson  after_script:
24104c6cceaSJeremy L Thompson    - |
24204c6cceaSJeremy L Thompson      if [ -f .SUCCESS ]; then
24304c6cceaSJeremy L Thompson        gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml;
24404c6cceaSJeremy L Thompson      fi
24504c6cceaSJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
24604c6cceaSJeremy L Thompson  artifacts:
24704c6cceaSJeremy L Thompson    paths:
24804c6cceaSJeremy L Thompson      - coverage.xml
24904c6cceaSJeremy L Thompson      - build/*.junit
25004c6cceaSJeremy L Thompson    reports:
25104c6cceaSJeremy L Thompson      coverage_report:
25204c6cceaSJeremy L Thompson        coverage_format: cobertura
25304c6cceaSJeremy L Thompson        path: coverage.xml
25404c6cceaSJeremy L Thompson      junit: build/*.junit
25504c6cceaSJeremy L Thompson      performance: performance.json
25604c6cceaSJeremy L Thompson    expire_in: 28 days
25704c6cceaSJeremy L Thompson
25804c6cceaSJeremy L Thompson
25904c6cceaSJeremy L Thompson# ----------------------------------------------------------------------------------------
260bedd5dcaSJeremy L Thompson# GPU testing on Noether
261bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
262f421185eSJeremy L Thompsonnoether-hip:
263f27266cbSJeremy L Thompson  stage: test:stage-full
264bedd5dcaSJeremy L Thompson  extends: .test
265bedd5dcaSJeremy L Thompson  tags:
266bedd5dcaSJeremy L Thompson    - noether
267bedd5dcaSJeremy L Thompson    - shell
268bedd5dcaSJeremy L Thompson  script:
269bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
270bedd5dcaSJeremy L Thompson    # Environment
271bedd5dcaSJeremy L Thompson    - export COVERAGE=1 CC=gcc HIPCC=hipcc
272bedd5dcaSJeremy L Thompson    - export NPROC_POOL=4
273bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
274bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
275bedd5dcaSJeremy L Thompson    - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm
276c3a3f305SJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
277bedd5dcaSJeremy L Thompson    # Libraries
278bedd5dcaSJeremy L Thompson    # -- libCEED
279bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
280bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
281bedd5dcaSJeremy L Thompson    # -- PETSc
282bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
283bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
284f421185eSJeremy L Thompson    - export PETSC_ARCH=arch-parallel-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
285bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
286bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
287bedd5dcaSJeremy L Thompson    # HONEE
288bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
289bedd5dcaSJeremy L Thompson    - make clean
29074512b2dSJeremy L Thompson    - make -j$NPROC_CPU
291bedd5dcaSJeremy L Thompson    # Test suite
292bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
293bedd5dcaSJeremy L Thompson    - echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
294bedd5dcaSJeremy L Thompson    # -- Fastest libCEED HIP backend, serial
295b6ee1185SJeremy L Thompson    # Note: /shared is faster due to /gen JiT time for CeedOperators overwhelming runtime improvements at these problem sizes
296e97df35aSJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_GPU / NPROC_POOL / 1)) CEED_BACKENDS="/gpu/hip/shared" JUNIT_BATCH="hip-serial" junit search=navierstokes
297bedd5dcaSJeremy L Thompson    # Report status
298bedd5dcaSJeremy L Thompson    - touch .SUCCESS
299bedd5dcaSJeremy L Thompson  after_script:
300bedd5dcaSJeremy L Thompson    - |
301bedd5dcaSJeremy L Thompson      if [ -f .SUCCESS ]; then
302bedd5dcaSJeremy L Thompson        gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml;
303bedd5dcaSJeremy L Thompson      fi
3042ef79a07SJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
305bedd5dcaSJeremy L Thompson  artifacts:
306bedd5dcaSJeremy L Thompson    paths:
307bedd5dcaSJeremy L Thompson      - coverage.xml
308bedd5dcaSJeremy L Thompson      - build/*.junit
309bedd5dcaSJeremy L Thompson    reports:
310bedd5dcaSJeremy L Thompson      coverage_report:
311bedd5dcaSJeremy L Thompson        coverage_format: cobertura
312bedd5dcaSJeremy L Thompson        path: coverage.xml
313bedd5dcaSJeremy L Thompson      junit: build/*.junit
314bedd5dcaSJeremy L Thompson      performance: performance.json
315bedd5dcaSJeremy L Thompson    expire_in: 28 days
316a3c4661bSJames Wright
317a3c4661bSJames Wright
3180241eab6SJeremy L Thompsonnoether-cuda:
3190241eab6SJeremy L Thompson  stage: test:stage-full
3200241eab6SJeremy L Thompson  extends: .test
3210241eab6SJeremy L Thompson  tags:
3220241eab6SJeremy L Thompson    - noether
3230241eab6SJeremy L Thompson    - shell
3240241eab6SJeremy L Thompson  script:
3250241eab6SJeremy L Thompson    - rm -f .SUCCESS
3260241eab6SJeremy L Thompson    # Environment
3270241eab6SJeremy L Thompson    - export COVERAGE=1 CC=gcc NVCC=nvcc
3280241eab6SJeremy L Thompson    - export NPROC_POOL=4
3290241eab6SJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
3300241eab6SJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
3310241eab6SJeremy L Thompson    - echo "-------------- NVCC ----------------" && $NVCC --version
3320241eab6SJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
3330241eab6SJeremy L Thompson    # Libraries
3340241eab6SJeremy L Thompson    # -- libCEED
3350241eab6SJeremy L Thompson    - echo "-------------- libCEED -------------"
3360241eab6SJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
3370241eab6SJeremy L Thompson    # -- PETSc
3380241eab6SJeremy L Thompson    - echo "-------------- PETSc ---------------"
3390241eab6SJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
3400241eab6SJeremy L Thompson    - export PETSC_ARCH=arch-parallel-cuda && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
3410241eab6SJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no -use_gpu_aware_mpi 0' # faster tests
3420241eab6SJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
3430241eab6SJeremy L Thompson    # HONEE
3440241eab6SJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
3450241eab6SJeremy L Thompson    - make clean
3460241eab6SJeremy L Thompson    - make -j$NPROC_CPU
3470241eab6SJeremy L Thompson    # Test suite
3480241eab6SJeremy L Thompson    - echo "-------------- HONEE tests ---------"
3490241eab6SJeremy L Thompson    - echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
3500241eab6SJeremy L Thompson    # -- Fastest libCEED CUDA backend, serial
3510241eab6SJeremy L Thompson    # Note: /shared is faster due to /gen JiT time for CeedOperators overwhelming runtime improvements at these problem sizes
352*ec67caadSJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
3530241eab6SJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_GPU / NPROC_POOL / 1)) CEED_BACKENDS="/gpu/cuda/shared" JUNIT_BATCH="cuda-serial" junit search=navierstokes
3540241eab6SJeremy L Thompson    # Report status
3550241eab6SJeremy L Thompson    - touch .SUCCESS
3560241eab6SJeremy L Thompson  after_script:
3570241eab6SJeremy L Thompson    - |
3580241eab6SJeremy L Thompson      if [ -f .SUCCESS ]; then
3590241eab6SJeremy L Thompson        gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml;
3600241eab6SJeremy L Thompson      fi
3610241eab6SJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
3620241eab6SJeremy L Thompson  artifacts:
3630241eab6SJeremy L Thompson    paths:
3640241eab6SJeremy L Thompson      - coverage.xml
3650241eab6SJeremy L Thompson      - build/*.junit
3660241eab6SJeremy L Thompson    reports:
3670241eab6SJeremy L Thompson      coverage_report:
3680241eab6SJeremy L Thompson        coverage_format: cobertura
3690241eab6SJeremy L Thompson        path: coverage.xml
3700241eab6SJeremy L Thompson      junit: build/*.junit
3710241eab6SJeremy L Thompson      performance: performance.json
3720241eab6SJeremy L Thompson    expire_in: 28 days
3730241eab6SJeremy L Thompson
3740241eab6SJeremy L Thompson
375a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
376a3c4661bSJames Wright# Build documentation
377a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
378a3c4661bSJames Wrightdocs-review:
379a3c4661bSJames Wright  stage: test:docs
380a3c4661bSJames Wright  tags:
381a3c4661bSJames Wright    - noether
382a3c4661bSJames Wright    - docker
383a3c4661bSJames Wright  extends:
384a3c4661bSJames Wright    - .docs
385a3c4661bSJames Wright    - .test-basic
386a3c4661bSJames Wright  interruptible: true
387a3c4661bSJames Wright  script:
388f421185eSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc PETSC_ARCH=arch-parallel-hip CEED_DIR=/projects/honee/libCEED
389a3c4661bSJames Wright    - git submodule update --init
390a3c4661bSJames Wright    - make doc-html pkgconf=true DOXYGENOPTS= SPHINXOPTS=-W
391a3c4661bSJames Wright    - mv doc/build/html public
392a3c4661bSJames Wright  artifacts:
393a3c4661bSJames Wright    paths:
394a3c4661bSJames Wright      - public
395a3c4661bSJames Wright    expire_in: 28 days
396a3c4661bSJames Wright  environment:
397a3c4661bSJames Wright    name: review/$CI_COMMIT_REF_NAME
398a3c4661bSJames Wright    url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html
399a3c4661bSJames Wright
400a3c4661bSJames Wright
401a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
402a3c4661bSJames Wright# Deploy documentation using GitLab pages
403a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
404a3c4661bSJames Wrightpages:  # this job name has special meaning to GitLab
405a3c4661bSJames Wright  stage: deploy
406a3c4661bSJames Wright  tags:
407a3c4661bSJames Wright    - noether
408a3c4661bSJames Wright    - docker
409a3c4661bSJames Wright  extends: .docs
410a3c4661bSJames Wright  interruptible: false
411a3c4661bSJames Wright  script:
412a3c4661bSJames Wright    - git submodule update --init
413a3c4661bSJames Wright    - make doc-dirhtml pkgconf=true DOXYGENOPTS=
414a3c4661bSJames Wright    - mv doc/build/dirhtml public
415a3c4661bSJames Wright  only:
416a3c4661bSJames Wright    - main
417a3c4661bSJames Wright  artifacts:
418a3c4661bSJames Wright    paths:
419a3c4661bSJames Wright      - public
420