Skip to content

Commit

Permalink
Extend testing for MPI (run on 2, 3 and 4 processes) (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk authored Nov 1, 2024
1 parent 2e81dcb commit 0cfd881
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 9 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,21 @@ jobs:
env:
CC: gcc-13
CXX: g++-13
- name: Run func tests (MPI)
- name: Run func tests (MPI, num_proc=2)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 2
- name: Run func tests (MPI, num_proc=3)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 3
- name: Run func tests (MPI, num_proc=4)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 4
- name: Run func tests (threads, num_threads=1)
run: source scripts/run_threads.sh
env:
Expand Down Expand Up @@ -133,9 +145,21 @@ jobs:
env:
CC: clang-18
CXX: clang++-18
- name: Run tests (MPI)
- name: Run func tests (MPI, num_proc=2)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 2
- name: Run func tests (MPI, num_proc=3)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 3
- name: Run func tests (MPI, num_proc=4)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 4
- name: Run tests (threads, num_threads=1)
run: source scripts/run_threads.sh
env:
Expand Down Expand Up @@ -225,6 +249,8 @@ jobs:
run: |
export ASAN_RUN=1
source scripts/run_mpi.sh
env:
PROC_COUNT: 2
- name: Run tests (threads, num_threads=1)
run: source scripts/run_threads.sh
env:
Expand Down Expand Up @@ -314,9 +340,21 @@ jobs:
- name: Ninja build
run: |
cmake --build build
- name: Run tests (MPI)
- name: Run func tests (MPI, num_proc=2)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 2
- name: Run func tests (MPI, num_proc=3)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 3
- name: Run func tests (MPI, num_proc=4)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 4
- name: Run tests (threads, num_threads=1)
run: source scripts/run_threads.sh
env:
Expand Down Expand Up @@ -562,6 +600,8 @@ jobs:
- name: Run tests (MPI)
run: |
source scripts/run_mpi.sh
env:
PROC_COUNT: 2
- name: Run tests (threads, num_threads=1)
run: source scripts/run_threads.sh
env:
Expand Down
12 changes: 6 additions & 6 deletions scripts/run_mpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ fi

if [[ -z "$ASAN_RUN" ]]; then
if [[ $OSTYPE == "linux-gnu" ]]; then
mpirun --oversubscribe -np 4 ./build/bin/sample_mpi
mpirun --oversubscribe -np 4 ./build/bin/sample_mpi_boost
mpirun --oversubscribe -np 4 ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/sample_mpi_boost
mpirun --oversubscribe -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
elif [[ $OSTYPE == "darwin"* ]]; then
mpirun -np 2 ./build/bin/sample_mpi
mpirun -np 2 ./build/bin/sample_mpi_boost
mpirun -np 2 ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun -np $PROC_COUNT ./build/bin/sample_mpi
mpirun -np $PROC_COUNT ./build/bin/sample_mpi_boost
mpirun -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
fi
fi

0 comments on commit 0cfd881

Please sign in to comment.