Index: /issm/trunk-jpl/etc/environment.sh
===================================================================
--- /issm/trunk-jpl/etc/environment.sh	(revision 24636)
+++ /issm/trunk-jpl/etc/environment.sh	(revision 24637)
@@ -187,4 +187,5 @@
 if [ -d "${MPI_DIR}" ]; then
 	export MPI_DIR
+	export MPI_HOME=${MPI_DIR} # Needed by Dakota
 	export MPI_INC_DIR="$MPI_DIR/include"
 	path_prepend "${MPI_DIR}/bin"
@@ -202,4 +203,5 @@
 		MPI_DIR=${PETSC_DIR}
 		export MPI_DIR
+		export MPI_HOME=${MPI_DIR} # Needed by Dakota
 		export MPI_INC_DIR="${MPI_DIR}/include"
 		path_prepend "${MPI_DIR}/bin"
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.11-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.11-linux.sh	(revision 24636)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.11-linux.sh	(revision 24637)
@@ -11,5 +11,5 @@
 
 # Unpack source
-tar -zxvf  petsc-$VER.tar.gz
+tar -zxvf petsc-${VER}.tar.gz
 
 # Cleanup
@@ -18,6 +18,6 @@
 
 # Move source to 'src' directory
-mv petsc-$VER/* src/
-rm -rf petsc-$VER
+mv petsc-${VER}/* src/
+rm -rf petsc-${VER}
 
 # Configure
@@ -26,15 +26,11 @@
 	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
 	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
-	--with-mpi-dir="${ISSM_DIR}/externalpackages/mpich/install" \
-	--with-blas-lib="-L${ISSM_DIR}/externalpackages/lapack/install/lib -lblas" \
-	--with-lapack-lib="-L${ISSM_DIR}/externalpackages/lapack/install/lib -llapack" \
 	--with-debugging=0 \
 	--with-valgrind=0 \
 	--with-x=0 \
 	--with-ssl=0 \
-	--with-shared-libraries=1 \
-	--download-zlib=1 \
-	--download-hdf5=1 \
-	--download-netcdf=1 \
+	--with-pic=1 \
+	--download-fblaslapack=1 \
+	--download-mpich=1 \
 	--download-metis=1 \
 	--download-parmetis=1 \
@@ -43,12 +39,4 @@
 
 # Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
+make
+make install
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.11-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.11-mac.sh	(revision 24637)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.11-mac.sh	(revision 24637)
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="3.11.3"
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf petsc-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv petsc-${VER}/* src/
+rm -rf petsc-${VER}
+
+# Configure
+cd src
+./config/configure.py \
+	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
+	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
+	--with-debugging=0 \
+	--with-valgrind=0 \
+	--with-x=0 \
+	--with-ssl=0 \
+	--with-pic=1 \
+	--download-fblaslapack=1 \
+	--download-mpich=1 \
+	--download-metis=1 \
+	--download-parmetis=1 \
+	--download-scalapack=1 \
+	--download-mumps=1
+
+# Compile and install
+make
+make install
Index: sm/trunk-jpl/externalpackages/petsc/install-3.11-macOS.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.11-macOS.sh	(revision 24636)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-## Constants
-#
-VER="3.11.3"
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
-
-# Unpack source
-tar -zxvf  petsc-$VER.tar.gz
-
-# Cleanup
-rm -rf install src
-mkdir install src
-
-# Move source to 'src' directory
-mv petsc-$VER/* src/
-rm -rf petsc-$VER
-
-# Configure
-cd src
-./config/configure.py \
-	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
-	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
-	--with-mpi-dir="${ISSM_DIR}/externalpackages/mpich/install" \
-	--with-blas-lib="-L${ISSM_DIR}/externalpackages/lapack/install/lib -lblas" \
-	--with-lapack-lib="-L${ISSM_DIR}/externalpackages/lapack/install/lib -llapack" \
-	--with-debugging=0 \
-	--with-valgrind=0 \
-	--with-x=0 \
-	--with-ssl=0 \
-	--with-shared-libraries=1 \
-	--download-zlib=1\
-	--download-hdf5=1 \
-	--download-netcdf=1 \
-	--download-metis=1 \
-	--download-parmetis=1 \
-	--download-scalapack=1 \
-	--download-mumps=1
-
-# Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux-static.sh	(revision 24636)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux-static.sh	(revision 24637)
@@ -7,12 +7,9 @@
 VER="3.12.3"
 
-## Environment
-#
-
 # Download source
 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
-tar -zxvf  petsc-${VER}.tar.gz
+tar -zxvf petsc-${VER}.tar.gz
 
 # Cleanup
@@ -40,12 +37,12 @@
 	--CXXFLAGS="-fPIC" \
 	--FFLAGS="-fPIC" \
-	--COPTFLAGS="-O3" \
-	--CXXOPTFLAGS="-O3" \
-	--FOPTFLAGS="-O3" \
+	--COPTFLAGS="-O2" \
+	--CXXOPTFLAGS="-O2" \
+	--FOPTFLAGS="-O2" \
 	--with-debugging=0 \
 	--with-valgrind=0 \
 	--with-x=0 \
 	--with-ssl=0 \
-	--download-f2cblaslapack=1 \
+	--download-fblaslapack=1 \
 	--download-mpich=1 \
 	--download-metis=1 \
@@ -55,9 +52,4 @@
 
 # Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
+make
+make install
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux.sh	(revision 24636)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.12-linux.sh	(revision 24637)
@@ -7,12 +7,9 @@
 VER="3.12.3"
 
-## Environment
-#
-
 # Download source
 $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
-tar -zxvf  petsc-${VER}.tar.gz
+tar -zxvf petsc-${VER}.tar.gz
 
 # Cleanup
@@ -29,7 +26,7 @@
 	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
 	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
-	--COPTFLAGS="-O3" \
-	--CXXOPTFLAGS="-O3" \
-	--FOPTFLAGS="-O3" \
+	--COPTFLAGS="-O2" \
+	--CXXOPTFLAGS="-O2" \
+	--FOPTFLAGS="-O2" \
 	--with-debugging=0 \
 	--with-valgrind=0 \
@@ -37,5 +34,5 @@
 	--with-ssl=0 \
 	--with-pic=1 \
-	--download-f2cblaslapack=1 \
+	--download-fblaslapack=1 \
 	--download-mpich=1 \
 	--download-metis=1 \
@@ -45,9 +42,4 @@
 
 # Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
+make
+make install
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.12-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.12-mac.sh	(revision 24637)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.12-mac.sh	(revision 24637)
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="3.12.3"
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf petsc-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv petsc-${VER}/* src/
+rm -rf petsc-${VER}
+
+# Configure
+cd src
+./config/configure.py \
+	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
+	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
+	--COPTFLAGS="-O2" \
+	--CXXOPTFLAGS="-O2" \
+	--FOPTFLAGS="-O2" \
+	--with-debugging=0 \
+	--with-valgrind=0 \
+	--with-x=0 \
+	--with-ssl=0 \
+	--with-pic=1 \
+	--download-fblaslapack=1 \
+	--download-mpich=1 \
+	--download-metis=1 \
+	--download-parmetis=1 \
+	--download-scalapack=1 \
+	--download-mumps=1
+
+# Compile and install
+make
+make install
Index: /issm/trunk-jpl/jenkins/macosx_pine-island
===================================================================
--- /issm/trunk-jpl/jenkins/macosx_pine-island	(revision 24636)
+++ /issm/trunk-jpl/jenkins/macosx_pine-island	(revision 24637)
@@ -4,5 +4,5 @@
 
 # MATLAB path
-MATLAB_PATH="/Applications/MATLAB_R2015b.app"
+MATLAB_PATH="/Applications/MATLAB_R2019b.app"
 
 # ISSM CONFIGURATION
@@ -11,7 +11,7 @@
 	--disable-static \
 	--with-matlab-dir=$MATLAB_PATH \
-	--with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
-	--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/mpich/install/lib -lmpi -lmpicxx -lmpifort" \
-	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/lapack/install \
+	--with-mpi-include=$ISSM_DIR/externalpackages/petsc/install/include \
+	--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
+	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
 	--with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \
 	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \
@@ -41,7 +41,5 @@
 	autotools	install.sh
 	cmake		install.sh
-	mpich		install-3.3.sh
-	lapack		install-3.8-mac.sh
-	petsc		install-3.7-mac.sh
+	petsc		install-3.12-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
