109f072d1SJed Brownstages: 209f072d1SJed Brown - test 309f072d1SJed Brown 409f072d1SJed Brownnoether-rocm: 509f072d1SJed Brown stage: test 609f072d1SJed Brown tags: 709f072d1SJed Brown - rocm 8*a3179afaSjeremylt interruptible: true 909f072d1SJed Brown image: jedbrown/rocm:latest 1009f072d1SJed Brown script: 1138607094Sjeremylt# Compilers 1238607094Sjeremylt - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc 13de01c4d8Sjeremylt - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 14d758efd3Sjeremylt - echo "-------------- CC ------------------" && $CC --version 15d758efd3Sjeremylt - echo "-------------- CXX -----------------" && $CXX --version 16d758efd3Sjeremylt - echo "-------------- FC ------------------" && $FC --version 17d758efd3Sjeremylt - echo "-------------- HIPCC ---------------" && $HIPCC --version 18d758efd3Sjeremylt - echo "-------------- GCOV ----------------" && gcov --version 19d758efd3Sjeremylt# Libraries for backends 20d758efd3Sjeremylt# -- MAGMA from dev branch 21d758efd3Sjeremylt - echo "-------------- MAGMA ---------------" 2238607094Sjeremylt - export MAGMA_DIR=/projects/hipMAGMA && git -C $MAGMA_DIR describe 23d758efd3Sjeremylt# -- LIBXSMM v1.16.1 24d758efd3Sjeremylt - cd .. && export XSMM_VERSION=libxsmm-1.16.1 && { [[ -d $XSMM_VERSION ]] || { git clone --depth 1 --branch 1.16.1 https://github.com/hfp/libxsmm.git $XSMM_VERSION && make -C $XSMM_VERSION -j$(nproc); }; } && export XSMM_DIR=$PWD/$XSMM_VERSION && cd libCEED 25d758efd3Sjeremylt - echo "-------------- LIBXSMM -------------" && git -C $XSMM_DIR describe --tags 26d758efd3Sjeremylt# -- OCCA v1.1.0 27d758efd3Sjeremylt - cd .. && export OCCA_VERSION=occa-1.1.0 OCCA_OPENCL_ENABLED=0 && { [[ -d $OCCA_VERSION ]] || { git clone --depth 1 --branch v1.1.0 https://github.com/libocca/occa.git $OCCA_VERSION && make -C $OCCA_VERSION -j$(nproc); }; } && export OCCA_DIR=$PWD/$OCCA_VERSION && cd libCEED 28d758efd3Sjeremylt - echo "-------------- OCCA ----------------" && make -C $OCCA_DIR info 2938607094Sjeremylt# libCEED 3096f2f974SJed Brown - make configure HIP_DIR=/opt/rocm OPT='-O -march=native -ffp-contract=fast' 31422b683aSjeremylt - BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*') && BACKENDS_GPU=$(make info-backends | grep -o '/gpu[^ ]*') 32d758efd3Sjeremylt - echo "-------------- libCEED -------------" && make info 33de01c4d8Sjeremylt - echo "-------------- BACKENDS_CPU---------" && echo $BACKENDS_CPU 34de01c4d8Sjeremylt - echo "-------------- BACKENDS_GPU---------" && echo $BACKENDS_GPU 35ab25172fSJeremy L Thompson - make -j$NPROC_CPU 36d758efd3Sjeremylt# -- libCEED only tests 37d758efd3Sjeremylt - echo "-------------- core tests ----------" 3809f072d1SJed 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 39e0e4aa64Sjeremylt# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests 40e0e4aa64Sjeremylt - export PETSC_DIR= PETSC_ARCH= 418e3e54ccSjeremylt - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" junit realsearch=% 42ab25172fSJeremy L Thompson - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" junit realsearch=% 43d758efd3Sjeremylt# Libraries for examples 44d758efd3Sjeremylt# -- PETSc with HIP (minimal) 45d758efd3Sjeremylt - export PETSC_DIR=/projects/petsc PETSC_ARCH=mpich-hip && git -C $PETSC_DIR describe 46d758efd3Sjeremylt - echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info 47d758efd3Sjeremylt - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" junit search="petsc fluids solids" 48d758efd3Sjeremylt - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" junit search="petsc fluids solids" 49d758efd3Sjeremylt# -- MFEM v4.2 5038607094Sjeremylt - cd .. && export MFEM_VERSION=mfem-4.2 && { [[ -d $MFEM_VERSION ]] || { git clone --depth 1 --branch v4.2 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 51d758efd3Sjeremylt - echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info 52ab25172fSJeremy L Thompson - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" junit search=mfem 53ab25172fSJeremy L Thompson - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" junit search=mfem 54d758efd3Sjeremylt# -- Nek5000 v19.0 5538607094Sjeremylt - export COVERAGE=0 56d758efd3Sjeremylt - 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 57d758efd3Sjeremylt - echo "-------------- Nek5000 -------------" && git -C $NEK5K_DIR describe --tags 58ab25172fSJeremy L Thompson - make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" junit search=nek 59ab25172fSJeremy L Thompson - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" junit search=nek 60fd936b74Sjeremylt# Clang-tidy 61d758efd3Sjeremylt - echo "-------------- clang-tidy ----------" && clang-tidy --version 62d758efd3Sjeremylt - TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --exit-code 6338607094Sjeremylt# Report status 64caee11faSJeremy L Thompson - echo "SUCCESS" > .job_status 653d19ba41SJeremy L Thompson after_script: 666c1493a0SJeremy L Thompson - | 67caee11faSJeremy L Thompson if [ $(cat .job_status) == "SUCCESS" ]; then 68752c3701SJeremy L Thompson lcov --directory . --capture --output-file coverage.info; 69d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 70d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 71d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 72d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 73d7f2f9acSJed Brown bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 743d19ba41SJeremy L Thompson fi 7509f072d1SJed Brown artifacts: 7609f072d1SJed Brown paths: 7709f072d1SJed Brown - build/*.junit 7809f072d1SJed Brown reports: 7909f072d1SJed Brown junit: build/*.junit 8009f072d1SJed Brown performance: performance.json 81422b158fSJed Brown 82422b158fSJed Brownlv-cuda: 83422b158fSJed Brown stage: test 84422b158fSJed Brown tags: 85422b158fSJed Brown - cuda 86*a3179afaSjeremylt interruptible: true 87422b158fSJed Brown before_script: 88422b158fSJed Brown# Compilers 8941f52181Sjeremylt - . /opt/rh/gcc-toolset-10/enable 90422b158fSJed Brown - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran CUDA_DIR=/usr/local/cuda 91c4380dfaSjeremylt - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):4)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU 92422b158fSJed Brown - echo "-------------- CC ------------------" && $CC --version 93422b158fSJed Brown - echo "-------------- CXX -----------------" && $CXX --version 94422b158fSJed Brown - echo "-------------- FC ------------------" && $FC --version 95422b158fSJed Brown - echo "-------------- NVCC ----------------" && $CUDA_DIR/bin/nvcc --version 9690b17620Sjeremylt# libCEED 97422b158fSJed Brown - make configure OPT='-O -march=native -ffp-contract=fast' 9890b17620Sjeremylt - echo "-------------- libCEED -------------" && make info 99422b158fSJed Brown - BACKENDS_GPU=$(make info-backends | grep -o '/gpu[^ ]*') 10090b17620Sjeremylt - echo "-------------- BACKENDS_GPU---------" && echo $BACKENDS_GPU 101422b158fSJed Brown script: 10290b17620Sjeremylt - nice make -k -j$NPROC_GPU -l$NPROC_GPU 10390b17620Sjeremylt - echo "-------------- core tests ----------" 10490b17620Sjeremylt - export PETSC_DIR= PETSC_ARCH= 10590b17620Sjeremylt - nice make -k -j$NPROC_GPU junit BACKENDS="$BACKENDS_GPU" realsearch=% 10690b17620Sjeremylt# Libraries for examples 10790b17620Sjeremylt# -- PETSc with CUDA (minimal) 10890b17620Sjeremylt - export PETSC_DIR=/home/jeth8984/petsc PETSC_ARCH=cuda-O && git -C $PETSC_DIR describe 10990b17620Sjeremylt - echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info 1106f5a11a3Sjeremylt - make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" junit search="petsc" 111dd88942fSjeremylt# Report status 112dd88942fSjeremylt - echo "SUCCESS" > .job_status 113dd88942fSjeremylt after_script: 114dd88942fSjeremylt - | 115dd88942fSjeremylt if [ $(cat .job_status) == "SUCCESS" ]; then 116dd88942fSjeremylt lcov --directory . --capture --output-file coverage.info; 117dd88942fSjeremylt bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface; 118dd88942fSjeremylt bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery; 119dd88942fSjeremylt bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends; 120dd88942fSjeremylt bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests; 121dd88942fSjeremylt bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples; 122dd88942fSjeremylt fi 123422b158fSJed Brown artifacts: 124422b158fSJed Brown paths: 125422b158fSJed Brown - build/*.junit 126422b158fSJed Brown reports: 127422b158fSJed Brown junit: build/*.junit 128