Skip to content
Open
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
56 changes: 36 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [pull_request]

# This section cancels previous runs for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
#
Expand Down Expand Up @@ -211,13 +211,14 @@ jobs:
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
cd tests
pytest -v -s --h5diff

#
# Check linux build with mamba environment
#
#########################################################
linux-mpi-mamba:
needs: [pre-commit, cppcheck]
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

Expand All @@ -233,29 +234,33 @@ jobs:

- name: Mamba and samurai env installation
uses: mamba-org/setup-micromamba@v2
env:
MAMBA_ROOT_PREFIX: ${{ runner.temp }}/micromamba-root
with:
download-micromamba: true
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda/mpi-environment.yml
environment-name: samurai-env
cache-environment: true

# - name: Conda update
# shell: bash -l {0}
# run: |
# conda update --all
generate-run-shell: true
cache-environment: false
cache-downloads: false
post-cleanup: all

- name: Petsc installation
shell: bash -l {0}
shell: micromamba-shell {0}
env:
MAMBA_ROOT_PREFIX: ${{ runner.temp }}/micromamba-root
run: |
conda install -y petsc pkg-config cxx-compiler
micromamba install -y petsc pkg-config cxx-compiler

- name: Conda informations
shell: bash -l {0}
shell: micromamba-shell {0}
run: |
conda info
conda list
micromamba info
micromamba list

- name: Configure
shell: bash -l {0}
shell: micromamba-shell {0}
run: |
cmake \
. \
Expand All @@ -267,13 +272,12 @@ jobs:
-DBUILD_TESTS=ON

- name: Build
shell: bash -l {0}
shell: micromamba-shell {0}
run: |
cmake --build build --target finite-volume-advection-2d --parallel 4
cmake --build build --target finite-volume-burgers --parallel 4
cmake --build build --target finite-volume-advection-2d finite-volume-burgers finite-volume-burgers-os-2d-mpi --parallel 4

- name: MPI test finite-volume-advection-2d
shell: bash -l {0}
shell: micromamba-shell {0}
run: |
cd build
set -e # Stop on first failure
Expand All @@ -289,7 +293,7 @@ jobs:
python ../python/compare.py FV_advection_2d_size_1_ite_ FV_advection_2d_size_9_ite_ --start 1 --end 19

- name: MPI test finite-volume-burgers
shell: bash -l {0}
shell: micromamba-shell {0}
run: |
cd build
set -e # Stop on first failure
Expand All @@ -304,6 +308,18 @@ jobs:
python ../python/compare.py burgers_2D_size_1_ite_ burgers_2D_size_4_ite_ --start 1 --end 19
python ../python/compare.py burgers_2D_size_1_ite_ burgers_2D_size_6_ite_ --start 1 --end 19

- name: MPI test burgers OSMP 2D (weak scaling)
shell: micromamba-shell {0}
run: |
cd build
set -e # Stop on first failure
mpiexec -n 2 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=2 --npy=1 --min-level=0 --max-level=8 --Tf=6 --nfiles 1
mpiexec -n 2 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=2 --npy=1 --min-level=0 --max-level=8 --Tf=6 --nfiles 1
mpiexec -n 4 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=2 --npy=2 --min-level=0 --max-level=8 --Tf=6 --nfiles 1
mpiexec -n 8 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=4 --npy=2 --min-level=0 --max-level=8 --Tf=6 --nfiles 1
mpiexec -n 8 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=2 --npy=4 --min-level=0 --max-level=8 --Tf=6 --nfiles 1
mpiexec -n 9 ./demos/FiniteVolume/finite-volume-burgers-os-2d-mpi --npx=3 --npy=3 --min-level=0 --max-level=8 --Tf=6 --nfiles 1

macos-mamba:
needs: [pre-commit, cppcheck]
runs-on: macos-14
Expand Down
7 changes: 7 additions & 0 deletions demos/FiniteVolume/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ burgers_mra.cpp:finite-volume-burgers-mra
burgers_os.cpp:finite-volume-burgers-os
)

# List of MPI demos (only if WITH_MPI is enabled)
if(${WITH_MPI})
list(APPEND STANDARD_DEMOS
burgers_os_2d_mpi.cpp:finite-volume-burgers-os-2d-mpi
)
endif()

# Create executables with PETSc
if(${WITH_PETSC})
message(STATUS "Building demos with PETSc support")
Expand Down
Loading
Loading