Skip to content

Commit

Permalink
Build with MPI support only if explicitly requested.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaklin committed Aug 12, 2022
1 parent e687ee6 commit c5ef9a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

### MPI
find_package(MPI)
if (MPI_FOUND)
if (CMAKE_ENABLE_MPI_SUPPORT)
find_package(MPI REQUIRED)
set(MSWEEP_MPI_SUPPORT 1)
include_directories(MPI_C_INCLUDE_DIRS)
if (CMAKE_MPI_MAX_PROCESSES)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mSWEEP with the following commands (example case for Open MPI):
> mkdir build
> cd build
> module load mpi/openmpi
> cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx ..
> cmake -DCMAKE_ENABLE_MPI_SUPPORT=1 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx ..
> make
```

Expand Down
3 changes: 2 additions & 1 deletion config/CMakeLists-rcgpar.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ include(ExternalProject)

ExternalProject_Add(rcgpar-download
GIT_REPOSITORY https://github.com/tmaklin/rcgpar
GIT_TAG v1.0.1
GIT_TAG v1.0.2
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/rcgpar"
BUILD_IN_SOURCE 0
BUILD_COMMAND ""
CMAKE_ARGS -D CMAKE_ENABLE_MPI_SUPPORT=${MSWEEP_MPI_SUPPORT}
INSTALL_COMMAND ""
TEST_COMMAND ""
UPDATE_COMMAND ""
Expand Down

0 comments on commit c5ef9a9

Please sign in to comment.