Skip to content

Commit

Permalink
Merge pull request #1513 from CEED/jeremy/pad-both
Browse files Browse the repository at this point in the history
Fix CI Issues
  • Loading branch information
jeremylt authored Mar 14, 2024
2 parents fad128e + ecc797d commit 62600ae
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/c-fortran-test-hardware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
compiler: [gcc-11]
compiler: [gcc-13]
arch: [aarch64, ppc64le]
distro: [ubuntu22.04]

Expand All @@ -24,7 +24,7 @@ jobs:
uses: uraimo/run-on-arch-action@v2
env:
CC: ${{ matrix.compiler }}
FC: gfortran-11
FC: gfortran-13
id: runcmd
with:
arch: ${{ matrix.arch }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/c-fortran-test-icc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
source /opt/intel/oneapi/setvars.sh
export CC=icx CXX=icx FC=ifx
export OPENMP=1
make -v
make info
make -j2
PROVE_OPTS=-v make prove -j2
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/c-fortran-test-linux-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
compiler: [gcc-11, clang]
include:
- os: ubuntu-22.04
asan: 1
os: [ubuntu-22.04, macos-13]
compiler: [gcc-13, clang]

runs-on: ${{ matrix.os }}

Expand All @@ -24,11 +21,8 @@ jobs:
- name: Build and test libCEED
env:
CC: ${{ matrix.compiler }}
FC: gfortran-11
AFLAGS: -fsanitize=address -fsanitize=leak
ASAN: ${{ matrix.asan }}
FC: gfortran-13
run: |
make -v
make info
make -j2
PROVE_OPTS=-v make prove -j2
8 changes: 4 additions & 4 deletions .github/workflows/python-test-with-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
compiler: [gcc-11]
compiler: [gcc-13]
python-version: ['3.x']

runs-on: ${{ matrix.os }}
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Python test
env:
CC: ${{ matrix.compiler }}
FC: gfortran-11
FC: gfortran-13
run: |
make info
make -j2
Expand All @@ -42,12 +42,12 @@ jobs:
- name: Python style
env:
CC: ${{ matrix.compiler }}
FC: gfortran-11
FC: gfortran-13
run: |
make format-py && git diff --exit-code
- name: Python version
env:
CC: ${{ matrix.compiler }}
FC: gfortran-11
FC: gfortran-13
run: |
make vermin
32 changes: 15 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ noether-asan:
interruptible: true
before_script:
# Environment
# Note: COVERAGE=0 is needed when using ASAN
- export COVERAGE=0 CC=gcc CXX=g++ FC=gfortran
- 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
# ASAN
# ASAN
- echo "-------------- ASAN ----------------"
- export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak"
- echo $AFLAGS
Expand All @@ -42,7 +43,7 @@ noether-asan:
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="memcheck" junit realsearch=%
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- make -j$NPROC_CPU tidy
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code
# Report status
- touch .SUCCESS
artifacts:
Expand All @@ -60,24 +61,22 @@ noether-cpu:
stage: test:cpu-and-tidy
tags:
- cpu
- 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
- 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 "-------------- HIPCC ---------------" && $HIPCC --version
- echo "-------------- GCOV ----------------" && gcov --version
# Libraries for backends
# -- LIBXSMM 2c145a109b5a8ad4e15f60ea42a86b9056bdc8b8
- cd .. && export XSMM_HASH=2c145a109b5a8ad4e15f60ea42a86b9056bdc8b8 && { [[ -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
- echo "-------------- LIBXSMM -------------" && basename $XSMM_DIR
# -- OCCA v1.1.0
- cd .. && export OCCA_VERSION=occa-1.4.0 && { [[ -d $OCCA_VERSION ]] || { git clone --depth 1 --branch v1.4.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
# -- OCCA v1.6.0
- 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
- echo "-------------- OCCA ----------------" && git -C $OCCA_DIR describe --tags && LD_LIBRARY_PATH=$OCCA_DIR/lib $OCCA_DIR/bin/occa info
script:
- rm -f .SUCCESS
Expand All @@ -100,8 +99,8 @@ noether-cpu:
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search="petsc fluids solids"
# -- MFEM v4.2
- 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
# -- MFEM v4.6
- 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
- echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=mfem
# -- Nek5000 v19.0
Expand All @@ -115,10 +114,6 @@ noether-cpu:
- export DEAL_II_ROOT_DIR=/projects/dealii DEAL_II_DIR=/projects/dealii/install
- echo "-------------- deal.II -------------" && git -C $DEAL_II_ROOT_DIR -c safe.directory=$DEAL_II_ROOT_DIR describe --always
- make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=dealii DEAL_II_DIR=$DEAL_II_DIR
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- export OCCA_DIR= && make lib -j$NPROC_CPU
- make -j$NPROC_CPU tidy
# Report status
- touch .SUCCESS
after_script:
Expand Down Expand Up @@ -158,7 +153,7 @@ noether-sycl:
script:
- rm -f .SUCCESS
# libCEED
- make configure SYCL_DIR=/opt/intel/oneapi/compiler/2023.2.0/linux OPT='-O -march=native -ffp-contract=fast'
- make configure SYCL_DIR=/opt/intel/oneapi/compiler/latest OPT='-O -march=native -ffp-contract=fast'
- BACKENDS_SYCL=$(make info-backends-all | grep -o '/sycl[^ ]*' | tr '\n' ' ')
- echo "-------------- libCEED -------------" && make info
- echo "-------------- BACKENDS_SYCL -------" && echo $BACKENDS_SYCL
Expand Down Expand Up @@ -204,6 +199,9 @@ noether-cuda:
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
- make -k -j$((NPROC_GPU / NPROC_POOL)) JUNIT_BATCH="cuda" junit BACKENDS="$BACKENDS_GPU" search="petsc fluids solids"
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code
# Report status
- touch .SUCCESS
after_script:
Expand Down Expand Up @@ -265,8 +263,8 @@ noether-rocm:
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search="petsc fluids solids"
# -- MFEM v4.2
- 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
# -- MFEM v4.6
- 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
- echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=mfem
# -- Nek5000 v19.0
Expand Down Expand Up @@ -303,7 +301,7 @@ noether-rocm:


# ----------------------------------------------------------------------------------------
# CPU + ROCm backends with CeedInt == float
# CPU + ROCm backends with CeedScalar == float (32 bit)
# ----------------------------------------------------------------------------------------
noether-float:
stage: test:gpu-and-float
Expand Down
11 changes: 4 additions & 7 deletions backends/opt/ceed-opt-operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ static int CeedOperatorSetupFields_Opt(CeedQFunction qf, CeedOperator op, bool i
CeedCallBackend(CeedBasisApply(basis, block_size, CEED_NOTRANSPOSE, CEED_EVAL_WEIGHT, CEED_VECTOR_NONE, q_vecs[i]));
break;
}
if (is_input && e_vecs[i]) {
CeedCallBackend(CeedVectorSetArray(e_vecs[i], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
}
// Initialize E-vec arrays
if (e_vecs[i]) CeedCallBackend(CeedVectorSetValue(e_vecs[i], 0.0));
}
return CEED_ERROR_SUCCESS;
}
Expand Down Expand Up @@ -620,10 +619,8 @@ static inline int CeedOperatorLinearAssembleQFunctionCore_Opt(CeedOperator op, b

// Get output vector
CeedCallBackend(CeedOperatorFieldGetVector(op_output_fields[out], &vec));
// Check if active output
if (vec == CEED_VECTOR_ACTIVE) {
CeedCallBackend(CeedVectorSetArray(impl->q_vecs_out[out], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
}
// Initialize array if active output
if (vec == CEED_VECTOR_ACTIVE) CeedCallBackend(CeedVectorSetValue(impl->q_vecs_out[out], 0.0));
}

// Restore input arrays
Expand Down
10 changes: 3 additions & 7 deletions backends/ref/ceed-ref-operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
static int CeedOperatorSetupFields_Ref(CeedQFunction qf, CeedOperator op, bool is_input, CeedVector *e_vecs_full, CeedVector *e_vecs,
CeedVector *q_vecs, CeedInt start_e, CeedInt num_fields, CeedInt Q) {
Ceed ceed;
bool is_at_points;
CeedSize e_size, q_size;
CeedInt num_comp, size, P;
CeedQFunctionField *qf_fields;
Expand All @@ -32,7 +31,6 @@ static int CeedOperatorSetupFields_Ref(CeedQFunction qf, CeedOperator op, bool i
CeedCallBackend(CeedGetParent(ceed, &ceed_parent));
if (ceed_parent) ceed = ceed_parent;
}
CeedCallBackend(CeedOperatorIsAtPoints(op, &is_at_points));
if (is_input) {
CeedCallBackend(CeedOperatorGetFields(op, NULL, &op_fields, NULL, NULL));
CeedCallBackend(CeedQFunctionGetFields(qf, NULL, &qf_fields, NULL, NULL));
Expand Down Expand Up @@ -633,7 +631,6 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
CeedCallBackend(CeedOperatorFieldGetVector(op_fields[i], &vec));
if (vec == CEED_VECTOR_ACTIVE || !is_input) {
CeedCallBackend(CeedVectorReferenceCopy(e_vecs[i], &q_vecs[i]));
CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
} else {
q_size = (CeedSize)max_num_points * size;
CeedCallBackend(CeedVectorCreate(ceed, q_size, &q_vecs[i]));
Expand All @@ -652,7 +649,6 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
CeedCallBackend(CeedVectorCreate(ceed, e_size, &e_vecs[i]));
q_size = (CeedSize)max_num_points * size;
CeedCallBackend(CeedVectorCreate(ceed, q_size, &q_vecs[i]));
CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
break;
case CEED_EVAL_WEIGHT: // Only on input fields
CeedCallBackend(CeedOperatorFieldGetBasis(op_fields[i], &basis));
Expand All @@ -662,9 +658,9 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
CeedBasisApplyAtPoints(basis, max_num_points, CEED_NOTRANSPOSE, CEED_EVAL_WEIGHT, CEED_VECTOR_NONE, CEED_VECTOR_NONE, q_vecs[i]));
break;
}
if (is_input && e_vecs[i]) {
CeedCallBackend(CeedVectorSetArray(e_vecs[i], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
}
// Initialize full arrays for E-vectors and Q-vectors
if (e_vecs[i]) CeedCallBackend(CeedVectorSetValue(e_vecs[i], 0.0));
if (eval_mode != CEED_EVAL_WEIGHT) CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
}
return CEED_ERROR_SUCCESS;
}
Expand Down

0 comments on commit 62600ae

Please sign in to comment.