Skip to content

Commit

Permalink
Merge: Update MPI wrapper, add more tests and CI jobs
Browse files Browse the repository at this point in the history
This PR updates and enhances the MPI wrapper, specifically adding more tests, adding non-blocking variants for existing blocking functions. The following one-sided functions were also additionally (and their non-blocking variants) added:
1. Accumulate
2. Get_accumulate
3. Fetch_and_op
Additionally, MPI compilation and tests were added to more CI jobs. gtest-mpi-listener was moved to `mpi/tests/` and is now always compiled when MPI and tests are enabled.
  • Loading branch information
pratikvn authored Jan 10, 2022
2 parents bec82bd + 00fe9a8 commit 388e91f
Show file tree
Hide file tree
Showing 7 changed files with 1,343 additions and 231 deletions.
15 changes: 11 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ build/cuda101/nompi/clang/all/release/static:
CUDA_ARCH: 35

# clang-cuda with cuda 10.1 and friends
build/clang-cuda101/nompi/gcc/cuda/release/shared:
build/clang-cuda101/openmpi/gcc/cuda/release/shared:
<<: *default_build
extends:
- .quick_test_condition
Expand All @@ -392,6 +392,8 @@ build/clang-cuda101/nompi/gcc/cuda/release/shared:
CUDA_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_MPI: "ON"
MPI_AS_ROOT: "ON"
BUILD_HIP: "OFF"
BUILD_TYPE: "Release"
CUDA_ARCH: 35
Expand Down Expand Up @@ -465,7 +467,7 @@ build/cuda102/nompi/intel/cuda/debug/static:
CUDA_ARCH: 35

# cuda 11.0 and friends
build/cuda110/nompi/gcc/cuda/debug/shared:
build/cuda110/mvapich2/gcc/cuda/debug/shared:
<<: *default_build_with_test
extends:
- .full_test_condition
Expand All @@ -474,6 +476,7 @@ build/cuda110/nompi/gcc/cuda/debug/shared:
<<: *default_variables
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_MPI: "ON"
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"
CUDA_ARCH: 61
Expand Down Expand Up @@ -541,7 +544,7 @@ build/amd/nompi/gcc/hip/debug/shared:
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"

build/amd/nompi/clang/hip/release/static:
build/amd/openmpi/clang/hip/release/static:
<<: *default_build_with_test
extends:
- .quick_test_condition
Expand All @@ -552,6 +555,8 @@ build/amd/nompi/clang/hip/release/static:
CXX_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_HIP: "ON"
MPI_AS_ROOT: "ON"
BUILD_MPI: "ON"
BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "OFF"

Expand Down Expand Up @@ -614,7 +619,7 @@ build/nocuda/nompi/gcc/omp/release/shared:
BUILD_OMP: "ON"
BUILD_TYPE: "Release"

build/nocuda/nompi/clang/omp/debug/static:
build/nocuda/openmpi/clang/omp/debug/static:
<<: *default_build_with_test
extends:
- .full_test_condition
Expand All @@ -624,6 +629,8 @@ build/nocuda/nompi/clang/omp/debug/static:
C_COMPILER: "clang"
CXX_COMPILER: "clang++"
BUILD_OMP: "ON"
MPI_AS_ROOT: "ON"
BUILD_MPI: "ON"
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"
BUILD_SHARED_LIBS: "OFF"
Expand Down
2 changes: 1 addition & 1 deletion cmake/create_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function(ginkgo_create_mpi_test test_name num_mpi_procs)
else()
set(OPENMPI_RUN_AS_ROOT_FLAG "")
endif()
target_link_libraries(${TEST_TARGET_NAME} PRIVATE ginkgo GTest::MPI_main GTest::GTest ${ARGN})
target_link_libraries(${TEST_TARGET_NAME} PRIVATE ginkgo gtest_mpi_main GTest::GTest ${ARGN})
target_link_libraries(${TEST_TARGET_NAME} PRIVATE MPI::MPI_CXX)
set(test_param ${MPIEXEC_NUMPROC_FLAG} ${num_mpi_procs} ${OPENMPI_RUN_AS_ROOT_FLAG} ${CMAKE_BINARY_DIR}/${REL_BINARY_DIR}/${test_name})
add_test(NAME ${REL_BINARY_DIR}/${test_name}
Expand Down
6 changes: 6 additions & 0 deletions core/test/mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
add_library(gtest_mpi_main "")
target_sources(gtest_mpi_main
PRIVATE
gtest/mpi_listener.cpp)
find_package(MPI REQUIRED)
target_link_libraries(gtest_mpi_main PRIVATE GTest::GTest MPI::MPI_CXX)
add_subdirectory(base)
Loading

0 comments on commit 388e91f

Please sign in to comment.