From 04e27e85b2da356295704665f2cd02184e2b0b20 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Tue, 3 Dec 2019 18:40:15 +0200 Subject: [PATCH] Removed MPI from the core library dependencies: instead one should use the appropriate mpi compiler for compiling host code by passing something like -DCMAKE_C_COMPILER=/appl/opt/openmpi/3.1.3-cuda/gcc/7.3.0/bin/mpicc -DCMAKE_CXX_COMPILER=/appl/opt/openmpi/3.1.3-cuda/gcc/7.3.0/bin/mpicxx to cmake --- src/core/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 28384f7..d81af8f 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -40,19 +40,14 @@ elseif (CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG") endif() if (MPI_ENABLED) - find_package(MPI REQUIRED) - add_definitions(-DAC_MPI_ENABLED=1) - cuda_include_directories(${MPI_CXX_INCLUDE_PATH}) - - add_definitions(-DAC_DEFAULT_CONFIG="${CMAKE_SOURCE_DIR}/config/astaroth.conf") # Hack, cmake doesnt propagate properly from utils. Probably because utils is compiled after core endif () ## Create and link the library #set(CMAKE_POSITION_INDEPENDENT_CODE ON) # fpic for shared libraries cuda_add_library(astaroth_core STATIC astaroth.cc node.cc device.cc kernels/boundconds.cu kernels/integration.cu kernels/reductions.cu) target_include_directories(astaroth_core PRIVATE . ${CUDA_INCLUDE_DIRS}) -target_link_libraries(astaroth_core ${CUDA_LIBRARIES} m) +target_link_libraries(astaroth_core m ${CUDA_LIBRARIES}) target_compile_definitions(astaroth_core PRIVATE AC_USE_CUDA_RUNTIME_API) add_dependencies(astaroth_core dsl_headers) @@ -62,5 +57,5 @@ if (MULTIGPU_ENABLED) endif () if (MPI_ENABLED) - target_link_libraries(astaroth_core ${MPI_CXX_LIBRARIES} astaroth_utils) + target_link_libraries(astaroth_core astaroth_utils) endif ()