Skip to content

Commit 62600ae

Browse files
authored
Merge pull request #1513 from CEED/jeremy/pad-both
Fix CI Issues
2 parents fad128e + ecc797d commit 62600ae

File tree

7 files changed

+31
-47
lines changed

7 files changed

+31
-47
lines changed

.github/workflows/c-fortran-test-hardware.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-22.04]
14-
compiler: [gcc-11]
14+
compiler: [gcc-13]
1515
arch: [aarch64, ppc64le]
1616
distro: [ubuntu22.04]
1717

@@ -24,7 +24,7 @@ jobs:
2424
uses: uraimo/run-on-arch-action@v2
2525
env:
2626
CC: ${{ matrix.compiler }}
27-
FC: gfortran-11
27+
FC: gfortran-13
2828
id: runcmd
2929
with:
3030
arch: ${{ matrix.arch }}

.github/workflows/c-fortran-test-icc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
source /opt/intel/oneapi/setvars.sh
3232
export CC=icx CXX=icx FC=ifx
3333
export OPENMP=1
34-
make -v
3534
make info
3635
make -j2
3736
PROVE_OPTS=-v make prove -j2

.github/workflows/c-fortran-test-linux-osx.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ jobs:
1010
test:
1111
strategy:
1212
matrix:
13-
os: [ubuntu-22.04, macos-12]
14-
compiler: [gcc-11, clang]
15-
include:
16-
- os: ubuntu-22.04
17-
asan: 1
13+
os: [ubuntu-22.04, macos-13]
14+
compiler: [gcc-13, clang]
1815

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

@@ -24,11 +21,8 @@ jobs:
2421
- name: Build and test libCEED
2522
env:
2623
CC: ${{ matrix.compiler }}
27-
FC: gfortran-11
28-
AFLAGS: -fsanitize=address -fsanitize=leak
29-
ASAN: ${{ matrix.asan }}
24+
FC: gfortran-13
3025
run: |
31-
make -v
3226
make info
3327
make -j2
3428
PROVE_OPTS=-v make prove -j2

.github/workflows/python-test-with-style.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-22.04]
14-
compiler: [gcc-11]
14+
compiler: [gcc-13]
1515
python-version: ['3.x']
1616

1717
runs-on: ${{ matrix.os }}
@@ -30,7 +30,7 @@ jobs:
3030
- name: Python test
3131
env:
3232
CC: ${{ matrix.compiler }}
33-
FC: gfortran-11
33+
FC: gfortran-13
3434
run: |
3535
make info
3636
make -j2
@@ -42,12 +42,12 @@ jobs:
4242
- name: Python style
4343
env:
4444
CC: ${{ matrix.compiler }}
45-
FC: gfortran-11
45+
FC: gfortran-13
4646
run: |
4747
make format-py && git diff --exit-code
4848
- name: Python version
4949
env:
5050
CC: ${{ matrix.compiler }}
51-
FC: gfortran-11
51+
FC: gfortran-13
5252
run: |
5353
make vermin

