xref: /honee/.gitlab-ci.yml (revision a06722ffb21319d6e9c24874439cbb3274728bf8)
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
10494078cdSJames Wrightworkflow:
11494078cdSJames Wright  auto_cancel:
12494078cdSJames Wright    on_job_failure: all
13494078cdSJames Wright
14bedd5dcaSJeremy L Thompson.test-basic:
15bedd5dcaSJeremy L Thompson  interruptible: true
16bedd5dcaSJeremy L Thompson  only:
17bedd5dcaSJeremy L Thompson    refs:
18bedd5dcaSJeremy L Thompson      - web
19bedd5dcaSJeremy L Thompson      - merge_requests
20bedd5dcaSJeremy L Thompson
21bedd5dcaSJeremy L Thompson.test:
22bedd5dcaSJeremy L Thompson  extends: .test-basic
23bedd5dcaSJeremy L Thompson  only:
24bedd5dcaSJeremy L Thompson    refs:
25bedd5dcaSJeremy L Thompson      - web
26bedd5dcaSJeremy L Thompson      - merge_requests
27bedd5dcaSJeremy L Thompson      - main
28bedd5dcaSJeremy L Thompson      - release
29bedd5dcaSJeremy L Thompson  except:
30bedd5dcaSJeremy L Thompson    variables:
31bedd5dcaSJeremy L Thompson      # Skip if the No-Code label is attached to a merge request (i.e., documentation only)
32bedd5dcaSJeremy L Thompson      - $CI_MERGE_REQUEST_LABELS =~ /(^|,)No-Code($|,)/
33bedd5dcaSJeremy L Thompson
34bedd5dcaSJeremy L Thompson.docs:
35bedd5dcaSJeremy L Thompson  image: python:3.10
36bedd5dcaSJeremy L Thompson  before_script:
37bedd5dcaSJeremy L Thompson    - pip install -r doc/requirements.txt
38bedd5dcaSJeremy L Thompson    - apt-get update
39bedd5dcaSJeremy L Thompson    - apt-get install -y doxygen librsvg2-bin
40bedd5dcaSJeremy L Thompson
41bedd5dcaSJeremy L Thompson
42bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
43*a06722ffSJames Wright# Test formatting
44*a06722ffSJames Wright# ----------------------------------------------------------------------------------------
45*a06722ffSJames Wrightnoether-format:
46*a06722ffSJames Wright  stage: test:stage-lint
47*a06722ffSJames Wright  extends: 
48*a06722ffSJames Wright    - .test-basic
49*a06722ffSJames Wright  tags:
50*a06722ffSJames Wright    - noether
51*a06722ffSJames Wright    - shell
52*a06722ffSJames Wright  script:
53*a06722ffSJames Wright    - rm -f .SUCCESS
54*a06722ffSJames Wright    - echo "-------------- make format ---------" && export CLANG_FORMAT=clang-format-15 && $CLANG_FORMAT --version
55*a06722ffSJames Wright    - make -j$NPROC_CPU format && git diff --color=always --exit-code
56*a06722ffSJames Wright    - touch .SUCCESS
57*a06722ffSJames Wright
58*a06722ffSJames Wright
59*a06722ffSJames Wright# ----------------------------------------------------------------------------------------
60*a06722ffSJames Wright# Test static analysis
61bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
62bedd5dcaSJeremy L Thompsonnoether-lint:
63bedd5dcaSJeremy L Thompson  stage: test:stage-lint
64bedd5dcaSJeremy L Thompson  extends: .test
65bedd5dcaSJeremy L Thompson  tags:
66bedd5dcaSJeremy L Thompson    - noether
67bedd5dcaSJeremy L Thompson    - shell
68bedd5dcaSJeremy L Thompson  script:
69bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
70bedd5dcaSJeremy L Thompson    # Environment
71c3a3f305SJeremy L Thompson    - export CC=gcc HIPCC=hipcc
72bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
73bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
74bedd5dcaSJeremy L Thompson    - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm
75bedd5dcaSJeremy L Thompson    # Libraries
76bedd5dcaSJeremy L Thompson    # -- libCEED
77bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
78bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
79bedd5dcaSJeremy L Thompson    # -- PETSc
80bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
81bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
82f421185eSJeremy L Thompson    - export PETSC_ARCH=arch-serial-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
83bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
84bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff
85bedd5dcaSJeremy L Thompson    # make with Werror, Wall, supress loop vectorization warnings
86bedd5dcaSJeremy L Thompson    - echo "-------------- make Werror ---------"
8774512b2dSJeremy L Thompson    - PEDANTIC=1 PEDANTICFLAGS="-Werror -Wall -Wno-pass-failed" make -j$NPROC_CPU
88bedd5dcaSJeremy L Thompson    # Clang-tidy
89bedd5dcaSJeremy L Thompson    - echo "-------------- clang-tidy ----------" && export CLANG_TIDY=clang-tidy-15 && $CLANG_TIDY --version
90f421185eSJeremy L Thompson    - PETSC_ARCH=arch-serial-hip make -j$NPROC_CPU tidy
91bedd5dcaSJeremy L Thompson    # Report status
92bedd5dcaSJeremy L Thompson    - touch .SUCCESS
93bedd5dcaSJeremy L Thompson
94bedd5dcaSJeremy L Thompson
95bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
96bedd5dcaSJeremy L Thompson# Test memory access assumptions
97bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
98bedd5dcaSJeremy L Thompsonnoether-memcheck:
99f27266cbSJeremy L Thompson  stage: test:stage-lint
100bedd5dcaSJeremy L Thompson  extends: .test
101bedd5dcaSJeremy L Thompson  tags:
102bedd5dcaSJeremy L Thompson    - noether
103bedd5dcaSJeremy L Thompson    - shell
104bedd5dcaSJeremy L Thompson  script:
105bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
106bedd5dcaSJeremy L Thompson    # Environment
107bedd5dcaSJeremy L Thompson    # -- NOTE: Coverage disabled because it doesn't play nice with the ASAN options
108bedd5dcaSJeremy L Thompson    - export CC=clang-15
109bedd5dcaSJeremy L Thompson    - export NPROC_POOL=8
110bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
111bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
112bedd5dcaSJeremy L Thompson    # Libraries
113bedd5dcaSJeremy L Thompson    # -- libCEED
114bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
115bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED-cpu && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
116bedd5dcaSJeremy L Thompson    # -- PETSc
117bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
118bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
119bedd5dcaSJeremy L Thompson    - export PETSC_ARCH=arch-serial-cpu-clang && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
120bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
121bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff
122bedd5dcaSJeremy L Thompson    # ASAN
123bedd5dcaSJeremy L Thompson    - echo "-------------- ASAN ----------------"
1243d8c820bSJames Wright    - export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak"
125bedd5dcaSJeremy L Thompson    - echo $AFLAGS
126bedd5dcaSJeremy L Thompson    # HONEE
127bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
128bedd5dcaSJeremy L Thompson    - make clean
12974512b2dSJeremy L Thompson    - make -j$NPROC_CPU
130bedd5dcaSJeremy L Thompson    # Test suite
131bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
132bedd5dcaSJeremy 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
133bedd5dcaSJeremy L Thompson    # -- Memcheck libCEED CPU backend, serial
134e97df35aSJeremy 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
135bedd5dcaSJeremy L Thompson    # Report status
136bedd5dcaSJeremy L Thompson    - touch .SUCCESS
137bedd5dcaSJeremy L Thompson  artifacts:
138bedd5dcaSJeremy L Thompson    paths:
139bedd5dcaSJeremy L Thompson      - build/*.junit
140bedd5dcaSJeremy L Thompson    reports:
141bedd5dcaSJeremy L Thompson      junit: build/*.junit
142bedd5dcaSJeremy L Thompson      performance: performance.json
143bedd5dcaSJeremy L Thompson    expire_in: 28 days
144bedd5dcaSJeremy L Thompson
145bedd5dcaSJeremy L Thompson
146bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
147bedd5dcaSJeremy L Thompson# CPU testing on Noether
148bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
149bedd5dcaSJeremy L Thompsonnoether-cpu:
150f27266cbSJeremy L Thompson  stage: test:stage-full
151bedd5dcaSJeremy L Thompson  extends: .test
152bedd5dcaSJeremy L Thompson  tags:
153bedd5dcaSJeremy L Thompson    - noether
154bedd5dcaSJeremy L Thompson    - shell
155bedd5dcaSJeremy L Thompson  script:
156bedd5dcaSJeremy L Thompson    - rm -f .SUCCESS
157bedd5dcaSJeremy L Thompson    # Environment
158c3a3f305SJeremy L Thompson    - export COVERAGE=1 CC=gcc
159bedd5dcaSJeremy L Thompson    - export NPROC_POOL=4
160bedd5dcaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
161bedd5dcaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
162bedd5dcaSJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
163bedd5dcaSJeremy L Thompson    # Libraries
164bedd5dcaSJeremy L Thompson    # -- libCEED
165bedd5dcaSJeremy L Thompson    - echo "-------------- libCEED -------------"
166bedd5dcaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
167bedd5dcaSJeremy L Thompson    # -- PETSc
168bedd5dcaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
169bedd5dcaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
170f421185eSJeremy L Thompson    - export PETSC_ARCH=arch-parallel-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
171bedd5dcaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
172bedd5dcaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
173bedd5dcaSJeremy L Thompson    # HONEE
174bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
175bedd5dcaSJeremy L Thompson    - make clean
17674512b2dSJeremy L Thompson    - make -j$NPROC_CPU
177bedd5dcaSJeremy L Thompson    # Test suite
178bedd5dcaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
179bedd5dcaSJeremy 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
180bedd5dcaSJeremy L Thompson    # -- Fastest libCEED CPU backend, parallel
181a447840aSJeremy L Thompson    - echo "Parallel tests skipped for now"
18267f3e659SJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
18367f3e659SJames Wright    - export SMARTREDIS_DIR=/home/phypid/SmartSimTestingSoftware/smartredis/install
184869763b2SJeremy L Thompson    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial" junit search=navierstokes
18567f3e659SJames Wright    - spack unload py-torch@2.3+cuda && export USE_TORCH=0
18667f3e659SJames Wright    - source /home/phypid/SmartSimTestingSoftware/bin/activate
18767f3e659SJames Wright    - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="cpu-serial" junit search="test-smartsim"
188bedd5dcaSJeremy L Thompson    # Report status
189bedd5dcaSJeremy L Thompson    - touch .SUCCESS
190bedd5dcaSJeremy L Thompson  after_script:
191bedd5dcaSJeremy L Thompson    - |
192bedd5dcaSJeremy L Thompson      if [ -f .SUCCESS ]; then
19385fc816eSJames Wright        gcovr --xml-pretty --exclude-lines-by-pattern '^\s*SETERR.*' --exclude-unreachable-branches --print-summary -o coverage.xml;
194bedd5dcaSJeremy L Thompson      fi
1952ef79a07SJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
196bedd5dcaSJeremy L Thompson  artifacts:
197bedd5dcaSJeremy L Thompson    paths:
198bedd5dcaSJeremy L Thompson      - coverage.xml
199bedd5dcaSJeremy L Thompson      - build/*.junit
200bedd5dcaSJeremy L Thompson    reports:
201bedd5dcaSJeremy L Thompson      coverage_report:
202bedd5dcaSJeremy L Thompson        coverage_format: cobertura
203bedd5dcaSJeremy L Thompson        path: coverage.xml
204bedd5dcaSJeremy L Thompson      junit: build/*.junit
205bedd5dcaSJeremy L Thompson      performance: performance.json
206bedd5dcaSJeremy L Thompson    expire_in: 28 days
207bedd5dcaSJeremy L Thompson
208bedd5dcaSJeremy L Thompson
209bedd5dcaSJeremy L Thompson# ----------------------------------------------------------------------------------------
21004c6cceaSJeremy L Thompson# CPU Int64 testing on Noether
21104c6cceaSJeremy L Thompson# ----------------------------------------------------------------------------------------
21204c6cceaSJeremy L Thompsonnoether-cpu-int64:
21304c6cceaSJeremy L Thompson  stage: test:stage-full
21404c6cceaSJeremy L Thompson  extends: .test
21504c6cceaSJeremy L Thompson  tags:
21604c6cceaSJeremy L Thompson    - noether
21704c6cceaSJeremy L Thompson    - shell
21804c6cceaSJeremy L Thompson  script:
21904c6cceaSJeremy L Thompson    - rm -f .SUCCESS
22004c6cceaSJeremy L Thompson    # Environment
221c3a3f305SJeremy L Thompson    - export COVERAGE=1 CC=gcc
22204c6cceaSJeremy L Thompson    - export NPROC_POOL=4
22304c6cceaSJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
22404c6cceaSJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
22504c6cceaSJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
22604c6cceaSJeremy L Thompson    # Libraries
22704c6cceaSJeremy L Thompson    # -- libCEED
22804c6cceaSJeremy L Thompson    - echo "-------------- libCEED -------------"
22904c6cceaSJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
23004c6cceaSJeremy L Thompson    # -- PETSc
23104c6cceaSJeremy L Thompson    - echo "-------------- PETSc ---------------"
23204c6cceaSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
23304c6cceaSJeremy L Thompson    - export PETSC_ARCH=arch-serial-cpu-int64 && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
23404c6cceaSJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no' # faster tests
23504c6cceaSJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
23604c6cceaSJeremy L Thompson    # HONEE
23704c6cceaSJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
23804c6cceaSJeremy L Thompson    - make clean
23904c6cceaSJeremy L Thompson    - make -j$NPROC_CPU
24004c6cceaSJeremy L Thompson    # Test suite
24104c6cceaSJeremy L Thompson    - echo "-------------- HONEE tests ---------"
24204c6cceaSJeremy 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
24304c6cceaSJeremy L Thompson    # -- Fastest libCEED CPU backend, serial
24467f3e659SJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
24567f3e659SJames Wright    - export SMARTREDIS_DIR=/home/phypid/SmartSimTestingSoftware/smartredis/install
24604c6cceaSJeremy 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
24767f3e659SJames Wright    - spack unload py-torch@2.3+cuda && export USE_TORCH=0
24867f3e659SJames Wright    - source /home/phypid/SmartSimTestingSoftware/bin/activate
24967f3e659SJames 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"
25004c6cceaSJeremy L Thompson    # Report status
25104c6cceaSJeremy L Thompson    - touch .SUCCESS
25204c6cceaSJeremy L Thompson  after_script:
25304c6cceaSJeremy L Thompson    - |
25404c6cceaSJeremy L Thompson      if [ -f .SUCCESS ]; then
25585fc816eSJames Wright        gcovr --xml-pretty --exclude-lines-by-pattern '^\s*SETERR.*' --exclude-unreachable-branches --print-summary -o coverage.xml;
25604c6cceaSJeremy L Thompson      fi
25704c6cceaSJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
25804c6cceaSJeremy L Thompson  artifacts:
25904c6cceaSJeremy L Thompson    paths:
26004c6cceaSJeremy L Thompson      - coverage.xml
26104c6cceaSJeremy L Thompson      - build/*.junit
26204c6cceaSJeremy L Thompson    reports:
26304c6cceaSJeremy L Thompson      coverage_report:
26404c6cceaSJeremy L Thompson        coverage_format: cobertura
26504c6cceaSJeremy L Thompson        path: coverage.xml
26604c6cceaSJeremy L Thompson      junit: build/*.junit
26704c6cceaSJeremy L Thompson      performance: performance.json
26804c6cceaSJeremy L Thompson    expire_in: 28 days
26904c6cceaSJeremy L Thompson
27004c6cceaSJeremy L Thompson
271342f6305SJames Wright#### Disable HIP temporarily
272342f6305SJames Wright
273342f6305SJames Wright# # ----------------------------------------------------------------------------------------
274342f6305SJames Wright# # GPU testing on Noether
275342f6305SJames Wright# # ----------------------------------------------------------------------------------------
276342f6305SJames Wright# noether-hip:
277342f6305SJames Wright#   stage: test:stage-full
278342f6305SJames Wright#   extends: .test
279342f6305SJames Wright#   tags:
280342f6305SJames Wright#     - noether
281342f6305SJames Wright#     - shell
282342f6305SJames Wright#   script:
283342f6305SJames Wright#     - rm -f .SUCCESS
284342f6305SJames Wright#     # Environment
285342f6305SJames Wright#     - export COVERAGE=1 CC=gcc HIPCC=hipcc
286342f6305SJames Wright#     - export NPROC_POOL=4
287342f6305SJames Wright#     - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
288342f6305SJames Wright#     - echo "-------------- CC ------------------" && $CC --version
289342f6305SJames Wright#     - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm
290342f6305SJames Wright#     - echo "-------------- GCOV ----------------" && gcov --version
291342f6305SJames Wright#     # Libraries
292342f6305SJames Wright#     # -- libCEED
293342f6305SJames Wright#     - echo "-------------- libCEED -------------"
294342f6305SJames Wright#     - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
295342f6305SJames Wright#     # -- PETSc
296342f6305SJames Wright#     - echo "-------------- PETSc ---------------"
297342f6305SJames Wright#     - export PETSC_DIR=/projects/honee/petsc
298342f6305SJames Wright#     - export PETSC_ARCH=arch-parallel-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
299342f6305SJames Wright#     - export PETSC_OPTIONS='-malloc_debug no' # faster tests
300342f6305SJames Wright#     - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
301342f6305SJames Wright#     # HONEE
302342f6305SJames Wright#     - echo "-------------- HONEE ---------------" && make info
303342f6305SJames Wright#     - make clean
304342f6305SJames Wright#     - make -j$NPROC_CPU
305342f6305SJames Wright#     # Test suite
306342f6305SJames Wright#     - echo "-------------- HONEE tests ---------"
307342f6305SJames Wright#     - 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
308342f6305SJames Wright#     # -- Fastest libCEED HIP backend, serial
309342f6305SJames Wright#     # Note: /shared is faster due to /gen JiT time for CeedOperators overwhelming runtime improvements at these problem sizes
310342f6305SJames Wright#     - NPROC_TEST=1 make -k -j$((NPROC_GPU / NPROC_POOL / 1)) CEED_BACKENDS="/gpu/hip/shared" JUNIT_BATCH="hip-serial" junit search=navierstokes
311342f6305SJames Wright#     # Report status
312342f6305SJames Wright#     - touch .SUCCESS
313342f6305SJames Wright#   after_script:
314342f6305SJames Wright#     - |
315342f6305SJames Wright#       if [ -f .SUCCESS ]; then
316342f6305SJames Wright#         gcovr --xml-pretty --exclude-lines-by-pattern '^\s*SETERR.*' --exclude-unreachable-branches --print-summary -o coverage.xml;
317342f6305SJames Wright#       fi
318342f6305SJames Wright#   coverage: '/^lines:\s+(\d+.\d\%)/'
319342f6305SJames Wright#   artifacts:
320342f6305SJames Wright#     paths:
321342f6305SJames Wright#       - coverage.xml
322342f6305SJames Wright#       - build/*.junit
323342f6305SJames Wright#     reports:
324342f6305SJames Wright#       coverage_report:
325342f6305SJames Wright#         coverage_format: cobertura
326342f6305SJames Wright#         path: coverage.xml
327342f6305SJames Wright#       junit: build/*.junit
328342f6305SJames Wright#       performance: performance.json
329342f6305SJames Wright#     expire_in: 28 days
330a3c4661bSJames Wright
331a3c4661bSJames Wright
3320241eab6SJeremy L Thompsonnoether-cuda:
3330241eab6SJeremy L Thompson  stage: test:stage-full
3340241eab6SJeremy L Thompson  extends: .test
3350241eab6SJeremy L Thompson  tags:
3360241eab6SJeremy L Thompson    - noether
3370241eab6SJeremy L Thompson    - shell
3380241eab6SJeremy L Thompson  script:
3390241eab6SJeremy L Thompson    - rm -f .SUCCESS
3400241eab6SJeremy L Thompson    # Environment
3410241eab6SJeremy L Thompson    - export COVERAGE=1 CC=gcc NVCC=nvcc
3420241eab6SJeremy L Thompson    - export NPROC_POOL=4
3430241eab6SJeremy L Thompson    - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
3440241eab6SJeremy L Thompson    - echo "-------------- CC ------------------" && $CC --version
3450241eab6SJeremy L Thompson    - echo "-------------- NVCC ----------------" && $NVCC --version
3460241eab6SJeremy L Thompson    - echo "-------------- GCOV ----------------" && gcov --version
3470241eab6SJeremy L Thompson    # Libraries
3480241eab6SJeremy L Thompson    # -- libCEED
3490241eab6SJeremy L Thompson    - echo "-------------- libCEED -------------"
3500241eab6SJeremy L Thompson    - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info
3510241eab6SJeremy L Thompson    # -- PETSc
3520241eab6SJeremy L Thompson    - echo "-------------- PETSc ---------------"
3530241eab6SJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc
3540241eab6SJeremy L Thompson    - export PETSC_ARCH=arch-parallel-cuda && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info
3550241eab6SJeremy L Thompson    - export PETSC_OPTIONS='-malloc_debug no -use_gpu_aware_mpi 0' # faster tests
3560241eab6SJeremy L Thompson    - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff
3570241eab6SJeremy L Thompson    # HONEE
3580241eab6SJeremy L Thompson    - echo "-------------- HONEE ---------------" && make info
3590241eab6SJeremy L Thompson    - make clean
3600241eab6SJeremy L Thompson    - make -j$NPROC_CPU
3610241eab6SJeremy L Thompson    # Test suite
3620241eab6SJeremy L Thompson    - echo "-------------- HONEE tests ---------"
3630241eab6SJeremy 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
3640241eab6SJeremy L Thompson    # -- Fastest libCEED CUDA backend, serial
3650241eab6SJeremy L Thompson    # Note: /shared is faster due to /gen JiT time for CeedOperators overwhelming runtime improvements at these problem sizes
366ec67caadSJames Wright    - source /home/phypid/spack/share/spack/setup-env.sh && spack load py-torch@2.3+cuda && export USE_TORCH=1
3670241eab6SJeremy 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
3680241eab6SJeremy L Thompson    # Report status
3690241eab6SJeremy L Thompson    - touch .SUCCESS
3700241eab6SJeremy L Thompson  after_script:
3710241eab6SJeremy L Thompson    - |
3720241eab6SJeremy L Thompson      if [ -f .SUCCESS ]; then
37385fc816eSJames Wright        gcovr --xml-pretty --exclude-lines-by-pattern '^\s*SETERR.*' --exclude-unreachable-branches --print-summary -o coverage.xml;
3740241eab6SJeremy L Thompson      fi
3750241eab6SJeremy L Thompson  coverage: '/^lines:\s+(\d+.\d\%)/'
3760241eab6SJeremy L Thompson  artifacts:
3770241eab6SJeremy L Thompson    paths:
3780241eab6SJeremy L Thompson      - coverage.xml
3790241eab6SJeremy L Thompson      - build/*.junit
3800241eab6SJeremy L Thompson    reports:
3810241eab6SJeremy L Thompson      coverage_report:
3820241eab6SJeremy L Thompson        coverage_format: cobertura
3830241eab6SJeremy L Thompson        path: coverage.xml
3840241eab6SJeremy L Thompson      junit: build/*.junit
3850241eab6SJeremy L Thompson      performance: performance.json
3860241eab6SJeremy L Thompson    expire_in: 28 days
3870241eab6SJeremy L Thompson
3880241eab6SJeremy L Thompson
389a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
390a3c4661bSJames Wright# Build documentation
391a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
392a3c4661bSJames Wrightdocs-review:
393a3c4661bSJames Wright  stage: test:docs
394a3c4661bSJames Wright  tags:
395a3c4661bSJames Wright    - noether
396a3c4661bSJames Wright    - docker
397a3c4661bSJames Wright  extends:
398a3c4661bSJames Wright    - .docs
399a3c4661bSJames Wright    - .test-basic
400a3c4661bSJames Wright  interruptible: true
401a3c4661bSJames Wright  script:
402f421185eSJeremy L Thompson    - export PETSC_DIR=/projects/honee/petsc PETSC_ARCH=arch-parallel-hip CEED_DIR=/projects/honee/libCEED
4033ff588abSJames Wright    - git -c safe.directory=/builds/phypid/honee submodule update --init
404a3c4661bSJames Wright    - make doc-html pkgconf=true DOXYGENOPTS= SPHINXOPTS=-W
405a3c4661bSJames Wright    - mv doc/build/html public
406a3c4661bSJames Wright  artifacts:
407a3c4661bSJames Wright    paths:
408a3c4661bSJames Wright      - public
409a3c4661bSJames Wright    expire_in: 28 days
410a3c4661bSJames Wright  environment:
411a3c4661bSJames Wright    name: review/$CI_COMMIT_REF_NAME
412a3c4661bSJames Wright    url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html
413a3c4661bSJames Wright
414a3c4661bSJames Wright
415a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
416a3c4661bSJames Wright# Deploy documentation using GitLab pages
417a3c4661bSJames Wright# ----------------------------------------------------------------------------------------
418a3c4661bSJames Wrightpages:  # this job name has special meaning to GitLab
419a3c4661bSJames Wright  stage: deploy
420a3c4661bSJames Wright  tags:
421a3c4661bSJames Wright    - noether
422a3c4661bSJames Wright    - docker
423a3c4661bSJames Wright  extends: .docs
424a3c4661bSJames Wright  interruptible: false
425a3c4661bSJames Wright  script:
4263ff588abSJames Wright    - git -c safe.directory=/builds/phypid/honee submodule update --init
427a3c4661bSJames Wright    - make doc-dirhtml pkgconf=true DOXYGENOPTS=
428a3c4661bSJames Wright    - mv doc/build/dirhtml public
429a3c4661bSJames Wright  only:
430a3c4661bSJames Wright    - main
431a3c4661bSJames Wright  artifacts:
432a3c4661bSJames Wright    paths:
433a3c4661bSJames Wright      - public
434