Skip to content

Commit

Permalink
Review updates.
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Ribizel <ribizel@kit.edu>
Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
Co-authored-by: Aditya Kashi <aditya.kashi@kit.edu>
  • Loading branch information
4 people committed Nov 27, 2021
1 parent e913f55 commit 37b8a44
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 75 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ option(GINKGO_BUILD_BENCHMARKS "Build Ginkgo's benchmarks" ON)
option(GINKGO_BUILD_REFERENCE "Compile reference CPU kernels" ON)
option(GINKGO_BUILD_OMP "Compile OpenMP kernels for CPU" ${GINKGO_HAS_OMP})
option(GINKGO_BUILD_MPI "Compile the MPI module" ${GINKGO_HAS_MPI})
option(GINKGO_FORCE_GPU_AWARE_MPI "Force the GPU Aware functionality to be enabled" OFF)
option(GINKGO_BUILD_DPCPP
"Compile DPC++ kernels for Intel GPUs or other DPC++ enabled hardware" ${GINKGO_HAS_DPCPP})
option(GINKGO_BUILD_CUDA "Compile kernels for NVIDIA GPUs" ${GINKGO_HAS_CUDA})
Expand Down Expand Up @@ -191,15 +190,8 @@ else()
message(STATUS "HWLOC is being forcibly switched off")
endif()

set(GINKGO_HAVE_MPI 0)
set(GINKGO_HAVE_GPU_AWARE_MPI 0)
if(GINKGO_BUILD_MPI)
find_package(MPI REQUIRED)
set(GINKGO_HAVE_MPI 1)
set(GINKGO_HAVE_GPU_AWARE_MPI 0)
if(GINKGO_FORCE_GPU_AWARE_MPI)
set(GINKGO_HAVE_GPU_AWARE_MPI 1)
endif()
endif()

# We keep using NVCC/HCC for consistency with previous releases even if AMD
Expand Down
5 changes: 2 additions & 3 deletions cmake/GinkgoConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ set(GINKGO_DPCPP_FLAGS @GINKGO_DPCPP_FLAGS@)
set(GINKGO_MKL_ROOT @GINKGO_MKL_ROOT@)
set(GINKGO_DPL_ROOT @GINKGO_DPL_ROOT@)

set(GINKGO_HAVE_MPI @GINKGO_HAVE_MPI@)
set(GINKGO_HAVE_CUDA_AWARE_MPI @GINKGO_HAVE_CUDA_AWARE_MPI@)
set(GINKGO_BUILD_MPI @GINKGO_BUILD_MPI@)

set(GINKGO_HAVE_PAPI_SDE @GINKGO_HAVE_PAPI_SDE@)

Expand Down Expand Up @@ -155,7 +154,7 @@ if(GINKGO_HAVE_HWLOC)
endif()

# Check for MPI if it is enabled
if(GINKGO_HAVE_MPI)
if(GINKGO_BUILD_MPI)
find_package(MPI REQUIRED)
endif()

Expand Down
2 changes: 0 additions & 2 deletions core/mpi/get_info.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ginkgo_print_module_header(${detailed_log} "MPI")
ginkgo_print_variable(${detailed_log} "GINKGO_FORCE_CUDA_AWARE_MPI")
ginkgo_print_variable(${detailed_log} "GKO_CUDA_AWARE_RUN_STATUS")
ginkgo_print_variable(${detailed_log} "MPI_C_COMPILER")
ginkgo_print_variable(${detailed_log} "MPI_CXX_COMPILER")
ginkgo_print_variable(${detailed_log} "MPI_CXX_COMPILE_OPTIONS")
Expand Down
3 changes: 2 additions & 1 deletion core/test/mpi/base/communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ TEST_F(Communicator, CommunicatorCanBeMoveConstructed)
TEST_F(Communicator, CommunicatorCanBeMoveAssigned)
{
gko::mpi::communicator comm2(MPI_COMM_WORLD);
gko::mpi::communicator copy = std::move(comm2);
gko::mpi::communicator copy(MPI_COMM_NULL);
copy = std::move(comm2);

EXPECT_TRUE(copy == comm);
}
Expand Down
8 changes: 1 addition & 7 deletions include/ginkgo/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/* Is MPI available ? */
// clang-format off
#define GKO_HAVE_MPI @GINKGO_HAVE_MPI@
// clang-format on


/* Is GPU-aware MPI available ? */
// clang-format off
#define GKO_HAVE_GPU_AWARE_MPI @GINKGO_HAVE_GPU_AWARE_MPI@
#cmakedefine01 GINKGO_BUILD_MPI
// clang-format on


Expand Down
Loading

0 comments on commit 37b8a44

Please sign in to comment.