.gitlab-ci.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ noether-asan:
1616
interruptible: true
1717
before_script:
1818
# Environment
19+
# Note: COVERAGE=0 is needed when using ASAN
1920
- export COVERAGE=0 CC=gcc CXX=g++ FC=gfortran
2021
- export NPROC_POOL=8
2122
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
2223
- echo "-------------- CC ------------------" && $CC --version
2324
- echo "-------------- CXX -----------------" && $CXX --version
2425
- echo "-------------- FC ------------------" && $FC --version
25-
# ASAN
26+
# ASAN
2627
- echo "-------------- ASAN ----------------"
2728
- export ASAN=1 AFLAGS="-fsanitize=address -fsanitize=leak"
2829
- echo $AFLAGS
@@ -42,7 +43,7 @@ noether-asan:
4243
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="memcheck" junit realsearch=%
4344
# Clang-tidy
4445
- echo "-------------- clang-tidy ----------" && clang-tidy --version
45-
- make -j$NPROC_CPU tidy
46+
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code
4647
# Report status
4748
- touch .SUCCESS
4849
artifacts:
@@ -60,24 +61,22 @@ noether-cpu:
6061
stage: test:cpu-and-tidy
6162
tags:
6263
- cpu
63-
- rocm
6464
interruptible: true
6565
before_script:
6666
# Environment
67-
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran HIPCC=hipcc
67+
- export COVERAGE=1 CC=gcc CXX=g++ FC=gfortran
6868
- export NPROC_POOL=8
6969
- echo "-------------- nproc ---------------" && NPROC_CPU=$(nproc) && NPROC_GPU=$(($(nproc)<8?$(nproc):8)) && echo "NPROC_CPU" $NPROC_CPU && echo "NPROC_GPU" $NPROC_GPU
7070
- echo "-------------- CC ------------------" && $CC --version
7171
- echo "-------------- CXX -----------------" && $CXX --version
7272
- echo "-------------- FC ------------------" && $FC --version
73-
- echo "-------------- HIPCC ---------------" && $HIPCC --version
7473
- echo "-------------- GCOV ----------------" && gcov --version
7574
# Libraries for backends
7675
# -- LIBXSMM 2c145a109b5a8ad4e15f60ea42a86b9056bdc8b8
7776
- 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
7877
- echo "-------------- LIBXSMM -------------" && basename $XSMM_DIR
79-
# -- OCCA v1.1.0
80-
- 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
78+
# -- OCCA v1.6.0
79+
- 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
8180
- echo "-------------- OCCA ----------------" && git -C $OCCA_DIR describe --tags && LD_LIBRARY_PATH=$OCCA_DIR/lib $OCCA_DIR/bin/occa info
8281
script:
8382
- rm -f .SUCCESS
@@ -100,8 +99,8 @@ noether-cpu:
10099
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
101100
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
102101
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search="petsc fluids solids"
103-
# -- MFEM v4.2
104-
- 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
102+
# -- MFEM v4.6
103+
- 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
105104
- echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info
106105
- make -k -j$((NPROC_CPU / NPROC_POOL)) BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=mfem
107106
# -- Nek5000 v19.0
@@ -115,10 +114,6 @@ noether-cpu:
115114
- export DEAL_II_ROOT_DIR=/projects/dealii DEAL_II_DIR=/projects/dealii/install
116115
- echo "-------------- deal.II -------------" && git -C $DEAL_II_ROOT_DIR -c safe.directory=$DEAL_II_ROOT_DIR describe --always
117116
- make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=dealii DEAL_II_DIR=$DEAL_II_DIR
118-
# Clang-tidy
119-
- echo "-------------- clang-tidy ----------" && clang-tidy --version
120-
- export OCCA_DIR= && make lib -j$NPROC_CPU
121-
- make -j$NPROC_CPU tidy
122117
# Report status
123118
- touch .SUCCESS
124119
after_script:
@@ -158,7 +153,7 @@ noether-sycl:
158153
script:
159154
- rm -f .SUCCESS
160155
# libCEED
161-
- make configure SYCL_DIR=/opt/intel/oneapi/compiler/2023.2.0/linux OPT='-O -march=native -ffp-contract=fast'
156+
- make configure SYCL_DIR=/opt/intel/oneapi/compiler/latest OPT='-O -march=native -ffp-contract=fast'
162157
- BACKENDS_SYCL=$(make info-backends-all | grep -o '/sycl[^ ]*' | tr '\n' ' ')
163158
- echo "-------------- libCEED -------------" && make info
164159
- echo "-------------- BACKENDS_SYCL -------" && echo $BACKENDS_SYCL
@@ -204,6 +199,9 @@ noether-cuda:
204199
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
205200
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
206201
- make -k -j$((NPROC_GPU / NPROC_POOL)) JUNIT_BATCH="cuda" junit BACKENDS="$BACKENDS_GPU" search="petsc fluids solids"
202+
# Clang-tidy
203+
- echo "-------------- clang-tidy ----------" && clang-tidy --version
204+
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --color=always --exit-code
207205
# Report status
208206
- touch .SUCCESS
209207
after_script:
@@ -265,8 +263,8 @@ noether-rocm:
265263
- source /home/jawr8143/SmartSimTestingSoftware/bin/activate && export SMARTREDIS_DIR=/home/jawr8143/SmartSimTestingSoftware/smartredis/install
266264
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
267265
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search="petsc fluids solids"
268-
# -- MFEM v4.2
269-
- 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
266+
# -- MFEM v4.6
267+
- 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
270268
- echo "-------------- MFEM ----------------" && make -C $MFEM_DIR info
271269
- make -k -j$((NPROC_GPU / NPROC_POOL)) BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=mfem
272270
# -- Nek5000 v19.0
@@ -303,7 +301,7 @@ noether-rocm:
303301

304302

305303
# ----------------------------------------------------------------------------------------
306-
# CPU + ROCm backends with CeedInt == float
304+
# CPU + ROCm backends with CeedScalar == float (32 bit)
307305
# ----------------------------------------------------------------------------------------
308306
noether-float:
309307
stage: test:gpu-and-float

