--- OpenFOAM-1.6-ext/etc/settings.sh.orig	2014-06-18 12:53:06.000000000 +0200
+++ OpenFOAM-1.6-ext/etc/settings.sh	2014-09-10 17:49:09.488313961 +0200
@@ -391,6 +391,11 @@
     unset mpi_version
     ;;
 
+EASYBUILDMPI)
+    export FOAM_MPI=mpi
+    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpi
+    ;;
+
 MPICH)
     mpi_version=mpich-1.2.4
     export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
diff -ruN OpenFOAM-1.6-ext.orig/wmake/rules/linux64Icc/mplibEASYBUILDMPI OpenFOAM-1.6-ext/wmake/rules/linux64Icc/mplibEASYBUILDMPI
--- OpenFOAM-1.6-ext.orig/wmake/rules/linux64Icc/mplibEASYBUILDMPI	1970-01-01 01:00:00.000000000 +0100
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Icc/mplibEASYBUILDMPI	2014-02-27 11:48:54.290303826 +0100
@@ -0,0 +1,3 @@
+PFLAGS     = -DMPICH_IGNORE_CXX_SEEK
+PINC       = -DMPICH_SKIP_MPICXX
+PLIBS      = 
diff -ruN OpenFOAM-1.6-ext.orig/wmake/rules/linux64Gcc/mplibEASYBUILDMPI OpenFOAM-1.6-ext/wmake/rules/linux64Icc/mplibEASYBUILDMPI
--- OpenFOAM-1.6-ext.orig/wmake/rules/linux64Gcc/mplibEASYBUILDMPI	1970-01-01 01:00:00.000000000 +0100
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Gcc/mplibEASYBUILDMPI	2014-02-27 11:48:54.290303826 +0100
@@ -0,0 +1,3 @@
+PFLAGS     = -DMPICH_IGNORE_CXX_SEEK
+PINC       = -DMPICH_SKIP_MPICXX
+PLIBS      = 
--- OpenFOAM-1.6-ext.orig/wmake/rules/linux64Gcc/c.orig	2014-09-04 14:14:31.446294000 +0200
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Gcc/c	2014-09-04 14:15:19.846263000 +0200
@@ -2,7 +2,7 @@
 
 cWARN        = -Wall
 
-cc          = gcc -m64
+cc          = $(MPICC) -fpermissive
 
 include $(RULES)/c$(WM_COMPILE_OPTION)
 
--- OpenFOAM-1.6-ext.orig/wmake/rules/linux64Gcc/c++.orig	2014-09-04 14:14:41.145266000 +0200
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Gcc/c++	2014-09-04 14:15:26.146097000 +0200
@@ -2,7 +2,7 @@
 
 c++WARN     = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
 
-CC          = g++ -m64
+CC          = $(MPICXX) -fpermissive
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
--- OpenFOAM-1.6-ext/wmake/rules/linux64Icc/c++.orig	2014-09-11 14:20:13.041097000 +0200
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Icc/c++	2014-09-11 14:20:24.338935000 +0200
@@ -2,7 +2,7 @@
 
 c++WARN     = -wd327,584,654,819,1125,1476,1505,1572
 
-CC          = icpc -DIntel
+CC          = $(MPICXX) -DIntel
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
--- OpenFOAM-1.6-ext/wmake/rules/linux64Icc/c.orig	2014-09-11 14:19:17.209906000 +0200
+++ OpenFOAM-1.6-ext/wmake/rules/linux64Icc/c	2014-09-11 14:19:32.840518000 +0200
@@ -2,7 +2,7 @@
 
 cWARN        = 
 
-cc          = icc
+cc          = $(MPICC)
 
 include $(RULES)/c$(WM_COMPILE_OPTION)
 
