Only use MPI if explicitly enabled

Running with MPI on a regular workstation will probably not increase
performance, so this should be disabled as default.
This commit is contained in:
Roland Kaufmann
2013-03-15 09:47:53 +01:00
parent edd6b15497
commit 4fb05162cb

View File

@@ -97,8 +97,13 @@ include (UseOptimization)
# dependencies, in case they alter the list of warnings
include (UseWarnings)
# parallel computing must be explicitly enabled
option (USE_MPI "Use Message Passing Interface for parallel computing" OFF)
if (NOT USE_MPI)
set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE)
endif (NOT USE_MPI)
### --- begin opm-core specific --- ###
# parallel programming
include (UseOpenMP)
find_openmp (${project})
### --- end opm-core specific --- ###