--- a/src/modules/mpi/mpi_funcs/mpi_iallgather.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iallgather.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Iallgather_core(CONST void *sendbuf, int sendcount, MPI_Datatype sendtype,
 			       void *recvbuf, int recvcount, MPI_Datatype recvtype,
 			       MPI_Comm comm, MPI_Request *r)
@@ -70,3 +71,4 @@ void mpif_iallgather_(void *sbuf, int *s
 
   MPI_Iallgather_epilog(sbuf, *scount, c_stype, rbuf, *rcount, c_rtype, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_iallgatherv.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iallgatherv.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Iallgatherv_core (CONST void *sendbuf __attribute__((unused)),
 				 int sendcount,
 				 MPI_Datatype sendtype,
@@ -78,3 +79,4 @@ void mpif_iallgatherv_(void *sbuf, int *
   MPI_Iallgatherv_epilog(sbuf, *scount, c_stype, rbuf, rcount, displs, c_rtype, c_comm, r);
 
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_iallreduce.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iallreduce.c
@@ -22,6 +22,7 @@
 #include "eztrace.h"
 
 
+#ifdef USE_MPI3
 static int MPI_Iallreduce_core (CONST void *sendbuf, void *recvbuf, int count,
 				MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
 				MPI_Request *r)
@@ -74,3 +75,4 @@ void mpif_iallreduce_(void *sbuf, void *
   *r = MPI_Request_c2f(c_req);
   MPI_Iallreduce_epilog(sbuf, rbuf, *count, c_type, c_op, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ialltoall.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ialltoall.c
@@ -22,6 +22,7 @@
 #include "eztrace.h"
 
 
+#ifdef USE_MPI3
 static int MPI_Ialltoall_core (CONST void *sendbuf, int sendcount, MPI_Datatype sendtype,
 			       void *recvbuf, int recvcnt, MPI_Datatype recvtype,
 			       MPI_Comm comm,
@@ -78,3 +79,4 @@ void mpif_ialltoall_(void *sbuf, int *sc
   *r = MPI_Request_c2f(c_req);
   MPI_Ialltoall_epilog(sbuf, *scount, c_stype, rbuf, *rcount, c_rtype, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ialltoallv.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ialltoallv.c
@@ -23,6 +23,7 @@
 
 
 
+#ifdef USE_MPI3
 static int MPI_Ialltoallv_core (CONST void *sendbuf, CONST int *sendcnts, CONST int *sdispls, MPI_Datatype sendtype,
 				void *recvbuf, CONST int *recvcnts, CONST int *rdispls, MPI_Datatype recvtype,
 				MPI_Comm comm,
@@ -81,3 +82,4 @@ void mpif_ialltoallv_(void *sbuf, int *s
   *r = MPI_Request_c2f(c_req);
   MPI_Ialltoallv_epilog(sbuf, scount, sdispls, c_stype, rbuf, rcount, rdispls, c_rtype, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ibarrier.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ibarrier.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Ibarrier_core (MPI_Comm c, MPI_Request *r)
 {
   return libMPI_Ibarrier(c, r);
@@ -54,3 +55,4 @@ void mpif_ibarrier_(MPI_Fint *c, MPI_Fin
   *r= MPI_Request_c2f(c_req);
   MPI_Ibarrier_epilog(c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ibcast.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ibcast.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Ibcast_core(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *r)
 {
   return libMPI_Ibcast(buffer, count, datatype, root, comm, r);
@@ -62,3 +63,4 @@ void mpif_ibcast_(void *buf, int *count,
   *r= MPI_Request_c2f(c_req);
   MPI_Ibcast_epilog(buf, *count, c_type, *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_igather.c
+++ b/src/modules/mpi/mpi_funcs/mpi_igather.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Igather_core(CONST void *sendbuf, int sendcnt, MPI_Datatype sendtype,
 			   void *recvbuf, int recvcount, MPI_Datatype recvtype,
 			    int root, MPI_Comm comm, MPI_Request *r)
@@ -76,3 +77,4 @@ void mpif_igather_(void *sbuf, int *scou
   *r= MPI_Request_c2f(c_req);
   MPI_Igather_epilog(sbuf, *scount, c_stype, rbuf, *rcount, c_rtype, *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_igatherv.c
+++ b/src/modules/mpi/mpi_funcs/mpi_igatherv.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Igatherv_core(CONST void *sendbuf, int sendcnt, MPI_Datatype sendtype,
 			     void *recvbuf, CONST int *recvcnts, CONST int *displs,
 			     MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *r)
@@ -78,3 +79,4 @@ void mpif_igatherv_(void *sbuf, int *sco
   *r= MPI_Request_c2f(c_req);
   MPI_Igatherv_epilog(sbuf, *scount, c_stype, rbuf, rcount, displs, c_rtype, *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ireduce.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ireduce.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Ireduce_core (CONST void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
 			     MPI_Op op, int root, MPI_Comm comm,
 			     MPI_Request *r)
@@ -73,3 +74,4 @@ void mpif_ireduce_(void *sbuf, void *rbu
   *r = MPI_Request_c2f(c_req);
   MPI_Ireduce_epilog(sbuf, rbuf, *count, c_type, c_op, *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_ireduce_scatter.c
+++ b/src/modules/mpi/mpi_funcs/mpi_ireduce_scatter.c
@@ -22,6 +22,7 @@
 #include "eztrace.h"
 
 
+#ifdef USE_MPI3
 static int MPI_Ireduce_scatter_core (CONST void *sendbuf, void *recvbuf, CONST int *recvcnts,
 				     MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
 				     MPI_Request *r)
@@ -73,3 +74,4 @@ void mpif_ireduce_scatter_(void *sbuf, v
   *r = MPI_Request_c2f(c_req);
   MPI_Ireduce_scatter_epilog(sbuf, rbuf, rcount, c_type, c_op, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_iscan.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iscan.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Iscan_core (CONST void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
 			   MPI_Op op, MPI_Comm comm,
 			   MPI_Request *r)
@@ -72,3 +73,4 @@ void mpif_iscan_(void *sbuf, void *rbuf,
   *r = MPI_Request_c2f(c_req);
   MPI_Iscan_epilog(sbuf, rbuf, *count, c_type, c_op, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_iscatter.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iscatter.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Iscatter_core(CONST void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt,
 			     MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *r)
 {
@@ -76,3 +77,4 @@ void mpif_iscatter_(void *sbuf, int *sco
 		     rbuf, *rcount, c_rtype,
 		      *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_funcs/mpi_iscatterv.c
+++ b/src/modules/mpi/mpi_funcs/mpi_iscatterv.c
@@ -21,6 +21,7 @@
 #include "mpi_ev_codes.h"
 #include "eztrace.h"
 
+#ifdef USE_MPI3
 static int MPI_Iscatterv_core(CONST void *sendbuf,
 			      CONST int *sendcnts,
 			      CONST int *displs,
@@ -94,3 +95,4 @@ void mpif_iscatterv_(void *sbuf, int *sc
 		      rbuf, *rcount, c_rtype,
 		      *root, c_comm, r);
 }
+#endif
--- a/src/modules/mpi/mpi_f.f90
+++ b/src/modules/mpi/mpi_f.f90
@@ -221,78 +221,75 @@ return
 end
 
 
-
-
-subroutine MPI_IBarrier(COMM, REQ, IERROR)
-call MPIF_IBarrier(COMM, REQ, IERROR)
-return
-end
-
-subroutine MPI_IBCast(BUFFER, COUNT, DATATYPE, ROOT, COMM, REQ, IERROR)
-call MPIF_IBCast(BUFFER, COUNT, DATATYPE, ROOT, COMM, REQ, IERROR)
-return
-end
-
-subroutine MPI_IGather(SBUF,SCNT,STYPE,RBUF,RCNT, RTYPE, R, C, REQ, E)
-call MPIF_IGather(SBUF, SCNT, STYPE, RBUF, RCNT, RTYPE, R, C, REQ, E)
-return
-end
-
-subroutine MPI_IGatherv(SBUF,SCNT,STYPE,RBUF,RCNT,DSP,RTYPE,R,C,REQ,E)
-call MPIF_IGatherv(SBUF,SCNT,STYPE,RBUF,RCNT,DSP,RTYPE,R,C,REQ,E)
-return
-end
-
-subroutine MPI_IScatter(SBUF,SCNT,STYPE,RBUF,RCNT,RTYPE,R,C,REQ,E)
-call MPIF_IScatter(SBUF, SCNT, STYPE, RBUF, RCNT, RTYPE, R, C,REQ, E)
-return
-end
-
-subroutine MPI_IScatterv(SBUF,SCNT,DSP,SDTYP,RBUF,RCNT,RTYP,R,C,REQ,E)
-call  MPIF_IScatterv(SBUF,SCNT,DSP,STYP,RBUF, RCNT, RTYP, R, C, REQ,E)
-return
-end
-
-subroutine MPI_IAllgather(SBUF, SCNT, STYP, RBUF, RCNT, RTYP, C, REQ, E)
-call MPIF_IAllgather(SBUF, SCNT, STYP, RBUF, RCNT, RTYP, C, REQ, E)
-return
-end
-
-subroutine MPI_IAllgatherv(SB, SC, ST, RB, RC, D, RT, C, REQ,IERROR)
-call MPIF_IAllgatherv(SB, SC, ST, RB, RC, D, RT, C, REQ,IERROR)
-return
-end
-
-subroutine MPI_IAlltoall(SB, SC, ST, RB, RC, RT, COMM, REQ,IERROR)
-call MPIF_IAlltoall(SB, SC, ST, RB, RC, RT, COMM, REQ,IERROR)
-return
-end
-
-subroutine MPI_IAlltoallv(SB, SC, SD, ST, RB, RC, RD, RT, C, REQ,ERROR)
-call MPIF_IAlltoallv(SB, SC, SD, ST, RB, RC, RD, RT, C, REQ,ERROR)
-return
-end
-
-subroutine MPI_IReduce(SBUF, RBUF, CNT, D, OP, ROOT, COMM, REQ,IERROR)
-call MPIF_IReduce(SBUF, RBUF, CNT, D, OP, ROOT, COMM, REQ,IERROR)
-return
-end
-
-subroutine MPI_IAllreduce(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
-call MPIF_IAllreduce(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
-return
-end
-
-subroutine MPI_IReduce_scatter(SBUF, RBUF, RCNT, D, OP, C, REQ,IERROR)
-call MPIF_IReduce_scatter(SBUF, RBUF, RCNT, D, OP, C, REQ,IERROR)
-return
-end
-
-subroutine MPI_IScan(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
-call  MPIF_IScan(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
-return
-end
-
+!subroutine MPI_IBarrier(COMM, REQ, IERROR)
+!call MPIF_IBarrier(COMM, REQ, IERROR)
+!return
+!end
+!
+!subroutine MPI_IBCast(BUFFER, COUNT, DATATYPE, ROOT, COMM, REQ, IERROR)
+!call MPIF_IBCast(BUFFER, COUNT, DATATYPE, ROOT, COMM, REQ, IERROR)
+!return
+!end
+!
+!subroutine MPI_IGather(SBUF,SCNT,STYPE,RBUF,RCNT, RTYPE, R, C, REQ, E)
+!call MPIF_IGather(SBUF, SCNT, STYPE, RBUF, RCNT, RTYPE, R, C, REQ, E)
+!return
+!end
+!
+!subroutine MPI_IGatherv(SBUF,SCNT,STYPE,RBUF,RCNT,DSP,RTYPE,R,C,REQ,E)
+!call MPIF_IGatherv(SBUF,SCNT,STYPE,RBUF,RCNT,DSP,RTYPE,R,C,REQ,E)
+!return
+!end
+!
+!subroutine MPI_IScatter(SBUF,SCNT,STYPE,RBUF,RCNT,RTYPE,R,C,REQ,E)
+!call MPIF_IScatter(SBUF, SCNT, STYPE, RBUF, RCNT, RTYPE, R, C,REQ, E)
+!return
+!end
+!
+!subroutine MPI_IScatterv(SBUF,SCNT,DSP,SDTYP,RBUF,RCNT,RTYP,R,C,REQ,E)
+!call  MPIF_IScatterv(SBUF,SCNT,DSP,STYP,RBUF, RCNT, RTYP, R, C, REQ,E)
+!return
+!end
+!
+!subroutine MPI_IAllgather(SBUF, SCNT, STYP, RBUF, RCNT, RTYP, C, REQ, E)
+!call MPIF_IAllgather(SBUF, SCNT, STYP, RBUF, RCNT, RTYP, C, REQ, E)
+!return
+!end
+!
+!subroutine MPI_IAllgatherv(SB, SC, ST, RB, RC, D, RT, C, REQ,IERROR)
+!call MPIF_IAllgatherv(SB, SC, ST, RB, RC, D, RT, C, REQ,IERROR)
+!return
+!end
+!
+!subroutine MPI_IAlltoall(SB, SC, ST, RB, RC, RT, COMM, REQ,IERROR)
+!call MPIF_IAlltoall(SB, SC, ST, RB, RC, RT, COMM, REQ,IERROR)
+!return
+!end
+!
+!subroutine MPI_IAlltoallv(SB, SC, SD, ST, RB, RC, RD, RT, C, REQ,ERROR)
+!call MPIF_IAlltoallv(SB, SC, SD, ST, RB, RC, RD, RT, C, REQ,ERROR)
+!return
+!end
+!
+!subroutine MPI_IReduce(SBUF, RBUF, CNT, D, OP, ROOT, COMM, REQ,IERROR)
+!call MPIF_IReduce(SBUF, RBUF, CNT, D, OP, ROOT, COMM, REQ,IERROR)
+!return
+!end
+!
+!subroutine MPI_IAllreduce(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
+!call MPIF_IAllreduce(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
+!return
+!end
+!
+!subroutine MPI_IReduce_scatter(SBUF, RBUF, RCNT, D, OP, C, REQ,IERROR)
+!call MPIF_IReduce_scatter(SBUF, RBUF, RCNT, D, OP, C, REQ,IERROR)
+!return
+!end
+!
+!subroutine MPI_IScan(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
+!call  MPIF_IScan(SBUF, RBUF, CNT, D, OP, COMM, REQ,IERROR)
+!return
+!end
 
 
 subroutine MPI_Send_init(B, C, T, D, TAG, COMM, R, IERROR)
