diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a7181abc..590688d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/scripts/run_mpi.sh b/scripts/run_mpi.sh index e3b09a23..b2fd1979 100644 --- a/scripts/run_mpi.sh +++ b/scripts/run_mpi.sh @@ -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