Merge pull request #10417 from darrengarvey/fix-configure-enabling-mpi

configure: Fix default path when enabling MPI.
This commit is contained in:
Shanqing Cai 2017-06-06 12:18:03 -04:00 committed by GitHub
commit 2be64b38e4

4
configure vendored
View File

@ -802,11 +802,11 @@ while true; do
fromuser=""
if [ -z "$MPI_HOME" ]; then
#Get the base folder by removing the bin path
default_path=$(dirname $(dirname $(which mpirun)) || dirname $(dirname $(which mpiexec)) || true)
default_mpi_path=$(dirname $(dirname $(which mpirun)) || dirname $(dirname $(which mpiexec)) || true)
read -p "Please specify the MPI toolkit folder. [Default is $default_mpi_path]: " MPI_HOME
fromuser="1"
if [ -z "$MPI_HOME" ]; then
MPI_HOME=$default_path
MPI_HOME=$default_mpi_path
fi
fi