diff --git a/config/setupMPI.cmake b/config/setupMPI.cmake index 4e9bf3df76..bfe65d2d7f 100644 --- a/config/setupMPI.cmake +++ b/config/setupMPI.cmake @@ -252,7 +252,9 @@ macro( setupOpenMPI ) # - Adding '--debug-daemons' is often requested by the OpenMPI dev team in conjunction with # 'export OMPI_MCA_btl_base_verbose=100' to obtain debug traces from openmpi. set(MPIEXEC_PREFLAGS_PERFBENCH "${MPIEXEC_PREFLAGS} --map-by socket:SPAN") - string(APPEND MPIEXEC_PREFLAGS " -bind-to none") + if(NOT MPIEXEC_PREFLAGS MATCHES " -bind-to none") + string(APPEND MPIEXEC_PREFLAGS " -bind-to none") + endif() # Setup for OMP plus MPI if( NOT APPLE ) # -bind-to fails on OSX, See #691