Skip to content
Snippets Groups Projects
Commit 920ca1b0 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing MPI installation

parent 5b682d1c
No related branches found
No related tags found
No related merge requests found
...@@ -201,9 +201,6 @@ if [ -d "$i_dir/EIGEN" ]; then ...@@ -201,9 +201,6 @@ if [ -d "$i_dir/EIGEN" ]; then
configure_options=" $configure_options --with-eigen=$i_dir/EIGEN " configure_options=" $configure_options --with-eigen=$i_dir/EIGEN "
lin_alg_inc="$lin_alg_inc -I$i_dir/EIGEN" lin_alg_inc="$lin_alg_inc -I$i_dir/EIGEN"
fi fi
if [ -d "$i_dir/MPI" ]; then
configure_options="$configure_options CXX=mpic++ "
fi
if [ -d "$i_dir/METIS" ]; then if [ -d "$i_dir/METIS" ]; then
configure_options=" $configure_options --with-metis=$i_dir/METIS " configure_options=" $configure_options --with-metis=$i_dir/METIS "
fi fi
...@@ -226,14 +223,6 @@ if [ x"$platform" = x"linux" ]; then ...@@ -226,14 +223,6 @@ if [ x"$platform" = x"linux" ]; then
lin_alg_lib="$lin_alg_lib -lrt" lin_alg_lib="$lin_alg_lib -lrt"
fi 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 ### MPI compilers must be in your PATH folder
set_mpi $i_dir set_mpi $i_dir
...@@ -281,7 +270,7 @@ else ...@@ -281,7 +270,7 @@ else
fi fi
./script/install_MPI.sh $i_dir $ncore ./script/install_MPI.sh $i_dir $ncore
MPI_installed=1 MPI_installed=1
export PATH="$PATH:$i_dir/MPI/bin" export PATH="$i_dir/MPI/bin:$PATH"
configure_options="$configure_options CXX=mpic++ " configure_options="$configure_options CXX=mpic++ "
elif [ $conf_err -eq 201 ]; then elif [ $conf_err -eq 201 ]; then
echo "Metis not found try to install" echo "Metis not found try to install"
...@@ -387,7 +376,7 @@ echo "" ...@@ -387,7 +376,7 @@ echo ""
if [ -d "$i_dir/MPI" ]; then if [ -d "$i_dir/MPI" ]; then
installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m $i_dir/MPI \033[0m\n" 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" bash_library="$bash_library:$i_dir/MPI/lib"
elif [ $MPI_System_prv -eq 1 ]; then elif [ $MPI_System_prv -eq 1 ]; then
installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m System installation \033[0m\n" installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m System installation \033[0m\n"
......
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
function set_mpi() function set_mpi()
{ {
command -v mpirun >/dev/null 2>&1 if [ x"$MPI_valid" == x"yes" ]; then
if [ $? -ne 0 ]; then configure_options="$configure_options CXX=mpic++ "
else
### Check for mpi installation ./script/install_MPI.sh $i_dir $ncore
MPI_installed=1
if [ -d "$1/MPI" ]; then export PATH="$i_dir/MPI/bin:$PATH"
echo "Setting MPI compilers to: $PATH:$1/MPI/bin" configure_options="$configure_options CXX=mpic++ "
export PATH="$PATH:$1/MPI/bin"
fi
fi fi
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment