Skip to content
5 changes: 4 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ codecov:
branch: main

fixes:
- "build/backends/::backends/"
- "build/interface/::interface/"
- "build/gallery/::gallery/"
- "build/backends/::backends/"
- "build/t*/::tests/t*"
- "build/ex*/::examples/ceed/ex*"

ignore:
- "julia/LibCEED.jl/src/generated/*.jl"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-fortan-test-ppc64le.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Hardware setup and test libCEED
uses: uraimo/run-on-arch-action@v3
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-fortran-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build and test libCEED
env:
CC: ${{ matrix.compiler }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-fortran-test-icc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Intel compilers
uses: rscohn2/setup-oneapi@v0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-fortran-test-linux-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set compiler
run: |
case "${{ matrix.compiler }}" in
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-fortran-test-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install clang-format
run: |
wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/julia-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: julia-actions/setup-julia@latest
- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/julia-test-with-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Julia setup
uses: julia-actions/setup-julia@latest
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-test-with-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Python setup
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Python dependencies
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ jobs:
matrix:
# windows-2019, macos-11
os: [ubuntu-20.04]

steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v5
- name: Build wheels
uses: pypa/cibuildwheel@v2.11.3

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand All @@ -43,11 +40,9 @@ jobs:
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v5
- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
Expand All @@ -66,7 +61,6 @@ jobs:
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Check release notes
run: |
git fetch origin main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Rust setup
uses: dtolnay/rust-toolchain@master
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/rust-test-with-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Rust setup
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -32,12 +32,16 @@ jobs:
env:
CC: ${{ matrix.compiler }}
FC: gfortran
run: CARGO_CEED_OPT_FLAGS="-g -O0 -fno-inline" cargo llvm-cov test --doctests --lcov --output-path lcov.info
run: |
export CARGO_CEED_OPT_FLAGS="-g -O0 -fno-inline"
cargo llvm-cov test --doctests --lcov --output-path lcov.info
- name: Codecov upload
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
if: ${{ runner.os == 'Linux' }}
with:
files: lcov.info
token: ${{secrets.CODECOV_TOKEN}}
exclude: interface,gallery,backends,tests,examples
token: ${{ secrets.CODECOV_TOKEN }}

style:
strategy:
Expand All @@ -49,7 +53,7 @@ jobs:

steps:
- name: Environment setup
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Rust setup
uses: dtolnay/rust-toolchain@master
with:
Expand Down
19 changes: 9 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ noether-cpu:
- echo "-------------- BACKENDS_CPU --------" && echo $BACKENDS_CPU
- make clean
- PEDANTIC=1 make -j$NPROC_CPU
- make -j$NPROC_CPU
# -- libCEED only tests
- echo "-------------- core tests ----------"
- 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
Expand Down Expand Up @@ -121,7 +120,7 @@ noether-cpu:
after_script:
- |
if [ -f .SUCCESS ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch,unused --substitute 's#(t*-f.h)#test/(t*.-f.h)#g';
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;
Expand Down Expand Up @@ -209,12 +208,10 @@ noether-rust-qfunctions:
after_script:
- |
if [ -f .SUCCESS ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch,unused --substitute 's#(t*-f.h)#test/(t*.-f.h)#g';
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;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F tests;
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_ACCESS_TOKEN} -F examples;
fi
artifacts:
paths:
Expand Down Expand Up @@ -258,11 +255,14 @@ noether-cuda:
- echo "-------------- core 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)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="cuda" junit realsearch=%
# Run only operator tests for ASAN
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="cuda" junit search=t5
# Rebuild without ASAN
- unset ASAN AFLAGS ASAN_OPTIONS
# Need to clean and run full test suite so gcda files match
- make clean
- PEDANTIC=1 make -k -j$NPROC_CPU -l$NPROC_CPU
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="cuda" junit realsearch=%
# Libraries for examples
# -- PETSc with CUDA (minimal)
- 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
Expand Down Expand Up @@ -290,7 +290,7 @@ noether-cuda:
after_script:
- |
if [ -f .SUCCESS ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch,unused --substitute 's#(t*-f.h)#test/(t*.-f.h)#g';
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;
Expand Down Expand Up @@ -357,7 +357,7 @@ noether-cuda:
# after_script:
# - |
# if [ -f .SUCCESS ]; then
# lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch,unused --substitute 's#(t*-f.h)#test/(t*.-f.h)#g';
# 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;
Expand Down Expand Up @@ -402,7 +402,6 @@ noether-rocm:
- make -j$NPROC_CPU
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- make clean
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code
# Report status
- touch .SUCCESS
Expand Down Expand Up @@ -460,7 +459,7 @@ noether-float:
after_script:
- |
if [ $(cat .job_status) == "SUCCESS" ]; then
lcov --directory . --capture --output-file coverage.info --ignore-errors source,mismatch,unused --substitute 's#(t*-f.h)#test/(t*.-f.h)#g';
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;
Expand Down
12 changes: 6 additions & 6 deletions backends/cuda/ceed-cuda-compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ static int CeedCompileCore_Cuda(Ceed ceed, const char *source, const bool throw_
CeedCallBackend(CeedFree(&opts));
*is_compile_good = result == NVRTC_SUCCESS;
if (!*is_compile_good) {
// LCOV_EXCL_START
char *log;
size_t log_size;

Expand All @@ -196,15 +197,14 @@ static int CeedCompileCore_Cuda(Ceed ceed, const char *source, const bool throw_
if (throw_error) {
return CeedError(ceed, CEED_ERROR_BACKEND, "%s\n%s", nvrtcGetErrorString(result), log);
} else {
// LCOV_EXCL_START
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- COMPILE ERROR DETECTED ----------\n");
CeedDebug(ceed, "Error: %s\nCompile log:\n%s\n", nvrtcGetErrorString(result), log);
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- BACKEND MAY FALLBACK ----------\n");
CeedCallBackend(CeedFree(&log));
CeedCallNvrtc(ceed, nvrtcDestroyProgram(&prog));
return CEED_ERROR_SUCCESS;
// LCOV_EXCL_STOP
}
// LCOV_EXCL_STOP
}

#if CUDA_VERSION >= 11010
Expand Down Expand Up @@ -389,16 +389,16 @@ static int CeedCompileCore_Cuda(Ceed ceed, const char *source, const bool throw_

*is_compile_good = result == 0;
if (!*is_compile_good) {
// LCOV_EXCL_START
if (throw_error) {
return CeedError(ceed, CEED_ERROR_BACKEND, "Failed to load module data");
} else {
// LCOV_EXCL_START
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- COMPILE ERROR DETECTED ----------\n");
CeedDebug(ceed, "Error: Failed to load module data");
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- BACKEND MAY FALLBACK ----------\n");
return CEED_ERROR_SUCCESS;
// LCOV_EXCL_STOP
}
// LCOV_EXCL_STOP
}
}
return CEED_ERROR_SUCCESS;
Expand Down Expand Up @@ -477,6 +477,7 @@ static int CeedRunKernelDimSharedCore_Cuda(Ceed ceed, CUfunction kernel, CUstrea
CUresult result = cuLaunchKernel(kernel, grid_size, 1, 1, block_size_x, block_size_y, block_size_z, shared_mem_size, stream, args, NULL);

if (result == CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES) {
// LCOV_EXCL_START
int max_threads_per_block, shared_size_bytes, num_regs;

cuFuncGetAttribute(&max_threads_per_block, CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, kernel);
Expand All @@ -487,13 +488,12 @@ static int CeedRunKernelDimSharedCore_Cuda(Ceed ceed, CUfunction kernel, CUstrea
"CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: max_threads_per_block %d on block size (%d,%d,%d), shared_size %d, num_regs %d",
max_threads_per_block, block_size_x, block_size_y, block_size_z, shared_size_bytes, num_regs);
} else {
// LCOV_EXCL_START
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- LAUNCH ERROR DETECTED ----------\n");
CeedDebug(ceed, "CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: max_threads_per_block %d on block size (%d,%d,%d), shared_size %d, num_regs %d\n",
max_threads_per_block, block_size_x, block_size_y, block_size_z, shared_size_bytes, num_regs);
CeedDebug256(ceed, CEED_DEBUG_COLOR_WARNING, "---------- BACKEND MAY FALLBACK ----------\n");
// LCOV_EXCL_STOP
}
// LCOV_EXCL_STOP
*is_good_run = false;
} else CeedChk_Cu(ceed, result);
return CEED_ERROR_SUCCESS;
Expand Down
8 changes: 4 additions & 4 deletions backends/hip/ceed-hip-compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static int CeedCompileCore_Hip(Ceed ceed, const char *source, const bool throw_e
CeedCallBackend(CeedFree(&opts));
*is_compile_good = result == HIPRTC_SUCCESS;
if (!*is_compile_good) {
// LCOV_EXCL_START
size_t log_size;
char *log;

Expand All @@ -154,15 +155,14 @@ static int CeedCompileCore_Hip(Ceed ceed, const char *source, const bool throw_e
if (throw_error) {
return CeedError(ceed, CEED_ERROR_BACKEND, "%s\n%s", hiprtcGetErrorString(result), log);
} else {
// LCOV_EXCL_START
CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- COMPILE ERROR DETECTED ----------\n");
CeedDebug(ceed, "Error: %s\nCompile log:\n%s\n", hiprtcGetErrorString(result), log);
CeedDebug256(ceed, CEED_DEBUG_COLOR_WARNING, "---------- BACKEND MAY FALLBACK ----------\n");
CeedCallBackend(CeedFree(&log));
CeedCallHiprtc(ceed, hiprtcDestroyProgram(&prog));
return CEED_ERROR_SUCCESS;
// LCOV_EXCL_STOP
}
// LCOV_EXCL_STOP
}

CeedCallHiprtc(ceed, hiprtcGetCodeSize(prog, &ptx_size));
Expand Down Expand Up @@ -234,17 +234,17 @@ static int CeedRunKernelDimSharedCore_Hip(Ceed ceed, hipFunction_t kernel, hipSt
if (result == hipSuccess) {
*is_good_run = true;
} else {
// LCOV_EXCL_START
if (throw_error) {
CeedCallHip(ceed, result);
} else {
// LCOV_EXCL_START
const char *message = hipGetErrorName(result);

CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- LAUNCH ERROR DETECTED ----------\n");
CeedDebug(ceed, "%s\n", message);
CeedDebug256(ceed, CEED_DEBUG_COLOR_WARNING, "---------- BACKEND MAY FALLBACK ----------\n");
// LCOV_EXCL_STOP
}
// LCOV_EXCL_STOP
*is_good_run = false;
}
return CEED_ERROR_SUCCESS;
Expand Down
4 changes: 4 additions & 0 deletions interface/ceed-basis.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,11 @@ static int CeedBasisApplyAtPoints_Core(CeedBasis basis, bool apply_add, CeedInt
}
break;
}
// LCOV_EXCL_START
default:
// Nothing to do, excluded above
break;
// LCOV_EXCL_STOP
}
CeedCall(CeedVectorRestoreArrayRead(basis->vec_chebyshev, &chebyshev_coeffs));
CeedCall(CeedVectorRestoreArrayRead(x_ref, &x_array_read));
Expand Down Expand Up @@ -659,9 +661,11 @@ static int CeedBasisApplyAtPoints_Core(CeedBasis basis, bool apply_add, CeedInt
}
break;
}
// LCOV_EXCL_START
default:
// Nothing to do, excluded above
break;
// LCOV_EXCL_STOP
}
CeedCall(CeedVectorRestoreArray(basis->vec_chebyshev, &chebyshev_coeffs));
CeedCall(CeedVectorRestoreArrayRead(x_ref, &x_array_read));
Expand Down
Loading
Loading