Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/Examples.Makefile.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/Examples.Makefile.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/Examples.Makefile.patch	(revision 8231)
@@ -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/1.0.2/astrid/configure.sh
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/configure.sh	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/configure.sh	(revision 8231)
@@ -0,0 +1,4 @@
+#!/bin/bash
+export CFLAGS="$CFLAGS -fPIC"
+export FFLAGS="$FFLAGS -fPIC"
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" --enable-sharedlibs=gcc --enable-f91=gfortran 
Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/mpicxx.h.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/mpicxx.h.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/astrid/mpicxx.h.patch	(revision 8231)
@@ -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/1.0.2/castor/Examples.Makefile.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/Examples.Makefile.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/Examples.Makefile.patch	(revision 8231)
@@ -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/1.0.2/castor/configure.sh
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/configure.sh	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/configure.sh	(revision 8231)
@@ -0,0 +1,2 @@
+#!/bin/bash
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" --enable-sharedlibs=gcc --enable-f91=gfortran 
Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/mpicxx.h.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/mpicxx.h.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/castor/mpicxx.h.patch	(revision 8231)
@@ -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/1.0.2/maceric/Examples.Makefile.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/Examples.Makefile.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/Examples.Makefile.patch	(revision 8231)
@@ -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/1.0.2/maceric/configure.sh
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/configure.sh	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/configure.sh	(revision 8231)
@@ -0,0 +1,4 @@
+#!/bin/bash
+export CFLAGS=" -arch i386"
+export FFLAGS=" -arch i386"
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" --enable-f91=gfortran --enable-sharedlibs=osx-gcc
Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/mpicxx.h.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/mpicxx.h.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/maceric/mpicxx.h.patch	(revision 8231)
@@ -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/1.0.2/ogive/Examples.Makefile.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/Examples.Makefile.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/Examples.Makefile.patch	(revision 8231)
@@ -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/1.0.2/ogive/configure.sh
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/configure.sh	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/configure.sh	(revision 8231)
@@ -0,0 +1,3 @@
+#!/bin/bash
+export CFLAGS=" -m32"
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" --enable-f91=gfortran --enable-sharedlibs=osx-gcc
Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/mpicxx.h.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/mpicxx.h.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/ogive/mpicxx.h.patch	(revision 8231)
@@ -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/1.0.2/wineric/Examples.Makefile.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/Examples.Makefile.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/Examples.Makefile.patch	(revision 8231)
@@ -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/1.0.2/wineric/configure.sh
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/configure.sh	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/configure.sh	(revision 8231)
@@ -0,0 +1,2 @@
+#!/bin/bash
+./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" 
Index: issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/mpicxx.h.patch
===================================================================
--- issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/mpicxx.h.patch	(revision 8231)
+++ issm/trunk/externalpackages/mpich2/configs/1.0.2/wineric/mpicxx.h.patch	(revision 8231)
@@ -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 8230)
+++ issm/trunk/externalpackages/mpich2/install.sh	(revision 8231)
@@ -5,6 +5,6 @@
 
 #version of mpich2
-version=1.0.2p1
-#version=1.3.1
+#version=1.0.2p1
+version=1.3.1
 
 #Some cleanup
