diff --git a/configure b/configure
index 71ff09bff618a95464435628f077fb9b2a1c8e7e..90f23c6440cb6ad5bbaaf76ca13c4b8696bbbb07 100755
--- a/configure
+++ b/configure
@@ -120,6 +120,7 @@ with_boost_program_options
 with_boost_iostreams
 with_blas
 with_lapack
+with_mpi
 with_suitesparse
 with_petsc
 with_eigen
@@ -509,6 +510,9 @@ do
       mpivendor)
       conf_options="$conf_options -DMPI_VENDOR=$ac_optarg"
       ;;
+      mpi)
+      conf_options="$conf_options -DMPI_ROOT=$ac_optarg"
+      ;;
       vcdevel)
       conf_options="$conf_options -DVc_ROOT=$ac_optarg"
       ;;
diff --git a/script/set_mpi b/script/set_mpi
index ef06cede4b23f3ebeba4546bff627ce039d175bf..dd041fd12b9c446ae6918d1cdbe1a2c867b999be 100755
--- a/script/set_mpi
+++ b/script/set_mpi
@@ -19,7 +19,7 @@ function set_mpi()
         fi
         MPI_installed=1
         export PATH="$1/MPI/bin:$PATH"
-        configure_options="$configure_options --with-mpivendor=openmpi"
+        configure_options="$configure_options --with-mpivendor=openmpi --with-mpi=$1/MPI"
   fi
 
 }