diff --git a/install b/install index 2e03cbfe087c0720386ed961a8b23987667540d8..fe9aff2ccd24f0ad031f9a87bfef8b786a3125d9 100755 --- a/install +++ b/install @@ -201,9 +201,6 @@ if [ -d "$i_dir/EIGEN" ]; then configure_options=" $configure_options --with-eigen=$i_dir/EIGEN " lin_alg_inc="$lin_alg_inc -I$i_dir/EIGEN" fi -if [ -d "$i_dir/MPI" ]; then - configure_options="$configure_options CXX=mpic++ " -fi if [ -d "$i_dir/METIS" ]; then configure_options=" $configure_options --with-metis=$i_dir/METIS " fi @@ -226,14 +223,6 @@ if [ x"$platform" = x"linux" ]; then lin_alg_lib="$lin_alg_lib -lrt" fi -### MPI - -if [ x"$MPI_valid" == x"yes" ]; then - configure_options="$configure_options CXX=mpic++ " -else - ./script/install_MPI.sh $i_dir $ncore -fi - ### MPI compilers must be in your PATH folder set_mpi $i_dir @@ -281,7 +270,7 @@ else fi ./script/install_MPI.sh $i_dir $ncore MPI_installed=1 - export PATH="$PATH:$i_dir/MPI/bin" + export PATH="$i_dir/MPI/bin:$PATH" configure_options="$configure_options CXX=mpic++ " elif [ $conf_err -eq 201 ]; then echo "Metis not found try to install" @@ -387,7 +376,7 @@ echo "" if [ -d "$i_dir/MPI" ]; then installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m $i_dir/MPI \033[0m\n" - bash_path="$bash_path:$i_dir/MPI/bin" + bash_path="$i_dir/MPI/bin:$bash_path" bash_library="$bash_library:$i_dir/MPI/lib" elif [ $MPI_System_prv -eq 1 ]; then installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m System installation \033[0m\n" diff --git a/script/set_mpi b/script/set_mpi index c0cd4d0b4362c766279324e453e859782b352b47..0bc7d554939d106cbf8dd82dd42141f504985f8d 100755 --- a/script/set_mpi +++ b/script/set_mpi @@ -2,15 +2,14 @@ function set_mpi() { - command -v mpirun >/dev/null 2>&1 - if [ $? -ne 0 ]; then - - ### Check for mpi installation - - if [ -d "$1/MPI" ]; then - echo "Setting MPI compilers to: $PATH:$1/MPI/bin" - export PATH="$PATH:$1/MPI/bin" - fi + if [ x"$MPI_valid" == x"yes" ]; then + configure_options="$configure_options CXX=mpic++ " + else + ./script/install_MPI.sh $i_dir $ncore + MPI_installed=1 + export PATH="$i_dir/MPI/bin:$PATH" + configure_options="$configure_options CXX=mpic++ " fi + }