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
27 changes: 21 additions & 6 deletions .github/actions/alf_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@ runs:
using: "composite"
steps:
- name: macOS Toolchain install

if: runner.os == 'macOS'
shell: bash
run: |
brew update
brew install gcc cmake open-mpi
brew install mpich
gcc_version=$(brew list --versions gcc | grep -o '[0-9]\+' | head -1)
bindir=$(brew --prefix)/bin
ln -fs ${bindir}/gfortran-${gcc_version} /usr/local/bin/gfortran
ln -fs ${bindir}/gcc-${gcc_version} /usr/local/bin/gcc
ln -fs ${bindir}/g++-${gcc_version} /usr/local/bin/g++

- name: Build & Test
- name: Get number of processors
shell: bash
run: |
if [[ $(uname) == "Darwin" ]]; then
NPROC=$(sysctl -n hw.ncpu)
else
NPROC=$(nproc)
fi
echo "There are $NPROC processors available."

- name: Build & Test
shell: bash
env:
ARGS: ${{ inputs.args }}
OMPI_ALLOW_RUN_AS_ROOT: 1 # needed for mpi runnig as root, needed by github runner
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
run: |
. ./configure.sh $ARGS
echo $ALF_FC
Expand All @@ -42,14 +48,23 @@ runs:
if echo "$MODE" | grep -iq -e "serial" -e "noMPI"; then
"$ALF_DIR/Prog/ALF.out"
else
mpiexec -n 2 "$ALF_DIR/Prog/ALF.out" # only 2 cores available in githubs runners
MPI_OPTS="-n 4"
if mpiexec --version | grep -iq -e 'Open MPI' -e 'OpenRTE'; then MPI_OPTS="$MPI_OPTS --use-hwthread-cpus"; fi
mpiexec $MPI_OPTS "$ALF_DIR/Prog/ALF.out"
fi
if echo "$MODE" | grep -iq -e "TEMPERING" -e "PARALLEL_PARAMS"; then cd Temp_0; fi
if echo "$CONFIG_ARGS" | grep -iq "HDF5"; then
"$ALF_DIR/Analysis/ana_hdf5.out"
else
"$ALF_DIR/Analysis/ana.out" *
fi

- name: Run unit tests
shell: bash
env:
ARGS: ${{ inputs.args }}
run: |
. ./configure.sh $ARGS
mkdir -p "$ALF_DIR/testsuite/tests"
cd "$ALF_DIR/testsuite/tests"
if echo "$ALF_FC" | grep -q "mpiifort -fc=ifx"; then exit 0; fi
Expand Down
97 changes: 16 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,97 +116,33 @@ jobs:
# Linux tests
# ======================

test_linux_gnu:
name: ${{ matrix.image_minor }} · ${{ matrix.mode }} · ${{ matrix.devel }} · ${{ matrix.config }}
test_linux:
name: ${{ matrix.image_minor[0] }} · ${{ matrix.mode }} · ${{ matrix.devel }} · ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image_minor: [bullseye, bookworm, trixie]
image_minor:
- [bullseye, GNU]
- [bookworm, GNU]
- [trixie, GNU]
- [bullseye-openblas, GNU]
# - [tumbleweed, GNU]
- [bullseye-pgi-21-03, PGI]
- [bookworm-pgi-24-09, PGI]
- [bullseye-intel, INTEL]
- [bookworm-intel-2024.2, INTEL]
- [bookworm-intel, INTELLLVM]
mode: [noMPI, MPI, TEMPERING, PARALLEL_PARAMS]
devel: ["", "Devel"]
config: ["", "HDF5"]
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/${{ matrix.image_minor }}
options: --user 0
image: ghcr.io/alf-qmc/alf-container/alf-requirements/${{ matrix.image_minor[0] }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
with:
args: GNU ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}

test_linux_gnu_openblas:
name: bullseye-openblas · ${{ matrix.devel }} · ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
devel: ["", "Devel"]
config: ["", "HDF5"]
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/bullseye-openblas
options: --user 0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
with:
args: GNU ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}

test_linux_pgi:
name: bullseye-pgi-21-03 · ${{ matrix.mode }} · ${{ matrix.devel }} · ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mode: [noMPI, MPI, TEMPERING, PARALLEL_PARAMS]
devel: ["", "Devel"]
config: ["", "HDF5"]
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/bullseye-pgi-21-03
options: --user 0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
with:
with:
args: PGI ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}

test_linux_intel:
name: ${{ matrix.image_minor }} · ${{ matrix.mode }} · ${{ matrix.devel }} · ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image_minor: [bullseye-intel, bookworm-intel-2024.2]
mode: [noMPI, MPI, TEMPERING, PARALLEL_PARAMS]
devel: ["", "Devel"]
config: ["", "HDF5"]
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/${{ matrix.image_minor }}
options: --user 0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
with:
args: INTEL ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}

test_linux_intelllvm:
name: bookworm-intel · ${{ matrix.mode }} · ${{ matrix.devel }} · ${{ matrix.config }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mode: [noMPI, MPI, TEMPERING, PARALLEL_PARAMS]
devel: ["", "Devel"]
config: ["", "HDF5"]
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/bookworm-intel
options: --user 0
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
with:
args: INTELLLVM ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}
args: ${{ matrix.image_minor[1] }} ${{ matrix.mode }} ${{ matrix.devel }} ${{ matrix.config }}

test_macos:
name: macOS · ${{ matrix.mode }} · ${{ matrix.devel }}
Expand All @@ -216,6 +152,7 @@ jobs:
matrix:
mode: [noMPI, MPI, TEMPERING, PARALLEL_PARAMS]
devel: ["", "Devel"]
config: [""] # TODO: Enable fast access to HDF5 on macOS runners
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/alf_test
Expand All @@ -230,13 +167,11 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/alf-qmc/alf-container/alf-requirements/bullseye
options: --user 0
steps:
- uses: actions/checkout@v4
- name: Run Valgrind
shell: bash
run: |
apt-get update && apt-get install -y valgrind
. ./configure.sh GNU devel serial
gfortran -v
make lib
Expand Down