Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 72 additions & 62 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ noether-cpu:
interruptible: true
before_script:
# Environment
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran GCOV=gcov
- export NPROC_POOL=8
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
- echo "-------------- CC ------------------" && $CC --version
- echo "-------------- CXX -----------------" && $CXX --version
- echo "-------------- FC ------------------" && $FC --version
- echo "-------------- GCOV ----------------" && gcov --version
- echo "-------------- GCOV ----------------" && $GCOV --version
- echo "GCOV=$GCOV" > job.env
# Libraries for backends
# -- LIBXSMM 7 April 2024
- 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
Expand Down Expand Up @@ -120,7 +121,8 @@ noether-cpu:
after_script:
- |
if [ -f .SUCCESS ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch;
source job.env;
lcov --directory . --capture --gcov-tool $GCOV --output-file coverage.info --ignore-errors source,mismatch;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
Expand Down Expand Up @@ -170,54 +172,55 @@ noether-cpu:
# ----------------------------------------------------------------------------------------
# Rust + CUDA
# ----------------------------------------------------------------------------------------
#noether-rust-qfunctions:
# stage: test:gpu-and-float
# tags:
# - cuda
# interruptible: true
# before_script:
# # Environment
# - export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC=gfortran-14 NVCC=nvcc GPU_CLANG=1
# - export NPROC_POOL=1
# - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
# - echo "-------------- CC ------------------" && $CC --version
# - echo "-------------- CXX -----------------" && $CXX --version
# - echo "-------------- FC ------------------" && $FC --version
# - echo "-------------- NVCC ----------------" && $NVCC --version
# - echo "-------------- Rustc ---------------" && rustc --version
# - echo "-------------- Clang++ -------------" && clang++ --version
# - echo "-------------- GCOV ----------------" && gcov-14 --version
# script:
# - rm -f .SUCCESS
# # Rustup
# - rustup update nightly
# - rustup component add rust-src --toolchain nightly
# - rustup component add llvm-tools --toolchain nightly
# # libCEED
# - make configure OPT='-g -O0 -fno-inline -march=native -ffp-contract=fast' CUDA_DIR=/usr/local/cuda-12.9
# - echo "-------------- libCEED -------------" && make info
# - make clean
# - make -k -j$NPROC_CPU -l$NPROC_CPU
# # -- libCEED only tests
# - echo "-------------- Rust QFunction tests -----"
# # Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests
# - export PETSC_DIR= PETSC_ARCH=
# - make -k -j$((NPROC_GPU / NPROC_POOL)) JUNIT_BATCH="rust-qfunction" junit search=rustqfunction
# # Report status
# - touch .SUCCESS
# after_script:
# - |
# if [ -f .SUCCESS ]; then
# lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
# fi
# artifacts:
# paths:
# - build/*.junit
# reports:
# junit: build/*.junit
noether-rust-qfunctions:
stage: test:gpu-and-float
tags:
- cuda
interruptible: true
before_script:
# Environment
- export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC=gfortran-14 NVCC=nvcc GCOV=gcov-14 CEED_USE_CLANG_CUDA=1
- export NPROC_POOL=1
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
- echo "-------------- CC ------------------" && $CC --version
- echo "-------------- CXX -----------------" && $CXX --version
- echo "-------------- FC ------------------" && $FC --version
- echo "-------------- NVCC ----------------" && $NVCC --version
- echo "-------------- Rustc ---------------" && rustc --version
- echo "-------------- GCOV ----------------" && $GCOV --version
- echo "GCOV=$GCOV" > job.env
script:
- rm -f .SUCCESS
# Rustup
- rustup update nightly
- rustup component add rust-src --toolchain nightly
- rustup component add llvm-tools --toolchain nightly
# libCEED
- make configure OPT='-g -O0 -fno-inline -march=native -ffp-contract=fast' CUDA_DIR=/usr/local/cuda-12.9
- echo "-------------- libCEED -------------" && make info
- make clean
- make -k -j$NPROC_CPU -l$NPROC_CPU
# -- libCEED only tests
- echo "-------------- Rust QFunction tests -----"
# Note: PETSC_DIR is set by default in GitLab runner env, unsetting to isolate core tests
- export PETSC_DIR= PETSC_ARCH=
- make -k -j$((NPROC_GPU / NPROC_POOL)) JUNIT_BATCH="rust-qfunction" junit search=rustqfunction
# Report status
- touch .SUCCESS
after_script:
- |
if [ -f .SUCCESS ]; then
source job.env;
lcov --directory . --capture --gcov-tool $GCOV --output-file coverage.info --ignore-errors source,mismatch;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
fi
artifacts:
paths:
- build/*.junit
reports:
junit: build/*.junit


# ----------------------------------------------------------------------------------------
Expand All @@ -230,14 +233,15 @@ noether-cuda:
interruptible: true
before_script:
# Environment
- export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC=gfortran-14 NVCC=nvcc
- export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC=gfortran-14 NVCC=nvcc GCOV=gcov-14
- export NPROC_POOL=4
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
- echo "-------------- CC ------------------" && $CC --version
- echo "-------------- CXX -----------------" && $CXX --version
- echo "-------------- FC ------------------" && $FC --version
- echo "-------------- NVCC ----------------" && $NVCC --version
- echo "-------------- GCOV ----------------" && gcov-14 --version
- echo "-------------- GCOV ----------------" && $GCOV --version
- echo "GCOV=$GCOV" > job.env
# ASAN
- echo "-------------- ASAN ----------------"
- export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak" ASAN_OPTIONS=protect_shadow_gap=0
Expand Down Expand Up @@ -290,7 +294,8 @@ noether-cuda:
after_script:
- |
if [ -f .SUCCESS ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch;
source job.env;
lcov --directory . --capture --gcov-tool $GCOV --output-file coverage.info --ignore-errors source,mismatch;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
Expand All @@ -317,14 +322,15 @@ noether-cuda:
# interruptible: true
# before_script:
# # Environment
# - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc
# - export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc GCOV=gcov
# - export NPROC_POOL=4
# - echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
# - echo "-------------- CC ------------------" && $CC --version
# - echo "-------------- CXX -----------------" && $CXX --version
# - echo "-------------- FC ------------------" && $FC --version
# - echo "-------------- HIPCC ---------------" && $HIPCC --version
# - echo "-------------- GCOV ----------------" && gcov --version
# - echo "-------------- GCOV ----------------" && $GCOV --version
# - echo "GCOV=$GCOV" > job.env
# # Libraries for backends
# # -- MAGMA from dev branch
# - echo "-------------- MAGMA ---------------"
Expand Down Expand Up @@ -357,7 +363,8 @@ noether-cuda:
# after_script:
# - |
# if [ -f .SUCCESS ]; then
# lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch;
# source job.env;
# lcov --directory . --capture --gcov-tool $GCOV --output-file coverage.info --ignore-errors source,mismatch;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
# bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
Expand All @@ -379,14 +386,15 @@ noether-rocm:
interruptible: true
before_script:
# Environment
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc GCOV=gcov
- export NPROC_POOL=4
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
- echo "-------------- CC ------------------" && $CC --version
- echo "-------------- CXX -----------------" && $CXX --version
- echo "-------------- FC ------------------" && $FC --version
- echo "-------------- HIPCC ---------------" && $HIPCC --version
- echo "-------------- GCOV ----------------" && gcov --version
- echo "-------------- GCOV ----------------" && $GCOV --version
- echo "GCOV=$GCOV" > job.env
# Libraries for backends
# -- MAGMA from dev branch
- echo "-------------- MAGMA ---------------"
Expand Down Expand Up @@ -418,13 +426,14 @@ noether-float:
interruptible: true
before_script:
# Environment
- export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC= NVCC=nvcc
- export COVERAGE=1 CC=gcc-14 CXX=g++-14 FC= NVCC=nvcc GCOV=gcov-14
- export NPROC_POOL=8
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
- echo "-------------- CC ------------------" && $CC --version
- echo "-------------- CXX -----------------" && $CXX --version
- echo "-------------- NVCC ----------------" && $NVCC --version
- echo "-------------- GCOV ----------------" && gcov-14 --version
- echo "-------------- GCOV ----------------" && $GCOV --version
- echo "GCOV=$GCOV" > job.env
# Libraries for backends
# ROCm tests currently disabled
# -- MAGMA from dev branch
Expand Down Expand Up @@ -459,7 +468,8 @@ noether-float:
after_script:
- |
if [ $(cat .job_status) == "SUCCESS" ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch;
source job.env;
lcov --directory . --capture --gcov-tool $GCOV --output-file coverage.info --ignore-errors source,mismatch;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F interface;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F gallery;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F backends;
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ external_examples := \
$(if $(DEAL_II_DIR),$(dealiiexamples)) \
$(if $(PETSC_DIR),$(fluidsexamples)) \
$(if $(PETSC_DIR),$(solidsexamples)) \
$(if $(or $(RUST_QF),$(GPU_CLANG)),$(rustqfunctionsexamples))
$(if $(or $(CEED_USE_CLANG_CUDA),$(CEED_CLANG_CUDA_CXX)),$(rustqfunctionsexamples))

allexamples = $(examples) $(external_examples)

Expand Down
1 change: 1 addition & 0 deletions backends/cuda/ceed-cuda-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ int CeedDestroy_Cuda(Ceed ceed) {

CeedCallBackend(CeedGetData(ceed, &data));
if (data->cublas_handle) CeedCallCublas(ceed, cublasDestroy(data->cublas_handle));
CeedCallBackend(CeedFree(&data->llvm_cxx));
CeedCallBackend(CeedFree(&data));
return CEED_ERROR_SUCCESS;
}
Expand Down
3 changes: 1 addition & 2 deletions backends/cuda/ceed-cuda-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ static const char *cublasGetErrorName(cublasStatus_t error) {

typedef struct {
int device_id;
bool use_llvm_version;
int llvm_version;
char *llvm_cxx;
cublasHandle_t cublas_handle;
struct cudaDeviceProp device_prop;
} Ceed_Cuda;
Expand Down
Loading
Loading