backends/opt/ceed-opt-operator.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ static int CeedOperatorSetupFields_Opt(CeedQFunction qf, CeedOperator op, bool i
136136
CeedCallBackend(CeedBasisApply(basis, block_size, CEED_NOTRANSPOSE, CEED_EVAL_WEIGHT, CEED_VECTOR_NONE, q_vecs[i]));
137137
break;
138138
}
139-
if (is_input && e_vecs[i]) {
140-
CeedCallBackend(CeedVectorSetArray(e_vecs[i], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
141-
}
139+
// Initialize E-vec arrays
140+
if (e_vecs[i]) CeedCallBackend(CeedVectorSetValue(e_vecs[i], 0.0));
142141
}
143142
return CEED_ERROR_SUCCESS;
144143
}
@@ -620,10 +619,8 @@ static inline int CeedOperatorLinearAssembleQFunctionCore_Opt(CeedOperator op, b
620619

621620
// Get output vector
622621
CeedCallBackend(CeedOperatorFieldGetVector(op_output_fields[out], &vec));
623-
// Check if active output
624-
if (vec == CEED_VECTOR_ACTIVE) {
625-
CeedCallBackend(CeedVectorSetArray(impl->q_vecs_out[out], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
626-
}
622+
// Initialize array if active output
623+
if (vec == CEED_VECTOR_ACTIVE) CeedCallBackend(CeedVectorSetValue(impl->q_vecs_out[out], 0.0));
627624
}
628625

629626
// Restore input arrays

backends/ref/ceed-ref-operator.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
static int CeedOperatorSetupFields_Ref(CeedQFunction qf, CeedOperator op, bool is_input, CeedVector *e_vecs_full, CeedVector *e_vecs,
2020
CeedVector *q_vecs, CeedInt start_e, CeedInt num_fields, CeedInt Q) {
2121
Ceed ceed;
22-
bool is_at_points;
2322
CeedSize e_size, q_size;
2423
CeedInt num_comp, size, P;
2524
CeedQFunctionField *qf_fields;
@@ -32,7 +31,6 @@ static int CeedOperatorSetupFields_Ref(CeedQFunction qf, CeedOperator op, bool i
3231
CeedCallBackend(CeedGetParent(ceed, &ceed_parent));
3332
if (ceed_parent) ceed = ceed_parent;
3433
}
35-
CeedCallBackend(CeedOperatorIsAtPoints(op, &is_at_points));
3634
if (is_input) {
3735
CeedCallBackend(CeedOperatorGetFields(op, NULL, &op_fields, NULL, NULL));
3836
CeedCallBackend(CeedQFunctionGetFields(qf, NULL, &qf_fields, NULL, NULL));
@@ -633,7 +631,6 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
633631
CeedCallBackend(CeedOperatorFieldGetVector(op_fields[i], &vec));
634632
if (vec == CEED_VECTOR_ACTIVE || !is_input) {
635633
CeedCallBackend(CeedVectorReferenceCopy(e_vecs[i], &q_vecs[i]));
636-
CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
637634
} else {
638635
q_size = (CeedSize)max_num_points * size;
639636
CeedCallBackend(CeedVectorCreate(ceed, q_size, &q_vecs[i]));
@@ -652,7 +649,6 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
652649
CeedCallBackend(CeedVectorCreate(ceed, e_size, &e_vecs[i]));
653650
q_size = (CeedSize)max_num_points * size;
654651
CeedCallBackend(CeedVectorCreate(ceed, q_size, &q_vecs[i]));
655-
CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
656652
break;
657653
case CEED_EVAL_WEIGHT: // Only on input fields
658654
CeedCallBackend(CeedOperatorFieldGetBasis(op_fields[i], &basis));
@@ -662,9 +658,9 @@ static int CeedOperatorSetupFieldsAtPoints_Ref(CeedQFunction qf, CeedOperator op
662658
CeedBasisApplyAtPoints(basis, max_num_points, CEED_NOTRANSPOSE, CEED_EVAL_WEIGHT, CEED_VECTOR_NONE, CEED_VECTOR_NONE, q_vecs[i]));
663659
break;
664660
}
665-
if (is_input && e_vecs[i]) {
666-
CeedCallBackend(CeedVectorSetArray(e_vecs[i], CEED_MEM_HOST, CEED_COPY_VALUES, NULL));
667-
}
661+
// Initialize full arrays for E-vectors and Q-vectors
662+
if (e_vecs[i]) CeedCallBackend(CeedVectorSetValue(e_vecs[i], 0.0));
663+
if (eval_mode != CEED_EVAL_WEIGHT) CeedCallBackend(CeedVectorSetValue(q_vecs[i], 0.0));
668664
}
669665
return CEED_ERROR_SUCCESS;
670666
}

0 commit comments

Comments
 (0)