1*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 2*bedd5dcaSJeremy L Thompson# HONEE GitLab CI 3*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 4*bedd5dcaSJeremy L Thompsonstages: 5*bedd5dcaSJeremy L Thompson - test:stage-lint 6*bedd5dcaSJeremy L Thompson - test:stage-memcheck 7*bedd5dcaSJeremy L Thompson - test:stage-cpu 8*bedd5dcaSJeremy L Thompson - test:stage-gpu 9*bedd5dcaSJeremy L Thompson 10*bedd5dcaSJeremy L Thompson.test-basic: 11*bedd5dcaSJeremy L Thompson interruptible: true 12*bedd5dcaSJeremy L Thompson only: 13*bedd5dcaSJeremy L Thompson refs: 14*bedd5dcaSJeremy L Thompson - web 15*bedd5dcaSJeremy L Thompson - merge_requests 16*bedd5dcaSJeremy L Thompson 17*bedd5dcaSJeremy L Thompson.test: 18*bedd5dcaSJeremy L Thompson extends: .test-basic 19*bedd5dcaSJeremy L Thompson only: 20*bedd5dcaSJeremy L Thompson refs: 21*bedd5dcaSJeremy L Thompson - web 22*bedd5dcaSJeremy L Thompson - merge_requests 23*bedd5dcaSJeremy L Thompson - main 24*bedd5dcaSJeremy L Thompson - release 25*bedd5dcaSJeremy L Thompson except: 26*bedd5dcaSJeremy L Thompson variables: 27*bedd5dcaSJeremy L Thompson # Skip if the No-Code label is attached to a merge request (i.e., documentation only) 28*bedd5dcaSJeremy L Thompson - $CI_MERGE_REQUEST_LABELS =~ /(^|,)No-Code($|,)/ 29*bedd5dcaSJeremy L Thompson needs: 30*bedd5dcaSJeremy L Thompson - job: docker-build 31*bedd5dcaSJeremy L Thompson optional: true 32*bedd5dcaSJeremy L Thompson 33*bedd5dcaSJeremy L Thompson.docs: 34*bedd5dcaSJeremy L Thompson image: python:3.10 35*bedd5dcaSJeremy L Thompson before_script: 36*bedd5dcaSJeremy L Thompson - pip install -r doc/requirements.txt 37*bedd5dcaSJeremy L Thompson - apt-get update 38*bedd5dcaSJeremy L Thompson - apt-get install -y doxygen librsvg2-bin 39*bedd5dcaSJeremy L Thompson 40*bedd5dcaSJeremy L Thompson 41*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 42*bedd5dcaSJeremy L Thompson# Test formatting and static analysis 43*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 44*bedd5dcaSJeremy L Thompsonnoether-lint: 45*bedd5dcaSJeremy L Thompson stage: test:stage-lint 46*bedd5dcaSJeremy L Thompson extends: .test 47*bedd5dcaSJeremy L Thompson tags: 48*bedd5dcaSJeremy L Thompson - noether 49*bedd5dcaSJeremy L Thompson - shell 50*bedd5dcaSJeremy L Thompson needs: [] 51*bedd5dcaSJeremy L Thompson script: 52*bedd5dcaSJeremy L Thompson - rm -f .SUCCESS 53*bedd5dcaSJeremy L Thompson # Environment 54*bedd5dcaSJeremy L Thompson - export COVERAGE=1 CC=gcc HIPCC=hipcc 55*bedd5dcaSJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 56*bedd5dcaSJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 57*bedd5dcaSJeremy L Thompson - echo "-------------- GCOV ----------------" && gcov --version 58*bedd5dcaSJeremy L Thompson - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm 59*bedd5dcaSJeremy L Thompson # Libraries 60*bedd5dcaSJeremy L Thompson # -- libCEED 61*bedd5dcaSJeremy L Thompson - echo "-------------- libCEED -------------" 62*bedd5dcaSJeremy L Thompson - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info 63*bedd5dcaSJeremy L Thompson # -- PETSc 64*bedd5dcaSJeremy L Thompson - echo "-------------- PETSc ---------------" 65*bedd5dcaSJeremy L Thompson - export PETSC_DIR=/projects/honee/petsc 66*bedd5dcaSJeremy L Thompson - export PETSC_ARCH=arch-serial-gpu && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info 67*bedd5dcaSJeremy L Thompson - export PETSC_OPTIONS='-malloc_debug no' # faster tests 68*bedd5dcaSJeremy L Thompson - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff 69*bedd5dcaSJeremy L Thompson # make with Werror, Wall, supress loop vectorization warnings 70*bedd5dcaSJeremy L Thompson - echo "-------------- make Werror ---------" 71*bedd5dcaSJeremy L Thompson - PEDANTIC=1 PEDANTICFLAGS="-Werror -Wall -Wno-pass-failed" make -j$NPROC_CPU lib 72*bedd5dcaSJeremy L Thompson # make format 73*bedd5dcaSJeremy L Thompson - echo "-------------- make format ---------" && export CLANG_FORMAT=clang-format-15 && $CLANG_FORMAT --version 74*bedd5dcaSJeremy L Thompson - make -j$NPROC_CPU format && git diff --color=always --exit-code 75*bedd5dcaSJeremy L Thompson # Clang-tidy 76*bedd5dcaSJeremy L Thompson - echo "-------------- clang-tidy ----------" && export CLANG_TIDY=clang-tidy-15 && $CLANG_TIDY --version 77*bedd5dcaSJeremy L Thompson - PETSC_ARCH=arch-serial-gpu make -j$NPROC_CPU tidy 78*bedd5dcaSJeremy L Thompson # Report status 79*bedd5dcaSJeremy L Thompson - touch .SUCCESS 80*bedd5dcaSJeremy L Thompson 81*bedd5dcaSJeremy L Thompson 82*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 83*bedd5dcaSJeremy L Thompson# Test memory access assumptions 84*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 85*bedd5dcaSJeremy L Thompsonnoether-memcheck: 86*bedd5dcaSJeremy L Thompson stage: test:stage-memcheck 87*bedd5dcaSJeremy L Thompson extends: .test 88*bedd5dcaSJeremy L Thompson tags: 89*bedd5dcaSJeremy L Thompson - noether 90*bedd5dcaSJeremy L Thompson - shell 91*bedd5dcaSJeremy L Thompson needs: [] 92*bedd5dcaSJeremy L Thompson script: 93*bedd5dcaSJeremy L Thompson - rm -f .SUCCESS 94*bedd5dcaSJeremy L Thompson # Environment 95*bedd5dcaSJeremy L Thompson # -- NOTE: Coverage disabled because it doesn't play nice with the ASAN options 96*bedd5dcaSJeremy L Thompson - export CC=clang-15 97*bedd5dcaSJeremy L Thompson - export NPROC_POOL=8 98*bedd5dcaSJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 99*bedd5dcaSJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 100*bedd5dcaSJeremy L Thompson # Libraries 101*bedd5dcaSJeremy L Thompson # -- libCEED 102*bedd5dcaSJeremy L Thompson - echo "-------------- libCEED -------------" 103*bedd5dcaSJeremy L Thompson - export CEED_DIR=/projects/honee/libCEED-cpu && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info 104*bedd5dcaSJeremy L Thompson # -- PETSc 105*bedd5dcaSJeremy L Thompson - echo "-------------- PETSc ---------------" 106*bedd5dcaSJeremy L Thompson - export PETSC_DIR=/projects/honee/petsc 107*bedd5dcaSJeremy L Thompson - export PETSC_ARCH=arch-serial-cpu-clang && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info 108*bedd5dcaSJeremy L Thompson - export PETSC_OPTIONS='-malloc_debug no' # faster tests 109*bedd5dcaSJeremy L Thompson - export LD_LIBRARY_PATH=$PETSC_DIR/lib PATH="$PATH:$PETSC_DIR/bin" # cgnsdiff 110*bedd5dcaSJeremy L Thompson # ASAN 111*bedd5dcaSJeremy L Thompson - echo "-------------- ASAN ----------------" 112*bedd5dcaSJeremy L Thompson - export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak" 113*bedd5dcaSJeremy L Thompson - echo $AFLAGS 114*bedd5dcaSJeremy L Thompson # HONEE 115*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE ---------------" && make info 116*bedd5dcaSJeremy L Thompson - make clean 117*bedd5dcaSJeremy L Thompson - make lib -j$NPROC_CPU 118*bedd5dcaSJeremy L Thompson # Test suite 119*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE tests ---------" 120*bedd5dcaSJeremy 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 121*bedd5dcaSJeremy L Thompson # -- Memcheck libCEED CPU backend, serial 122*bedd5dcaSJeremy L Thompson - NPROC_TEST=1 make -k -j$((NPROC_CPU / NPROC_POOL)) CEED_BACKENDS="/cpu/self/memcheck" JUNIT_BATCH="cpu-serial-memcheck" junit realsearch=% 123*bedd5dcaSJeremy L Thompson # Report status 124*bedd5dcaSJeremy L Thompson - touch .SUCCESS 125*bedd5dcaSJeremy L Thompson artifacts: 126*bedd5dcaSJeremy L Thompson paths: 127*bedd5dcaSJeremy L Thompson - build/*.junit 128*bedd5dcaSJeremy L Thompson reports: 129*bedd5dcaSJeremy L Thompson junit: build/*.junit 130*bedd5dcaSJeremy L Thompson performance: performance.json 131*bedd5dcaSJeremy L Thompson expire_in: 28 days 132*bedd5dcaSJeremy L Thompson 133*bedd5dcaSJeremy L Thompson 134*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 135*bedd5dcaSJeremy L Thompson# CPU testing on Noether 136*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 137*bedd5dcaSJeremy L Thompsonnoether-cpu: 138*bedd5dcaSJeremy L Thompson stage: test:stage-cpu 139*bedd5dcaSJeremy L Thompson extends: .test 140*bedd5dcaSJeremy L Thompson tags: 141*bedd5dcaSJeremy L Thompson - noether 142*bedd5dcaSJeremy L Thompson - shell 143*bedd5dcaSJeremy L Thompson script: 144*bedd5dcaSJeremy L Thompson - rm -f .SUCCESS 145*bedd5dcaSJeremy L Thompson # Environment 146*bedd5dcaSJeremy L Thompson - export COVERAGE=1 CC=gcc HIPCC=hipcc 147*bedd5dcaSJeremy L Thompson - export NPROC_POOL=4 148*bedd5dcaSJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 149*bedd5dcaSJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 150*bedd5dcaSJeremy L Thompson - echo "-------------- GCOV ----------------" && gcov --version 151*bedd5dcaSJeremy L Thompson - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm 152*bedd5dcaSJeremy L Thompson # Libraries 153*bedd5dcaSJeremy L Thompson # -- libCEED 154*bedd5dcaSJeremy L Thompson - echo "-------------- libCEED -------------" 155*bedd5dcaSJeremy L Thompson - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info 156*bedd5dcaSJeremy L Thompson # -- PETSc 157*bedd5dcaSJeremy L Thompson - echo "-------------- PETSc ---------------" 158*bedd5dcaSJeremy L Thompson - export PETSC_DIR=/projects/honee/petsc 159*bedd5dcaSJeremy L Thompson - export PETSC_ARCH=arch-parallel-gpu && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info 160*bedd5dcaSJeremy L Thompson - export PETSC_OPTIONS='-malloc_debug no' # faster tests 161*bedd5dcaSJeremy L Thompson - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff 162*bedd5dcaSJeremy L Thompson # HONEE 163*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE ---------------" && make info 164*bedd5dcaSJeremy L Thompson - make clean 165*bedd5dcaSJeremy L Thompson - make lib -j$NPROC_CPU 166*bedd5dcaSJeremy L Thompson # Test suite 167*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE tests ---------" 168*bedd5dcaSJeremy 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 169*bedd5dcaSJeremy L Thompson # -- Fastest libCEED CPU backend, parallel 170*bedd5dcaSJeremy L Thompson # Note: /shared is faster due to /gen JiT time for CeedOperators overwhelming runtime improvements at these problem sizes 171*bedd5dcaSJeremy L Thompson - NPROC_TEST=2 make -k -j$((NPROC_GPU / NPROC_POOL / 2)) CEED_BACKENDS="/gpu/hip/shared" JUNIT_BATCH="cpu-parallel" junit realsearch=% 172*bedd5dcaSJeremy L Thompson # Report status 173*bedd5dcaSJeremy L Thompson - touch .SUCCESS 174*bedd5dcaSJeremy L Thompson after_script: 175*bedd5dcaSJeremy L Thompson - | 176*bedd5dcaSJeremy L Thompson if [ -f .SUCCESS ]; then 177*bedd5dcaSJeremy L Thompson gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml; 178*bedd5dcaSJeremy L Thompson fi 179*bedd5dcaSJeremy L Thompson artifacts: 180*bedd5dcaSJeremy L Thompson paths: 181*bedd5dcaSJeremy L Thompson - coverage.xml 182*bedd5dcaSJeremy L Thompson - build/*.junit 183*bedd5dcaSJeremy L Thompson reports: 184*bedd5dcaSJeremy L Thompson coverage_report: 185*bedd5dcaSJeremy L Thompson coverage_format: cobertura 186*bedd5dcaSJeremy L Thompson path: coverage.xml 187*bedd5dcaSJeremy L Thompson junit: build/*.junit 188*bedd5dcaSJeremy L Thompson performance: performance.json 189*bedd5dcaSJeremy L Thompson expire_in: 28 days 190*bedd5dcaSJeremy L Thompson 191*bedd5dcaSJeremy L Thompson 192*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 193*bedd5dcaSJeremy L Thompson# GPU testing on Noether 194*bedd5dcaSJeremy L Thompson# ---------------------------------------------------------------------------------------- 195*bedd5dcaSJeremy L Thompsonnoether-gpu: 196*bedd5dcaSJeremy L Thompson stage: test:stage-gpu 197*bedd5dcaSJeremy L Thompson extends: .test 198*bedd5dcaSJeremy L Thompson tags: 199*bedd5dcaSJeremy L Thompson - noether 200*bedd5dcaSJeremy L Thompson - shell 201*bedd5dcaSJeremy L Thompson script: 202*bedd5dcaSJeremy L Thompson - rm -f .SUCCESS 203*bedd5dcaSJeremy L Thompson # Environment 204*bedd5dcaSJeremy L Thompson - export COVERAGE=1 CC=gcc HIPCC=hipcc 205*bedd5dcaSJeremy L Thompson - export NPROC_POOL=4 206*bedd5dcaSJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 207*bedd5dcaSJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 208*bedd5dcaSJeremy L Thompson - echo "-------------- GCOV ----------------" && gcov --version 209*bedd5dcaSJeremy L Thompson - echo "-------------- HIPCC ---------------" && $HIPCC --version && export HIP_DIR=/opt/rocm 210*bedd5dcaSJeremy L Thompson # Libraries 211*bedd5dcaSJeremy L Thompson # -- libCEED 212*bedd5dcaSJeremy L Thompson - echo "-------------- libCEED -------------" 213*bedd5dcaSJeremy L Thompson - export CEED_DIR=/projects/honee/libCEED && git -C $CEED_DIR -c safe.directory=$CEED_DIR describe && make -C $CEED_DIR info 214*bedd5dcaSJeremy L Thompson # -- PETSc 215*bedd5dcaSJeremy L Thompson - echo "-------------- PETSc ---------------" 216*bedd5dcaSJeremy L Thompson - export PETSC_DIR=/projects/honee/petsc 217*bedd5dcaSJeremy L Thompson - export PETSC_ARCH=arch-parallel-gpu && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe && make -C $PETSC_DIR info 218*bedd5dcaSJeremy L Thompson - export PETSC_OPTIONS='-malloc_debug no' # faster tests 219*bedd5dcaSJeremy L Thompson - export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib PATH="$PATH:$PETSC_DIR/$PETSC_ARCH/bin" # cgnsdiff 220*bedd5dcaSJeremy L Thompson # HONEE 221*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE ---------------" && make info 222*bedd5dcaSJeremy L Thompson - make clean 223*bedd5dcaSJeremy L Thompson - make lib -j$NPROC_CPU 224*bedd5dcaSJeremy L Thompson # Test suite 225*bedd5dcaSJeremy L Thompson - echo "-------------- HONEE tests ---------" 226*bedd5dcaSJeremy 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 227*bedd5dcaSJeremy L Thompson # -- Fastest libCEED HIP backend, serial 228*bedd5dcaSJeremy L Thompson - NPROC_TEST=1 make -k -j$((NPROC_GPU / NPROC_POOL / 1)) CEED_BACKENDS="/cpu/self" JUNIT_BATCH="hip-serial" junit realsearch=% 229*bedd5dcaSJeremy L Thompson # Report status 230*bedd5dcaSJeremy L Thompson - touch .SUCCESS 231*bedd5dcaSJeremy L Thompson after_script: 232*bedd5dcaSJeremy L Thompson - | 233*bedd5dcaSJeremy L Thompson if [ -f .SUCCESS ]; then 234*bedd5dcaSJeremy L Thompson gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml; 235*bedd5dcaSJeremy L Thompson fi 236*bedd5dcaSJeremy L Thompson artifacts: 237*bedd5dcaSJeremy L Thompson paths: 238*bedd5dcaSJeremy L Thompson - coverage.xml 239*bedd5dcaSJeremy L Thompson - build/*.junit 240*bedd5dcaSJeremy L Thompson reports: 241*bedd5dcaSJeremy L Thompson coverage_report: 242*bedd5dcaSJeremy L Thompson coverage_format: cobertura 243*bedd5dcaSJeremy L Thompson path: coverage.xml 244*bedd5dcaSJeremy L Thompson junit: build/*.junit 245*bedd5dcaSJeremy L Thompson performance: performance.json 246*bedd5dcaSJeremy L Thompson expire_in: 28 days 247