Index: /issm/trunk/externalpackages/petsc/configs/altix64/configure.sh
===================================================================
--- /issm/trunk/externalpackages/petsc/configs/altix64/configure.sh	(revision 1519)
+++ /issm/trunk/externalpackages/petsc/configs/altix64/configure.sh	(revision 1519)
@@ -0,0 +1,5 @@
+#After Plapack is fixed
+./config/configure.py  --prefix=$PETSC_DIR --with-batch=1  --PETSC_ARCH=$PETSC_ARCH --PETSC_DIR=$PETSC_DIR  --with-debugging=no --with-shared=0 COPTFLAGS=-O3 FOPTFLAGS=-O3 --with-blas-lapack-dir=/opt/intel/mkl/9.1.023 --with-mpi-lib=/usr/lib/libmpi.so --with-mpi-include=/usr/include  --with-mpi-shared=0 --download-mumps=yes --download-scalapack=yes --download-blacs=yes  --with-plapack-dir=$PETSC_DIR/externalpackages/PLAPACKR32/$PETSC_ARCH --FFLAGS=-I/usr/include --with-cc=icc --with-fc=ifort
+
+#Before Plapack implodes
+#./config/configure.py  --prefix=$PETSC_DIR --with-batch=1  --PETSC_ARCH=$PETSC_ARCH --PETSC_DIR=$PETSC_DIR  --with-debugging=no --with-shared=0 COPTFLAGS=-O3 FOPTFLAGS=-O3 --with-blas-lapack-dir=/opt/intel/mkl/9.1.023 --with-mpi-lib=/usr/lib/libmpi.so --with-mpi-include=/usr/include  --with-mpi-shared=0 --download-mumps=yes --download-scalapack=yes --download-blacs=yes  --download-plapack=yes --FFLAGS=-I/usr/include --with-cc=icc --with-fc=ifort
Index: /issm/trunk/externalpackages/petsc/configs/linux64/configure.sh
===================================================================
--- /issm/trunk/externalpackages/petsc/configs/linux64/configure.sh	(revision 1519)
+++ /issm/trunk/externalpackages/petsc/configs/linux64/configure.sh	(revision 1519)
@@ -0,0 +1,3 @@
+#!/bin/bash
+./config/configure.py  --prefix="$ISSM_DIR/externalpackages/petsc/install" --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install --PETSC_ARCH=linux-gnu-amd64 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" --with-fc=gfortran --with-debugging=0 --with-shared=1 --download-mumps=yes --download-scalapack=yes --download-blacs=yes --download-blas=yes --download-f-blas-lapack=yes --FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include --download-plapack=yes
+
Index: /issm/trunk/externalpackages/petsc/configs/macosx32/configure.sh
===================================================================
--- /issm/trunk/externalpackages/petsc/configs/macosx32/configure.sh	(revision 1519)
+++ /issm/trunk/externalpackages/petsc/configs/macosx32/configure.sh	(revision 1519)
@@ -0,0 +1,2 @@
+#!/bin/bash
+./config/configure.py  --prefix="$ISSM_DIR/externalpackages/petsc/install" --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install --PETSC_ARCH=macosx-gnu --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" --with-fc=gfortran --with-debugging=0 --with-shared=0 --download-mumps=yes --download-scalapack=yes --download-blacs=yes --download-blas=yes --download-f-blas-lapack=yes --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -lmpich -lpmpich" --download-plapack=yes
Index: /issm/trunk/externalpackages/petsc/configs/winxp32/configure.sh
===================================================================
--- /issm/trunk/externalpackages/petsc/configs/winxp32/configure.sh	(revision 1519)
+++ /issm/trunk/externalpackages/petsc/configs/winxp32/configure.sh	(revision 1519)
@@ -0,0 +1,2 @@
+#!/bin/bash
+./config/configure.py  --with-parallel-no --prefix="$ISSM_DIR/externalpackages/petsc/install" --PETSC_ARCH=cygwin-intel --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" --with-debugging=0 --with-mpi=0 --download-c-blas-lapack=1
Index: /issm/trunk/externalpackages/petsc/install.sh
===================================================================
--- /issm/trunk/externalpackages/petsc/install.sh	(revision 1518)
+++ /issm/trunk/externalpackages/petsc/install.sh	(revision 1519)
@@ -2,5 +2,5 @@
 
 #Get number of cpus on current platform
-NUMCPUS=`grep -c processor /proc/cpuinfo`;
+NUMCPUS=$1;
 
 #version of petsc
@@ -25,7 +25,11 @@
 ../configure.sh
 
-#Compile petsc
-make  -j $NUMCPUS
-
-#Install
-make install
+#Compile petsc and install it
+if [ -z $NUMCPUS ];
+then
+	  make
+	  make install
+else
+	  make  -j $NUMCPUS
+	  make  -j $NUMCPUS install
+fi
