From a84132d588d6edc4dad406a0fb4b080e141bc5e2 Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Tue, 6 Nov 2018 12:48:32 +0100
Subject: [PATCH] Fixing installation with cmake

---
 script/install_MPI.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/script/install_MPI.sh b/script/install_MPI.sh
index 583a881d..5a283b7a 100755
--- a/script/install_MPI.sh
+++ b/script/install_MPI.sh
@@ -26,7 +26,13 @@ cd openmpi-3.1.1
 #
 
 
-./configure --with-cuda --prefix=$1/MPI --enable-mpi-fortran=yes CC=$3 CXX=$4 F77=$5 FC=$5
+if [ x"$6" == x"1" ]; then
+   echo "Installing MPI with GPU support"
+  ./configure --with-cuda --prefix=$1/MPI --enable-mpi-fortran=yes CC=$3 CXX=$4 F77=$5 FC=$5
+else
+  echo "Installing MPI without GPU support"
+  ./configure --prefix=$1/MPI --enable-mpi-fortran=yes CC=$3 CXX=$4 F77=$5 FC=$5
+fi
 make -j $2
 make install
 
-- 
GitLab