Index: /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 11912)
+++ /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 11912)
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+STEP=2
+
+if [ $STEP -eq 1 ]; then
+	# Adapted from petsc 3.2. 
+	# Used Mercurial to get code
+	hg clone http://petsc.cs.iit.edu/petsc/petsc-dev src
+	cd src
+	hg clone http://petsc.cs.iit.edu/petsc/BuildSystem config/BuildSystem
+fi
+
+# To update (via Mercurial):
+#      cd petsc-dev
+#      hg pull -u
+#      cd config/BuildSystem
+#      hg pull -u
+
+
+# configure script
+# Note: using metis from externalpackages did not work...
+# for now downloading new metis
+#   -then rename metis in externalpackages to metis2
+
+
+if [ $STEP -eq 2 ]; then
+	cd src
+	./config/configure.py \
+	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+	--with-mpi-dir="$ISSM_TIER/externalpackages/mpich2/install" \
+	--with-clanguage=C++ \
+	--PETSC_ARCH=linux-gnu-amd64 \
+	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
+	--with-debugging=0 \
+	--with-shared-libraries=0 \
+	--download-metis=yes \
+	--download-mumps=yes \
+	--download-scalapack=yes \
+	--download-blacs=yes \
+	--download-blas=yes \
+	--download-f-blas-lapack=yes \
+	--download-plapack=yes \
+	--download-parmetis=yes \
+	--with-pic=1
+
+	#Compile petsc and install it
+	make
+	make install
+fi
