-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
112 changed files
with
3,093 additions
and
2,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
name: act_test | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# paths-ignore: | ||
# - '**.nix' | ||
# - 'flake.lock' | ||
# pull_request: | ||
# paths-ignore: | ||
# - '**.nix' | ||
# - 'flake.lock' | ||
|
||
concurrency: act_test-${{ github.ref }} | ||
|
||
jobs: | ||
|
||
ubuntu: | ||
# For available GitHub-hosted runners, see: | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners | ||
runs-on: ${{ matrix.os }} | ||
|
||
name: ${{ matrix.os }} (${{ matrix.compiler }} ${{ matrix.mpi }} MPI ${{ matrix.openmp }} OpenMP) | ||
|
||
strategy: | ||
# Allow other runners in the matrix to continue if some fail | ||
fail-fast: false | ||
|
||
matrix: | ||
os: [ubuntu-24.04] | ||
compiler: [gcc] | ||
mpi: [with] | ||
openmp: [with] | ||
include: | ||
- os: ubuntu-24.04-arm | ||
compiler: gcc | ||
compiler-pkgs: "g++ gcc" | ||
cc: "gcc" | ||
cxx: "g++" | ||
mpi: with | ||
openmp: without | ||
openmp-cmake-flags: "-DWITH_OpenMP=OFF" | ||
env: | ||
CC: ${{ matrix.cc }} | ||
CXX: ${{ matrix.cxx }} | ||
|
||
steps: | ||
- name: get CPU information | ||
run: lscpu | ||
|
||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: install dependencies | ||
run: | | ||
sudo apt -qq update | ||
sudo apt install -y ${{ matrix.compiler-pkgs }} cmake gfortran \ | ||
libopenblas-dev \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "libhypre-dev") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "libopenmpi-dev libmumps-dev libparmetis-dev") \ | ||
$([ "${{ matrix.compiler }}" == "gcc" ] && echo "libsuitesparse-dev") \ | ||
$([ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ] && echo "librocalution-dev") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "trilinos-all-dev libptscotch-dev") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "libnetcdff-dev") | ||
- name: configure | ||
# CHOLMOD and rocALUTION require a working OpenMP package. So, disable them for clang. | ||
run: | | ||
# work around error in the rocALUTION CMake config file distributed by Ubuntu | ||
if [ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ]; then | ||
sudo sed -i '/find_dependency(HIP)/d' /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/cmake/rocalution/rocalution-config.cmake | ||
fi | ||
mkdir ${GITHUB_WORKSPACE}/build | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake \ | ||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | ||
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \ | ||
-DBLA_VENDOR="OpenBLAS" \ | ||
${{ matrix.openmp-cmake-flags }} \ | ||
-DWITH_LUA=ON \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Zoltan=OFF" || echo "-DWITH_Zoltan=OFF") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Mumps=OFF" || echo "-DWITH_Mumps=OFF") \ | ||
$([ "${{ matrix.compiler }}" == "gcc" ] && echo "-DWITH_CHOLMOD=OFF" || echo "-DWITH_CHOLMOD=OFF") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Hypre=OFF -DHYPRE_INCLUDE_DIR=/usr/include/hypre" || echo "-DWITH_Hypre=OFF") \ | ||
$([ "${{ matrix.compiler }}" == "gcc" ] && [ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_ROCALUTION=OFF" || echo "-DWITH_ROCALUTION=OFF") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_ElmerIce=OFF" || echo "-DWITH_ElmerIce=OFF") \ | ||
-DWITH_ELMERGUI=OFF \ | ||
-DWITH_VTK=OFF \ | ||
-DWITH_OCC=OFF \ | ||
-DWITH_MATC=OFF \ | ||
-DWITH_PARAVIEW=OFF \ | ||
-DCREATE_PKGCONFIG_FILE=ON \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_MPI=ON -DMPI_TEST_MAXPROC=2 -DMPIEXEC_PREFLAGS=--allow-run-as-root" || echo "-DWITH_MPI=OFF") \ | ||
$([ "${{ matrix.mpi }}" == "with" ] && echo "-DWITH_Trilinos=OFF" || echo "-DWITH_Trilinos=OFF") \ | ||
.. | ||
- name: build | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake --build . -j$(nproc) | ||
- name: install | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake --install . | ||
- name: check | ||
id: run-ctest | ||
timeout-minutes: 150 | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
ctest . \ | ||
-LE slow \ | ||
-j$(nproc) \ | ||
--timeout 300 | ||
- name: Re-run tests | ||
if: always() && (steps.run-ctest.outcome == 'failure') | ||
timeout-minutes: 60 | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
# get names of failed tests and strip potential "_np*" suffix | ||
failed_tests=($(ctest . -N --rerun-failed | grep -E "Test\s+#.*" | awk '{print $3}' | sed -e 's/_np[0-9]*$//g')) | ||
# remove duplicate test names | ||
unique_failed_tests=($(echo "${failed_tests[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')) | ||
for test in "${unique_failed_tests[@]}"; do | ||
# check if test is from fem or ElmerIce | ||
if [ -d fem/tests/${test} ]; then | ||
test_root=fem/tests | ||
else | ||
test_root=elmerice/Tests | ||
fi | ||
echo "::group::Content of ${test_root}/${test}" | ||
echo ---- Files ---- | ||
ls -Rl ${test_root}/${test} | ||
if [ -f ${test_root}/${test}/test-stderr*.log ]; then | ||
err_logs=($(ls ${test_root}/${test}/test-stderr*.log)) | ||
for err_log in "${err_logs[@]}"; do | ||
echo ---- Content of ${err_log} ---- | ||
cat ${err_log} | ||
done | ||
fi | ||
if [ -f ${test_root}/${test}/test-stdout*.log ]; then | ||
out_logs=($(ls ${test_root}/${test}/test-stdout*.log)) | ||
for out_log in "${out_logs[@]}"; do | ||
echo ---- Content of ${out_log} ---- | ||
cat ${out_log} | ||
done | ||
fi | ||
echo "::endgroup::" | ||
done | ||
echo "::group::Re-run failing tests" | ||
ctest --rerun-failed --output-on-failure --timeout 180 || true | ||
echo "::endgroup::" | ||
echo "::group::Log from these tests" | ||
[ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log | ||
echo "::endgroup::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,28 @@ jobs: | |
|
||
runs-on: ${{ matrix.os }} | ||
|
||
name: ${{ matrix.os }} (${{ matrix.openmp }} OpenMP) | ||
|
||
strategy: | ||
# Allow other runners in the matrix to continue if some fail | ||
fail-fast: false | ||
|
||
matrix: | ||
os: [macos-14, macos-13] | ||
os: [macos-14] | ||
openmp: [without] | ||
# Building with OpenMP causes some test failures on macOS on Apple | ||
# Silicon. | ||
# The affected tests currently are: H1BasisEvaluation and | ||
# SD_H1BasisEvaluation. | ||
# For the time being, disable building with OpenMP in CI on Apple | ||
# Silicon. | ||
# OpenMP is also needed as a transitional build dependency of the | ||
# SuiteSparse package from Homebrew. | ||
# FIXME: Consider building with OpenMP again when this (potentially | ||
# upstream) issue has been fixed. | ||
include: | ||
- os: macos-13 | ||
openmp: with | ||
|
||
steps: | ||
- name: get CPU information | ||
|
@@ -49,34 +65,40 @@ jobs: | |
brew install --overwrite [email protected] [email protected] | ||
brew reinstall gcc | ||
brew install \ | ||
cmake libomp openblas open-mpi suitesparse \ | ||
cmake openblas open-mpi \ | ||
${{ matrix.openmp == 'with' && 'libomp suitesparse' || '' }} \ | ||
qwt vtk opencascade | ||
echo "HOMEBREW_PREFIX=$(brew --prefix)" >> $GITHUB_ENV | ||
- name: configure | ||
env: | ||
LDFLAGS: -L${{ env.HOMEBREW_PREFIX }}/opt/libomp/lib -lomp | ||
LDFLAGS: ${{ matrix.openmp == 'with' && format('-L{0}/opt/libomp/lib -lomp', env.HOMEBREW_PREFIX) || '' }} | ||
# The tests `SD_H1BasisEvaluation` and `SD_LinearFormsAssembly` are | ||
# failing on macos-13 (Intel CPU) at optimization level `-O3`. | ||
# They are passing if ElmerFEM is built with optimization level `-O2`. | ||
run: | | ||
mkdir ${GITHUB_WORKSPACE}/build | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake \ | ||
-DCMAKE_BUILD_TYPE="Release" \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.os == 'macos-13' && 'RelWithDebInfo' || 'Release' }} \ | ||
-DCMAKE_C_COMPILER=clang \ | ||
-DCMAKE_CXX_COMPILER=clang++ \ | ||
-DCMAKE_Fortran_COMPILER=gfortran \ | ||
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/usr" \ | ||
-DBLA_VENDOR="OpenBLAS" \ | ||
-DCMAKE_PREFIX_PATH="${HOMEBREW_PREFIX}/opt/libomp;${HOMEBREW_PREFIX}/opt/openblas;${HOMEBREW_PREFIX}/opt/qt;${HOMEBREW_PREFIX}/opt/qwt" \ | ||
-DWITH_OpenMP=ON \ | ||
-DOpenMP_C_FLAGS="-Xclang -fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include" \ | ||
-DOpenMP_CXX_FLAGS="-Xclang -fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include" \ | ||
-DOpenMP_Fortran_FLAGS="-fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include" \ | ||
-DCMAKE_PREFIX_PATH="$( [ "${{ matrix.openmp }}" == "with" ] && echo "${HOMEBREW_PREFIX}/opt/libomp;")${HOMEBREW_PREFIX}/opt/openblas;${HOMEBREW_PREFIX}/opt/qt;${HOMEBREW_PREFIX}/opt/qwt" \ | ||
${{ matrix.openmp == 'with' | ||
&& '-DWITH_OpenMP=ON \ | ||
-DOpenMP_C_FLAGS="-Xclang -fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include" \ | ||
-DOpenMP_CXX_FLAGS="-Xclang -fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include" \ | ||
-DOpenMP_Fortran_FLAGS="-fopenmp -I${HOMEBREW_PREFIX}/opt/libomp/include"' | ||
|| '-DWITH_OpenMP=OFF' }} \ | ||
-DWITH_LUA=ON \ | ||
-DWITH_MPI=ON \ | ||
-DMPI_TEST_MAXPROC=2 \ | ||
-DWITH_Zoltan=OFF \ | ||
-DWITH_Mumps=OFF \ | ||
-DWITH_CHOLMOD=ON \ | ||
-DWITH_CHOLMOD=${{ matrix.openmp == 'with' && 'ON' || 'OFF' }} \ | ||
-DWITH_ElmerIce=ON \ | ||
-DWITH_ELMERGUI=ON \ | ||
-DWITH_QT6=ON \ | ||
|
@@ -132,12 +154,18 @@ jobs: | |
echo ---- Files ---- | ||
ls -Rl ${test_root}/${test} | ||
if [ -f ${test_root}/${test}/test-stderr*.log ]; then | ||
echo ---- Content of test-stderr*.log ---- | ||
cat ${test_root}/${test}/test-stderr*.log | ||
err_logs=($(ls ${test_root}/${test}/test-stderr*.log)) | ||
for err_log in "${err_logs[@]}"; do | ||
echo ---- Content of ${err_log} ---- | ||
cat ${err_log} | ||
done | ||
fi | ||
if [ -f ${test_root}/${test}/test-stdout*.log ]; then | ||
echo ---- Content of test-stdout*.log ---- | ||
cat ${test_root}/${test}/test-stdout*.log | ||
out_logs=($(ls ${test_root}/${test}/test-stdout*.log)) | ||
for out_log in "${out_logs[@]}"; do | ||
echo ---- Content of ${out_log} ---- | ||
cat ${out_log} | ||
done | ||
fi | ||
echo "::endgroup::" | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.