diff --git a/script/pre_req b/script/pre_req index f98b9d183ee10543fa8744a16cec5bf7836843f9..42347be5f94723c7857fdad7d7af526defc2679b 100755 --- a/script/pre_req +++ b/script/pre_req @@ -175,6 +175,7 @@ if [ -d "$i_dir/MPI" ]; then export PATH="$i_dir/MPI/bin:$PATH" fi +is_mpi_openmpi=0 MPI_valid=no if haveProg mpirun; then @@ -188,6 +189,7 @@ if haveProg mpirun; then if [ x"$version" == x"openmpi" ]; then + is_mpi_openmpi=1 # Check if we are compiling with GPU support if [ x"$gpu_support" == x"1" ]; then diff --git a/script/set_mpi b/script/set_mpi index 4d93c5ba0404803914c0c93c51f9079741c65255..e909da50f0e63fcf77ab130dea5214dc3a8f790d 100755 --- a/script/set_mpi +++ b/script/set_mpi @@ -3,7 +3,11 @@ function set_mpi() { if [ x"$MPI_valid" == x"yes" ]; then - configure_options="$configure_options CXX=mpic++ " + if [ is_mpi_openmpi -eq 1 ]; then + configure_options="$configure_options CXX=mpic++ --mpivendor=openmpi" + else + configure_options="$configure_options CXX=mpic++ " + fi else if [ $call_test_working_mpi_options -eq 1 ]; then test_working_mpi_options