diff --git a/script/install_MPI.sh b/script/install_MPI.sh
index 0753c5d20723f9c8baeb2fcc13f0c36379262633..cb90468ffeb4f2fecbbb42619c95e19e7e730340 100755
--- a/script/install_MPI.sh
+++ b/script/install_MPI.sh
@@ -21,10 +21,10 @@ if [ x"$3" == x"1" ]; then
    # Detect where is nvcc
    cuda_location=$(dirname $(dirname $(which nvcc)) )
 
-   ./configure $mpi_options --with-cuda=$cuda_location --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $8
+   ./configure --with-hwloc=internal --with-libevent=internal mpi_options --with-cuda=$cuda_location --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $8
 else
    echo "Installing MPI without GPU support"
-   ./configure $mpi_options --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $8
+   ./configure --with-hwloc=internal --with-libevent=internal $mpi_options --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $8
 fi
 make -j $2
 make install