Index: sm/trunk/externalpackages/mpich2/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/Examples.Makefile.patch	(revision 8143)
+++ 	(revision )
@@ -1,6 +1,0 @@
-72,73c72,73
-< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
-< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
----
-> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
-> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/1.3.1/macosx32/configure.sh
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/1.3.1/macosx32/configure.sh	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/1.3.1/macosx32/configure.sh	(revision 8144)
@@ -0,0 +1,19 @@
+#!/bin/bash
+export CFLAGS=" -arch i386"
+export CXXFLAGS=" -arch i386"
+export CPPFLAGS=" -arch i386"
+export FFLAGS=" -arch i386"
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" --enable-f91=gfortran --enable-sharedlibs=osx-gcc --enable-shared --enable-fc=/usr/local/bin/gfortran
+
+#CFLAGS      C compiler flags
+#LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+#nonstandard directory <lib dir>
+#CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+#headers in a nonstandard directory <include dir>
+#F77         Fortran 77 compiler command
+#FFLAGS      Fortran 77 compiler flags
+#F90         Fortran 90 compiler command
+#F90FLAGS    Fortran 90 compiler flags
+#CXX         C++ compiler command
+#CXXFLAGS    C++ compiler flags
+#CPP         C preprocessor
Index: /issm/trunk/externalpackages/mpich2/configs/altix64/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/altix64/Examples.Makefile.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/altix64/Examples.Makefile.patch	(revision 8144)
@@ -0,0 +1,6 @@
+72,73c72,73
+< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
+< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
+---
+> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
+> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/altix64/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/altix64/mpicxx.h.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/altix64/mpicxx.h.patch	(revision 8144)
@@ -0,0 +1,12 @@
+26c26
+< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+30c30
+< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+35c35
+< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Index: /issm/trunk/externalpackages/mpich2/configs/linux64/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/linux64/Examples.Makefile.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/linux64/Examples.Makefile.patch	(revision 8144)
@@ -0,0 +1,6 @@
+72,73c72,73
+< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
+< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
+---
+> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
+> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/linux64/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/linux64/mpicxx.h.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/linux64/mpicxx.h.patch	(revision 8144)
@@ -0,0 +1,12 @@
+26c26
+< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+30c30
+< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+35c35
+< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Index: /issm/trunk/externalpackages/mpich2/configs/macosx32/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/macosx32/Examples.Makefile.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/macosx32/Examples.Makefile.patch	(revision 8144)
@@ -0,0 +1,6 @@
+72,73c72,73
+< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
+< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
+---
+> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
+> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/macosx32/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/macosx32/mpicxx.h.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/macosx32/mpicxx.h.patch	(revision 8144)
@@ -0,0 +1,12 @@
+26c26
+< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+30c30
+< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+35c35
+< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Index: /issm/trunk/externalpackages/mpich2/configs/macosx64/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/macosx64/Examples.Makefile.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/macosx64/Examples.Makefile.patch	(revision 8144)
@@ -0,0 +1,6 @@
+72,73c72,73
+< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
+< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
+---
+> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
+> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/macosx64/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/macosx64/mpicxx.h.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/macosx64/mpicxx.h.patch	(revision 8144)
@@ -0,0 +1,12 @@
+26c26
+< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+30c30
+< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+35c35
+< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Index: /issm/trunk/externalpackages/mpich2/configs/winxp32/Examples.Makefile.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/winxp32/Examples.Makefile.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/winxp32/Examples.Makefile.patch	(revision 8144)
@@ -0,0 +1,6 @@
+72,73c72,73
+< cpi: cpi.o   ../lib/lib${MPILIBNAME}.a
+< 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS}
+---
+> cpi: cpi.o   ../lib/lib${MPILIBNAME}.a 
+> 	$(C_LINK) $(LDFLAGS) -o cpi cpi.o  -lm ${LIBS} ../lib/libmpich.a
Index: /issm/trunk/externalpackages/mpich2/configs/winxp32/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/configs/winxp32/mpicxx.h.patch	(revision 8144)
+++ /issm/trunk/externalpackages/mpich2/configs/winxp32/mpicxx.h.patch	(revision 8144)
@@ -0,0 +1,12 @@
+26c26
+< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
+30c30
+< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
+35c35
+< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
+---
+> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Index: /issm/trunk/externalpackages/mpich2/install.sh
===================================================================
--- /issm/trunk/externalpackages/mpich2/install.sh	(revision 8143)
+++ /issm/trunk/externalpackages/mpich2/install.sh	(revision 8144)
@@ -6,4 +6,5 @@
 #version of mpich2
 version=1.0.2p1
+#version=1.3.1
 
 #Some cleanup
Index: sm/trunk/externalpackages/mpich2/mpicxx.h.patch
===================================================================
--- /issm/trunk/externalpackages/mpich2/mpicxx.h.patch	(revision 8143)
+++ 	(revision )
@@ -1,12 +1,0 @@
-26c26
-< //#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
----
-> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
-30c30
-< //#error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
----
-> #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
-35c35
-< //#error "SEEK_END is #defined but must not be for the C++ binding of MPI"
----
-> #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
