diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a371a..a5a514b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,11 @@ include_directories(src/common) # Common headers include_directories(${CMAKE_BINARY_DIR}) # DSL headers include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) # CUDA headers +if (MPI_ENABLED) + find_package(MPI REQUIRED) + include_directories(${MPI_CXX_INCLUDE_DIRS}) +endif() + ## Subdirectories add_subdirectory(src/utils) add_subdirectory(src/core/kernels) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7d93fd2..757cbfe 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -6,9 +6,10 @@ target_link_libraries(astaroth_core astaroth_utils astaroth_kernels CUDA::cudart ## Options if (MPI_ENABLED) - find_package(MPI) - find_package(OpenMP) - target_link_libraries(astaroth_core MPI::MPI_CXX OpenMP::OpenMP_CXX) + #find_package(MPI REQUIRED) + #find_package(OpenMP) + #target_link_libraries(astaroth_core MPI::MPI_CXX OpenMP::OpenMP_CXX) + target_link_libraries(astaroth_core MPI::MPI_CXX) endif() if (MULTIGPU_ENABLED)