153928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 253928bd0SJeremy L Thompson# libCEED GitLab CI 353928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 409f072d1SJed Brownstages: 51e31b501SJeremy L Thompson - test:cpu-and-tidy 61e31b501SJeremy L Thompson - test:gpu-and-float 71e31b501SJeremy L Thompson 826a4920cSJeremy L Thompson 953928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 1053928bd0SJeremy L Thompson# Memcheck backends + ASAN 1153928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 1253928bd0SJeremy L Thompsonnoether-asan: 1353928bd0SJeremy L Thompson stage: test:cpu-and-tidy 1453928bd0SJeremy L Thompson tags: 1553928bd0SJeremy L Thompson - cpu 1653928bd0SJeremy L Thompson interruptible: true 1753928bd0SJeremy L Thompson before_script: 1853928bd0SJeremy L Thompson# Environment 199e9358dcSJeremy L Thompson# Note: COVERAGE=0 is needed when using ASAN 2053928bd0SJeremy L Thompson - export COVERAGE=0 CC=gcc CXX=g++ FC=gfortran 2153928bd0SJeremy L Thompson - export NPROC_POOL=8 2253928bd0SJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 2353928bd0SJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 2453928bd0SJeremy L Thompson - echo "-------------- CXX -----------------" && $CXX --version 2553928bd0SJeremy L Thompson - echo "-------------- FC ------------------" && $FC --version 2653928bd0SJeremy L Thompson# ASAN 2753928bd0SJeremy L Thompson - echo "-------------- ASAN ----------------" 2853928bd0SJeremy L Thompson - export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak" 2953928bd0SJeremy L Thompson - echo $AFLAGS 3053928bd0SJeremy L Thompson script: 3153928bd0SJeremy L Thompson - rm -f .SUCCESS 3253928bd0SJeremy L Thompson# libCEED 3353928bd0SJeremy L Thompson - make configure OPT='-O -march=native -ffp-contract=fast' 34ad037b63SJeremy L Thompson - BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*' | tr '\n' ' ') 3553928bd0SJeremy L Thompson - echo "-------------- libCEED -------------" && make info 36ad037b63SJeremy L Thompson - echo "-------------- BACKENDS_CPU --------" && echo $BACKENDS_CPU 3753928bd0SJeremy L Thompson - make -j$NPROC_CPU 3853928bd0SJeremy L Thompson# -- libCEED only tests 3953928bd0SJeremy L Thompson - echo "-------------- core tests ----------" 4053928bd0SJeremy 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 4153928bd0SJeremy L Thompson# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 4253928bd0SJeremy L Thompson - export PETSC_DIR= PETSC_ARCH= 43ad037b63SJeremy L Thompson - make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="memcheck" junit realsearch=% 4453928bd0SJeremy L Thompson# Clang-tidy 4553928bd0SJeremy L Thompson - echo "-------------- clang-tidy ----------" && clang-tidy --version 469e9358dcSJeremy L Thompson - TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code 4753928bd0SJeremy L Thompson# Report status 4853928bd0SJeremy L Thompson - touch .SUCCESS 4953928bd0SJeremy L Thompson artifacts: 5053928bd0SJeremy L Thompson paths: 5153928bd0SJeremy L Thompson - build/*.junit 5253928bd0SJeremy L Thompson reports: 5353928bd0SJeremy L Thompson junit: build/*.junit 5453928bd0SJeremy L Thompson performance: performance.json 5553928bd0SJeremy L Thompson 5653928bd0SJeremy L Thompson 5753928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 5853928bd0SJeremy L Thompson# CPU backends only + make tidy 5953928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 601e31b501SJeremy L Thompsonnoether-cpu: 611e31b501SJeremy L Thompson stage: test:cpu-and-tidy 621e31b501SJeremy L Thompson tags: 631e31b501SJeremy L Thompson - cpu 641e31b501SJeremy L Thompson interruptible: true 651e31b501SJeremy L Thompson before_script: 661e31b501SJeremy L Thompson# Environment 679e9358dcSJeremy L Thompson - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran 6819868e18SZach Atkins - export NPROC_POOL=8 691e31b501SJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 701e31b501SJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 711e31b501SJeremy L Thompson - echo "-------------- CXX -----------------" && $CXX --version 721e31b501SJeremy L Thompson - echo "-------------- FC ------------------" && $FC --version 731e31b501SJeremy L Thompson - echo "-------------- GCOV ----------------" && gcov --version 741e31b501SJeremy L Thompson# Libraries for backends 75ed721ed8SJeremy L Thompson# -- LIBXSMM 7 April 2024 76ed721ed8SJeremy L Thompson - cd .. && export XSMM_HASH=94ee71576870152feb62f3f0cf6b061d036dcdb5 && { [[ -d libxsmm-$XSMM_HASH ]] || { curl -L https://github.com/libxsmm/libxsmm/archive/$XSMM_HASH.tar.gz -o xsmm.tar.gz && tar zvxf xsmm.tar.gz && rm xsmm.tar.gz && make -C libxsmm-$XSMM_HASH -j$(nproc); }; } && export XSMM_DIR=$PWD/libxsmm-$XSMM_HASH && cd libCEED 7768c150f8SJed Brown - echo "-------------- LIBXSMM -------------" && basename $XSMM_DIR 78a4b1483eSJeremy L Thompson# -- OCCA v1.6.0 79a4b1483eSJeremy L Thompson - cd .. && export OCCA_VERSION=occa-1.6.0 && { [[ -d $OCCA_VERSION ]] || { git clone --depth 1 --branch v1.6.0 https://github.com/libocca/occa.git $OCCA_VERSION && cd $OCCA_VERSION && export ENABLE_OPENCL="OFF" ENABLE_DPCPP="OFF" ENABLE_HIP="OFF" ENABLE_CUDA="OFF" && ./configure-cmake.sh && cmake --build build --parallel $NPROC_CPU && cmake --install build && cd ..; }; } && export OCCA_DIR=$PWD/$OCCA_VERSION/install && cd libCEED 800be03a92SJeremy L Thompson - echo "-------------- OCCA ----------------" && git -C $OCCA_DIR describe --tags && LD_LIBRARY_PATH=$OCCA_DIR/lib $OCCA_DIR/bin/occa info 811e31b501SJeremy L Thompson script: 821e31b501SJeremy L Thompson - rm -f .SUCCESS 831e31b501SJeremy L Thompson# libCEED 841e31b501SJeremy L Thompson - make configure OPT='-O -march=native -ffp-contract=fast' 851b16049aSZach Atkins - BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*' | tr '\n' ' ') 861e31b501SJeremy L Thompson - echo "-------------- libCEED -------------" && make info 871e31b501SJeremy L Thompson - echo "-------------- BACKENDS_CPU --------" && echo $BACKENDS_CPU 882c2ea1dbSJeremy L Thompson - OCCA_DIR= PEDANTIC=1 make -j$NPROC_CPU 891e31b501SJeremy L Thompson - make -j$NPROC_CPU 901e31b501SJeremy L Thompson# -- libCEED only tests 911e31b501SJeremy L Thompson - echo "-------------- core tests ----------" 921e31b501SJeremy 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 931e31b501SJeremy L Thompson# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 941e31b501SJeremy L Thompson - export PETSC_DIR= PETSC_ARCH= 9519868e18SZach Atkins - make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit realsearch=% 961e31b501SJeremy L Thompson# Libraries for examples 971e31b501SJeremy L Thompson# -- PETSc with HIP (minimal) 984d00b080SJeremy L Thompson - export PETSC_DIR=/projects/petsc PETSC_ARCH=mpich-hip-int64 && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe 991e31b501SJeremy L Thompson - echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info 100637c7b11SJames Wright - make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search="petsc fluids-navierstokes solids" 101a4b1483eSJeremy L Thompson# -- MFEM v4.6 102a4b1483eSJeremy L Thompson - cd .. && export MFEM_VERSION=mfem-4.6 && { [[ -d $MFEM_VERSION ]] || { git clone --depth 1 --branch v4.6 https://github.com/mfem/mfem.git $MFEM_VERSION && make -C $MFEM_VERSION -j$(nproc) serial CXXFLAGS="-O -std=c++11"; }; } && export MFEM_DIR=$PWD/$MFEM_VERSION && cd libCEED 1031e31b501SJeremy L Thompson - echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info 10419868e18SZach Atkins - make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=mfem 1051e31b501SJeremy L Thompson# -- Nek5000 v19.0 1061e31b501SJeremy L Thompson - export COVERAGE=0 1071e31b501SJeremy L Thompson - cd .. && export NEK5K_VERSION=Nek5000-19.0 && { [[ -d $NEK5K_VERSION ]] || { git clone --depth 1 --branch v19.0 https://github.com/Nek5000/Nek5000.git $NEK5K_VERSION && cd $NEK5K_VERSION/tools && ./maketools genbox genmap reatore2 && cd ../..; }; } && export NEK5K_DIR=$PWD/$NEK5K_VERSION && export PATH=$NEK5K_DIR/bin:$PATH MPI=0 && cd libCEED 1081e31b501SJeremy L Thompson - echo "-------------- Nek5000 -------------" && git -C $NEK5K_DIR describe --tags 10919868e18SZach Atkins - export NPROC_POOL=1 110b41f14d5SJeremy L Thompson - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=nek NEK5K_DIR=$NEK5K_DIR 1118c81f8b0SPeter Munch# -- deal.II 8bd5c262f13e15793aa206b6eed8774a9b25ce11 1128c81f8b0SPeter Munch - OCCA_DIR= BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*' | tr '\n' ' ') 1138c81f8b0SPeter Munch - export DEAL_II_ROOT_DIR=/projects/dealii DEAL_II_DIR=/projects/dealii/install 1148c81f8b0SPeter Munch - echo "-------------- deal.II -------------" && git -C $DEAL_II_ROOT_DIR -c safe.directory=$DEAL_II_ROOT_DIR describe --always 1158c81f8b0SPeter Munch - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=dealii DEAL_II_DIR=$DEAL_II_DIR 1161e31b501SJeremy L Thompson# Report status 1171e31b501SJeremy L Thompson - touch .SUCCESS 1181e31b501SJeremy L Thompson after_script: 1191e31b501SJeremy L Thompson - | 1201e31b501SJeremy L Thompson if [ -f .SUCCESS ]; then 1211e31b501SJeremy L Thompson lcov --directory . --capture --output-file coverage.info; 1221e31b501SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 1231e31b501SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 1241e31b501SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 1251e31b501SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 1261e31b501SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 1271e31b501SJeremy L Thompson fi 1281e31b501SJeremy L Thompson artifacts: 1291e31b501SJeremy L Thompson paths: 1301e31b501SJeremy L Thompson - build/*.junit 1311e31b501SJeremy L Thompson reports: 1321e31b501SJeremy L Thompson junit: build/*.junit 1331e31b501SJeremy L Thompson performance: performance.json 13409f072d1SJed Brown 13526a4920cSJeremy L Thompson 13653928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 13753928bd0SJeremy L Thompson# Check SYCL backends build 13853928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 13926a4920cSJeremy L Thompsonnoether-sycl: 14026a4920cSJeremy L Thompson stage: test:gpu-and-float 14126a4920cSJeremy L Thompson tags: 14226a4920cSJeremy L Thompson - sycl 14326a4920cSJeremy L Thompson interruptible: true 14426a4920cSJeremy L Thompson before_script: 14526a4920cSJeremy L Thompson# Environment 14626a4920cSJeremy L Thompson - . /opt/intel/oneapi/setvars.sh 14726a4920cSJeremy L Thompson - export COVERAGE=1 CC=icx CXX=icpx 14826a4920cSJeremy L Thompson - export NPROC_POOL=8 14926a4920cSJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 15026a4920cSJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 15126a4920cSJeremy L Thompson - echo "-------------- CXX -----------------" && $CXX --version 15226a4920cSJeremy L Thompson script: 15326a4920cSJeremy L Thompson - rm -f .SUCCESS 15426a4920cSJeremy L Thompson# libCEED 15538cff5a3SJeremy L Thompson - make configure SYCL_DIR=/opt/intel/oneapi/compiler/latest OPT='-O -march=native -ffp-contract=fast' 15626a4920cSJeremy L Thompson - BACKENDS_SYCL=$(make info-backends-all | grep -o '/sycl[^ ]*' | tr '\n' ' ') 15726a4920cSJeremy L Thompson - echo "-------------- libCEED -------------" && make info 15826a4920cSJeremy L Thompson - echo "-------------- BACKENDS_SYCL -------" && echo $BACKENDS_SYCL 15926a4920cSJeremy L Thompson - make -j$NPROC_CPU 16026a4920cSJeremy L Thompson# Report status 16126a4920cSJeremy L Thompson - touch .SUCCESS 16226a4920cSJeremy L Thompson 16326a4920cSJeremy L Thompson 16453928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 16553928bd0SJeremy L Thompson# CUDA backends 16653928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 16753928bd0SJeremy L Thompsonnoether-cuda: 16853928bd0SJeremy L Thompson stage: test:gpu-and-float 16953928bd0SJeremy L Thompson tags: 17053928bd0SJeremy L Thompson - cuda 17153928bd0SJeremy L Thompson interruptible: true 17253928bd0SJeremy L Thompson before_script: 17353928bd0SJeremy L Thompson# Environment 17453928bd0SJeremy L Thompson - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran NVCC=nvcc 17553928bd0SJeremy L Thompson - export NPROC_POOL=4 17653928bd0SJeremy L Thompson - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 17753928bd0SJeremy L Thompson - echo "-------------- CC ------------------" && $CC --version 17853928bd0SJeremy L Thompson - echo "-------------- CXX -----------------" && $CXX --version 17953928bd0SJeremy L Thompson - echo "-------------- FC ------------------" && $FC --version 18053928bd0SJeremy L Thompson - echo "-------------- NVCC ----------------" && $NVCC --version 18153928bd0SJeremy L Thompson - echo "-------------- GCOV ----------------" && gcov --version 18253928bd0SJeremy L Thompson script: 18353928bd0SJeremy L Thompson - rm -f .SUCCESS 18453928bd0SJeremy L Thompson# libCEED 18553928bd0SJeremy L Thompson - make configure OPT='-O -march=native -ffp-contract=fast' CUDA_DIR=/usr 18653928bd0SJeremy L Thompson - echo "-------------- libCEED -------------" && make info 18753928bd0SJeremy L Thompson - BACKENDS_GPU=$(make info-backends | grep -o '/gpu[^ ]*' | tr '\n' ' ') 18853928bd0SJeremy L Thompson - echo "-------------- BACKENDS_GPU --------" && echo $BACKENDS_GPU 18953928bd0SJeremy L Thompson - PEDANTIC=1 make -k -j$NPROC_CPU -l$NPROC_CPU 19053928bd0SJeremy L Thompson# -- libCEED only tests 19153928bd0SJeremy L Thompson - echo "-------------- core tests ----------" 19253928bd0SJeremy L Thompson# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 19353928bd0SJeremy L Thompson - export PETSC_DIR= PETSC_ARCH= 19453928bd0SJeremy L Thompson - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="cuda" junit realsearch=% 19553928bd0SJeremy L Thompson# Libraries for examples 19653928bd0SJeremy L Thompson# -- PETSc with CUDA (minimal) 19753928bd0SJeremy L Thompson - export PETSC_DIR=/projects/petsc PETSC_ARCH=mpich-cuda-O PETSC_OPTIONS='-use_gpu_aware_mpi 0' && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe 19853928bd0SJeremy L Thompson - echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info 199*ecc12a5aSJeremy L Thompson - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="cuda" junit search="petsc fluids-navierstokes solids" 2009e9358dcSJeremy L Thompson# Clang-tidy 2019e9358dcSJeremy L Thompson - echo "-------------- clang-tidy ----------" && clang-tidy --version 2029e9358dcSJeremy L Thompson - TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code 20353928bd0SJeremy L Thompson# Report status 20453928bd0SJeremy L Thompson - touch .SUCCESS 20553928bd0SJeremy L Thompson after_script: 20653928bd0SJeremy L Thompson - | 20753928bd0SJeremy L Thompson if [ -f .SUCCESS ]; then 20853928bd0SJeremy L Thompson lcov --directory . --capture --output-file coverage.info; 20953928bd0SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 21053928bd0SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 21153928bd0SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 21253928bd0SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 21353928bd0SJeremy L Thompson bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 21453928bd0SJeremy L Thompson fi 21553928bd0SJeremy L Thompson artifacts: 21653928bd0SJeremy L Thompson paths: 21753928bd0SJeremy L Thompson - build/*.junit 21853928bd0SJeremy L Thompson reports: 21953928bd0SJeremy L Thompson junit: build/*.junit 22053928bd0SJeremy L Thompson 22153928bd0SJeremy L Thompson 22253928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 22353928bd0SJeremy L Thompson# ROCm backends 22453928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 22509f072d1SJed Brownnoether-rocm: 2261e31b501SJeremy L Thompson stage: test:gpu-and-float 22709f072d1SJed Brown tags: 22809f072d1SJed Brown - rocm 229a3179afaSjeremylt interruptible: true 2301e31b501SJeremy L Thompson before_script: 2315221680fSJeremy L Thompson# Environment 23238607094Sjeremylt - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc 23319868e18SZach Atkins - export NPROC_POOL=4 234de01c4d8Sjeremylt - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 235d758efd3Sjeremylt - echo "-------------- CC ------------------" && $CC --version 236d758efd3Sjeremylt - echo "-------------- CXX -----------------" && $CXX --version 237d758efd3Sjeremylt - echo "-------------- FC ------------------" && $FC --version 238d758efd3Sjeremylt - echo "-------------- HIPCC ---------------" && $HIPCC --version 239d758efd3Sjeremylt - echo "-------------- GCOV ----------------" && gcov --version 240d758efd3Sjeremylt# Libraries for backends 241d758efd3Sjeremylt# -- MAGMA from dev branch 242d758efd3Sjeremylt - echo "-------------- MAGMA ---------------" 243d7cd60dfSJed Brown - export MAGMA_DIR=/projects/hipMAGMA && git -C $MAGMA_DIR -c safe.directory=$MAGMA_DIR describe 2441e31b501SJeremy L Thompson script: 2451e31b501SJeremy L Thompson - rm -f .SUCCESS 24638607094Sjeremylt# libCEED 247402a89e6SJeremy L Thompson - make configure ROCM_DIR=/opt/rocm-6.1.0 OPT='-O -march=native -ffp-contract=fast' 2481b16049aSZach Atkins - BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*' | tr '\n' ' ') && BACKENDS_GPU=$(make info-backends | grep -o '/gpu[^ ]*' | tr '\n' ' ') 249d758efd3Sjeremylt - echo "-------------- libCEED -------------" && make info 2505221680fSJeremy L Thompson - echo "-------------- BACKENDS_GPU --------" && echo $BACKENDS_GPU 251ab25172fSJeremy L Thompson - make -j$NPROC_CPU 252d758efd3Sjeremylt# -- libCEED only tests 253d758efd3Sjeremylt - echo "-------------- core tests ----------" 25409f072d1SJed Brown - 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 255e0e4aa64Sjeremylt# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 256e0e4aa64Sjeremylt - export PETSC_DIR= PETSC_ARCH= 25719868e18SZach Atkins - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit realsearch=% 258d758efd3Sjeremylt# Libraries for examples 259d758efd3Sjeremylt# -- PETSc with HIP (minimal) 260d7cd60dfSJed Brown - export PETSC_DIR=/projects/petsc PETSC_ARCH=mpich-hip && git -C $PETSC_DIR -c safe.directory=$PETSC_DIR describe 261d758efd3Sjeremylt - echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info 26219868e18SZach Atkins - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search="petsc fluids solids" 263a4b1483eSJeremy L Thompson# -- MFEM v4.6 264a4b1483eSJeremy L Thompson - cd .. && export MFEM_VERSION=mfem-4.6 && { [[ -d $MFEM_VERSION ]] || { git clone --depth 1 --branch v4.6 https://github.com/mfem/mfem.git $MFEM_VERSION && make -C $MFEM_VERSION -j$(nproc) serial CXXFLAGS="-O -std=c++11"; }; } && export MFEM_DIR=$PWD/$MFEM_VERSION && cd libCEED 265d758efd3Sjeremylt - echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info 26619868e18SZach Atkins - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=mfem 267d758efd3Sjeremylt# -- Nek5000 v19.0 26838607094Sjeremylt - export COVERAGE=0 269d758efd3Sjeremylt - cd .. && export NEK5K_VERSION=Nek5000-19.0 && { [[ -d $NEK5K_VERSION ]] || { git clone --depth 1 --branch v19.0 https://github.com/Nek5000/Nek5000.git $NEK5K_VERSION && cd $NEK5K_VERSION/tools && ./maketools genbox genmap reatore2 && cd ../..; }; } && export NEK5K_DIR=$PWD/$NEK5K_VERSION && export PATH=$NEK5K_DIR/bin:$PATH MPI=0 && cd libCEED 270d758efd3Sjeremylt - echo "-------------- Nek5000 -------------" && git -C $NEK5K_DIR describe --tags 27119868e18SZach Atkins - export NPROC_POOL=1 272b41f14d5SJeremy L Thompson - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=nek NEK5K_DIR=$NEK5K_DIR 2738c81f8b0SPeter Munch# -- deal.II 8bd5c262f13e15793aa206b6eed8774a9b25ce11 2748c81f8b0SPeter Munch - export DEAL_II_ROOT_DIR=/projects/dealii DEAL_II_DIR=/projects/dealii/install 2758c81f8b0SPeter Munch - echo "-------------- deal.II -------------" && git -C $DEAL_II_ROOT_DIR -c safe.directory=$DEAL_II_ROOT_DIR describe --always 2768c81f8b0SPeter Munch - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=dealii DEAL_II_DIR=$DEAL_II_DIR 277fd936b74Sjeremylt# Clang-tidy 278d758efd3Sjeremylt - echo "-------------- clang-tidy ----------" && clang-tidy --version 279db7c0df8SJeremy L Thompson - TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code 28038607094Sjeremylt# Report status 281b9ce5a03SJed Brown - touch .SUCCESS 2823d19ba41SJeremy L Thompson after_script: 2836c1493a0SJeremy L Thompson - | 284b9ce5a03SJed Brown if [ -f .SUCCESS ]; then 285752c3701SJeremy L Thompson lcov --directory . --capture --output-file coverage.info; 286d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 287d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 288d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 289d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 290d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 2913d19ba41SJeremy L Thompson fi 29209f072d1SJed Brown artifacts: 29309f072d1SJed Brown paths: 29409f072d1SJed Brown - build/*.junit 29509f072d1SJed Brown reports: 29609f072d1SJed Brown junit: build/*.junit 29709f072d1SJed Brown performance: performance.json 298422b158fSJed Brown 29926a4920cSJeremy L Thompson 30053928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 3019e9358dcSJeremy L Thompson# CPU + ROCm backends with CeedScalar == float (32 bit) 30253928bd0SJeremy L Thompson# ---------------------------------------------------------------------------------------- 30380a9ef05SNatalie Beamsnoether-float: 3041e31b501SJeremy L Thompson stage: test:gpu-and-float 30580a9ef05SNatalie Beams tags: 3061e31b501SJeremy L Thompson - cpu 30780a9ef05SNatalie Beams - rocm 30880a9ef05SNatalie Beams interruptible: true 3091e31b501SJeremy L Thompson before_script: 3105221680fSJeremy L Thompson# Environment 31180a9ef05SNatalie Beams - export COVERAGE=1 CC=gcc CXX=g++ FC= HIPCC=hipcc 31219868e18SZach Atkins - export NPROC_POOL=8 31380a9ef05SNatalie Beams - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 31480a9ef05SNatalie Beams - echo "-------------- CC ------------------" && $CC --version 31580a9ef05SNatalie Beams - echo "-------------- CXX -----------------" && $CXX --version 31680a9ef05SNatalie Beams - echo "-------------- HIPCC ---------------" && $HIPCC --version 31780a9ef05SNatalie Beams - echo "-------------- GCOV ----------------" && gcov --version 31880a9ef05SNatalie Beams# Libraries for backends 31980a9ef05SNatalie Beams# -- MAGMA from dev branch 32080a9ef05SNatalie Beams - echo "-------------- MAGMA ---------------" 321d7cd60dfSJed Brown - export MAGMA_DIR=/projects/hipMAGMA && git -C $MAGMA_DIR -c safe.directory=$MAGMA_DIR describe 322ed721ed8SJeremy L Thompson# -- LIBXSMM 7 April 2024 323ed721ed8SJeremy L Thompson - cd .. && export XSMM_HASH=94ee71576870152feb62f3f0cf6b061d036dcdb5 && { [[ -d libxsmm-$XSMM_HASH ]] || { curl -L https://github.com/libxsmm/libxsmm/archive/$XSMM_HASH.tar.gz -o xsmm.tar.gz && tar zvxf xsmm.tar.gz && rm xsmm.tar.gz && make -C libxsmm-$XSMM_HASH -j$(nproc); }; } && export XSMM_DIR=$PWD/libxsmm-$XSMM_HASH && cd libCEED 32468c150f8SJed Brown - echo "-------------- LIBXSMM -------------" && basename $XSMM_DIR 3251e31b501SJeremy L Thompson script: 3261e31b501SJeremy L Thompson - rm -f .SUCCESS 32780a9ef05SNatalie Beams# libCEED 3281e31b501SJeremy L Thompson# Change to single precision 329c9c2c079SJeremy L Thompson - sed -i 's/ceed-f64/ceed-f32/1' include/ceed/types.h 33080a9ef05SNatalie Beams# Build libCEED 331402a89e6SJeremy L Thompson - make configure ROCM_DIR=/opt/rocm-6.1.0 OPT='-O -march=native -ffp-contract=fast' 3321b16049aSZach Atkins - BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*' | tr '\n' ' ') && BACKENDS_GPU=$(make info-backends | grep -o '/gpu[^ ]*' | tr '\n' ' ') 33380a9ef05SNatalie Beams - echo "-------------- libCEED -------------" && make info 3345221680fSJeremy L Thompson - echo "-------------- BACKENDS_CPU --------" && echo $BACKENDS_CPU 3355221680fSJeremy L Thompson - echo "-------------- BACKENDS_GPU --------" && echo $BACKENDS_GPU 33680a9ef05SNatalie Beams - make -j$NPROC_CPU 33780a9ef05SNatalie Beams# -- libCEED only tests 33880a9ef05SNatalie Beams - echo "-------------- core tests ----------" 33980a9ef05SNatalie Beams - 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 34080a9ef05SNatalie Beams# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 34180a9ef05SNatalie Beams - export PETSC_DIR= PETSC_ARCH= 34219868e18SZach Atkins - make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="float-cpu" junit realsearch=% 34319868e18SZach Atkins - export NPROC_POOL=4 34419868e18SZach Atkins - make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="float-hip" junit realsearch=% 34580a9ef05SNatalie Beams# Report status 34680a9ef05SNatalie Beams - echo "SUCCESS" > .job_status 34780a9ef05SNatalie Beams after_script: 34880a9ef05SNatalie Beams - | 34980a9ef05SNatalie Beams if [ $(cat .job_status) == "SUCCESS" ]; then 35080a9ef05SNatalie Beams lcov --directory . --capture --output-file coverage.info; 35180a9ef05SNatalie Beams bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 35280a9ef05SNatalie Beams bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 35380a9ef05SNatalie Beams bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 35480a9ef05SNatalie Beams bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 35580a9ef05SNatalie Beams bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 35680a9ef05SNatalie Beams fi 357c9c2c079SJeremy L Thompson - sed -i 's/ceed-f32/ceed-f64/1' include/ceed/types.h 35880a9ef05SNatalie Beams artifacts: 35980a9ef05SNatalie Beams paths: 36080a9ef05SNatalie Beams - build/*.junit 36180a9ef05SNatalie Beams reports: 36280a9ef05SNatalie Beams junit: build/*.junit 36380a9ef05SNatalie Beams performance: performance.json 364