[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-383-g0ff12df

mysql vizuser noreply at mpich.org
Fri Jul 26 08:59:28 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  0ff12df58cdf4921efc1236211485c746328cb26 (commit)
       via  7d747526ef9352c4f7ca089a99efd0e729ea8a96 (commit)
       via  ede63de44f756baba9271733376f85ce98642112 (commit)
       via  2e9ad71a4735e04bb9a67dd813bc0b98d84e0447 (commit)
       via  d3a85756698ad5eb6995ac26282fd76c1a3cd19b (commit)
       via  4e783c9d287bb1f7122ff9e9d403bdb43b0904a9 (commit)
       via  e98feb066592dfec56857601e14fa745f73b89d1 (commit)
       via  ddeb54a4ae04b1728fe2c0baba51d0dc88017e4c (commit)
       via  3e3adf97317f5668d0bd1f4606c9775bd8fe40de (commit)
       via  b8e7cbd181439294a4274ab92af88eff69facb4f (commit)
       via  2204a718c3c4e96e679a3eb3e1f6fd615055c44e (commit)
       via  b7cfbe35e8a2383aa0dc8207abe53ef70a0dc59b (commit)
       via  3eec02b3ac638fee50a44a1b153cd97390cf83ea (commit)
       via  0747e46f37c59974c75db36f63084e60d110ed26 (commit)
       via  25e5cde0a3455fd71fe26b6297b7331c860f17ca (commit)
       via  af63831e3288beb3080a4f65f751045b74a2c47b (commit)
       via  3083d8e7f95c19f79a6dfb672ccb3363357ae588 (commit)
       via  34d594d466377ed40e1cff5e9e75b4a00d762625 (commit)
       via  9a048941309585309b0ee217e2db4de0749c3e12 (commit)
       via  e46124eebcbb4120001bb3f118e4c723adf53d30 (commit)
       via  432391e02248ec3d91e4e02af3f5083bc0405886 (commit)
       via  fc2433ede3b925529ef6bdf921ab1a69b454d8af (commit)
       via  5838c8df1856a90faeb91e1f70d7f25a382552b3 (commit)
       via  230060cdfdd6b0179c61e8e9325c2d3f481f9de2 (commit)
      from  05fd0e1b5e1822cd98eafa3cbde20140ee98fb33 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/0ff12df58cdf4921efc1236211485c746328cb26

commit 0ff12df58cdf4921efc1236211485c746328cb26
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jul 25 16:22:51 2013 -0500

    Deprecate ENABLE_COLL_FT_RET
    
    This environment variable is no longer necessary now that FT and NBC will play
    well together. We'll keep this one around for one more version, then delete it
    in MPICH-3.2.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index bce12a2..7d378c7 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -319,6 +319,7 @@ parameters:
       default     : true
       class       : device
       description : >-
+        DEPRECATED! Will be removed in MPICH-3.2
         Collectives called on a communicator with a failed process
         should not hang, however the result of the operation may be
         invalid even though the function returns MPI_SUCCESS.  This

http://git.mpich.org/mpich.git/commitdiff/7d747526ef9352c4f7ca089a99efd0e729ea8a96

commit 7d747526ef9352c4f7ca089a99efd0e729ea8a96
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Tue Jul 23 09:10:45 2013 -0500

    Update CHANGES with FT/NBC work.
    
    Add a description for the FT and NBC work to the CHANGES file.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/CHANGES b/CHANGES
index d827e2a..a1924dd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,10 @@
    capabilities for collectives.  See the README.envvar file for more
    information.
 
+ # OVERALL: Allow non-blocking collectives and fault tolerance at the same
+   time. The option MPIR_PARAM_ENABLE_COLL_FT_RET has been removed as it is no
+   longer necessary.
+
  # BUILD: Enable shared library builds by default.
 
  # PM/PMI: Upgraded hwloc to 1.7.1.

http://git.mpich.org/mpich.git/commitdiff/ede63de44f756baba9271733376f85ce98642112

commit ede63de44f756baba9271733376f85ce98642112
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 15:26:24 2013 -0500

    Rename MPIC_Waitall_ft to MPIC_Waitall
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index fa2a388..9786192 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3901,7 +3901,7 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
                   MPI_Comm comm, MPI_Request *request, int *errflag);
 int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPI_Comm comm, MPI_Request *request);
-int MPIC_Waitall_ft(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag);
+int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag);
 
 
 void MPIR_MAXF  ( void *, void *, int *, MPI_Datatype * ) ;
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 790b7d3..8d3f2f1 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -473,7 +473,7 @@ int MPIR_Alltoall_intra(
             }
   
             /* ... then wait for them to finish: */
-            mpi_errno = MPIC_Waitall_ft(2*ss,reqarray,starray, errflag);
+            mpi_errno = MPIC_Waitall(2*ss,reqarray,starray, errflag);
             if (mpi_errno && mpi_errno != MPI_ERR_IN_STATUS) MPIU_ERR_POP(mpi_errno);
             
             /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 477e704..a6ab621 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -188,7 +188,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                 }
             }
 
-            mpi_errno = MPIC_Waitall_ft(req_cnt, reqarray, starray, errflag);
+            mpi_errno = MPIC_Waitall(req_cnt, reqarray, starray, errflag);
             if (mpi_errno && mpi_errno != MPI_ERR_IN_STATUS) MPIU_ERR_POP(mpi_errno);
 
             /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index aa1e1b4..89ac201 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -164,7 +164,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
                 }
             }
 
-            mpi_errno = MPIC_Waitall_ft(outstanding_requests, reqarray, starray, errflag);
+            mpi_errno = MPIC_Waitall(outstanding_requests, reqarray, starray, errflag);
             if (mpi_errno && mpi_errno != MPI_ERR_IN_STATUS) MPIU_ERR_POP(mpi_errno);
             
             /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 55bc1c2..15929d0 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -114,7 +114,7 @@ int MPIR_Gatherv (
             }
         }
         /* ... then wait for *all* of them to finish: */
-        mpi_errno = MPIC_Waitall_ft(reqs, reqarray, starray, errflag);
+        mpi_errno = MPIC_Waitall(reqs, reqarray, starray, errflag);
         if (mpi_errno&& mpi_errno != MPI_ERR_IN_STATUS) MPIU_ERR_POP(mpi_errno);
         
         /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 2bf9d85..12079be 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -660,10 +660,10 @@ int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Waitall_ft
+#define FUNCNAME MPIC_Waitall
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Waitall_ft(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag)
+int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index fc3940a..ed1006a 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -107,7 +107,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
             }
         }
         /* ... then wait for *all* of them to finish: */
-        mpi_errno = MPIC_Waitall_ft(reqs, reqarray, starray, errflag);
+        mpi_errno = MPIC_Waitall(reqs, reqarray, starray, errflag);
         if (mpi_errno && mpi_errno != MPI_ERR_IN_STATUS) MPIU_ERR_POP(mpi_errno);
         /* --BEGIN ERROR HANDLING-- */
         if (mpi_errno == MPI_ERR_IN_STATUS) {

http://git.mpich.org/mpich.git/commitdiff/2e9ad71a4735e04bb9a67dd813bc0b98d84e0447

commit 2e9ad71a4735e04bb9a67dd813bc0b98d84e0447
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 15:25:26 2013 -0500

    Rename MPIC_Irecv_ft to MPIC_Irecv
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 7c8af8c..fa2a388 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3899,7 +3899,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              MPI_Comm comm, MPI_Status *status, int *errflag);
 int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, MPI_Request *request, int *errflag);
-int MPIC_Irecv_ft(void *buf, int count, MPI_Datatype datatype, int source,
+int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPI_Comm comm, MPI_Request *request);
 int MPIC_Waitall_ft(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag);
 
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 024dbd5..790b7d3 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -454,7 +454,7 @@ int MPIR_Alltoall_intra(
             /* do the communication -- post ss sends and receives: */
             for ( i=0; i<ss; i++ ) { 
                 dst = (rank+i+ii) % comm_size;
-                mpi_errno = MPIC_Irecv_ft((char *)recvbuf +
+                mpi_errno = MPIC_Irecv((char *)recvbuf +
                                           dst*recvcount*recvtype_extent, 
                                           recvcount, recvtype, dst,
                                           MPIR_ALLTOALL_TAG, comm,
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index c525d37..477e704 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -151,7 +151,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                     if (type_size) {
                         MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                                          rdispls[dst]*recv_extent);
-                        mpi_errno = MPIC_Irecv_ft((char *)recvbuf+rdispls[dst]*recv_extent,
+                        mpi_errno = MPIC_Irecv((char *)recvbuf+rdispls[dst]*recv_extent,
                                                   recvcounts[dst], recvtype, dst,
                                                   MPIR_ALLTOALLV_TAG, comm,
                                                   &reqarray[req_cnt]);
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index db7379c..aa1e1b4 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -137,7 +137,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
                 if (recvcounts[dst]) {
                     MPID_Datatype_get_size_macro(recvtypes[dst], type_size);
                     if (type_size) {
-                        mpi_errno = MPIC_Irecv_ft((char *)recvbuf+rdispls[dst],
+                        mpi_errno = MPIC_Irecv((char *)recvbuf+rdispls[dst],
                                                   recvcounts[dst], recvtypes[dst], dst,
                                                   MPIR_ALLTOALLW_TAG, comm,
                                                   &reqarray[outstanding_requests]);
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index ea5ab96..55bc1c2 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -105,7 +105,7 @@ int MPIR_Gatherv (
                     }
                 }
                 else {
-                    mpi_errno = MPIC_Irecv_ft(((char *)recvbuf+displs[i]*extent), 
+                    mpi_errno = MPIC_Irecv(((char *)recvbuf+displs[i]*extent),
                                               recvcounts[i], recvtype, i,
                                               MPIR_GATHERV_TAG, comm,
                                               &reqarray[reqs++]);
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index ce8a95f..2bf9d85 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -624,10 +624,10 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Irecv_ft
+#define FUNCNAME MPIC_Irecv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Irecv_ft(void *buf, int count, MPI_Datatype datatype, int source,
+int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPI_Comm comm, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;

http://git.mpich.org/mpich.git/commitdiff/d3a85756698ad5eb6995ac26282fd76c1a3cd19b

commit d3a85756698ad5eb6995ac26282fd76c1a3cd19b
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 14:57:26 2013 -0500

    Rename MPIC_Isend_ft to MPIC_Isend
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 2e9d148..7c8af8c 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3897,7 +3897,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int dest, int sendtag,
                              int source, int recvtag,
                              MPI_Comm comm, MPI_Status *status, int *errflag);
-int MPIC_Isend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, MPI_Request *request, int *errflag);
 int MPIC_Irecv_ft(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPI_Comm comm, MPI_Request *request);
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 8a43b76..024dbd5 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -464,7 +464,7 @@ int MPIR_Alltoall_intra(
 
             for ( i=0; i<ss; i++ ) { 
                 dst = (rank-i-ii+comm_size) % comm_size;
-                mpi_errno = MPIC_Isend_ft((char *)sendbuf +
+                mpi_errno = MPIC_Isend((char *)sendbuf +
                                           dst*sendcount*sendtype_extent, 
                                           sendcount, sendtype, dst,
                                           MPIR_ALLTOALL_TAG, comm,
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index e1a2c54..c525d37 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -173,7 +173,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                     if (type_size) {
                         MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                                          sdispls[dst]*send_extent);
-                        mpi_errno = MPIC_Isend_ft((char *)sendbuf+sdispls[dst]*send_extent,
+                        mpi_errno = MPIC_Isend((char *)sendbuf+sdispls[dst]*send_extent,
                                                   sendcounts[dst], sendtype, dst,
                                                   MPIR_ALLTOALLV_TAG, comm,
                                                   &reqarray[req_cnt], errflag);
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 9dfd038..db7379c 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -153,7 +153,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
                 if (sendcounts[dst]) {
                     MPID_Datatype_get_size_macro(sendtypes[dst], type_size);
                     if (type_size) {
-                        mpi_errno = MPIC_Isend_ft((char *)sendbuf+sdispls[dst],
+                        mpi_errno = MPIC_Isend((char *)sendbuf+sdispls[dst],
                                                   sendcounts[dst], sendtypes[dst], dst,
                                                   MPIR_ALLTOALLW_TAG, comm,
                                                   &reqarray[outstanding_requests], errflag);
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index b2e33c4..ce8a95f 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -584,10 +584,10 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Isend_ft
+#define FUNCNAME MPIC_Isend
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Isend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, MPI_Request *request, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 0007372..fc3940a 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -99,7 +99,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                     }
                 }
                 else {
-                    mpi_errno = MPIC_Isend_ft(((char *)sendbuf+displs[i]*extent), 
+                    mpi_errno = MPIC_Isend(((char *)sendbuf+displs[i]*extent),
                                               sendcounts[i], sendtype, i,
                                               MPIR_SCATTERV_TAG, comm, &reqarray[reqs++], errflag);
                     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 887a8cc..76e13ba 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -271,12 +271,12 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
     for (i = 0; i < comm_size; ++i) {
         if (rin_sizes[i]) {
             /* send edges where i is a destination to process i */
-            mpi_errno = MPIC_Isend_ft(&rin[i][0], rin_sizes[i], MPI_INT, i, MPIR_TOPO_A_TAG, comm_old, &reqs[idx++], &errflag);
+            mpi_errno = MPIC_Isend(&rin[i][0], rin_sizes[i], MPI_INT, i, MPIR_TOPO_A_TAG, comm_old, &reqs[idx++], &errflag);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         }
         if (rout_sizes[i]) {
             /* send edges where i is a source to process i */
-            mpi_errno = MPIC_Isend_ft(&rout[i][0], rout_sizes[i], MPI_INT, i, MPIR_TOPO_B_TAG, comm_old, &reqs[idx++], &errflag);
+            mpi_errno = MPIC_Isend(&rout[i][0], rout_sizes[i], MPI_INT, i, MPIR_TOPO_B_TAG, comm_old, &reqs[idx++], &errflag);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         }
     }

http://git.mpich.org/mpich.git/commitdiff/4e783c9d287bb1f7122ff9e9d403bdb43b0904a9

commit 4e783c9d287bb1f7122ff9e9d403bdb43b0904a9
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 14:50:44 2013 -0500

    Rename MPIC_Sendrecv_replace_ft to MPIC_Sendrecv_replace
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.Rename MPIC_Send_ft to MPIC_Send
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 3f40f1b..2e9d148 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3893,7 +3893,7 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, int recvcount,
                      MPI_Datatype recvtype, int source, int recvtag,
                      MPI_Comm comm, MPI_Status *status, int *errflag);
-int MPIC_Sendrecv_replace_ft(void *buf, int count, MPI_Datatype datatype,
+int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int dest, int sendtag,
                              int source, int recvtag,
                              MPI_Comm comm, MPI_Status *status, int *errflag);
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index ec37505..8a43b76 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -135,7 +135,7 @@ int MPIR_Alltoall_intra(
             for (j = i; j < comm_size; ++j) {
                 if (rank == i) {
                     /* also covers the (rank == i && rank == j) case */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + j*recvcount*recvtype_extent),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + j*recvcount*recvtype_extent),
                                                          recvcount, recvtype,
                                                          j, MPIR_ALLTOALL_TAG,
                                                          j, MPIR_ALLTOALL_TAG,
@@ -149,7 +149,7 @@ int MPIR_Alltoall_intra(
                 }
                 else if (rank == j) {
                     /* same as above with i/j args reversed */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + i*recvcount*recvtype_extent),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + i*recvcount*recvtype_extent),
                                                          recvcount, recvtype,
                                                          i, MPIR_ALLTOALL_TAG,
                                                          i, MPIR_ALLTOALL_TAG,
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index dd64a82..e1a2c54 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -99,7 +99,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
             for (j = i; j < comm_size; ++j) {
                 if (rank == i) {
                     /* also covers the (rank == i && rank == j) case */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + rdispls[j]*recv_extent),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[j]*recv_extent),
                                                          recvcounts[j], recvtype,
                                                          j, MPIR_ALLTOALLV_TAG,
                                                          j, MPIR_ALLTOALLV_TAG,
@@ -114,7 +114,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                 }
                 else if (rank == j) {
                     /* same as above with i/j args reversed */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + rdispls[i]*recv_extent),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[i]*recv_extent),
                                                          recvcounts[i], recvtype,
                                                          i, MPIR_ALLTOALLV_TAG,
                                                          i, MPIR_ALLTOALLV_TAG,
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 65a64b8..9dfd038 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -90,7 +90,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
             for (j = i; j < comm_size; ++j) {
                 if (rank == i) {
                     /* also covers the (rank == i && rank == j) case */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + rdispls[j]),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[j]),
                                                          recvcounts[j], recvtypes[j],
                                                          j, MPIR_ALLTOALLW_TAG,
                                                          j, MPIR_ALLTOALLW_TAG,
@@ -104,7 +104,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
                 }
                 else if (rank == j) {
                     /* same as above with i/j args reversed */
-                    mpi_errno = MPIC_Sendrecv_replace_ft(((char *)recvbuf + rdispls[i]),
+                    mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[i]),
                                                          recvcounts[i], recvtypes[i],
                                                          i, MPIR_ALLTOALLW_TAG,
                                                          i, MPIR_ALLTOALLW_TAG,
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 3e12a22..b2e33c4 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -40,111 +40,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 }
 
 
-/* NOTE: for regular collectives (as opposed to irregular collectives) calling
- * this function repeatedly will almost always be slower than performing the
- * equivalent inline because of the overhead of the repeated malloc/free */
-#undef FUNCNAME
-#define FUNCNAME MPIC_Sendrecv_replace
-#undef FCNAME
-#define FCNAME MPIU_QUOTE(FUNCNAME)
-static int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
-                                 int dest, int sendtag,
-                                 int source, int recvtag,
-                                 MPI_Comm comm, MPI_Status *status)
-{
-    int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t context_id_offset;
-    MPID_Request *sreq;
-    MPID_Request *rreq;
-    void *tmpbuf = NULL;
-    int tmpbuf_size = 0;
-    int tmpbuf_count = 0;
-    MPID_Comm *comm_ptr;
-    MPIU_CHKLMEM_DECL(1);
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_SENDRECV_REPLACE);
-#ifdef MPID_LOG_ARROWS
-    /* The logging macros log sendcount and recvcount */
-    int sendcount = count, recvcount = count;
-#endif
-
-    MPIDI_PT2PT_FUNC_ENTER_BOTH(MPID_STATE_MPIC_SENDRECV_REPLACE);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id_offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    if (count > 0 && dest != MPI_PROC_NULL)
-    {
-        MPIR_Pack_size_impl(count, datatype, &tmpbuf_size);
-        MPIU_CHKLMEM_MALLOC(tmpbuf, void *, tmpbuf_size, mpi_errno, "temporary send buffer");
-
-        mpi_errno = MPIR_Pack_impl(buf, count, datatype, tmpbuf, tmpbuf_size, &tmpbuf_count);
-        if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-    }
-
-    mpi_errno = MPID_Irecv(buf, count, datatype, source, recvtag,
-                           comm_ptr, context_id_offset, &rreq);
-    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
-    mpi_errno = MPID_Isend(tmpbuf, tmpbuf_count, MPI_PACKED, dest,
-                           sendtag, comm_ptr, context_id_offset,
-                           &sreq);
-    if (mpi_errno != MPI_SUCCESS)
-    {
-        /* --BEGIN ERROR HANDLING-- */
-        /* FIXME: should we cancel the pending (possibly completed) receive request or wait for it to complete? */
-        MPID_Request_release(rreq);
-        MPIU_ERR_POP(mpi_errno);
-        /* --END ERROR HANDLING-- */
-    }
-
-    if (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq))
-    {
-        MPID_Progress_state progress_state;
-
-        MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq))
-        {
-            mpi_errno = MPID_Progress_wait(&progress_state);
-            if (mpi_errno != MPI_SUCCESS)
-            {
-                /* --BEGIN ERROR HANDLING-- */
-                MPID_Progress_end(&progress_state);
-                MPIU_ERR_POP(mpi_errno);
-                /* --END ERROR HANDLING-- */
-            }
-        }
-        MPID_Progress_end(&progress_state);
-    }
-
-    if (status != MPI_STATUS_IGNORE) {
-        *status = rreq->status;
-    }
-
-    if (mpi_errno == MPI_SUCCESS) {
-        mpi_errno = rreq->status.MPI_ERROR;
-
-        if (mpi_errno == MPI_SUCCESS) {
-            mpi_errno = sreq->status.MPI_ERROR;
-        }
-    }
-
-    MPID_Request_release(sreq);
-    MPID_Request_release(rreq);
-
-    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
-fn_exit:
-    MPIU_CHKLMEM_FREEALL();
-    MPIDI_PT2PT_FUNC_EXIT_BOTH(MPID_STATE_MPIC_SENDRECV_REPLACE);
-    return mpi_errno;
-fn_fail:
-    goto fn_exit;
-}
-
 #undef FUNCNAME
 #define FUNCNAME MPIR_Localcopy
 #undef FCNAME
@@ -571,11 +466,14 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     goto fn_exit;
 }
 
+/* NOTE: for regular collectives (as opposed to irregular collectives) calling
+ * this function repeatedly will almost always be slower than performing the
+ * equivalent inline because of the overhead of the repeated malloc/free */
 #undef FUNCNAME
-#define FUNCNAME MPIC_Sendrecv_replace_ft
+#define FUNCNAME MPIC_Sendrecv_replace
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Sendrecv_replace_ft(void *buf, int count, MPI_Datatype datatype,
+int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int dest, int sendtag,
                              int source, int recvtag,
                              MPI_Comm comm, MPI_Status *status, int *errflag)
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index debd352..bea645a 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -571,7 +571,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 
-        mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
+        mpi_errno = MPIC_Sendrecv_replace(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
                                   sendtag++, 0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
@@ -1229,7 +1229,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
 	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 #endif
-        mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
+        mpi_errno = MPIC_Sendrecv_replace(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
                                   sendtag++, 0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {

http://git.mpich.org/mpich.git/commitdiff/e98feb066592dfec56857601e14fa745f73b89d1

commit e98feb066592dfec56857601e14fa745f73b89d1
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 14:44:51 2013 -0500

    Rename MPIC_Sendrecv_ft to MPIC_Sendrecv
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.Rename MPIC_Send_ft to MPIC_Send
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 7d36563..3f40f1b 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3889,7 +3889,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                  MPI_Comm comm, MPI_Status *status, int *errflag);
 int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, int *errflag);
-int MPIC_Sendrecv_ft(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, int recvcount,
                      MPI_Datatype recvtype, int source, int recvtag,
                      MPI_Comm comm, MPI_Status *status, int *errflag);
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index f31f7b6..9a3f30f 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -168,7 +168,7 @@ int MPIR_Allgather_intra (
                 recv_offset = dst_tree_root * recvcount * recvtype_extent;
                 
                 if (dst < comm_size) {
-                    mpi_errno = MPIC_Sendrecv_ft(((char *)recvbuf + send_offset),
+                    mpi_errno = MPIC_Sendrecv(((char *)recvbuf + send_offset),
                                                  curr_cnt, recvtype, dst,
                                                  MPIR_ALLGATHER_TAG,  
                                                  ((char *)recvbuf + recv_offset),
@@ -336,7 +336,7 @@ int MPIR_Allgather_intra (
                 recv_offset = dst_tree_root * nbytes;
                 
                 if (dst < comm_size) {
-                    mpi_errno = MPIC_Sendrecv_ft(((char *)tmp_buf + send_offset),
+                    mpi_errno = MPIC_Sendrecv(((char *)tmp_buf + send_offset),
                                                  curr_cnt, MPI_BYTE, dst,
                                                  MPIR_ALLGATHER_TAG,  
                                                  ((char *)tmp_buf + recv_offset),
@@ -489,7 +489,7 @@ int MPIR_Allgather_intra (
             src = (rank + pof2) % comm_size;
             dst = (rank - pof2 + comm_size) % comm_size;
             
-            mpi_errno = MPIC_Sendrecv_ft(tmp_buf, curr_cnt, recvtype, dst,
+            mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt, recvtype, dst,
                                          MPIR_ALLGATHER_TAG,
                                          ((char *)tmp_buf + curr_cnt*recvtype_extent),
                                          curr_cnt, recvtype,
@@ -512,7 +512,7 @@ int MPIR_Allgather_intra (
             src = (rank + pof2) % comm_size;
             dst = (rank - pof2 + comm_size) % comm_size;
             
-            mpi_errno = MPIC_Sendrecv_ft(tmp_buf, rem * recvcount, recvtype,
+            mpi_errno = MPIC_Sendrecv(tmp_buf, rem * recvcount, recvtype,
                                          dst, MPIR_ALLGATHER_TAG,
                                          ((char *)tmp_buf + curr_cnt*recvtype_extent),
                                          rem * recvcount, recvtype,
@@ -571,7 +571,7 @@ int MPIR_Allgather_intra (
         j     = rank;
         jnext = left;
         for (i=1; i<comm_size; i++) {
-            mpi_errno = MPIC_Sendrecv_ft(((char *)recvbuf +
+            mpi_errno = MPIC_Sendrecv(((char *)recvbuf +
                                           j*recvcount*recvtype_extent), 
                                          recvcount, recvtype, right,
                                          MPIR_ALLGATHER_TAG, 
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 3fc34b1..b09dddb 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -186,7 +186,7 @@ int MPIR_Allgatherv_intra (
                     for (j=0; j<dst_tree_root; j++)
                         recv_offset += recvcounts[j];
 
-                    mpi_errno = MPIC_Sendrecv_ft(((char *)tmp_buf + send_offset * recvtype_extent),
+                    mpi_errno = MPIC_Sendrecv(((char *)tmp_buf + send_offset * recvtype_extent),
                                                  curr_cnt, recvtype, dst,
                                                  MPIR_ALLGATHERV_TAG,  
                                                  ((char *)tmp_buf + recv_offset * recvtype_extent),
@@ -388,7 +388,7 @@ int MPIR_Allgatherv_intra (
                 recv_offset *= nbytes;
                 
                 if (dst < comm_size) {
-                    mpi_errno = MPIC_Sendrecv_ft(((char *)tmp_buf + send_offset),
+                    mpi_errno = MPIC_Sendrecv(((char *)tmp_buf + send_offset),
                                                  curr_cnt, MPI_BYTE, dst,
                                                  MPIR_ALLGATHERV_TAG,  
                                                  ((char *)tmp_buf + recv_offset),
@@ -551,7 +551,7 @@ int MPIR_Allgatherv_intra (
             src = (rank + pof2) % comm_size;
             dst = (rank - pof2 + comm_size) % comm_size;
             
-            mpi_errno = MPIC_Sendrecv_ft(tmp_buf, curr_cnt, recvtype, dst,
+            mpi_errno = MPIC_Sendrecv(tmp_buf, curr_cnt, recvtype, dst,
                                          MPIR_ALLGATHERV_TAG,
                                          ((char *)tmp_buf + curr_cnt*recvtype_extent),
                                          total_count - curr_cnt, recvtype,
@@ -580,7 +580,7 @@ int MPIR_Allgatherv_intra (
             for (i=0; i<rem; i++)
                 send_cnt += recvcounts[(rank+i)%comm_size];
 
-            mpi_errno = MPIC_Sendrecv_ft(tmp_buf, send_cnt, recvtype,
+            mpi_errno = MPIC_Sendrecv(tmp_buf, send_cnt, recvtype,
                                          dst, MPIR_ALLGATHERV_TAG,
                                          ((char *)tmp_buf + curr_cnt*recvtype_extent),
                                          total_count - curr_cnt, recvtype,
@@ -693,7 +693,7 @@ int MPIR_Allgatherv_intra (
 		tosend -= sendnow;
 	    }
 	    else { /* There's data to be sent and received */
-		mpi_errno = MPIC_Sendrecv_ft(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, 
+		mpi_errno = MPIC_Sendrecv(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG,
                                              rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG,
                                              comm, &status, errflag);
                 if (mpi_errno) {
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index c3b3945..e05d36e 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -155,7 +155,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
 
                 /* Send the most current data, which is in recvbuf. Recv
                    into tmp_buf */
-                mpi_errno = MPIC_Sendrecv_ft(recvbuf, count, datatype,
+                mpi_errno = MPIC_Sendrecv(recvbuf, count, datatype,
                                              cdst, tag, tmp_buf,
                                              count, datatype, cdst,
                                              tag, comm,
@@ -234,7 +234,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
                 }
 
                 /* Send data from recvbuf. Recv into tmp_buf */
-                mpi_errno = MPIC_Sendrecv_ft((char *) recvbuf +
+                mpi_errno = MPIC_Sendrecv((char *) recvbuf +
                                              disps[send_idx]*extent,
                                              send_cnt, datatype,
                                              cdst, tag,
@@ -300,7 +300,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
                         recv_cnt += cnts[i];
                 }
 
-                mpi_errno = MPIC_Sendrecv_ft((char *) recvbuf +
+                mpi_errno = MPIC_Sendrecv((char *) recvbuf +
                                              disps[send_idx]*extent,
                                              send_cnt, datatype,
                                              cdst, tag,
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index d4fcce7..377b692 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -354,7 +354,7 @@ int MPIR_Allreduce_intra (
 
                     /* Send the most current data, which is in recvbuf. Recv
                        into tmp_buf */ 
-                    mpi_errno = MPIC_Sendrecv_ft(recvbuf, count, datatype, 
+                    mpi_errno = MPIC_Sendrecv(recvbuf, count, datatype,
                                                  dst, MPIR_ALLREDUCE_TAG, tmp_buf,
                                                  count, datatype, dst,
                                                  MPIR_ALLREDUCE_TAG, comm,
@@ -435,7 +435,7 @@ int MPIR_Allreduce_intra (
                            send_cnt, recv_cnt, last_idx);
                            */
                     /* Send data from recvbuf. Recv into tmp_buf */ 
-                    mpi_errno = MPIC_Sendrecv_ft((char *) recvbuf +
+                    mpi_errno = MPIC_Sendrecv((char *) recvbuf +
                                                  disps[send_idx]*extent,
                                                  send_cnt, datatype,  
                                                  dst, MPIR_ALLREDUCE_TAG, 
@@ -500,7 +500,7 @@ int MPIR_Allreduce_intra (
                             recv_cnt += cnts[i];
                     }
 
-                    mpi_errno = MPIC_Sendrecv_ft((char *) recvbuf +
+                    mpi_errno = MPIC_Sendrecv((char *) recvbuf +
                                                  disps[send_idx]*extent,
                                                  send_cnt, datatype,  
                                                  dst, MPIR_ALLREDUCE_TAG, 
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 794ba4a..ec37505 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -224,7 +224,7 @@ int MPIR_Alltoall_intra(
             mpi_errno = MPIR_Pack_impl(recvbuf, 1, newtype, tmp_buf, pack_size, &position);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
-            mpi_errno = MPIC_Sendrecv_ft(tmp_buf, position, MPI_PACKED, dst,
+            mpi_errno = MPIC_Sendrecv(tmp_buf, position, MPI_PACKED, dst,
                                          MPIR_ALLTOALL_TAG, recvbuf, 1, newtype,
                                          src, MPIR_ALLTOALL_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
@@ -310,7 +310,7 @@ int MPIR_Alltoall_intra(
             my_tree_root <<= i;
             
             if (dst < comm_size) {
-                mpi_errno = MPIC_Sendrecv_ft(((char *)tmp_buf +
+                mpi_errno = MPIC_Sendrecv(((char *)tmp_buf +
                                               my_tree_root*sendbuf_extent),
                                              curr_cnt, sendtype,
                                              dst, MPIR_ALLTOALL_TAG, 
@@ -528,7 +528,7 @@ int MPIR_Alltoall_intra(
                 dst = (rank + i) % comm_size;
             }
 
-            mpi_errno = MPIC_Sendrecv_ft(((char *)sendbuf +
+            mpi_errno = MPIC_Sendrecv(((char *)sendbuf +
                                           dst*sendcount*sendtype_extent), 
                                          sendcount, sendtype, dst,
                                          MPIR_ALLTOALL_TAG, 
@@ -632,7 +632,7 @@ int MPIR_Alltoall_inter(
             sendaddr = (char *)sendbuf + dst*sendcount*sendtype_extent;
         }
 
-        mpi_errno = MPIC_Sendrecv_ft(sendaddr, sendcount, sendtype, dst,
+        mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst,
                                      MPIR_ALLTOALL_TAG, recvaddr,
                                      recvcount, recvtype, src,
                                      MPIR_ALLTOALL_TAG, comm, &status, errflag);
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 40595e0..dd64a82 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -298,7 +298,7 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
             sendcount = sendcounts[dst];
         }
 
-        mpi_errno = MPIC_Sendrecv_ft(sendaddr, sendcount, sendtype, dst, 
+        mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst,
                                      MPIR_ALLTOALLV_TAG, recvaddr, recvcount, 
                                      recvtype, src, MPIR_ALLTOALLV_TAG,
                                      comm, &status, errflag);
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 2e82bbc..65a64b8 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -197,7 +197,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
         for (i=1; i<comm_size; i++) {
             src = (rank - i + comm_size) % comm_size;
             dst = (rank + i) % comm_size;
-            mpi_errno = MPIC_Sendrecv_ft(((char *)sendbuf+sdispls[dst]), 
+            mpi_errno = MPIC_Sendrecv(((char *)sendbuf+sdispls[dst]),
                                          sendcounts[dst], sendtypes[dst], dst,
                                          MPIR_ALLTOALLW_TAG, 
                                          ((char *)recvbuf+rdispls[src]), 
@@ -294,7 +294,7 @@ int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int
             sendtype = sendtypes[dst];
         }
 
-        mpi_errno = MPIC_Sendrecv_ft(sendaddr, sendcount, sendtype,
+        mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype,
                                      dst, MPIR_ALLTOALLW_TAG, recvaddr,
                                      recvcount, recvtype, src,
                                      MPIR_ALLTOALLW_TAG, comm, &status, errflag);
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 8c056e6..aec6cb0 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -73,7 +73,7 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, int *errflag )
     while (mask < size) {
         dst = (rank + mask) % size;
         src = (rank - mask + size) % size;
-        mpi_errno = MPIC_Sendrecv_ft(NULL, 0, MPI_BYTE, dst,
+        mpi_errno = MPIC_Sendrecv(NULL, 0, MPI_BYTE, dst,
                                      MPIR_BARRIER_TAG, NULL, 0, MPI_BYTE,
                                      src, MPIR_BARRIER_TAG, comm,
                                      MPI_STATUS_IGNORE, errflag);
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 4df5443..0a97422 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -513,7 +513,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
 
         if (relative_dst < comm_size)
         {
-            mpi_errno = MPIC_Sendrecv_ft(((char *)tmp_buf + send_offset),
+            mpi_errno = MPIC_Sendrecv(((char *)tmp_buf + send_offset),
                                          curr_size, MPI_BYTE, dst, MPIR_BCAST_TAG, 
                                          ((char *)tmp_buf + recv_offset),
                                          (nbytes-recv_offset < 0 ? 0 : nbytes-recv_offset), 
@@ -814,7 +814,7 @@ static int MPIR_Bcast_scatter_ring_allgather(
             right_count = 0;
         right_disp = rel_j * scatter_size;
 
-        mpi_errno = MPIC_Sendrecv_ft((char *)tmp_buf + right_disp, right_count,
+        mpi_errno = MPIC_Sendrecv((char *)tmp_buf + right_disp, right_count,
                                      MPI_BYTE, right, MPIR_BCAST_TAG,
                                      (char *)tmp_buf + left_disp, left_count,
                                      MPI_BYTE, left, MPIR_BCAST_TAG,
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 563ccfd..ef5451e 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -150,7 +150,7 @@ int MPIR_Exscan (
         dst = rank ^ mask;
         if (dst < comm_size) {
             /* Send partial_scan to dst. Recv into tmp_buf */
-            mpi_errno = MPIC_Sendrecv_ft(partial_scan, count, datatype,
+            mpi_errno = MPIC_Sendrecv(partial_scan, count, datatype,
                                          dst, MPIR_EXSCAN_TAG, tmp_buf,
                                          count, datatype, dst,
                                          MPIR_EXSCAN_TAG, comm,
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index f73ea85..3e12a22 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -40,57 +40,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 }
 
 
-#undef FUNCNAME
-#define FUNCNAME MPIC_Sendrecv
-#undef FCNAME
-#define FCNAME "MPIC_Sendrecv"
-static int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                         int dest, int sendtag, void *recvbuf, int recvcount,
-                         MPI_Datatype recvtype, int source, int recvtag,
-                         MPI_Comm comm, MPI_Status *status)
-{
-    MPID_Request *recv_req_ptr=NULL, *send_req_ptr=NULL;
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Comm *comm_ptr = NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_SENDRECV);
-
-    MPIDI_PT2PT_FUNC_ENTER_BOTH(MPID_STATE_MPIC_SENDRECV);
-
-    MPIU_ERR_CHKANDJUMP1((sendcount < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", sendcount);
-    MPIU_ERR_CHKANDJUMP1((recvcount < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", recvcount);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Irecv(recvbuf, recvcount, recvtype, source, recvtag,
-                           comm_ptr, context_id, &recv_req_ptr);
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-    mpi_errno = MPID_Isend(sendbuf, sendcount, sendtype, dest, sendtag, 
-                           comm_ptr, context_id, &send_req_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-
-    mpi_errno = MPIC_Wait(send_req_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-    
-    mpi_errno = MPIC_Wait(recv_req_ptr);
-    if (mpi_errno) { MPIU_ERR_POPFATAL(mpi_errno); }
-    if (status != MPI_STATUS_IGNORE)
-        *status = recv_req_ptr->status;
-    mpi_errno = recv_req_ptr->status.MPI_ERROR;
-
-    MPID_Request_release(send_req_ptr);
-    MPID_Request_release(recv_req_ptr);
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    MPIDI_PT2PT_FUNC_EXIT_BOTH(MPID_STATE_MPIC_SENDRECV);
-    return mpi_errno;
-    /* --END ERROR HANDLING-- */
-}
-
 /* NOTE: for regular collectives (as opposed to irregular collectives) calling
  * this function repeatedly will almost always be slower than performing the
  * equivalent inline because of the overhead of the repeated malloc/free */
@@ -551,10 +500,10 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Sendrecv_ft
+#define FUNCNAME MPIC_Sendrecv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Sendrecv_ft(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, int recvcount,
                      MPI_Datatype recvtype, int source, int recvtag,
                      MPI_Comm comm, MPI_Status *status, int *errflag)
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index b7cecb9..e430084 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -593,7 +593,7 @@ int MPIR_Ireduce_scatter_rec_dbl(const void *sendbuf, void *recvbuf, const int r
          * will in the future when we update the NBC code to be fault-tolerant
          * in roughly the same fashion. [goodell@ 2011-03-03] */
         /* The following reduction is done here instead of after
-           the MPIC_Sendrecv_ft or MPIC_Recv above. This is
+           the MPIC_Sendrecv or MPIC_Recv above. This is
            because to do it above, in the noncommutative
            case, we would need an extra temp buffer so as not to
            overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 956433d..ac23912 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -576,7 +576,7 @@ int MPIR_Ireduce_scatter_block_rec_dbl(const void *sendbuf, void *recvbuf, int r
          * will in the future when we update the NBC code to be fault-tolerant
          * in roughly the same fashion. [goodell@ 2011-03-03] */
         /* The following reduction is done here instead of after
-           the MPIC_Sendrecv_ft or MPIC_Recv above. This is
+           the MPIC_Sendrecv or MPIC_Recv above. This is
            because to do it above, in the noncommutative
            case, we would need an extra temp buffer so as not to
            overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index b6d728f..c78ec42 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -109,7 +109,7 @@ static int MPIR_Reduce_scatter_noncomm(const void *sendbuf, void *recvbuf, const
             send_offset += size;
         }
 
-        mpi_errno = MPIC_Sendrecv_ft(outgoing_data + send_offset*true_extent,
+        mpi_errno = MPIC_Sendrecv(outgoing_data + send_offset*true_extent,
                                      size, datatype, peer, MPIR_REDUCE_SCATTER_TAG,
                                      incoming_data + recv_offset*true_extent,
                                      size, datatype, peer, MPIR_REDUCE_SCATTER_TAG,
@@ -414,7 +414,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
 */
                 /* Send data from tmp_results. Recv into tmp_recvbuf */ 
                 if ((send_cnt != 0) && (recv_cnt != 0)) 
-                    mpi_errno = MPIC_Sendrecv_ft((char *) tmp_results +
+                    mpi_errno = MPIC_Sendrecv((char *) tmp_results +
                                                  newdisps[send_idx]*extent,
                                                  send_cnt, datatype,
                                                  dst, MPIR_REDUCE_SCATTER_TAG,
@@ -530,14 +530,14 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
             /* send the data that dst needs. recv data that this process
                needs from src into tmp_recvbuf */
             if (sendbuf != MPI_IN_PLACE) 
-                mpi_errno = MPIC_Sendrecv_ft(((char *)sendbuf+disps[dst]*extent), 
+                mpi_errno = MPIC_Sendrecv(((char *)sendbuf+disps[dst]*extent),
                                              recvcounts[dst], datatype, dst,
                                              MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf,
                                              recvcounts[rank], datatype, src,
                                              MPIR_REDUCE_SCATTER_TAG, comm,
                                              MPI_STATUS_IGNORE, errflag);
             else
-                mpi_errno = MPIC_Sendrecv_ft(((char *)recvbuf+disps[dst]*extent), 
+                mpi_errno = MPIC_Sendrecv(((char *)recvbuf+disps[dst]*extent),
                                              recvcounts[dst], datatype, dst,
                                              MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf,
                                              recvcounts[rank], datatype, src,
@@ -714,7 +714,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                        received in tmp_recvbuf and then accumulated into
                        tmp_results. accumulation is done later below.   */ 
 
-                    mpi_errno = MPIC_Sendrecv_ft(tmp_results, 1, sendtype, dst,
+                    mpi_errno = MPIC_Sendrecv(tmp_results, 1, sendtype, dst,
                                                  MPIR_REDUCE_SCATTER_TAG, 
                                                  tmp_recvbuf, 1, recvtype, dst,
                                                  MPIR_REDUCE_SCATTER_TAG, comm,
@@ -796,7 +796,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                 }
 
                 /* The following reduction is done here instead of after 
-                   the MPIC_Sendrecv_ft or MPIC_Recv above. This is
+                   the MPIC_Sendrecv or MPIC_Recv above. This is
                    because to do it above, in the noncommutative 
                    case, we would need an extra temp buffer so as not to
                    overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 273b91c..841435b 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -119,7 +119,7 @@ static int MPIR_Reduce_scatter_block_noncomm (
             send_offset += size;
         }
 
-        mpi_errno = MPIC_Sendrecv_ft(outgoing_data + send_offset*true_extent,
+        mpi_errno = MPIC_Sendrecv(outgoing_data + send_offset*true_extent,
                                      size, datatype, peer, MPIR_REDUCE_SCATTER_BLOCK_TAG,
                                      incoming_data + recv_offset*true_extent,
                                      size, datatype, peer, MPIR_REDUCE_SCATTER_BLOCK_TAG,
@@ -431,7 +431,7 @@ int MPIR_Reduce_scatter_block_intra (
 */
                 /* Send data from tmp_results. Recv into tmp_recvbuf */ 
                 if ((send_cnt != 0) && (recv_cnt != 0)) 
-                    mpi_errno = MPIC_Sendrecv_ft((char *) tmp_results +
+                    mpi_errno = MPIC_Sendrecv((char *) tmp_results +
                                                  newdisps[send_idx]*extent,
                                                  send_cnt, datatype,
                                                  dst, MPIR_REDUCE_SCATTER_BLOCK_TAG,
@@ -534,14 +534,14 @@ int MPIR_Reduce_scatter_block_intra (
             /* send the data that dst needs. recv data that this process
                needs from src into tmp_recvbuf */
             if (sendbuf != MPI_IN_PLACE) 
-                mpi_errno = MPIC_Sendrecv_ft(((char *)sendbuf+disps[dst]*extent), 
+                mpi_errno = MPIC_Sendrecv(((char *)sendbuf+disps[dst]*extent),
                                              recvcount, datatype, dst,
                                              MPIR_REDUCE_SCATTER_BLOCK_TAG, tmp_recvbuf,
                                              recvcount, datatype, src,
                                              MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
                                              MPI_STATUS_IGNORE, errflag);
             else
-                mpi_errno = MPIC_Sendrecv_ft(((char *)recvbuf+disps[dst]*extent), 
+                mpi_errno = MPIC_Sendrecv(((char *)recvbuf+disps[dst]*extent),
                                              recvcount, datatype, dst,
                                              MPIR_REDUCE_SCATTER_BLOCK_TAG, tmp_recvbuf,
                                              recvcount, datatype, src,
@@ -707,7 +707,7 @@ int MPIR_Reduce_scatter_block_intra (
                        received in tmp_recvbuf and then accumulated into
                        tmp_results. accumulation is done later below.   */ 
 
-                    mpi_errno = MPIC_Sendrecv_ft(tmp_results, 1, sendtype, dst,
+                    mpi_errno = MPIC_Sendrecv(tmp_results, 1, sendtype, dst,
                                                  MPIR_REDUCE_SCATTER_BLOCK_TAG, 
                                                  tmp_recvbuf, 1, recvtype, dst,
                                                  MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
@@ -789,7 +789,7 @@ int MPIR_Reduce_scatter_block_intra (
                 }
 
                 /* The following reduction is done here instead of after 
-                   the MPIC_Sendrecv_ft or MPIC_Recv above. This is
+                   the MPIC_Sendrecv or MPIC_Recv above. This is
                    because to do it above, in the noncommutative 
                    case, we would need an extra temp buffer so as not to
                    overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 06a48a1..4168698 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -413,7 +413,7 @@ static int MPIR_Reduce_redscat_gather (
                   send_cnt, recv_cnt, last_idx);
 */
             /* Send data from recvbuf. Recv into tmp_buf */ 
-            mpi_errno = MPIC_Sendrecv_ft((char *) recvbuf +
+            mpi_errno = MPIC_Sendrecv((char *) recvbuf +
                                          disps[send_idx]*extent,
                                          send_cnt, datatype,
                                          dst, MPIR_REDUCE_TAG,
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index efb8b6b..5ff546a 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -150,7 +150,7 @@ static int MPIR_Scan_generic (
         dst = rank ^ mask;
         if (dst < comm_size) {
             /* Send partial_scan to dst. Recv into tmp_buf */
-            mpi_errno = MPIC_Sendrecv_ft(partial_scan, count, datatype,
+            mpi_errno = MPIC_Sendrecv(partial_scan, count, datatype,
                                          dst, MPIR_SCAN_TAG, tmp_buf,
                                          count, datatype, dst,
                                          MPIR_SCAN_TAG, comm,
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index 8424377..abf01ea 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -383,7 +383,7 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
         info[0] = new_context_id;
         info[1] = group_ptr->size;
 
-        mpi_errno = MPIC_Sendrecv_ft(info, 2, MPI_INT, 0, 0,
+        mpi_errno = MPIC_Sendrecv(info, 2, MPI_INT, 0, 0,
                                      rinfo, 2, MPI_INT, 0, 0,
                                      comm, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
@@ -397,7 +397,7 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
                             mpi_errno,"remote_mapping");
 
         /* Populate and exchange the ranks */
-        mpi_errno = MPIC_Sendrecv_ft( mapping, group_ptr->size, MPI_INT, 0, 0,
+        mpi_errno = MPIC_Sendrecv( mapping, group_ptr->size, MPI_INT, 0, 0,
                                       remote_mapping, remote_size, MPI_INT, 0, 0,
                                       comm, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 8a23f23..d53935d 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -231,7 +231,7 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
     /* In the intercomm case, we need to exchange the context ids */
     if (comm_ptr->comm_kind == MPID_INTERCOMM) {
 	if (comm_ptr->rank == 0) {
-	    mpi_errno = MPIC_Sendrecv_ft( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
+	    mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
 				       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 
 				       0, 0, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
 	    if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 5b6629e..4c2460e 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -1409,7 +1409,7 @@ int MPIR_Get_intercomm_contextid( MPID_Comm *comm_ptr, MPIR_Context_id_t *contex
        exchange data */
     remote_context_id = -1;
     if (comm_ptr->rank == 0) {
-        mpi_errno = MPIC_Sendrecv_ft( &mycontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
+        mpi_errno = MPIC_Sendrecv( &mycontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
                                       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
                                       comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index f960f15..04a4ab3 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -223,7 +223,7 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
         /* printf( "About to sendrecv in intercomm_create\n" );fflush(stdout);*/
         MPIU_DBG_MSG_FMT(COMM,VERBOSE,(MPIU_DBG_FDEST,"rank %d sendrecv to rank %d", peer_comm_ptr->rank,
                                        remote_leader));
-        mpi_errno = MPIC_Sendrecv_ft( &local_size,  1, MPI_INT,
+        mpi_errno = MPIC_Sendrecv( &local_size,  1, MPI_INT,
                                       remote_leader, cts_tag,
                                       &remote_size, 1, MPI_INT,
                                       remote_leader, cts_tag,
@@ -243,7 +243,7 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
         /* Exchange the lpid arrays */
-        mpi_errno = MPIC_Sendrecv_ft( local_gpids, 2*local_size, MPI_INT,
+        mpi_errno = MPIC_Sendrecv( local_gpids, 2*local_size, MPI_INT,
                                       remote_leader, cts_tag,
                                       remote_gpids, 2*remote_size, MPI_INT,
                                       remote_leader, cts_tag, peer_comm_ptr->handle,
@@ -302,7 +302,7 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
     if (local_comm_ptr->rank == local_leader) {
         MPIR_Context_id_t remote_context_id;
 
-        mpi_errno = MPIC_Sendrecv_ft( &recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
+        mpi_errno = MPIC_Sendrecv( &recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
                                       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
                                       peer_comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 36f0f5e..5c7b8ce 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -51,7 +51,7 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
     if (comm_ptr->rank == 0) {
         /* This routine allows use to use the collective communication
            context rather than the point-to-point context. */
-        mpi_errno = MPIC_Sendrecv_ft( &local_high, 1, MPI_INT, 0, 0,
+        mpi_errno = MPIC_Sendrecv( &local_high, 1, MPI_INT, 0, 0,
                                       &remote_high, 1, MPI_INT, 0, 0, comm_ptr->handle,
                                       MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -65,7 +65,7 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
             mpi_errno = MPID_GPID_Get( comm_ptr, 0, ingpid );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             
-            mpi_errno = MPIC_Sendrecv_ft( ingpid, 2, MPI_INT, 0, 1,
+            mpi_errno = MPIC_Sendrecv( ingpid, 2, MPI_INT, 0, 1,
                                           outgpid, 2, MPI_INT, 0, 1, comm_ptr->handle,
                                           MPI_STATUS_IGNORE, &errflag );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index b12d685..6bad491 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -397,7 +397,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 	MPIU_DBG_MSG_FMT(CH3_CONNECT,VERBOSE,(MPIU_DBG_FDEST,
 		  "sending 3 ints, %d, %d and %d, and receiving 3 ints", 
                   send_ints[0], send_ints[1], send_ints[2]));
-        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
                                      sendtag++, recv_ints, 3, MPI_INT,
                                      0, recvtag++, tmp_comm->handle,
                                      MPI_STATUS_IGNORE, &errflag);
@@ -440,7 +440,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 	MPIU_DBG_MSG_FMT(CH3_CONNECT,VERBOSE,(MPIU_DBG_FDEST,
                "sending %d ints, receiving %d ints", 
 	      local_comm_size * 2, remote_comm_size * 2));
-	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 2,
+	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 2,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 2, 
 				  MPI_INT, 0, recvtag++, tmp_comm->handle, 
@@ -497,7 +497,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     if (rank == root)
     {
 	MPIU_DBG_MSG(CH3_CONNECT,VERBOSE,"sync with peer");
-        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
                                      sendtag++, &j, 0, MPI_INT,
                                      0, recvtag++, tmp_comm->handle,
                                      MPI_STATUS_IGNORE, &errflag);
@@ -995,7 +995,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = (*newcomm)->recvcontext_id;
 
 	/*printf("accept:sending 3 ints, %d, %d, %d, and receiving 2 ints\n", send_ints[0], send_ints[1], send_ints[2]);fflush(stdout);*/
-        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
                                      sendtag++, recv_ints, 3, MPI_INT,
                                      0, recvtag++, tmp_comm->handle,
                                      MPI_STATUS_IGNORE, &errflag);
@@ -1034,7 +1034,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
 
 	/* Receive the translations from remote process rank to process group index */
 	/*printf("accept:sending %d ints and receiving %d ints\n", local_comm_size * 2, remote_comm_size * 2);fflush(stdout);*/
-	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 2,
+	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 2,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 2, 
 				  MPI_INT, 0, recvtag++, tmp_comm->handle, 
@@ -1086,7 +1086,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     if (rank == root)
     {
 	MPIU_DBG_MSG(CH3_CONNECT,VERBOSE,"sync with peer");
-        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
                                      sendtag++, &j, 0, MPI_INT,
                                      0, recvtag++, tmp_comm->handle,
                                      MPI_STATUS_IGNORE, &errflag);
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index 3d979c3..debd352 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -561,14 +561,14 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = recvcontext_id;
 
 	TRACE_ERR("connect:sending 3 ints, %d, %d, %d, and receiving 2 ints with sendtag=%d recvtag=%d\n", send_ints[0], send_ints[1], send_ints[2], sendtag, recvtag);
-        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
                                   sendtag++, recv_ints, 3, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 
         mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
@@ -577,7 +577,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-            TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+            TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
         }
     }
 
@@ -609,13 +609,13 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 					n_remote_pgs, remote_pg );
 	/* Receive the translations from remote process rank to process group
 	   index */
-	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 3,
+	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 3,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 3,
 				  MPI_INT, 0, recvtag++, tmp_comm->handle,
 				  MPI_STATUS_IGNORE, &errflag);
 	if (mpi_errno) {
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 
 	for (i=0; i<remote_comm_size; i++)
@@ -675,12 +675,12 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     /* synchronize with remote root */
     if (rank == root)
     {
-        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
                                   sendtag++, &j, 0, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
         }
 
         /* All communication with remote root done. Release the communicator. */
@@ -1211,22 +1211,22 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = (*newcomm)->recvcontext_id;
 
 	TRACE_ERR("accept:sending 3 ints, %d, %d, %d, and receiving 2 ints with sendtag=%d recvtag=%d\n", send_ints[0], send_ints[1], send_ints[2], sendtag, recvtag);
-        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
                                   sendtag++, recv_ints, 3, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 #if 0
 	send_char = pg_list->str;
 	TRACE_ERR("accept:sending 1 string and receiving 1 string\n", send_char, recv_char);
-        mpi_errno = MPIC_Sendrecv_ft(send_char, 1, MPI_CHAR, 0,
+        mpi_errno = MPIC_Sendrecv(send_char, 1, MPI_CHAR, 0,
                                      sendtag++, recv_char, 3, MPI_CHAR,
                                      0, recvtag++, tmp_comm->handle,
                                      MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
 	}
 #endif
         mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
@@ -1235,7 +1235,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-            TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+            TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
         }
 
     }
@@ -1268,7 +1268,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
 
 	/* Receive the translations from remote process rank to process group index */
 	TRACE_ERR("accept:sending %d ints and receiving %d ints\n", local_comm_size * 2, remote_comm_size * 2);
-	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 3,
+	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 3,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 3,
 				  MPI_INT, 0, recvtag++, tmp_comm->handle,
@@ -1334,12 +1334,12 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     /* synchronize with remote root */
     if (rank == root)
     {
-        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
                                   sendtag++, &j, 0, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
                                   MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
         }
 
         /* All communication with remote root done. Release the communicator. */

http://git.mpich.org/mpich.git/commitdiff/ddeb54a4ae04b1728fe2c0baba51d0dc88017e4c

commit ddeb54a4ae04b1728fe2c0baba51d0dc88017e4c
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jul 1 14:41:39 2013 -0500

    Rename MPIC_Ssend_ft to MPIC_Ssend
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 66bbae0..7d36563 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3887,7 +3887,7 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
                  MPI_Comm comm, int *errflag);
 int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                  MPI_Comm comm, MPI_Status *status, int *errflag);
-int MPIC_Ssend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, int *errflag);
 int MPIC_Sendrecv_ft(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, int recvcount,
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 56e9553..ea5ab96 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -148,7 +148,7 @@ int MPIR_Gatherv (
                 MPIR_PARAM_GET_DEFAULT_INT(GATHERV_INTER_SSEND_MIN_PROCS,&min_procs);
 
             if (comm_size >= min_procs) {
-                mpi_errno = MPIC_Ssend_ft(sendbuf, sendcount, sendtype, root,
+                mpi_errno = MPIC_Ssend(sendbuf, sendcount, sendtype, root,
                                           MPIR_GATHERV_TAG, comm, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 443f092..f73ea85 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -505,10 +505,10 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Ssend_ft
+#define FUNCNAME MPIC_Ssend
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Ssend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;

http://git.mpich.org/mpich.git/commitdiff/3e3adf97317f5668d0bd1f4606c9775bd8fe40de

commit 3e3adf97317f5668d0bd1f4606c9775bd8fe40de
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 28 14:58:35 2013 -0500

    Rename MPIC_Send_ft to MPIC_Send
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index faefa43..66bbae0 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3883,7 +3883,7 @@ int MPIC_Wait(MPID_Request * request_ptr);
 int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
 
 /* FT versions of te MPIC_ functions */
-int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                  MPI_Comm comm, int *errflag);
 int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                  MPI_Comm comm, MPI_Status *status, int *errflag);
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index d0e9fb3..f31f7b6 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -233,7 +233,7 @@ int MPIR_Allgather_intra (
                         if ((dst > rank) && 
                             (rank < tree_root + nprocs_completed)
                             && (dst >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Send_ft(((char *)recvbuf + offset),
+                            mpi_errno = MPIC_Send(((char *)recvbuf + offset),
                                                      last_recv_cnt,
                                                      recvtype, dst,
                                                      MPIR_ALLGATHER_TAG, comm, errflag); 
@@ -394,7 +394,7 @@ int MPIR_Allgather_intra (
                             (rank < tree_root + nprocs_completed)
                             && (dst >= tree_root + nprocs_completed)) {
                             
-                            mpi_errno = MPIC_Send_ft(((char *)tmp_buf + offset),
+                            mpi_errno = MPIC_Send(((char *)tmp_buf + offset),
                                                      last_recv_cnt, MPI_BYTE,
                                                      dst, MPIR_ALLGATHER_TAG,
                                                      comm, errflag);
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 7a2bde4..3fc34b1 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -257,7 +257,7 @@ int MPIR_Allgatherv_intra (
                                 offset += recvcounts[j];
                             offset *= recvtype_extent;
 
-                            mpi_errno = MPIC_Send_ft(((char *)tmp_buf + offset),
+                            mpi_errno = MPIC_Send(((char *)tmp_buf + offset),
                                                      last_recv_cnt,
                                                      recvtype, dst,
                                                      MPIR_ALLGATHERV_TAG, comm, errflag);
@@ -450,7 +450,7 @@ int MPIR_Allgatherv_intra (
                             (rank < tree_root + nprocs_completed)
                             && (dst >= tree_root + nprocs_completed)) {
                             
-                            mpi_errno = MPIC_Send_ft(((char *)tmp_buf + offset),
+                            mpi_errno = MPIC_Send(((char *)tmp_buf + offset),
                                                      last_recv_cnt, MPI_BYTE,
                                                      dst, MPIR_ALLGATHERV_TAG,
                                                      comm, errflag);
@@ -683,7 +683,7 @@ int MPIR_Allgatherv_intra (
 		torecv -= recvnow;
 	    }
 	    else if (!recvnow) { /* If there's no data to receive, just do a send call */
-		mpi_errno = MPIC_Send_ft(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, comm, errflag);
+		mpi_errno = MPIC_Send(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, comm, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
                     *errflag = TRUE;
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index c220efa..c3b3945 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -90,7 +90,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
     if (group_rank < 2*rem) {
         if (group_rank % 2 == 0) { /* even */
             to_comm_rank(cdst, group_rank+1);
-            mpi_errno = MPIC_Send_ft(recvbuf, count,
+            mpi_errno = MPIC_Send(recvbuf, count,
                                      datatype, cdst,
                                      tag, comm, errflag);
             if (mpi_errno) {
@@ -329,7 +329,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
     if (group_rank < 2*rem) {
         if (group_rank % 2) { /* odd */
             to_comm_rank(cdst, group_rank-1);
-            mpi_errno = MPIC_Send_ft(recvbuf, count,
+            mpi_errno = MPIC_Send(recvbuf, count,
                                      datatype, cdst,
                                      tag, comm, errflag);
         }
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 07d38df..d4fcce7 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -293,7 +293,7 @@ int MPIR_Allreduce_intra (
         
         if (rank < 2*rem) {
             if (rank % 2 == 0) { /* even */
-                mpi_errno = MPIC_Send_ft(recvbuf, count, 
+                mpi_errno = MPIC_Send(recvbuf, count,
                                          datatype, rank+1,
                                          MPIR_ALLREDUCE_TAG, comm, errflag);
                 if (mpi_errno) {
@@ -528,7 +528,7 @@ int MPIR_Allreduce_intra (
            (rank-1), the ranks who didn't participate above. */
         if (rank < 2*rem) {
             if (rank % 2)  /* odd */
-                mpi_errno = MPIC_Send_ft(recvbuf, count, 
+                mpi_errno = MPIC_Send(recvbuf, count,
                                          datatype, rank-1,
                                          MPIR_ALLREDUCE_TAG, comm, errflag);
             else  /* even */
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index b72031e..794ba4a 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -368,7 +368,7 @@ int MPIR_Alltoall_intra(
                         (rank < tree_root + nprocs_completed)
                         && (dst >= tree_root + nprocs_completed)) {
                         /* send the data received in this step above */
-                        mpi_errno = MPIC_Send_ft(((char *)tmp_buf +
+                        mpi_errno = MPIC_Send(((char *)tmp_buf +
                                                   dst_tree_root*sendbuf_extent),
                                                  last_recv_cnt, sendtype,
                                                  dst, MPIR_ALLTOALL_TAG,
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 9ecaf05..4df5443 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -184,10 +184,10 @@ static int MPIR_Bcast_binomial(
             dst = rank + mask;
             if (dst >= comm_size) dst -= comm_size;
             if (!is_contig || !is_homogeneous)
-                mpi_errno = MPIC_Send_ft(tmp_buf,nbytes,MPI_BYTE,dst,
+                mpi_errno = MPIC_Send(tmp_buf,nbytes,MPI_BYTE,dst,
                                          MPIR_BCAST_TAG,comm, errflag);
             else
-                mpi_errno = MPIC_Send_ft(buffer,count,datatype,dst,
+                mpi_errno = MPIC_Send(buffer,count,datatype,dst,
                                          MPIR_BCAST_TAG,comm, errflag); 
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
@@ -333,7 +333,7 @@ static int scatter_for_bcast(
             {
                 dst = rank + mask;
                 if (dst >= comm_size) dst -= comm_size;
-                mpi_errno = MPIC_Send_ft(((char *)tmp_buf +
+                mpi_errno = MPIC_Send(((char *)tmp_buf +
                                           scatter_size*(relative_rank+mask)),
                                          send_size, MPI_BYTE, dst,
                                          MPIR_BCAST_TAG, comm, errflag);
@@ -589,7 +589,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
 
                     /* printf("Rank %d, send to %d, offset %d, size %d\n", rank, dst, offset, recv_size);
                        fflush(stdout); */
-                    mpi_errno = MPIC_Send_ft(((char *)tmp_buf + offset),
+                    mpi_errno = MPIC_Send(((char *)tmp_buf + offset),
                                              recv_size, MPI_BYTE, dst,
                                              MPIR_BCAST_TAG, comm, errflag); 
                     /* recv_size was set in the previous
@@ -952,7 +952,7 @@ static int MPIR_SMP_Bcast(
             MPIU_Get_intranode_rank(comm_ptr, root) > 0) /* is not the node root (0) */ 
         {                                                /* and is on our node (!-1) */
             if (root == comm_ptr->rank) {
-                mpi_errno = MPIC_Send_ft(buffer,count,datatype,0,
+                mpi_errno = MPIC_Send(buffer,count,datatype,0,
                                          MPIR_BCAST_TAG,comm_ptr->node_comm->handle, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -1283,7 +1283,7 @@ int MPIR_Bcast_inter (
     {
         /* root sends to rank 0 on remote group and returns */
         MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
-        mpi_errno =  MPIC_Send_ft(buffer, count, datatype, 0,
+        mpi_errno =  MPIC_Send(buffer, count, datatype, 0,
                                   MPIR_BCAST_TAG, comm, errflag); 
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 23995cf..d8ca2ec 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -268,7 +268,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 		if (!tmp_buf_size)
 		{
                     /* leaf nodes send directly from sendbuf */
-                    mpi_errno = MPIC_Send_ft(sendbuf, sendcount, sendtype, dst,
+                    mpi_errno = MPIC_Send(sendbuf, sendcount, sendtype, dst,
                                              MPIR_GATHER_TAG, comm, errflag);
                     if (mpi_errno) {
                         /* for communication errors, just record the error but continue */
@@ -278,7 +278,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     }
                 }
                 else if (nbytes < MPIR_PARAM_GATHER_VSMALL_MSG_SIZE) {
-		    mpi_errno = MPIC_Send_ft(tmp_buf, curr_cnt, MPI_BYTE, dst,
+		    mpi_errno = MPIC_Send(tmp_buf, curr_cnt, MPI_BYTE, dst,
                                              MPIR_GATHER_TAG, comm, errflag);
                     if (mpi_errno) {
                         /* for communication errors, just record the error but continue */
@@ -301,7 +301,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 		    mpi_errno = MPIR_Type_commit_impl(&tmp_type);
                     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
-		    mpi_errno = MPIC_Send_ft(MPI_BOTTOM, 1, tmp_type, dst,
+		    mpi_errno = MPIC_Send(MPI_BOTTOM, 1, tmp_type, dst,
                                              MPIR_GATHER_TAG, comm, errflag);
                     if (mpi_errno) {
                         /* for communication errors, just record the error but continue */
@@ -393,7 +393,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 	    {
                 dst = relative_rank ^ mask;
                 dst = (dst + root) % comm_size;
-                mpi_errno = MPIC_Send_ft(tmp_buf, curr_cnt, MPI_BYTE, dst,
+                mpi_errno = MPIC_Send(tmp_buf, curr_cnt, MPI_BYTE, dst,
                                          MPIR_GATHER_TAG, comm, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -560,7 +560,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             
             if (rank == 0)
 	    {
-                mpi_errno = MPIC_Send_ft(tmp_buf, sendcount*local_size,
+                mpi_errno = MPIC_Send(tmp_buf, sendcount*local_size,
                                          sendtype, root,
                                          MPIR_GATHER_TAG, comm, errflag);
                 if (mpi_errno) {
@@ -596,7 +596,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
         }
         else
 	{
-            mpi_errno = MPIC_Send_ft(sendbuf,sendcount,sendtype,root,
+            mpi_errno = MPIC_Send(sendbuf,sendcount,sendtype,root,
                                      MPIR_GATHER_TAG,comm, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 8b14800..56e9553 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -158,7 +158,7 @@ int MPIR_Gatherv (
                 }
             }
             else {
-                mpi_errno = MPIC_Send_ft(sendbuf, sendcount, sendtype, root,
+                mpi_errno = MPIC_Send(sendbuf, sendcount, sendtype, root,
                                          MPIR_GATHERV_TAG, comm, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 6703958..443f092 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -396,10 +396,10 @@ int MPIC_Wait(MPID_Request * request_ptr)
    this is OK since there is no data that can be received corrupted. */
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Send_ft
+#define FUNCNAME MPIC_Send
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                  MPI_Comm comm, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index 270b338..ffdda09 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -327,7 +327,7 @@ int MPIR_Igather_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendt
             {
                 dst = relative_rank ^ mask;
                 dst = (dst + root) % comm_size;
-                mpi_errno = MPIC_Send_ft(tmp_buf, curr_cnt, MPI_BYTE, dst,
+                mpi_errno = MPIC_Send(tmp_buf, curr_cnt, MPI_BYTE, dst,
                                          MPIR_GATHER_TAG, comm, errflag);
                 if (mpi_errno) MPIU_ERR_POP(mpi_errno);
                 break;
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 3d77fd3..0a9d0b9 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -388,7 +388,7 @@ int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
 
                 send_subtree_cnt = curr_cnt - nbytes * mask;
                 /* mask is also the size of this process's subtree */
-                mpi_errno = MPIC_Send_ft(((char *)tmp_buf + nbytes*mask),
+                mpi_errno = MPIC_Send(((char *)tmp_buf + nbytes*mask),
                                          send_subtree_cnt, MPI_BYTE, dst,
                                          MPIR_SCATTER_TAG, comm, errflag);
                 if (mpi_errno) {
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 0fc360e..b6d728f 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -320,7 +320,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
 
         if (rank < 2*rem) {
             if (rank % 2 == 0) { /* even */
-                mpi_errno = MPIC_Send_ft(tmp_results, total_count, 
+                mpi_errno = MPIC_Send(tmp_results, total_count,
                                          datatype, rank+1,
                                          MPIR_REDUCE_SCATTER_TAG, comm, errflag);
                 if (mpi_errno) {
@@ -430,7 +430,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                                              MPIR_REDUCE_SCATTER_TAG, comm,
                                              MPI_STATUS_IGNORE, errflag);
                 else if ((recv_cnt == 0) && (send_cnt != 0))
-                    mpi_errno = MPIC_Send_ft((char *) tmp_results +
+                    mpi_errno = MPIC_Send((char *) tmp_results +
                                              newdisps[send_idx]*extent,
                                              send_cnt, datatype,
                                              dst, MPIR_REDUCE_SCATTER_TAG,
@@ -476,7 +476,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
         if (rank < 2*rem) {
             if (rank % 2) { /* odd */
                 if (recvcounts[rank-1]) {
-                    mpi_errno = MPIC_Send_ft((char *) tmp_results +
+                    mpi_errno = MPIC_Send((char *) tmp_results +
                                              disps[rank-1]*extent, recvcounts[rank-1],
                                              datatype, rank-1,
                                              MPIR_REDUCE_SCATTER_TAG, comm, errflag);
@@ -764,7 +764,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                             (rank < tree_root + nprocs_completed)
                             && (dst >= tree_root + nprocs_completed)) {
                             /* send the current result */
-                            mpi_errno = MPIC_Send_ft(tmp_recvbuf, 1, recvtype,
+                            mpi_errno = MPIC_Send(tmp_recvbuf, 1, recvtype,
                                                      dst, MPIR_REDUCE_SCATTER_TAG,
                                                      comm, errflag);
                             if (mpi_errno) {
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 4d6a5ac..273b91c 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -337,7 +337,7 @@ int MPIR_Reduce_scatter_block_intra (
 
         if (rank < 2*rem) {
             if (rank % 2 == 0) { /* even */
-                mpi_errno = MPIC_Send_ft(tmp_results, total_count, 
+                mpi_errno = MPIC_Send(tmp_results, total_count,
                                          datatype, rank+1,
                                          MPIR_REDUCE_SCATTER_BLOCK_TAG, comm, errflag);
                 if (mpi_errno) {
@@ -447,7 +447,7 @@ int MPIR_Reduce_scatter_block_intra (
                                              MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
                                              MPI_STATUS_IGNORE, errflag);
                 else if ((recv_cnt == 0) && (send_cnt != 0))
-                    mpi_errno = MPIC_Send_ft((char *) tmp_results +
+                    mpi_errno = MPIC_Send((char *) tmp_results +
                                              newdisps[send_idx]*extent,
                                              send_cnt, datatype,
                                              dst, MPIR_REDUCE_SCATTER_BLOCK_TAG,
@@ -489,7 +489,7 @@ int MPIR_Reduce_scatter_block_intra (
            calculated for that process */
         if (rank < 2*rem) {
             if (rank % 2) { /* odd */
-                mpi_errno = MPIC_Send_ft((char *) tmp_results +
+                mpi_errno = MPIC_Send((char *) tmp_results +
                                          disps[rank-1]*extent, recvcount,
                                          datatype, rank-1,
                                          MPIR_REDUCE_SCATTER_BLOCK_TAG, comm, errflag);
@@ -757,7 +757,7 @@ int MPIR_Reduce_scatter_block_intra (
                             (rank < tree_root + nprocs_completed)
                             && (dst >= tree_root + nprocs_completed)) {
                             /* send the current result */
-                            mpi_errno = MPIC_Send_ft(tmp_recvbuf, 1, recvtype,
+                            mpi_errno = MPIC_Send(tmp_recvbuf, 1, recvtype,
                                                      dst, MPIR_REDUCE_SCATTER_BLOCK_TAG,
                                                      comm, errflag);
                             if (mpi_errno) {
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index d68d3dd..06a48a1 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -165,7 +165,7 @@ static int MPIR_Reduce_binomial (
             /* I've received all that I'm going to.  Send my result to 
                my parent */
             source = ((relrank & (~ mask)) + lroot) % comm_size;
-            mpi_errno  = MPIC_Send_ft(recvbuf, count, datatype,
+            mpi_errno  = MPIC_Send(recvbuf, count, datatype,
                                       source, MPIR_REDUCE_TAG, comm, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
@@ -182,7 +182,7 @@ static int MPIR_Reduce_binomial (
     {
         if (rank == 0)
         {
-            mpi_errno  = MPIC_Send_ft(recvbuf, count, datatype, root,
+            mpi_errno  = MPIC_Send(recvbuf, count, datatype, root,
                                       MPIR_REDUCE_TAG, comm, errflag);
         }
         else if (rank == root)
@@ -327,7 +327,7 @@ static int MPIR_Reduce_redscat_gather (
     
     if (rank < 2*rem) {
         if (rank % 2 != 0) { /* odd */
-            mpi_errno = MPIC_Send_ft(recvbuf, count,
+            mpi_errno = MPIC_Send(recvbuf, count,
                                      datatype, rank-1,
                                      MPIR_REDUCE_TAG, comm, errflag);
             if (mpi_errno) {
@@ -482,7 +482,7 @@ static int MPIR_Reduce_redscat_gather (
                 last_idx = 2;
             }
             else if (newrank == 0) {  /* send */
-                mpi_errno = MPIC_Send_ft(recvbuf, cnts[0], datatype,
+                mpi_errno = MPIC_Send(recvbuf, cnts[0], datatype,
                                          root, MPIR_REDUCE_TAG, comm, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -553,7 +553,7 @@ static int MPIR_Reduce_redscat_gather (
                 /* printf("Rank %d, send_idx %d, send_cnt %d, last_idx %d\n", newrank, send_idx, send_cnt, last_idx);
                    fflush(stdout); */
                 /* Send data from recvbuf. Recv into tmp_buf */ 
-                mpi_errno = MPIC_Send_ft((char *) recvbuf +
+                mpi_errno = MPIC_Send((char *) recvbuf +
                                          disps[send_idx]*extent,
                                          send_cnt, datatype,
                                          dst, MPIR_REDUCE_TAG,
@@ -948,7 +948,7 @@ int MPIR_Reduce_inter (
 
         if (rank == 0)
 	{
-            mpi_errno = MPIC_Send_ft(tmp_buf, count, datatype, root,
+            mpi_errno = MPIC_Send(tmp_buf, count, datatype, root,
                                      MPIR_REDUCE_TAG, comm, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index b3e3624..efb8b6b 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -313,7 +313,7 @@ int MPIR_Scan(
              comm_ptr->node_comm != NULL && 
              MPIU_Get_intranode_rank(comm_ptr, rank) == comm_ptr->node_comm->local_size - 1)
     {
-        mpi_errno = MPIC_Send_ft(recvbuf, count, datatype,
+        mpi_errno = MPIC_Send(recvbuf, count, datatype,
                                  0, MPIR_SCAN_TAG, comm_ptr->node_comm->handle, errflag);
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
@@ -345,7 +345,7 @@ int MPIR_Scan(
         if (MPIU_Get_internode_rank(comm_ptr, rank) != 
             comm_ptr->node_roots_comm->local_size-1)
         {
-            mpi_errno = MPIC_Send_ft(prefulldata, count, datatype,
+            mpi_errno = MPIC_Send(prefulldata, count, datatype,
                                      MPIU_Get_internode_rank(comm_ptr, rank) + 1,
                                      MPIR_SCAN_TAG, comm_ptr->node_roots_comm->handle, errflag);
             if (mpi_errno) {
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 0cc0be2..635755b 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -205,7 +205,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
 		{
                     send_subtree_cnt = curr_cnt - sendcount * mask;
                     /* mask is also the size of this process's subtree */
-                    mpi_errno = MPIC_Send_ft(((char *)sendbuf + 
+                    mpi_errno = MPIC_Send(((char *)sendbuf +
                                               extent * sendcount * mask),
                                              send_subtree_cnt,
                                              sendtype, dst,
@@ -216,7 +216,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                     /* non-zero root and others */
                     send_subtree_cnt = curr_cnt - nbytes*mask; 
                     /* mask is also the size of this process's subtree */
-                    mpi_errno = MPIC_Send_ft(((char *)tmp_buf + nbytes*mask),
+                    mpi_errno = MPIC_Send(((char *)tmp_buf + nbytes*mask),
                                              send_subtree_cnt,
                                              MPI_BYTE, dst,
                                              MPIR_SCATTER_TAG, comm, errflag);
@@ -356,7 +356,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                 
                 send_subtree_cnt = curr_cnt - nbytes * mask; 
                 /* mask is also the size of this process's subtree */
-                mpi_errno = MPIC_Send_ft(((char *)tmp_buf + nbytes*mask),
+                mpi_errno = MPIC_Send(((char *)tmp_buf + nbytes*mask),
                                          send_subtree_cnt, MPI_BYTE, dst,
                                          MPIR_SCATTER_TAG, comm, errflag);
                 if (mpi_errno) {
@@ -446,7 +446,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
     if (nbytes < MPIR_PARAM_SCATTER_INTER_SHORT_MSG_SIZE) {
         if (root == MPI_ROOT) {
             /* root sends all data to rank 0 on remote group and returns */
-            mpi_errno = MPIC_Send_ft(sendbuf, sendcount*remote_size,
+            mpi_errno = MPIC_Send(sendbuf, sendcount*remote_size,
                                      sendtype, 0, MPIR_SCATTER_TAG, comm, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
@@ -509,7 +509,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
         if (root == MPI_ROOT) {
             MPID_Datatype_get_extent_macro(sendtype, extent);
             for (i=0; i<remote_size; i++) {
-                mpi_errno = MPIC_Send_ft(((char *)sendbuf+sendcount*i*extent),
+                mpi_errno = MPIC_Send(((char *)sendbuf+sendcount*i*extent),
                                          sendcount, sendtype, i,
                                          MPIR_SCATTER_TAG, comm, errflag);
                 if (mpi_errno) {
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 286da09..b12d685 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -884,14 +884,14 @@ static int SendPGtoPeerAndFree( MPID_Comm *tmp_comm, int *sendtag_p,
 	pg_iter = pg_list;
 	i = pg_iter->lenStr;
 	/*printf("connect:sending 1 int: %d\n", i);fflush(stdout);*/
-	mpi_errno = MPIC_Send_ft(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
+	mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
 	}
 	
 	/* printf("connect:sending string length %d\n", i);fflush(stdout); */
-	mpi_errno = MPIC_Send_ft(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
+	mpi_errno = MPIC_Send(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
 			      tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index ae5fbae..3d979c3 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -1099,14 +1099,14 @@ static int MPIDI_SendPGtoPeerAndFree( struct MPID_Comm *tmp_comm, int *sendtag_p
 	pg_iter = pg_list;
         i = pg_iter->lenStr;
 	TRACE_ERR("connect:sending 1 int: %d\n", i);
-	mpi_errno = MPIC_Send_ft(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
+	mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    TRACE_ERR("MPIC_Send returned with mpi_errno=%d\n", mpi_errno);
 	}
 
 	TRACE_ERR("connect:sending string length %d\n", i);
-	mpi_errno = MPIC_Send_ft(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
+	mpi_errno = MPIC_Send(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
 			      tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
diff --git a/src/pmi/pmi2/poe/poe2pmi.c b/src/pmi/pmi2/poe/poe2pmi.c
index 29a1d31..7132716 100644
--- a/src/pmi/pmi2/poe/poe2pmi.c
+++ b/src/pmi/pmi2/poe/poe2pmi.c
@@ -422,7 +422,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
         parent_rank = (parent) % TASKS;
         result += *recvbuf;
         TRACE_ERR("_mpi_reduce_for_dyntask - send to parent_rank=%d parent taskid=%d \n", parent_rank, pg_world->vct[parent_rank].taskid);
-        MPIC_Send_ft(&result, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
+        MPIC_Send(&result, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
       }
       else
       {
@@ -438,7 +438,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
   if(world_rank != parent && numchildren == 0) {
     parent_rank = (parent) % TASKS;
     TRACE_ERR("_mpi_reduce_for_dyntask - send to parent_rank=%d parent_task_id=%d\n", parent_rank, pg_world->vct[parent_rank].taskid);
-    MPIC_Send_ft(sendbuf, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
+    MPIC_Send(sendbuf, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
   }
 
   if(world_rank == 0) {

http://git.mpich.org/mpich.git/commitdiff/b8e7cbd181439294a4274ab92af88eff69facb4f

commit b8e7cbd181439294a4274ab92af88eff69facb4f
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 28 14:56:51 2013 -0500

    Rename MPIC_Recv_ft to MPIC_Recv
    
    The FT functions are now the default (only) way to call the collective
    helper functions. This is one of a few patches to migrate all uses to no
    longer use the MPIC_*_ft naming scheme.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 3adacbf..faefa43 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3885,7 +3885,7 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
 /* FT versions of te MPIC_ functions */
 int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                  MPI_Comm comm, int *errflag);
-int MPIC_Recv_ft(void *buf, int count, MPI_Datatype datatype, int source, int tag,
+int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                  MPI_Comm comm, MPI_Status *status, int *errflag);
 int MPIC_Ssend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                   MPI_Comm comm, int *errflag);
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index bcfde2f..d0e9fb3 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -252,7 +252,7 @@ int MPIR_Allgather_intra (
                         else if ((dst < rank) && 
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Recv_ft(((char *)recvbuf + offset),  
+                            mpi_errno = MPIC_Recv(((char *)recvbuf + offset),
                                                      (comm_size - (my_tree_root + mask))*recvcount,
                                                      recvtype, dst,
                                                      MPIR_ALLGATHER_TAG,
@@ -413,7 +413,7 @@ int MPIR_Allgather_intra (
                         else if ((dst < rank) && 
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + offset),
+                            mpi_errno = MPIC_Recv(((char *)tmp_buf + offset),
                                                      tmp_buf_size - offset,
                                                      MPI_BYTE, dst,
                                                      MPIR_ALLGATHER_TAG,
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 8833cd5..7a2bde4 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -281,7 +281,7 @@ int MPIR_Allgatherv_intra (
                             for (j=0; j<(my_tree_root+mask); j++)
                                 offset += recvcounts[j];
 
-                            mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + offset * recvtype_extent),
+                            mpi_errno = MPIC_Recv(((char *)tmp_buf + offset * recvtype_extent),
                                                      total_count - offset, recvtype,
                                                      dst, MPIR_ALLGATHERV_TAG,
                                                      comm, &status, errflag);
@@ -469,7 +469,7 @@ int MPIR_Allgatherv_intra (
                         else if ((dst < rank) && 
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + offset),
+                            mpi_errno = MPIC_Recv(((char *)tmp_buf + offset),
                                                      tmp_buf_size-offset, MPI_BYTE,
                                                      dst,
                                                      MPIR_ALLGATHERV_TAG,
@@ -673,7 +673,7 @@ int MPIR_Allgatherv_intra (
 		 * consecutive processes contribute 0 bytes each. */
 	    }
 	    else if (!sendnow) { /* If there's no data to send, just do a recv call */
-		mpi_errno = MPIC_Recv_ft(rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, comm, &status, errflag);
+		mpi_errno = MPIC_Recv(rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, comm, &status, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
                     *errflag = TRUE;
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index 24c514e..c220efa 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -107,7 +107,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
         }
         else { /* odd */
             to_comm_rank(csrc, group_rank-1);
-            mpi_errno = MPIC_Recv_ft(tmp_buf, count,
+            mpi_errno = MPIC_Recv(tmp_buf, count,
                                      datatype, csrc,
                                      tag, comm,
                                      MPI_STATUS_IGNORE, errflag);
@@ -335,7 +335,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
         }
         else { /* even */
             to_comm_rank(csrc, group_rank+1);
-            mpi_errno = MPIC_Recv_ft(recvbuf, count,
+            mpi_errno = MPIC_Recv(recvbuf, count,
                                      datatype, csrc,
                                      tag, comm,
                                      MPI_STATUS_IGNORE, errflag);
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 9a818f5..07d38df 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -309,7 +309,7 @@ int MPIR_Allreduce_intra (
                 newrank = -1; 
             }
             else { /* odd */
-                mpi_errno = MPIC_Recv_ft(tmp_buf, count, 
+                mpi_errno = MPIC_Recv(tmp_buf, count,
                                          datatype, rank-1,
                                          MPIR_ALLREDUCE_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
@@ -532,7 +532,7 @@ int MPIR_Allreduce_intra (
                                          datatype, rank-1,
                                          MPIR_ALLREDUCE_TAG, comm, errflag);
             else  /* even */
-                mpi_errno = MPIC_Recv_ft(recvbuf, count,
+                mpi_errno = MPIC_Recv(recvbuf, count,
                                          datatype, rank+1,
                                          MPIR_ALLREDUCE_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 9082a9b..b72031e 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -385,7 +385,7 @@ int MPIR_Alltoall_intra(
                     else if ((dst < rank) && 
                              (dst < tree_root + nprocs_completed) &&
                              (rank >= tree_root + nprocs_completed)) {
-                        mpi_errno = MPIC_Recv_ft(((char *)tmp_buf +
+                        mpi_errno = MPIC_Recv(((char *)tmp_buf +
                                                   dst_tree_root*sendbuf_extent),
                                                  sendbuf_extent*(comm_size-dst_tree_root),
                                                  sendtype,   
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 261cc78..9ecaf05 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -138,10 +138,10 @@ static int MPIR_Bcast_binomial(
             src = rank - mask; 
             if (src < 0) src += comm_size;
             if (!is_contig || !is_homogeneous)
-                mpi_errno = MPIC_Recv_ft(tmp_buf,nbytes,MPI_BYTE,src,
+                mpi_errno = MPIC_Recv(tmp_buf,nbytes,MPI_BYTE,src,
                                          MPIR_BCAST_TAG,comm, &status, errflag);
             else
-                mpi_errno = MPIC_Recv_ft(buffer,count,datatype,src,
+                mpi_errno = MPIC_Recv(buffer,count,datatype,src,
                                          MPIR_BCAST_TAG,comm, &status, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
@@ -297,7 +297,7 @@ static int scatter_for_bcast(
             }
             else
             {
-                mpi_errno = MPIC_Recv_ft(((char *)tmp_buf +
+                mpi_errno = MPIC_Recv(((char *)tmp_buf +
                                           relative_rank*scatter_size),
                                          recv_size, MPI_BYTE, src,
                                          MPIR_BCAST_TAG, comm, &status, errflag);
@@ -610,7 +610,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
                 {
                     /* printf("Rank %d waiting to recv from rank %d\n",
                        relative_rank, dst); */
-                    mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + offset),
+                    mpi_errno = MPIC_Recv(((char *)tmp_buf + offset),
                                              nbytes - offset, 
                                              MPI_BYTE, dst, MPIR_BCAST_TAG,
                                              comm, &status, errflag); 
@@ -962,7 +962,7 @@ static int MPIR_SMP_Bcast(
                 }
             }
             else if (0 == comm_ptr->node_comm->rank) {
-                mpi_errno = MPIC_Recv_ft(buffer,count,datatype,MPIU_Get_intranode_rank(comm_ptr, root),
+                mpi_errno = MPIC_Recv(buffer,count,datatype,MPIU_Get_intranode_rank(comm_ptr, root),
                                          MPIR_BCAST_TAG,comm_ptr->node_comm->handle, &status, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -1301,7 +1301,7 @@ int MPIR_Bcast_inter (
         
         if (rank == 0)
         {
-            mpi_errno = MPIC_Recv_ft(buffer, count, datatype, root,
+            mpi_errno = MPIC_Recv(buffer, count, datatype, root,
                                      MPIR_BCAST_TAG, comm, &status, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 16e233c..23995cf 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -184,7 +184,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 			     * receive buffer, place it directly. This
 			     * should cover the case where the root is
 			     * rank 0. */
-			    mpi_errno = MPIC_Recv_ft(((char *)recvbuf +
+			    mpi_errno = MPIC_Recv(((char *)recvbuf +
                                                       (((rank + mask) % comm_size)*recvcount*extent)),
                                                      recvblks * recvcount, recvtype, src,
                                                      MPIR_GATHER_TAG, comm,
@@ -197,7 +197,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                             }
 			}
 			else if (nbytes < MPIR_PARAM_GATHER_VSMALL_MSG_SIZE) {
-			    mpi_errno = MPIC_Recv_ft(tmp_buf, recvblks * nbytes, MPI_BYTE,
+			    mpi_errno = MPIC_Recv(tmp_buf, recvblks * nbytes, MPI_BYTE,
                                                      src, MPIR_GATHER_TAG, comm, &status, errflag);
                             if (mpi_errno) {
                                 /* for communication errors, just record the error but continue */
@@ -220,7 +220,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 			    mpi_errno = MPIR_Type_commit_impl(&tmp_type);
                             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 			    
-			    mpi_errno = MPIC_Recv_ft(recvbuf, 1, tmp_type, src,
+			    mpi_errno = MPIC_Recv(recvbuf, 1, tmp_type, src,
                                                      MPIR_GATHER_TAG, comm, &status, errflag);
                             if (mpi_errno) {
                                 /* for communication errors, just record the error but continue */
@@ -246,7 +246,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 			    offset = mask * nbytes;
 			else
 			    offset = (mask - 1) * nbytes;
-			mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + offset),
+			mpi_errno = MPIC_Recv(((char *)tmp_buf + offset),
                                                  recvblks * nbytes, MPI_BYTE, src,
                                                  MPIR_GATHER_TAG, comm,
                                                  &status, errflag);
@@ -372,7 +372,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 if (src < comm_size)
 		{
                     src = (src + root) % comm_size;
-                    mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + curr_cnt),
+                    mpi_errno = MPIC_Recv(((char *)tmp_buf + curr_cnt),
                                              tmp_buf_size-curr_cnt, MPI_BYTE, src,
                                              MPIR_GATHER_TAG, comm, 
                                              &status, errflag);
@@ -509,7 +509,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
         if (root == MPI_ROOT)
 	{
             /* root receives data from rank 0 on remote group */
-            mpi_errno = MPIC_Recv_ft(recvbuf, recvcount*remote_size,
+            mpi_errno = MPIC_Recv(recvbuf, recvcount*remote_size,
                                      recvtype, 0, MPIR_GATHER_TAG, comm,
                                      &status, errflag);
             if (mpi_errno) {
@@ -583,7 +583,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
             for (i=0; i<remote_size; i++)
 	    {
-                mpi_errno = MPIC_Recv_ft(((char *)recvbuf+recvcount*i*extent),
+                mpi_errno = MPIC_Recv(((char *)recvbuf+recvcount*i*extent),
                                          recvcount, recvtype, i,
                                          MPIR_GATHER_TAG, comm, &status, errflag);
                 if (mpi_errno) {
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 4151aff..6703958 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -442,10 +442,10 @@ int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, in
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Recv_ft
+#define FUNCNAME MPIC_Recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Recv_ft(void *buf, int count, MPI_Datatype datatype, int source, int tag,
+int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                  MPI_Comm comm, MPI_Status *status, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index 36efa80..270b338 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -312,7 +312,7 @@ int MPIR_Igather_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendt
                 src = relative_rank | mask;
                 if (src < comm_size) {
                     src = (src + root) % comm_size;
-                    mpi_errno = MPIC_Recv_ft(((char *)tmp_buf + curr_cnt),
+                    mpi_errno = MPIC_Recv(((char *)tmp_buf + curr_cnt),
                                              tmp_buf_size-curr_cnt, MPI_BYTE, src,
                                              MPIR_GATHER_TAG, comm,
                                              &status, errflag);
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index dc59220..b7cecb9 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -593,7 +593,7 @@ int MPIR_Ireduce_scatter_rec_dbl(const void *sendbuf, void *recvbuf, const int r
          * will in the future when we update the NBC code to be fault-tolerant
          * in roughly the same fashion. [goodell@ 2011-03-03] */
         /* The following reduction is done here instead of after
-           the MPIC_Sendrecv_ft or MPIC_Recv_ft above. This is
+           the MPIC_Sendrecv_ft or MPIC_Recv above. This is
            because to do it above, in the noncommutative
            case, we would need an extra temp buffer so as not to
            overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 8d363d2..956433d 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -576,7 +576,7 @@ int MPIR_Ireduce_scatter_block_rec_dbl(const void *sendbuf, void *recvbuf, int r
          * will in the future when we update the NBC code to be fault-tolerant
          * in roughly the same fashion. [goodell@ 2011-03-03] */
         /* The following reduction is done here instead of after
-           the MPIC_Sendrecv_ft or MPIC_Recv_ft above. This is
+           the MPIC_Sendrecv_ft or MPIC_Recv above. This is
            because to do it above, in the noncommutative
            case, we would need an extra temp buffer so as not to
            overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 4ce45d6..3d77fd3 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -358,7 +358,7 @@ int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
                 src = rank - mask;
                 if (src < 0) src += comm_size;
 
-                mpi_errno = MPIC_Recv_ft(tmp_buf, tmp_buf_size, MPI_BYTE, src,
+                mpi_errno = MPIC_Recv(tmp_buf, tmp_buf_size, MPI_BYTE, src,
                                          MPIR_SCATTER_TAG, comm, &status, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 07d8654..0fc360e 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -336,7 +336,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                 newrank = -1; 
             }
             else { /* odd */
-                mpi_errno = MPIC_Recv_ft(tmp_recvbuf, total_count, 
+                mpi_errno = MPIC_Recv(tmp_recvbuf, total_count,
                                          datatype, rank-1,
                                          MPIR_REDUCE_SCATTER_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
@@ -424,7 +424,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                                                  MPIR_REDUCE_SCATTER_TAG, comm,
                                                  MPI_STATUS_IGNORE, errflag);
                 else if ((send_cnt == 0) && (recv_cnt != 0))
-                    mpi_errno = MPIC_Recv_ft((char *) tmp_recvbuf +
+                    mpi_errno = MPIC_Recv((char *) tmp_recvbuf +
                                              newdisps[recv_idx]*extent,
                                              recv_cnt, datatype, dst,
                                              MPIR_REDUCE_SCATTER_TAG, comm,
@@ -490,7 +490,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
             }
             else  {   /* even */
                 if (recvcounts[rank]) {
-                    mpi_errno = MPIC_Recv_ft(recvbuf, recvcounts[rank],
+                    mpi_errno = MPIC_Recv(recvbuf, recvcounts[rank],
                                              datatype, rank+1,
                                              MPIR_REDUCE_SCATTER_TAG, comm,
                                              MPI_STATUS_IGNORE, errflag);
@@ -779,7 +779,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                         else if ((dst < rank) && 
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Recv_ft(tmp_recvbuf, 1, recvtype, dst,
+                            mpi_errno = MPIC_Recv(tmp_recvbuf, 1, recvtype, dst,
                                                      MPIR_REDUCE_SCATTER_TAG,
                                                      comm, MPI_STATUS_IGNORE, errflag); 
                             received = 1;
@@ -796,7 +796,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
                 }
 
                 /* The following reduction is done here instead of after 
-                   the MPIC_Sendrecv_ft or MPIC_Recv_ft above. This is
+                   the MPIC_Sendrecv_ft or MPIC_Recv above. This is
                    because to do it above, in the noncommutative 
                    case, we would need an extra temp buffer so as not to
                    overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index d5a298d..4d6a5ac 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -353,7 +353,7 @@ int MPIR_Reduce_scatter_block_intra (
                 newrank = -1; 
             }
             else { /* odd */
-                mpi_errno = MPIC_Recv_ft(tmp_recvbuf, total_count, 
+                mpi_errno = MPIC_Recv(tmp_recvbuf, total_count,
                                          datatype, rank-1,
                                          MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
@@ -441,7 +441,7 @@ int MPIR_Reduce_scatter_block_intra (
                                                  MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
                                                  MPI_STATUS_IGNORE, errflag);
                 else if ((send_cnt == 0) && (recv_cnt != 0))
-                    mpi_errno = MPIC_Recv_ft((char *) tmp_recvbuf +
+                    mpi_errno = MPIC_Recv((char *) tmp_recvbuf +
                                              newdisps[recv_idx]*extent,
                                              recv_cnt, datatype, dst,
                                              MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
@@ -495,7 +495,7 @@ int MPIR_Reduce_scatter_block_intra (
                                          MPIR_REDUCE_SCATTER_BLOCK_TAG, comm, errflag);
             }
             else  {   /* even */
-                mpi_errno = MPIC_Recv_ft(recvbuf, recvcount,
+                mpi_errno = MPIC_Recv(recvbuf, recvcount,
                                          datatype, rank+1,
                                          MPIR_REDUCE_SCATTER_BLOCK_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
@@ -772,7 +772,7 @@ int MPIR_Reduce_scatter_block_intra (
                         else if ((dst < rank) && 
                                  (dst < tree_root + nprocs_completed) &&
                                  (rank >= tree_root + nprocs_completed)) {
-                            mpi_errno = MPIC_Recv_ft(tmp_recvbuf, 1, recvtype, dst,
+                            mpi_errno = MPIC_Recv(tmp_recvbuf, 1, recvtype, dst,
                                                      MPIR_REDUCE_SCATTER_BLOCK_TAG,
                                                      comm, MPI_STATUS_IGNORE, errflag);
                             received = 1;
@@ -789,7 +789,7 @@ int MPIR_Reduce_scatter_block_intra (
                 }
 
                 /* The following reduction is done here instead of after 
-                   the MPIC_Sendrecv_ft or MPIC_Recv_ft above. This is
+                   the MPIC_Sendrecv_ft or MPIC_Recv above. This is
                    because to do it above, in the noncommutative 
                    case, we would need an extra temp buffer so as not to
                    overwrite temp_recvbuf, because temp_recvbuf may have
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 99bb5b9..d68d3dd 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -136,7 +136,7 @@ static int MPIR_Reduce_binomial (
             source = (relrank | mask);
             if (source < comm_size) {
                 source = (source + lroot) % comm_size;
-                mpi_errno = MPIC_Recv_ft(tmp_buf, count, datatype, source, 
+                mpi_errno = MPIC_Recv(tmp_buf, count, datatype, source,
                                          MPIR_REDUCE_TAG, comm, &status, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -187,7 +187,7 @@ static int MPIR_Reduce_binomial (
         }
         else if (rank == root)
         {
-            mpi_errno = MPIC_Recv_ft(recvbuf, count, datatype, 0,
+            mpi_errno = MPIC_Recv(recvbuf, count, datatype, 0,
                                     MPIR_REDUCE_TAG, comm, &status, errflag);
         }
         if (mpi_errno) {
@@ -343,7 +343,7 @@ static int MPIR_Reduce_redscat_gather (
             newrank = -1; 
         }
         else { /* even */
-            mpi_errno = MPIC_Recv_ft(tmp_buf, count,
+            mpi_errno = MPIC_Recv(tmp_buf, count,
                                      datatype, rank+1,
                                      MPIR_REDUCE_TAG, comm,
                                      MPI_STATUS_IGNORE, errflag);
@@ -468,7 +468,7 @@ static int MPIR_Reduce_redscat_gather (
                 for (i=1; i<pof2; i++)
                     disps[i] = disps[i-1] + cnts[i-1];
                 
-                mpi_errno = MPIC_Recv_ft(recvbuf, cnts[0], datatype,
+                mpi_errno = MPIC_Recv(recvbuf, cnts[0], datatype,
                                          0, MPIR_REDUCE_TAG, comm,
                                          MPI_STATUS_IGNORE, errflag);
                 if (mpi_errno) {
@@ -570,7 +570,7 @@ static int MPIR_Reduce_redscat_gather (
                 /* recv and continue */
                 /* printf("Rank %d, recv_idx %d, recv_cnt %d, last_idx %d\n", newrank, recv_idx, recv_cnt, last_idx);
                    fflush(stdout); */
-                mpi_errno = MPIC_Recv_ft((char *) recvbuf +
+                mpi_errno = MPIC_Recv((char *) recvbuf +
                                          disps[recv_idx]*extent,
                                          recv_cnt, datatype, dst,
                                          MPIR_REDUCE_TAG, comm,
@@ -899,7 +899,7 @@ int MPIR_Reduce_inter (
 
     if (root == MPI_ROOT) {
         /* root receives data from rank 0 on remote group */
-        mpi_errno = MPIC_Recv_ft(recvbuf, count, datatype, 0,
+        mpi_errno = MPIC_Recv(recvbuf, count, datatype, 0,
                                  MPIR_REDUCE_TAG, comm, &status, errflag);
         if (mpi_errno) {
             /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 916653c..b3e3624 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -299,7 +299,7 @@ int MPIR_Scan(
        reduced data of rank 1,2,3. */
     if (comm_ptr->node_roots_comm != NULL && comm_ptr->node_comm != NULL)
     {
-        mpi_errno = MPIC_Recv_ft(localfulldata, count, datatype, 
+        mpi_errno = MPIC_Recv(localfulldata, count, datatype,
                                  comm_ptr->node_comm->local_size - 1, MPIR_SCAN_TAG, 
                                  comm_ptr->node_comm->handle, &status, errflag);
         if (mpi_errno) {
@@ -357,7 +357,7 @@ int MPIR_Scan(
         }
         if (MPIU_Get_internode_rank(comm_ptr, rank) != 0)
         {
-            mpi_errno = MPIC_Recv_ft(tempbuf, count, datatype,
+            mpi_errno = MPIC_Recv(tempbuf, count, datatype,
                                      MPIU_Get_internode_rank(comm_ptr, rank) - 1, 
                                      MPIR_SCAN_TAG, comm_ptr->node_roots_comm->handle, 
                                      &status, errflag);
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 6a42fa7..0cc0be2 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -161,7 +161,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                    they don't have to forward data to anyone. Others
                    receive data into a temporary buffer. */
                 if (relative_rank % 2) {
-                    mpi_errno = MPIC_Recv_ft(recvbuf, recvcount, recvtype,
+                    mpi_errno = MPIC_Recv(recvbuf, recvcount, recvtype,
                                              src, MPIR_SCATTER_TAG, comm, 
                                              &status, errflag);
                     if (mpi_errno) {
@@ -172,7 +172,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                     }
                 }
                 else {
-                    mpi_errno = MPIC_Recv_ft(tmp_buf, tmp_buf_size, MPI_BYTE, src,
+                    mpi_errno = MPIC_Recv(tmp_buf, tmp_buf_size, MPI_BYTE, src,
                                              MPIR_SCATTER_TAG, comm, &status, errflag);
                     if (mpi_errno) {
                         /* for communication errors, just record the error but continue */
@@ -326,7 +326,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                 src = rank - mask; 
                 if (src < 0) src += comm_size;
                 
-                mpi_errno = MPIC_Recv_ft(tmp_buf, tmp_buf_size, MPI_BYTE, src,
+                mpi_errno = MPIC_Recv(tmp_buf, tmp_buf_size, MPI_BYTE, src,
                                          MPIR_SCATTER_TAG, comm, &status, errflag);
                 if (mpi_errno) {
                     /* for communication errors, just record the error but continue */
@@ -475,7 +475,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                 /* adjust for potential negative lower bound in datatype */
                 tmp_buf = (void *)((char*)tmp_buf - true_lb);
 
-                mpi_errno = MPIC_Recv_ft(tmp_buf, recvcount*local_size,
+                mpi_errno = MPIC_Recv(tmp_buf, recvcount*local_size,
                                          recvtype, root,
                                          MPIR_SCATTER_TAG, comm, &status, errflag);
                 if (mpi_errno) {
@@ -521,7 +521,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
             }
         }
         else {
-            mpi_errno = MPIC_Recv_ft(recvbuf,recvcount,recvtype,root,
+            mpi_errno = MPIC_Recv(recvbuf,recvcount,recvtype,root,
                                      MPIR_SCATTER_TAG,comm,&status, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index ad8086a..0007372 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -128,7 +128,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
 
     else if (root != MPI_PROC_NULL) { /* non-root nodes, and in the intercomm. case, non-root nodes on remote side */
         if (recvcount) {
-            mpi_errno = MPIC_Recv_ft(recvbuf,recvcount,recvtype,root,
+            mpi_errno = MPIC_Recv(recvbuf,recvcount,recvtype,root,
                                      MPIR_SCATTERV_TAG,comm,MPI_STATUS_IGNORE, errflag);
             if (mpi_errno) {
                 /* for communication errors, just record the error but continue */
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 18a943a..887a8cc 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -318,7 +318,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
         buf = MPIU_Malloc(count*sizeof(int));
         MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
-        mpi_errno = MPIC_Recv_ft(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
+        mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
         /* FIXME: buf is never freed on error! */
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         
@@ -352,7 +352,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
         buf = MPIU_Malloc(count*sizeof(int));
         MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
-        mpi_errno = MPIC_Recv_ft(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
+        mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
         /* FIXME: buf is never freed on error! */
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 7298686..286da09 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -704,7 +704,7 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
 
 	if (rank == root) {
 	    /* First, receive the pg description from the partner */
-	    mpi_errno = MPIC_Recv_ft(&j, 1, MPI_INT, 0, recvtag++,
+	    mpi_errno = MPIC_Recv(&j, 1, MPI_INT, 0, recvtag++,
 				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
@@ -714,7 +714,7 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
 	    if (pg_str == NULL) {
 		MPIU_ERR_POP(mpi_errno);
 	    }
-	    mpi_errno = MPIC_Recv_ft(pg_str, j, MPI_CHAR, 0, recvtag++,
+	    mpi_errno = MPIC_Recv(pg_str, j, MPI_CHAR, 0, recvtag++,
 				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index 7cb0ce3..ae5fbae 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -827,18 +827,18 @@ static int MPIDI_ReceivePGAndDistribute( struct MPID_Comm *tmp_comm, struct MPID
 
 	if (rank == root) {
 	    /* First, receive the pg description from the partner */
-	    mpi_errno = MPIC_Recv_ft(&j, 1, MPI_INT, 0, recvtag++,
+	    mpi_errno = MPIC_Recv(&j, 1, MPI_INT, 0, recvtag++,
 				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
-		TRACE_ERR("MPIC_Recv_ft returned with mpi_errno=%d\n", mpi_errno);
+		TRACE_ERR("MPIC_Recv returned with mpi_errno=%d\n", mpi_errno);
 	    }
 	    pg_str = (char*)MPIU_Malloc(j);
-	    mpi_errno = MPIC_Recv_ft(pg_str, j, MPI_CHAR, 0, recvtag++,
+	    mpi_errno = MPIC_Recv(pg_str, j, MPI_CHAR, 0, recvtag++,
 				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
-		TRACE_ERR("MPIC_Recv_ft returned with mpi_errno=%d\n", mpi_errno);
+		TRACE_ERR("MPIC_Recv returned with mpi_errno=%d\n", mpi_errno);
 	    }
 	}
 
diff --git a/src/pmi/pmi2/poe/poe2pmi.c b/src/pmi/pmi2/poe/poe2pmi.c
index e52d1eb..29a1d31 100644
--- a/src/pmi/pmi2/poe/poe2pmi.c
+++ b/src/pmi/pmi2/poe/poe2pmi.c
@@ -413,7 +413,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
     remaining_child_count = i;
     child_rank = (children[i])% TASKS;
     TRACE_ERR("_mpi_reduce_for_dyntask - recv from child_rank%d child_taskid=%d\n", child_rank, pg_world->vct[child_rank].taskid);
-    mpi_errno = MPIC_Recv_ft(recvbuf, sizeof(int),MPI_BYTE, child_rank, tag, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag);
+    mpi_errno = MPIC_Recv(recvbuf, sizeof(int),MPI_BYTE, child_rank, tag, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag);
     TRACE_ERR("_mpi_reduce_for_dyntask - recv DONE from child_rank%d child_taskid=%d\n", child_rank, pg_world->vct[child_rank].taskid);
 
     if(world_rank != parent)

http://git.mpich.org/mpich.git/commitdiff/2204a718c3c4e96e679a3eb3e1f6fd615055c44e

commit 2204a718c3c4e96e679a3eb3e1f6fd615055c44e
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 28 11:28:25 2013 -0500

    Combine MPIC_Isend and MPIC_Isend_ft
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 5bb7ae5..4151aff 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,9 +15,6 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
-static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                     MPI_Comm comm, MPI_Request *request);
-
 #undef FUNCNAME
 #define FUNCNAME MPIC_Probe
 #undef FCNAME
@@ -343,42 +340,6 @@ int MPIR_Localcopy(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 }
 
 
-#undef FUNCNAME
-#define FUNCNAME MPIC_Isend
-#undef FCNAME
-#define FCNAME "MPIC_Isend"
-static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                      MPI_Comm comm, MPI_Request *request)
-{
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Request *request_ptr=NULL;
-    MPID_Comm *comm_ptr=NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_ISEND);
-
-    MPIDI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPIC_ISEND);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Isend(buf, count, datatype, dest, tag, comm_ptr,
-                          context_id, &request_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); } 
-
-    *request = request_ptr->handle;
-
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_ISEND);
-    return mpi_errno;
-    /* --END ERROR HANDLING-- */
-}
-
-
 /* FIXME: For the brief-global and finer-grain control, we must ensure that
    the global lock is *not* held when this routine is called. (unless we change
    progress_start/end to grab the lock, in which case we must *still* make
@@ -783,16 +744,30 @@ int MPIC_Isend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, i
                   MPI_Comm comm, MPI_Request *request, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
+    MPID_Request *request_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_ISEND_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_ISEND_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", count);
+
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
         MPIR_TAG_SET_ERROR_BIT(tag);
 
-    mpi_errno = MPIC_Isend(buf, count, datatype, dest, tag, comm, request);
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
+    mpi_errno = MPID_Isend(buf, count, datatype, dest, tag, comm_ptr,
+            context_id, &request_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+    *request = request_ptr->handle;
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_ISEND_FT);

http://git.mpich.org/mpich.git/commitdiff/b7cfbe35e8a2383aa0dc8207abe53ef70a0dc59b

commit b7cfbe35e8a2383aa0dc8207abe53ef70a0dc59b
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 28 10:27:50 2013 -0500

    Combine MPIC_Irecv and MPIC_Irecv_ft
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 7d1d4ab..5bb7ae5 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,8 +15,6 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
-static int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
-                     source, int tag, MPI_Comm comm, MPI_Request *request);
 static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
                      MPI_Comm comm, MPI_Request *request);
 
@@ -381,41 +379,6 @@ static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int des
 }
 
 
-#undef FUNCNAME
-#define FUNCNAME MPIC_Irecv
-#undef FCNAME
-#define FCNAME "MPIC_Irecv"
-static int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
-                    source, int tag, MPI_Comm comm, MPI_Request *request)
-{
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Request *request_ptr=NULL;
-    MPID_Comm *comm_ptr = NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_IRECV);
-
-    MPIDI_PT2PT_FUNC_ENTER_BACK(MPID_STATE_MPIC_IRECV);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Irecv(buf, count, datatype, source, tag, comm_ptr,
-                          context_id, &request_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-
-    *request = request_ptr->handle;
-
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    MPIDI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPIC_IRECV);
-    return mpi_errno;
-    /* --END ERROR HANDLING-- */
-}
-
 /* FIXME: For the brief-global and finer-grain control, we must ensure that
    the global lock is *not* held when this routine is called. (unless we change
    progress_start/end to grab the lock, in which case we must *still* make
@@ -846,11 +809,25 @@ int MPIC_Irecv_ft(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPI_Comm comm, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
+    MPID_Request *request_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_IRECV_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_IRECV_FT);
 
-    mpi_errno = MPIC_Irecv(buf, count, datatype, source, tag, comm, request);
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", count);
+
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
+    mpi_errno = MPID_Irecv(buf, count, datatype, source, tag, comm_ptr,
+            context_id, &request_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+    *request = request_ptr->handle;
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_IRECV_FT);

http://git.mpich.org/mpich.git/commitdiff/3eec02b3ac638fee50a44a1b153cd97390cf83ea

commit 3eec02b3ac638fee50a44a1b153cd97390cf83ea
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 27 16:09:49 2013 -0500

    Combine MPIC_Sendrecv_replace and MPIC_Sendrecv_replace_ft
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 9f62c34..7d1d4ab 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,10 +15,6 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
-static int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype type,
-                                int dest, int sendtag,
-                                int source, int recvtag,
-                                MPI_Comm comm, MPI_Status *status);
 static int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
                      source, int tag, MPI_Comm comm, MPI_Request *request);
 static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
@@ -713,21 +709,88 @@ int MPIC_Sendrecv_replace_ft(void *buf, int count, MPI_Datatype datatype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Status mystatus;
+    MPIR_Context_id_t context_id_offset;
+    MPID_Request *sreq;
+    MPID_Request *rreq;
+    void *tmpbuf = NULL;
+    int tmpbuf_size = 0;
+    int tmpbuf_count = 0;
+    MPID_Comm *comm_ptr;
+    MPIU_CHKLMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SENDRECV_REPLACE_FT);
+#ifdef MPID_LOG_ARROWS
+    /* The logging macros log sendcount and recvcount */
+    int sendcount = count, recvcount = count;
+#endif
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SENDRECV_REPLACE_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", count);
+
     if (MPIR_PARAM_ENABLE_COLL_FT_RET) {
         if (status == MPI_STATUS_IGNORE) status = &mystatus;
         if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
     }
 
-    mpi_errno = MPIC_Sendrecv_replace(buf, count, datatype,
-                                      dest, sendtag,
-                                      source, recvtag,
-                                      comm, status);
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id_offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
+    if (count > 0 && dest != MPI_PROC_NULL) {
+        MPIR_Pack_size_impl(count, datatype, &tmpbuf_size);
+        MPIU_CHKLMEM_MALLOC(tmpbuf, void *, tmpbuf_size, mpi_errno, "temporary send buffer");
+
+        mpi_errno = MPIR_Pack_impl(buf, count, datatype, tmpbuf, tmpbuf_size, &tmpbuf_count);
+        if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    }
+
+    mpi_errno = MPID_Irecv(buf, count, datatype, source, recvtag,
+                           comm_ptr, context_id_offset, &rreq);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+    mpi_errno = MPID_Isend(tmpbuf, tmpbuf_count, MPI_PACKED, dest,
+                           sendtag, comm_ptr, context_id_offset, &sreq);
+    if (mpi_errno != MPI_SUCCESS) {
+        /* --BEGIN ERROR HANDLING-- */
+        /* FIXME: should we cancel the pending (possibly completed) receive
+         * request or wait for it to complete? */
+        MPID_Request_release(rreq);
+        MPIU_ERR_POP(mpi_errno);
+        /* --END ERROR HANDLING-- */
+    }
+
+    if (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq)) {
+        MPID_Progress_state progress_state;
+
+        MPID_Progress_start(&progress_state);
+        while (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq)) {
+            mpi_errno = MPID_Progress_wait(&progress_state);
+            if (mpi_errno != MPI_SUCCESS) {
+                /* --BEGIN ERROR HANDLING-- */
+                MPID_Progress_end(&progress_state);
+                MPIU_ERR_POP(mpi_errno);
+                /* --END ERROR HANDLING-- */
+            }
+        }
+        MPID_Progress_end(&progress_state);
+    }
+
+    *status = rreq->status;
+
+    if (mpi_errno == MPI_SUCCESS) {
+        mpi_errno = rreq->status.MPI_ERROR;
+
+        if (mpi_errno == MPI_SUCCESS) {
+            mpi_errno = sreq->status.MPI_ERROR;
+        }
+    }
+
+    MPID_Request_release(sreq);
+    MPID_Request_release(rreq);
+
     if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
     
@@ -741,6 +804,7 @@ int MPIC_Sendrecv_replace_ft(void *buf, int count, MPI_Datatype datatype,
     }
 
  fn_exit:
+    MPIU_CHKLMEM_FREEALL();
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "OUT: errflag = %s", *errflag?"TRUE":"FALSE");
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SENDRECV_REPLACE_FT);
     return mpi_errno;

http://git.mpich.org/mpich.git/commitdiff/0747e46f37c59974c75db36f63084e60d110ed26

commit 0747e46f37c59974c75db36f63084e60d110ed26
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 27 12:37:41 2013 -0500

    Combine MPI_Sendrecv and MPI_Sendrecv_ft.
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 8f0a7d0..9f62c34 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,14 +15,6 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
-static int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
-                    MPI_Comm comm, MPI_Status *status);
-static int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                    MPI_Comm comm);
-static int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                        int dest, int sendtag, void *recvbuf, int recvcount,
-                        MPI_Datatype recvtype, int source, int recvtag,
-                        MPI_Comm comm, MPI_Status *status);
 static int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype type,
                                 int dest, int sendtag,
                                 int source, int recvtag,
@@ -648,23 +640,49 @@ int MPIC_Sendrecv_ft(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      MPI_Comm comm, MPI_Status *status, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
     MPI_Status mystatus;
+    MPID_Request *recv_req_ptr = NULL, *send_req_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SENDRECV_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SENDRECV_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
+    MPIU_ERR_CHKANDJUMP1((sendcount < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", sendcount);
+    MPIU_ERR_CHKANDJUMP1((recvcount < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", recvcount);
+
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
     if (MPIR_PARAM_ENABLE_COLL_FT_RET) {
         if (status == MPI_STATUS_IGNORE) status = &mystatus;
         if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
     }
 
-    mpi_errno = MPIC_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag,
-                              recvbuf, recvcount, recvtype, source, recvtag,
-                              comm, status);
-    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
+    mpi_errno = MPID_Irecv(recvbuf, recvcount, recvtype, source, recvtag,
+                           comm_ptr, context_id, &recv_req_ptr);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    mpi_errno = MPID_Isend(sendbuf, sendcount, sendtype, dest, recvtag,
+                           comm_ptr, context_id, &send_req_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIC_Wait(send_req_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    mpi_errno = MPIC_Wait(recv_req_ptr);
+    if (mpi_errno) MPIU_ERR_POPFATAL(mpi_errno);
+
+    *status = recv_req_ptr->status;
+    mpi_errno = recv_req_ptr->status.MPI_ERROR;
+
+    MPID_Request_release(send_req_ptr);
+    MPID_Request_release(recv_req_ptr);
+
+    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
 
     if (source != MPI_PROC_NULL) {
         if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {

http://git.mpich.org/mpich.git/commitdiff/25e5cde0a3455fd71fe26b6297b7331c860f17ca

commit 25e5cde0a3455fd71fe26b6297b7331c860f17ca
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 27 10:43:36 2013 -0500

    Combine MPIC_Ssend and MPIC_Ssend_ft.
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 95e2381..8f0a7d0 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -58,48 +58,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Ssend
-#undef FCNAME
-#define FCNAME "MPIC_Ssend"
-static int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                     MPI_Comm comm)
-{
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Request *request_ptr=NULL;
-    MPID_Comm *comm_ptr=NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_SSEND);
-
-    MPIDI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPIC_SSEND);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Ssend(buf, count, datatype, dest, tag, comm_ptr,
-                           context_id, &request_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-    if (request_ptr) {
-        mpi_errno = MPIC_Wait(request_ptr);
-	if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-	MPID_Request_release(request_ptr);
-    }
- fn_exit:
-    MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_SSEND);
-    return mpi_errno;
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) {
-        MPID_Request_release(request_ptr);
-    }
-    goto fn_exit;
-    /* --END ERROR HANDLING-- */
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIC_Sendrecv
 #undef FCNAME
 #define FCNAME "MPIC_Sendrecv"
@@ -642,22 +600,42 @@ int MPIC_Ssend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, i
                   MPI_Comm comm, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
+    MPID_Request *request_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SSEND_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SSEND_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
-    
+
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+            "**countneg", "**countneg %d", count);
+
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
         MPIR_TAG_SET_ERROR_BIT(tag);
 
-    mpi_errno = MPIC_Ssend(buf, count, datatype, dest, tag, comm);
+    mpi_errno = MPID_Ssend(buf, count, datatype, dest, tag, comm_ptr,
+                           context_id, &request_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    if (request_ptr) {
+        mpi_errno = MPIC_Wait(request_ptr);
+        if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+        MPID_Request_release(request_ptr);
+    }
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SSEND_FT);
     return mpi_errno;
  fn_fail:
+    /* --BEGIN ERROR HANDLING-- */
+    if (request_ptr) MPID_Request_release(request_ptr);
     goto fn_exit;
+    /* --END ERROR HANDLING-- */
 }
 
 #undef FUNCNAME

http://git.mpich.org/mpich.git/commitdiff/af63831e3288beb3080a4f65f751045b74a2c47b

commit af63831e3288beb3080a4f65f751045b74a2c47b
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 27 09:37:18 2013 -0500

    Combine MPIC_Recv and MPIC_Recv_ft.
    
    Merge the two functions into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 0d64187..95e2381 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -58,55 +58,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Recv
-#undef FCNAME
-#define FCNAME "MPIC_Recv"
-static int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
-	                 MPI_Comm comm, MPI_Status *status)
-{
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Request *request_ptr=NULL;
-    MPID_Comm *comm_ptr = NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_RECV);
-
-    MPIDI_PT2PT_FUNC_ENTER_BACK(MPID_STATE_MPIC_RECV);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Recv(buf, count, datatype, source, tag, comm_ptr,
-                          context_id, status, &request_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-    if (request_ptr) {
-        mpi_errno = MPIC_Wait(request_ptr);
-	if (mpi_errno == MPI_SUCCESS) {
-	    if (status != MPI_STATUS_IGNORE) {
-		*status = request_ptr->status;
-	    }
-	    mpi_errno = request_ptr->status.MPI_ERROR;
-	}
-	else { MPIU_ERR_POP(mpi_errno); }
-
-        MPID_Request_release(request_ptr);
-    }
- fn_exit:
-    MPIDI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPIC_RECV);
-    return mpi_errno;
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) { 
-	MPID_Request_release(request_ptr);
-    }
-    goto fn_exit;
-    /* --END ERROR HANDLING-- */
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIC_Ssend
 #undef FCNAME
 #define FCNAME "MPIC_Ssend"
@@ -628,26 +579,41 @@ int MPIC_Recv_ft(void *buf, int count, MPI_Datatype datatype, int source, int ta
                  MPI_Comm comm, MPI_Status *status, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
     MPI_Status mystatus;
+    MPID_Request *request_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_RECV_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_RECV_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    if (status == MPI_STATUS_IGNORE)
-        status = &mystatus;
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", count);
 
-    mpi_errno = MPIC_Recv(buf, count, datatype, source, tag, comm, status);
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
 
-    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) {
-        goto fn_exit;
-    }
+    if (status == MPI_STATUS_IGNORE)
+        status = &mystatus;
 
+    mpi_errno = MPID_Recv(buf, count, datatype, source, tag, comm_ptr,
+                          context_id, status, &request_ptr);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    if (request_ptr) {
+        mpi_errno = MPIC_Wait(request_ptr);
+        if (mpi_errno == MPI_SUCCESS) {
+            *status = request_ptr->status;
+            mpi_errno = request_ptr->status.MPI_ERROR;
+        } else {
+            MPIU_ERR_POP(mpi_errno);
+        }
+        MPID_Request_release(request_ptr);
+    }
 
-    if (*errflag)
-        goto fn_exit;
+    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
 
     if (source != MPI_PROC_NULL) {
         if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
@@ -663,6 +629,8 @@ int MPIC_Recv_ft(void *buf, int count, MPI_Datatype datatype, int source, int ta
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_RECV_FT);
     return mpi_errno;
  fn_fail:
+    /* --BEGIN ERROR HANDLING-- */
+    if (request_ptr) MPID_Request_release(request_ptr);
     goto fn_exit;
 }
 

http://git.mpich.org/mpich.git/commitdiff/3083d8e7f95c19f79a6dfb672ccb3363357ae588

commit 3083d8e7f95c19f79a6dfb672ccb3363357ae588
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 27 09:01:18 2013 -0500

    Combine MPIC_Send and MPIC_Send_ft. Remove MPIC_Send.
    
    Merge the two function into one function and remove the non-ft version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 8a6841d..0d64187 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,8 +15,6 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
-static int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                    MPI_Comm comm);
 static int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
                     MPI_Comm comm, MPI_Status *status);
 static int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
@@ -60,48 +58,6 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIC_Send
-#undef FCNAME
-#define FCNAME "MPIC_Send"
-static int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                     MPI_Comm comm)
-{
-    int mpi_errno = MPI_SUCCESS;
-    int context_id;
-    MPID_Request *request_ptr=NULL;
-    MPID_Comm *comm_ptr=NULL;
-    MPIDI_STATE_DECL(MPID_STATE_MPIC_SEND);
-
-    MPIDI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPIC_SEND);
-
-    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
-                         "**countneg", "**countneg %d", count);
-
-    MPID_Comm_get_ptr( comm, comm_ptr );
-    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
-        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
-
-    mpi_errno = MPID_Send(buf, count, datatype, dest, tag, comm_ptr,
-                          context_id, &request_ptr); 
-    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-    if (request_ptr) {
-        mpi_errno = MPIC_Wait(request_ptr);
-	if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-	MPID_Request_release(request_ptr);
-    }
- fn_exit:
-    MPIDI_PT2PT_FUNC_EXIT(MPID_STATE_MPIC_SEND);
-    return mpi_errno;
- fn_fail:
-    /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) {
-        MPID_Request_release(request_ptr);
-    }
-    goto fn_exit;
-    /* --END ERROR HANDLING-- */
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIC_Recv
 #undef FCNAME
 #define FCNAME "MPIC_Recv"
@@ -626,22 +582,42 @@ int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, in
                  MPI_Comm comm, int *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
+    int context_id;
+    MPID_Request *request_ptr = NULL;
+    MPID_Comm *comm_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SEND_FT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SEND_FT);
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
+    MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
+                         "**countneg", "**countneg %d", count);
+
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
         MPIR_TAG_SET_ERROR_BIT(tag);
 
-    mpi_errno = MPIC_Send(buf, count, datatype, dest, tag, comm);
+    MPID_Comm_get_ptr(comm, comm_ptr);
+    context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
+        MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+
+    mpi_errno = MPID_Send(buf, count, datatype, dest, tag, comm_ptr,
+                          context_id, &request_ptr);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+    if (request_ptr) {
+        mpi_errno = MPIC_Wait(request_ptr);
+        if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+        MPID_Request_release(request_ptr);
+    }
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SEND_FT);
     return mpi_errno;
  fn_fail:
+    /* --BEGIN ERROR HANDLING-- */
+    if (request_ptr) MPID_Request_release(request_ptr);
     goto fn_exit;
+    /* --END ERROR HANDLING-- */
 }
 
 #undef FUNCNAME

http://git.mpich.org/mpich.git/commitdiff/34d594d466377ed40e1cff5e9e75b4a00d762625

commit 34d594d466377ed40e1cff5e9e75b4a00d762625
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Wed Jun 26 12:48:00 2013 -0500

    Move MPIC_* usage over to MPIC_*_ft functions.
    
    All usages of the non-ft versions have moved over to use the ft versions
    to avoid the need to maintain both and to ensure that we provide some
    ability to provide ft everywhere. There are times where this isn't
    necessary or useful and in those cases, the value of *errflag can be
    ignored and just the return value can be checked to see if the function
    was successful or not.
    
    The MPIC_* functions that have an ft mirror
    (e.g. MPIC_Send -> MPIC_Send_ft) are no longer accessible outside of
    helper_fns.c. Now the MPIC_*_ft functions should be called directly.
    Note that this is not going to be a long lived policy. Instead, the
    MPIC_*_ft functions will be merged with the standard MPIC_* functions
    and will replace them.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index fe541f0..3adacbf 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3877,26 +3877,8 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);
    other internal operations. They are wrappers around MPID send/recv
    functions. They do sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA(INTER)_COLL. */
-int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-              MPI_Comm comm);
-int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
-              MPI_Comm comm, MPI_Status *status);
-int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-               MPI_Comm comm);
-int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                  int dest, int sendtag, void *recvbuf, int recvcount,
-                  MPI_Datatype recvtype, int source, int recvtag,
-                  MPI_Comm comm, MPI_Status *status);
-int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype type,
-                          int dest, int sendtag,
-                          int source, int recvtag,
-                          MPI_Comm comm, MPI_Status *status);
 int MPIR_Localcopy(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                    void *recvbuf, int recvcount, MPI_Datatype recvtype);
-int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
-               source, int tag, MPI_Comm comm, MPI_Request *request);
-int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-               MPI_Comm comm, MPI_Request *request);
 int MPIC_Wait(MPID_Request * request_ptr);
 int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
 
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 5f2b46d..8a6841d 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -15,6 +15,25 @@
    sends/receives by setting the context offset to
    MPID_CONTEXT_INTRA_COLL or MPID_CONTEXT_INTER_COLL. */
 
+static int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                    MPI_Comm comm);
+static int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
+                    MPI_Comm comm, MPI_Status *status);
+static int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                    MPI_Comm comm);
+static int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+                        int dest, int sendtag, void *recvbuf, int recvcount,
+                        MPI_Datatype recvtype, int source, int recvtag,
+                        MPI_Comm comm, MPI_Status *status);
+static int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype type,
+                                int dest, int sendtag,
+                                int source, int recvtag,
+                                MPI_Comm comm, MPI_Status *status);
+static int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
+                     source, int tag, MPI_Comm comm, MPI_Request *request);
+static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                     MPI_Comm comm, MPI_Request *request);
+
 #undef FUNCNAME
 #define FUNCNAME MPIC_Probe
 #undef FCNAME
@@ -44,8 +63,8 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 #define FUNCNAME MPIC_Send
 #undef FCNAME
 #define FCNAME "MPIC_Send"
-int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-              MPI_Comm comm)
+static int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                     MPI_Comm comm)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -86,8 +105,8 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 #define FUNCNAME MPIC_Recv
 #undef FCNAME
 #define FCNAME "MPIC_Recv"
-int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
-	     MPI_Comm comm, MPI_Status *status)
+static int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
+	                 MPI_Comm comm, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -135,8 +154,8 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
 #define FUNCNAME MPIC_Ssend
 #undef FCNAME
 #define FCNAME "MPIC_Ssend"
-int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-               MPI_Comm comm)
+static int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                     MPI_Comm comm)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -177,10 +196,10 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 #define FUNCNAME MPIC_Sendrecv
 #undef FCNAME
 #define FCNAME "MPIC_Sendrecv"
-int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                  int dest, int sendtag, void *recvbuf, int recvcount,
-                  MPI_Datatype recvtype, int source, int recvtag,
-                  MPI_Comm comm, MPI_Status *status) 
+static int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+                         int dest, int sendtag, void *recvbuf, int recvcount,
+                         MPI_Datatype recvtype, int source, int recvtag,
+                         MPI_Comm comm, MPI_Status *status)
 {
     MPID_Request *recv_req_ptr=NULL, *send_req_ptr=NULL;
     int mpi_errno = MPI_SUCCESS;
@@ -231,10 +250,10 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FUNCNAME MPIC_Sendrecv_replace
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
-                          int dest, int sendtag,
-                          int source, int recvtag,
-                          MPI_Comm comm, MPI_Status *status)
+static int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
+                                 int dest, int sendtag,
+                                 int source, int recvtag,
+                                 MPI_Comm comm, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Context_id_t context_id_offset;
@@ -477,8 +496,8 @@ int MPIR_Localcopy(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FUNCNAME MPIC_Isend
 #undef FCNAME
 #define FCNAME "MPIC_Isend"
-int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-              MPI_Comm comm, MPI_Request *request)
+static int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
+                      MPI_Comm comm, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -513,8 +532,8 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 #define FUNCNAME MPIC_Irecv
 #undef FCNAME
 #define FCNAME "MPIC_Irecv"
-int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
-               source, int tag, MPI_Comm comm, MPI_Request *request)
+static int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int
+                    source, int tag, MPI_Comm comm, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index 894679b..8424377 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -383,9 +383,9 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
         info[0] = new_context_id;
         info[1] = group_ptr->size;
 
-        mpi_errno = MPIC_Sendrecv(info, 2, MPI_INT, 0, 0,
-                                  rinfo, 2, MPI_INT, 0, 0,
-                                  comm, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft(info, 2, MPI_INT, 0, 0,
+                                     rinfo, 2, MPI_INT, 0, 0,
+                                     comm, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
         if (*newcomm_ptr != NULL) {
             (*newcomm_ptr)->context_id = rinfo[0];
@@ -397,9 +397,9 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
                             mpi_errno,"remote_mapping");
 
         /* Populate and exchange the ranks */
-        mpi_errno = MPIC_Sendrecv( mapping, group_ptr->size, MPI_INT, 0, 0,
-                                   remote_mapping, remote_size, MPI_INT, 0, 0,
-                                   comm, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( mapping, group_ptr->size, MPI_INT, 0, 0,
+                                      remote_mapping, remote_size, MPI_INT, 0, 0,
+                                      comm, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
 
         /* Broadcast to the other members of the local group */
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index d5f90da..8a23f23 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -231,9 +231,9 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
     /* In the intercomm case, we need to exchange the context ids */
     if (comm_ptr->comm_kind == MPID_INTERCOMM) {
 	if (comm_ptr->rank == 0) {
-	    mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
+	    mpi_errno = MPIC_Sendrecv_ft( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
 				       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 
-				       0, 0, comm_ptr->handle, MPI_STATUS_IGNORE );
+				       0, 0, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
 	    if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
 	    mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index af3a99a..5b6629e 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -1409,9 +1409,9 @@ int MPIR_Get_intercomm_contextid( MPID_Comm *comm_ptr, MPIR_Context_id_t *contex
        exchange data */
     remote_context_id = -1;
     if (comm_ptr->rank == 0) {
-        mpi_errno = MPIC_Sendrecv( &mycontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
-                                   &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag, 
-                                   comm_ptr->handle, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( &mycontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
+                                      &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
+                                      comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
     }
 
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 00786db..f960f15 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -223,11 +223,11 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
         /* printf( "About to sendrecv in intercomm_create\n" );fflush(stdout);*/
         MPIU_DBG_MSG_FMT(COMM,VERBOSE,(MPIU_DBG_FDEST,"rank %d sendrecv to rank %d", peer_comm_ptr->rank,
                                        remote_leader));
-        mpi_errno = MPIC_Sendrecv( &local_size,  1, MPI_INT,
-                                   remote_leader, cts_tag,
-                                   &remote_size, 1, MPI_INT,
-                                   remote_leader, cts_tag,
-                                   peer_comm_ptr->handle, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( &local_size,  1, MPI_INT,
+                                      remote_leader, cts_tag,
+                                      &remote_size, 1, MPI_INT,
+                                      remote_leader, cts_tag,
+                                      peer_comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
         MPIU_DBG_MSG_FMT(COMM,VERBOSE,(MPIU_DBG_FDEST, "local size = %d, remote size = %d", local_size,
@@ -243,10 +243,11 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
         /* Exchange the lpid arrays */
-        mpi_errno = MPIC_Sendrecv( local_gpids, 2*local_size, MPI_INT,
-                                   remote_leader, cts_tag,
-                                   remote_gpids, 2*remote_size, MPI_INT,
-                                   remote_leader, cts_tag, peer_comm_ptr->handle, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( local_gpids, 2*local_size, MPI_INT,
+                                      remote_leader, cts_tag,
+                                      remote_gpids, 2*remote_size, MPI_INT,
+                                      remote_leader, cts_tag, peer_comm_ptr->handle,
+                                      MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
         /* Convert the remote gpids to the lpids */
@@ -301,9 +302,9 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
     if (local_comm_ptr->rank == local_leader) {
         MPIR_Context_id_t remote_context_id;
 
-        mpi_errno = MPIC_Sendrecv( &recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
-                                   &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
-                                   peer_comm_ptr->handle, MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( &recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
+                                      &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
+                                      peer_comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
         final_context_id = remote_context_id;
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index f4bbbb3..36f0f5e 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -51,9 +51,9 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
     if (comm_ptr->rank == 0) {
         /* This routine allows use to use the collective communication
            context rather than the point-to-point context. */
-        mpi_errno = MPIC_Sendrecv( &local_high, 1, MPI_INT, 0, 0,
-                                   &remote_high, 1, MPI_INT, 0, 0, comm_ptr->handle,
-                                   MPI_STATUS_IGNORE );
+        mpi_errno = MPIC_Sendrecv_ft( &local_high, 1, MPI_INT, 0, 0,
+                                      &remote_high, 1, MPI_INT, 0, 0, comm_ptr->handle,
+                                      MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         
         /* If local_high and remote_high are the same, then order is arbitrary.
@@ -65,9 +65,9 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
             mpi_errno = MPID_GPID_Get( comm_ptr, 0, ingpid );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             
-            mpi_errno = MPIC_Sendrecv( ingpid, 2, MPI_INT, 0, 1,
-                                       outgpid, 2, MPI_INT, 0, 1, comm_ptr->handle,
-                                       MPI_STATUS_IGNORE );
+            mpi_errno = MPIC_Sendrecv_ft( ingpid, 2, MPI_INT, 0, 1,
+                                          outgpid, 2, MPI_INT, 0, 1, comm_ptr->handle,
+                                          MPI_STATUS_IGNORE, &errflag );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
             /* Note that the gpids cannot be the same because we are
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 82395d2..18a943a 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -271,12 +271,12 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
     for (i = 0; i < comm_size; ++i) {
         if (rin_sizes[i]) {
             /* send edges where i is a destination to process i */
-            mpi_errno = MPIC_Isend(&rin[i][0], rin_sizes[i], MPI_INT, i, MPIR_TOPO_A_TAG, comm_old, &reqs[idx++]);
+            mpi_errno = MPIC_Isend_ft(&rin[i][0], rin_sizes[i], MPI_INT, i, MPIR_TOPO_A_TAG, comm_old, &reqs[idx++], &errflag);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         }
         if (rout_sizes[i]) {
             /* send edges where i is a source to process i */
-            mpi_errno = MPIC_Isend(&rout[i][0], rout_sizes[i], MPI_INT, i, MPIR_TOPO_B_TAG, comm_old, &reqs[idx++]);
+            mpi_errno = MPIC_Isend_ft(&rout[i][0], rout_sizes[i], MPI_INT, i, MPIR_TOPO_B_TAG, comm_old, &reqs[idx++], &errflag);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         }
     }
@@ -318,7 +318,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
         buf = MPIU_Malloc(count*sizeof(int));
         MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
-        mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, comm_old, MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Recv_ft(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
         /* FIXME: buf is never freed on error! */
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         
@@ -352,7 +352,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
         buf = MPIU_Malloc(count*sizeof(int));
         MPIU_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
-        mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, comm_old, MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Recv_ft(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, comm_old, MPI_STATUS_IGNORE, &errflag);
         /* FIXME: buf is never freed on error! */
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 9ee54e5..7298686 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -397,10 +397,10 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 	MPIU_DBG_MSG_FMT(CH3_CONNECT,VERBOSE,(MPIU_DBG_FDEST,
 		  "sending 3 ints, %d, %d and %d, and receiving 3 ints", 
                   send_ints[0], send_ints[1], send_ints[2]));
-        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
-                                  sendtag++, recv_ints, 3, MPI_INT,
-                                  0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+                                     sendtag++, recv_ints, 3, MPI_INT,
+                                     0, recvtag++, tmp_comm->handle,
+                                     MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
@@ -440,11 +440,11 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 	MPIU_DBG_MSG_FMT(CH3_CONNECT,VERBOSE,(MPIU_DBG_FDEST,
                "sending %d ints, receiving %d ints", 
 	      local_comm_size * 2, remote_comm_size * 2));
-	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 2, 
+	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 2,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 2, 
 				  MPI_INT, 0, recvtag++, tmp_comm->handle, 
-				  MPI_STATUS_IGNORE);
+				  MPI_STATUS_IGNORE, &errflag);
 	if (mpi_errno) {
 	    MPIU_ERR_POP(mpi_errno);
 	}
@@ -497,10 +497,10 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     if (rank == root)
     {
 	MPIU_DBG_MSG(CH3_CONNECT,VERBOSE,"sync with peer");
-        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
-                                  sendtag++, &j, 0, MPI_INT,
-                                  0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+                                     sendtag++, &j, 0, MPI_INT,
+                                     0, recvtag++, tmp_comm->handle,
+                                     MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
         }
@@ -704,8 +704,8 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
 
 	if (rank == root) {
 	    /* First, receive the pg description from the partner */
-	    mpi_errno = MPIC_Recv(&j, 1, MPI_INT, 0, recvtag++, 
-				  tmp_comm->handle, MPI_STATUS_IGNORE);
+	    mpi_errno = MPIC_Recv_ft(&j, 1, MPI_INT, 0, recvtag++,
+				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
 		MPIU_ERR_POP(mpi_errno);
@@ -714,8 +714,8 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
 	    if (pg_str == NULL) {
 		MPIU_ERR_POP(mpi_errno);
 	    }
-	    mpi_errno = MPIC_Recv(pg_str, j, MPI_CHAR, 0, recvtag++, 
-				  tmp_comm->handle, MPI_STATUS_IGNORE);
+	    mpi_errno = MPIC_Recv_ft(pg_str, j, MPI_CHAR, 0, recvtag++,
+				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
 		MPIU_ERR_POP(mpi_errno);
@@ -875,6 +875,7 @@ static int SendPGtoPeerAndFree( MPID_Comm *tmp_comm, int *sendtag_p,
     int mpi_errno = 0;
     int sendtag = *sendtag_p, i;
     pg_node *pg_iter;
+    int errflag = FALSE;
     MPIDI_STATE_DECL(MPID_STATE_SENDPGTOPEERANDFREE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_SENDPGTOPEERANDFREE);
@@ -883,15 +884,15 @@ static int SendPGtoPeerAndFree( MPID_Comm *tmp_comm, int *sendtag_p,
 	pg_iter = pg_list;
 	i = pg_iter->lenStr;
 	/*printf("connect:sending 1 int: %d\n", i);fflush(stdout);*/
-	mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle);
+	mpi_errno = MPIC_Send_ft(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
 	}
 	
 	/* printf("connect:sending string length %d\n", i);fflush(stdout); */
-	mpi_errno = MPIC_Send(pg_iter->str, i, MPI_CHAR, 0, sendtag++, 
-			      tmp_comm->handle);
+	mpi_errno = MPIC_Send_ft(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
+			      tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
@@ -994,10 +995,10 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = (*newcomm)->recvcontext_id;
 
 	/*printf("accept:sending 3 ints, %d, %d, %d, and receiving 2 ints\n", send_ints[0], send_ints[1], send_ints[2]);fflush(stdout);*/
-        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
-                                  sendtag++, recv_ints, 3, MPI_INT,
-                                  0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
+                                     sendtag++, recv_ints, 3, MPI_INT,
+                                     0, recvtag++, tmp_comm->handle,
+                                     MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
 	}
@@ -1033,11 +1034,11 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
 
 	/* Receive the translations from remote process rank to process group index */
 	/*printf("accept:sending %d ints and receiving %d ints\n", local_comm_size * 2, remote_comm_size * 2);fflush(stdout);*/
-	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 2, 
+	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 2,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 2, 
 				  MPI_INT, 0, recvtag++, tmp_comm->handle, 
-				  MPI_STATUS_IGNORE);
+				  MPI_STATUS_IGNORE, &errflag);
 #ifdef MPICH_DBG_OUTPUT
 	MPIU_DBG_PRINTF(("[%d]accept:Received remote_translation:\n", rank));
 	for (i=0; i<remote_comm_size; i++)
@@ -1085,10 +1086,10 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     if (rank == root)
     {
 	MPIU_DBG_MSG(CH3_CONNECT,VERBOSE,"sync with peer");
-        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
-                                  sendtag++, &j, 0, MPI_INT,
-                                  0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
+                                     sendtag++, &j, 0, MPI_INT,
+                                     0, recvtag++, tmp_comm->handle,
+                                     MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
 	    MPIU_ERR_POP(mpi_errno);
         }
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index 13038c1..7cb0ce3 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -561,23 +561,23 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = recvcontext_id;
 
 	TRACE_ERR("connect:sending 3 ints, %d, %d, %d, and receiving 2 ints with sendtag=%d recvtag=%d\n", send_ints[0], send_ints[1], send_ints[2], sendtag, recvtag);
-        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
                                   sendtag++, recv_ints, 3, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
 	}
 
-        mpi_errno = MPIC_Sendrecv_replace(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
+        mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
                                   sendtag++, 0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-            TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+            TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
         }
     }
 
@@ -609,13 +609,13 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
 					n_remote_pgs, remote_pg );
 	/* Receive the translations from remote process rank to process group
 	   index */
-	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 3,
+	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 3,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 3,
 				  MPI_INT, 0, recvtag++, tmp_comm->handle,
-				  MPI_STATUS_IGNORE);
+				  MPI_STATUS_IGNORE, &errflag);
 	if (mpi_errno) {
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
 	}
 
 	for (i=0; i<remote_comm_size; i++)
@@ -675,12 +675,12 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     /* synchronize with remote root */
     if (rank == root)
     {
-        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
                                   sendtag++, &j, 0, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
         }
 
         /* All communication with remote root done. Release the communicator. */
@@ -827,18 +827,18 @@ static int MPIDI_ReceivePGAndDistribute( struct MPID_Comm *tmp_comm, struct MPID
 
 	if (rank == root) {
 	    /* First, receive the pg description from the partner */
-	    mpi_errno = MPIC_Recv(&j, 1, MPI_INT, 0, recvtag++,
-				  tmp_comm->handle, MPI_STATUS_IGNORE);
+	    mpi_errno = MPIC_Recv_ft(&j, 1, MPI_INT, 0, recvtag++,
+				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
-		TRACE_ERR("MPIC_Recv returned with mpi_errno=%d\n", mpi_errno);
+		TRACE_ERR("MPIC_Recv_ft returned with mpi_errno=%d\n", mpi_errno);
 	    }
 	    pg_str = (char*)MPIU_Malloc(j);
-	    mpi_errno = MPIC_Recv(pg_str, j, MPI_CHAR, 0, recvtag++,
-				  tmp_comm->handle, MPI_STATUS_IGNORE);
+	    mpi_errno = MPIC_Recv_ft(pg_str, j, MPI_CHAR, 0, recvtag++,
+				  tmp_comm->handle, MPI_STATUS_IGNORE, &errflag);
 	    *recvtag_p = recvtag;
 	    if (mpi_errno != MPI_SUCCESS) {
-		TRACE_ERR("MPIC_Recv returned with mpi_errno=%d\n", mpi_errno);
+		TRACE_ERR("MPIC_Recv_ft returned with mpi_errno=%d\n", mpi_errno);
 	    }
 	}
 
@@ -1093,20 +1093,21 @@ static int MPIDI_SendPGtoPeerAndFree( struct MPID_Comm *tmp_comm, int *sendtag_p
     int mpi_errno = 0;
     int sendtag = *sendtag_p, i;
     pg_node *pg_iter;
+    int errflag = FALSE;
 
     while (pg_list != NULL) {
 	pg_iter = pg_list;
         i = pg_iter->lenStr;
 	TRACE_ERR("connect:sending 1 int: %d\n", i);
-	mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle);
+	mpi_errno = MPIC_Send_ft(&i, 1, MPI_INT, 0, sendtag++, tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    TRACE_ERR("MPIC_Send returned with mpi_errno=%d\n", mpi_errno);
 	}
 
 	TRACE_ERR("connect:sending string length %d\n", i);
-	mpi_errno = MPIC_Send(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
-			      tmp_comm->handle);
+	mpi_errno = MPIC_Send_ft(pg_iter->str, i, MPI_CHAR, 0, sendtag++,
+			      tmp_comm->handle, &errflag);
 	*sendtag_p = sendtag;
 	if (mpi_errno != MPI_SUCCESS) {
 	    TRACE_ERR("MPIC_Send returned with mpi_errno=%d\n", mpi_errno);
@@ -1210,31 +1211,31 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
         send_ints[2] = (*newcomm)->recvcontext_id;
 
 	TRACE_ERR("accept:sending 3 ints, %d, %d, %d, and receiving 2 ints with sendtag=%d recvtag=%d\n", send_ints[0], send_ints[1], send_ints[2], sendtag, recvtag);
-        mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv_ft(send_ints, 3, MPI_INT, 0,
                                   sendtag++, recv_ints, 3, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
 	}
 #if 0
 	send_char = pg_list->str;
 	TRACE_ERR("accept:sending 1 string and receiving 1 string\n", send_char, recv_char);
-        mpi_errno = MPIC_Sendrecv(send_char, 1, MPI_CHAR, 0,
-                                  sendtag++, recv_char, 3, MPI_CHAR,
-                                  0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+        mpi_errno = MPIC_Sendrecv_ft(send_char, 1, MPI_CHAR, 0,
+                                     sendtag++, recv_char, 3, MPI_CHAR,
+                                     0, recvtag++, tmp_comm->handle,
+                                     MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
 	}
 #endif
-        mpi_errno = MPIC_Sendrecv_replace(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
+        mpi_errno = MPIC_Sendrecv_replace_ft(&comm_cntr, 1, MPI_LONG_LONG_INT, 0,
                                   sendtag++, 0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
             /* this is a no_port error because we may fail to connect
                on the send if the port name is invalid */
-            TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+            TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
         }
 
     }
@@ -1267,7 +1268,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
 
 	/* Receive the translations from remote process rank to process group index */
 	TRACE_ERR("accept:sending %d ints and receiving %d ints\n", local_comm_size * 2, remote_comm_size * 2);
-	mpi_errno = MPIC_Sendrecv(local_translation, local_comm_size * 3,
+	mpi_errno = MPIC_Sendrecv_ft(local_translation, local_comm_size * 3,
 				  MPI_INT, 0, sendtag++,
 				  remote_translation, remote_comm_size * 3,
 				  MPI_INT, 0, recvtag++, tmp_comm->handle,
@@ -1333,12 +1334,12 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     /* synchronize with remote root */
     if (rank == root)
     {
-        mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0,
+        mpi_errno = MPIC_Sendrecv_ft(&i, 0, MPI_INT, 0,
                                   sendtag++, &j, 0, MPI_INT,
                                   0, recvtag++, tmp_comm->handle,
-                                  MPI_STATUS_IGNORE);
+                                  MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno != MPI_SUCCESS) {
-	    TRACE_ERR("MPIC_Sendrecv returned with mpi_errno=%d\n", mpi_errno);
+	    TRACE_ERR("MPIC_Sendrecv_ft returned with mpi_errno=%d\n", mpi_errno);
         }
 
         /* All communication with remote root done. Release the communicator. */
diff --git a/src/pmi/pmi2/poe/poe2pmi.c b/src/pmi/pmi2/poe/poe2pmi.c
index 3a3abc0..e52d1eb 100644
--- a/src/pmi/pmi2/poe/poe2pmi.c
+++ b/src/pmi/pmi2/poe/poe2pmi.c
@@ -389,6 +389,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
   int         numchildren, parent=0, i, result=0,tag, remaining_child_count;
   MPID_Comm   *comm_ptr;
   int         mpi_errno;
+  int         errflag = FALSE;
 
   int TASKS= world_size;
   children = MPIU_Malloc(TASKS*sizeof(int));
@@ -412,7 +413,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
     remaining_child_count = i;
     child_rank = (children[i])% TASKS;
     TRACE_ERR("_mpi_reduce_for_dyntask - recv from child_rank%d child_taskid=%d\n", child_rank, pg_world->vct[child_rank].taskid);
-    mpi_errno = MPIC_Recv(recvbuf, sizeof(int),MPI_BYTE, child_rank, tag, comm_ptr->handle, MPI_STATUS_IGNORE);
+    mpi_errno = MPIC_Recv_ft(recvbuf, sizeof(int),MPI_BYTE, child_rank, tag, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag);
     TRACE_ERR("_mpi_reduce_for_dyntask - recv DONE from child_rank%d child_taskid=%d\n", child_rank, pg_world->vct[child_rank].taskid);
 
     if(world_rank != parent)
@@ -421,7 +422,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
         parent_rank = (parent) % TASKS;
         result += *recvbuf;
         TRACE_ERR("_mpi_reduce_for_dyntask - send to parent_rank=%d parent taskid=%d \n", parent_rank, pg_world->vct[parent_rank].taskid);
-        MPIC_Send(&result, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle);
+        MPIC_Send_ft(&result, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
       }
       else
       {
@@ -437,7 +438,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
   if(world_rank != parent && numchildren == 0) {
     parent_rank = (parent) % TASKS;
     TRACE_ERR("_mpi_reduce_for_dyntask - send to parent_rank=%d parent_task_id=%d\n", parent_rank, pg_world->vct[parent_rank].taskid);
-    MPIC_Send(sendbuf, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle);
+    MPIC_Send_ft(sendbuf, sizeof(int), MPI_BYTE, parent_rank, tag, comm_ptr->handle, &errflag);
   }
 
   if(world_rank == 0) {

http://git.mpich.org/mpich.git/commitdiff/9a048941309585309b0ee217e2db4de0749c3e12

commit 9a048941309585309b0ee217e2db4de0749c3e12
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jun 24 11:03:53 2013 -0500

    No longer need MPIR_ERROR_TAG.
    
    The functionality has been replaced by reserving a bit from the tag
    space to accomplish the same thing without messing up tag matching.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 048ccf0..fe541f0 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3848,8 +3848,7 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);
 #define MPIR_TOPO_A_TAG               26
 #define MPIR_TOPO_B_TAG               27
 #define MPIR_REDUCE_SCATTER_BLOCK_TAG 28
-#define MPIR_ERROR_TAG                29
-#define MPIR_FIRST_NBC_TAG            30
+#define MPIR_FIRST_NBC_TAG            29
 
 /* These macros must be used carefully. These macros will not work with
  * negative tags. By definition, users are not to use negative tags and the

http://git.mpich.org/mpich.git/commitdiff/e46124eebcbb4120001bb3f118e4c723adf53d30

commit e46124eebcbb4120001bb3f118e4c723adf53d30
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Mon Jun 24 10:39:09 2013 -0500

    Make ENABLE_COLL_FT_RET default now that it doesn't break NBC.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/util/param/params.yml b/src/util/param/params.yml
index d5f4300..bce12a2 100644
--- a/src/util/param/params.yml
+++ b/src/util/param/params.yml
@@ -316,10 +316,9 @@ parameters:
     - category    : fault_tolerance
       name        : ENABLE_COLL_FT_RET
       type        : boolean
-      default     : false
+      default     : true
       class       : device
       description : >-
-        NOT COMPATIBLE WITH NONBLOCKING COLLECTIVES (see tt#1601)!!!
         Collectives called on a communicator with a failed process
         should not hang, however the result of the operation may be
         invalid even though the function returns MPI_SUCCESS.  This

http://git.mpich.org/mpich.git/commitdiff/432391e02248ec3d91e4e02af3f5083bc0405886

commit 432391e02248ec3d91e4e02af3f5083bc0405886
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 21 13:43:49 2013 -0500

    Modify collective functions to propagate error bit.
    
    All of the *_ft functions now set/check for the error bit in the tag
    instead of using a completely separate tag to send error notifications.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 677b0b7..5f2b46d 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -614,9 +614,9 @@ int MPIC_Send_ft(const void *buf, int count, MPI_Datatype datatype, int dest, in
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
-        mpi_errno = MPIC_Send(buf, count, datatype, dest, MPIR_ERROR_TAG, comm);
-    else
-        mpi_errno = MPIC_Send(buf, count, datatype, dest, tag, comm);
+        MPIR_TAG_SET_ERROR_BIT(tag);
+
+    mpi_errno = MPIC_Send(buf, count, datatype, dest, tag, comm);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SEND_FT);
@@ -640,24 +640,25 @@ int MPIC_Recv_ft(void *buf, int count, MPI_Datatype datatype, int source, int ta
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) {
-            mpi_errno = MPIC_Recv(buf, count, datatype, source, tag, comm, status);
-            goto fn_exit;
-    }
-    
     if (status == MPI_STATUS_IGNORE)
         status = &mystatus;
-    
-    mpi_errno = MPIC_Recv(buf, count, datatype, source, MPI_ANY_TAG, comm, status);
+
+    mpi_errno = MPIC_Recv(buf, count, datatype, source, tag, comm, status);
+
+    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) {
+        goto fn_exit;
+    }
+
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     if (*errflag)
         goto fn_exit;
 
     if (source != MPI_PROC_NULL) {
-        if (status->MPI_TAG == MPIR_ERROR_TAG)
+        if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
             *errflag = TRUE;
-        else {
+            MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+        } else {
             MPIU_Assert(status->MPI_TAG == tag);
         }
     }
@@ -685,9 +686,9 @@ int MPIC_Ssend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, i
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
     
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
-        mpi_errno = MPIC_Ssend(buf, count, datatype, dest, MPIR_ERROR_TAG, comm);
-    else
-        mpi_errno = MPIC_Ssend(buf, count, datatype, dest, tag, comm);
+        MPIR_TAG_SET_ERROR_BIT(tag);
+
+    mpi_errno = MPIC_Ssend(buf, count, datatype, dest, tag, comm);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SSEND_FT);
@@ -713,32 +714,22 @@ int MPIC_Sendrecv_ft(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) {
-        mpi_errno = MPIC_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag,
-                                  recvbuf, recvcount, recvtype, source, recvtag,
-                                  comm, status);
-        goto fn_exit;
+    if (MPIR_PARAM_ENABLE_COLL_FT_RET) {
+        if (status == MPI_STATUS_IGNORE) status = &mystatus;
+        if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
     }
-    
-    if (status == MPI_STATUS_IGNORE)
-        status = &mystatus;
-    
-    if (*errflag) {
-        mpi_errno = MPIC_Sendrecv(sendbuf, sendcount, sendtype, dest, MPIR_ERROR_TAG,
-                                  recvbuf, recvcount, recvtype, source, MPI_ANY_TAG,
-                                  comm, status);
-        goto fn_exit;
-    }
-    
+
     mpi_errno = MPIC_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag,
-                              recvbuf, recvcount, recvtype, source, MPI_ANY_TAG,
+                              recvbuf, recvcount, recvtype, source, recvtag,
                               comm, status);
+    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     if (source != MPI_PROC_NULL) {
-        if (status->MPI_TAG == MPIR_ERROR_TAG)
+        if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
             *errflag = TRUE;
-        else {
+            MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+        } else {
             MPIU_Assert(status->MPI_TAG == recvtag);
         }
     }
@@ -769,35 +760,23 @@ int MPIC_Sendrecv_replace_ft(void *buf, int count, MPI_Datatype datatype,
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) {
-        mpi_errno = MPIC_Sendrecv_replace(buf, count, datatype,
-                                          dest, sendtag,
-                                          source, recvtag,
-                                          comm, status);
-        goto fn_exit;
+    if (MPIR_PARAM_ENABLE_COLL_FT_RET) {
+        if (status == MPI_STATUS_IGNORE) status = &mystatus;
+        if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
     }
 
-    if (status == MPI_STATUS_IGNORE)
-        status = &mystatus;
-    
-    if (*errflag) {
-        mpi_errno = MPIC_Sendrecv_replace(buf, count, datatype,
-                                          dest, MPIR_ERROR_TAG,
-                                          source, MPI_ANY_TAG,
-                                          comm, status);
-        goto fn_exit;
-    }
-    
     mpi_errno = MPIC_Sendrecv_replace(buf, count, datatype,
                                       dest, sendtag,
-                                      source, MPI_ANY_TAG,
+                                      source, recvtag,
                                       comm, status);
+    if (!MPIR_PARAM_ENABLE_COLL_FT_RET) goto fn_exit;
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
     
     if (source != MPI_PROC_NULL) {
-        if (status->MPI_TAG == MPIR_ERROR_TAG)
+        if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
             *errflag = TRUE;
-        else {
+            MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+        } else {
             MPIU_Assert(status->MPI_TAG == recvtag);
         }
     }
@@ -825,9 +804,9 @@ int MPIC_Isend_ft(const void *buf, int count, MPI_Datatype datatype, int dest, i
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
     if (*errflag && MPIR_PARAM_ENABLE_COLL_FT_RET)
-        mpi_errno = MPIC_Isend(buf, count, datatype, dest, MPIR_ERROR_TAG, comm, request);
-    else
-        mpi_errno = MPIC_Isend(buf, count, datatype, dest, tag, comm, request);
+        MPIR_TAG_SET_ERROR_BIT(tag);
+
+    mpi_errno = MPIC_Isend(buf, count, datatype, dest, tag, comm, request);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_ISEND_FT);
@@ -848,10 +827,7 @@ int MPIC_Irecv_ft(void *buf, int count, MPI_Datatype datatype, int source,
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_IRECV_FT);
 
-    if (MPIR_PARAM_ENABLE_COLL_FT_RET)
-        mpi_errno = MPIC_Irecv(buf, count, datatype, source, MPI_ANY_TAG, comm, request);
-    else
-        mpi_errno = MPIC_Irecv(buf, count, datatype, source, tag, comm, request);
+    mpi_errno = MPIC_Irecv(buf, count, datatype, source, tag, comm, request);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPIC_IRECV_FT);
@@ -877,9 +853,9 @@ int MPIC_Waitall_ft(int numreq, MPI_Request requests[], MPI_Status statuses[], i
 
     MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    /* The MPI_TAG field is not set for send oeprations, so if we want
-       to check for MPIR_ERROR_TAG below, we should initialize all tag
-       fields here. */
+    /* The MPI_TAG field is not set for send operations, so if we want
+       to check for the error bit in the tag below, we should initialize all
+       tag fields here. */
     for (i = 0; i < numreq; ++i)
         statuses[i].MPI_TAG = 0;
     
@@ -890,8 +866,9 @@ int MPIC_Waitall_ft(int numreq, MPI_Request requests[], MPI_Status statuses[], i
         goto fn_exit;
 
     for (i = 0; i < numreq; ++i) {
-        if (statuses[i].MPI_TAG == MPIR_ERROR_TAG) {
+        if (MPIR_TAG_CHECK_ERROR_BIT(statuses[i].MPI_TAG)) {
             *errflag = TRUE;
+            MPIR_TAG_CLEAR_ERROR_BIT(statuses[i].MPI_TAG);
             break;
         }
     }
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 4eb6658..5bef548 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -287,7 +287,7 @@ int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s)
     /* Mask the error bit that might be set on incoming messages. It is
      * assumed that the local receive operation won't have the error bit set
      * (or it is masked away at some other level). */
-    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+    MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
     if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
         MPIR_T_START_TIMER(RECVQ_STATISTICS, timer_start);
 	while (rreq != NULL) {
@@ -371,7 +371,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id,
     /* Mask the error bit that might be set on incoming messages. It is
      * assumed that the local receive operation won't have the error bit set
      * (or it is masked away at some other level). */
-    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+    MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
 
     /* Note that since this routine is used only in the case of send_cancel,
        there can be only one match if at all. */
@@ -456,7 +456,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i
         /* Mask the error bit that might be set on incoming messages. It is
          * assumed that the local receive operation won't have the error bit set
          * (or it is masked away at some other level). */
-        MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+        MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
 
         if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
             do {
@@ -578,7 +578,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
     /* Mask the error bit that might be set on incoming messages. It is
      * assumed that the local receive operation won't have the error bit set
      * (or it is masked away at some other level). */
-    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+    MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
 
 	if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
 	    do {
@@ -824,8 +824,8 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
     /* Unset the error bit if it is set on the incoming packet so we don't
      * have to mask it every time. It will get reset at the end of the loop or
      * before the request is added to the unexpected queue if was set here. */
-    if (MPIU_TAG_CHECK_ERROR_BIT(match->parts.tag)) {
-        MPIU_TAG_CLEAR_ERROR_BIT(match->parts.tag);
+    if (MPIR_TAG_CHECK_ERROR_BIT(match->parts.tag)) {
+        MPIR_TAG_CLEAR_ERROR_BIT(match->parts.tag);
         error_bit_masked = 1;
     }
 
@@ -872,7 +872,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
         rreq->dev.recv_pending_count = 1;
         /* Reset the error bit if we unset it earlier. */
         if (error_bit_masked)
-            MPIU_TAG_SET_ERROR_BIT(match->parts.tag);
+            MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
 	rreq->dev.match	= *match;
 	rreq->dev.next	= NULL;
 	if (recvq_unexpected_tail != NULL) {
@@ -891,7 +891,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
 
     /* Reset the error bit if we unset it earlier. */
     if (error_bit_masked)
-        MPIU_TAG_SET_ERROR_BIT(match->parts.tag);
+        MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
 
     *foundp = found;
 

http://git.mpich.org/mpich.git/commitdiff/fc2433ede3b925529ef6bdf921ab1a69b454d8af

commit fc2433ede3b925529ef6bdf921ab1a69b454d8af
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri Jun 14 09:32:18 2013 -0500

    Mask away the error bit in tag space when matching.
    
    When appropriate, the error bit should not be part of the tag space when
    matching. This isn't always necessary. For pt2pt messages, the error bit will
    never be set so the masking isn't necessary. This change has minimal measured
    effect on matching times.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 501edd4..4eb6658 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -283,18 +283,22 @@ int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s)
     match.parts.tag = tag;
     match.parts.rank = source;
 
+    mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
+    /* Mask the error bit that might be set on incoming messages. It is
+     * assumed that the local receive operation won't have the error bit set
+     * (or it is masked away at some other level). */
+    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
     if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
         MPIR_T_START_TIMER(RECVQ_STATISTICS, timer_start);
 	while (rreq != NULL) {
             MPIR_T_INC(RECVQ_STATISTICS, unexpected_recvq_match_attempts);
-	    if (MATCH_WITH_NO_MASK(rreq->dev.match, match))
+	    if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask))
 		break;
 	    rreq = rreq->dev.next;
 	}
         MPIR_T_END_TIMER(RECVQ_STATISTICS, timer_start, time_matching_unexpectedq);
     }
     else {
-	mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
 	if (tag == MPI_ANY_TAG)
 	    match.parts.tag = mask.parts.tag = 0;
 	if (source == MPI_ANY_SOURCE)
@@ -352,6 +356,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id,
     MPID_Request * cur_rreq;
     MPID_Request * matching_prev_rreq;
     MPID_Request * matching_cur_rreq;
+    MPIDI_Message_match mask;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECVQ_FDU);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_RECVQ_FDU);
@@ -362,6 +367,12 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id,
     matching_cur_rreq = NULL;
     prev_rreq = NULL;
 
+    mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
+    /* Mask the error bit that might be set on incoming messages. It is
+     * assumed that the local receive operation won't have the error bit set
+     * (or it is masked away at some other level). */
+    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+
     /* Note that since this routine is used only in the case of send_cancel,
        there can be only one match if at all. */
     /* FIXME: Why doesn't this exit after it finds the first match? */
@@ -372,7 +383,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id,
         if (cur_rreq->dev.sender_req_id == sreq_id) {
             MPIR_T_INC(RECVQ_STATISTICS, unexpected_recvq_match_attempts);
 
-            if (MATCH_WITH_NO_MASK(cur_rreq->dev.match, *match)) {
+            if (MATCH_WITH_LEFT_MASK(cur_rreq->dev.match, *match, mask)) {
                 matching_prev_rreq = prev_rreq;
                 matching_cur_rreq = cur_rreq;
             }
@@ -441,10 +452,16 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i
         match.parts.tag = tag;
         match.parts.rank = source;
 
+        mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
+        /* Mask the error bit that might be set on incoming messages. It is
+         * assumed that the local receive operation won't have the error bit set
+         * (or it is masked away at some other level). */
+        MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+
         if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
             do {
                 MPIR_T_INC(RECVQ_STATISTICS, unexpected_recvq_match_attempts);
-                if (MATCH_WITH_NO_MASK(rreq->dev.match, match)) {
+                if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask)) {
                     if (prev_rreq != NULL) {
                         prev_rreq->dev.next = rreq->dev.next;
                     }
@@ -470,7 +487,6 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i
             } while (rreq);
         }
         else {
-            mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
             if (tag == MPI_ANY_TAG)
                 match.parts.tag = mask.parts.tag = 0;
             if (source == MPI_ANY_SOURCE)
@@ -558,10 +574,16 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
 	match.parts.tag = tag;
 	match.parts.rank = source;
 
+    mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
+    /* Mask the error bit that might be set on incoming messages. It is
+     * assumed that the local receive operation won't have the error bit set
+     * (or it is masked away at some other level). */
+    MPIU_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+
 	if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
 	    do {
                 MPIR_T_INC(RECVQ_STATISTICS, unexpected_recvq_match_attempts);
-		if (MATCH_WITH_NO_MASK(rreq->dev.match, match)) {
+		if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask)) {
 		    if (prev_rreq != NULL) {
 			prev_rreq->dev.next = rreq->dev.next;
 		    }
@@ -590,7 +612,6 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
 	    } while (rreq);
 	}
 	else {
-	    mask.parts.context_id = mask.parts.rank = mask.parts.tag = ~0;
 	    if (tag == MPI_ANY_TAG)
 		match.parts.tag = mask.parts.tag = 0;
 	    if (source == MPI_ANY_SOURCE)
@@ -793,12 +814,21 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
     MPID_Request * rreq;
     MPID_Request * prev_rreq;
     int channel_matched;
+    int error_bit_masked = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECVQ_FDP_OR_AEU);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_RECVQ_FDP_OR_AEU);
 
     MPIU_THREAD_CS_ASSERT_HELD(MSGQUEUE);
 
+    /* Unset the error bit if it is set on the incoming packet so we don't
+     * have to mask it every time. It will get reset at the end of the loop or
+     * before the request is added to the unexpected queue if was set here. */
+    if (MPIU_TAG_CHECK_ERROR_BIT(match->parts.tag)) {
+        MPIU_TAG_CLEAR_ERROR_BIT(match->parts.tag);
+        error_bit_masked = 1;
+    }
+
  top_loop:
     prev_rreq = NULL;
 
@@ -840,6 +870,9 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
 				   found=FALSE;goto lock_exit );
         MPIU_Assert(mpi_errno == 0);
         rreq->dev.recv_pending_count = 1;
+        /* Reset the error bit if we unset it earlier. */
+        if (error_bit_masked)
+            MPIU_TAG_SET_ERROR_BIT(match->parts.tag);
 	rreq->dev.match	= *match;
 	rreq->dev.next	= NULL;
 	if (recvq_unexpected_tail != NULL) {
@@ -856,6 +889,10 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
 
   lock_exit:
 
+    /* Reset the error bit if we unset it earlier. */
+    if (error_bit_masked)
+        MPIU_TAG_SET_ERROR_BIT(match->parts.tag);
+
     *foundp = found;
 
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_RECVQ_FDP_OR_AEU);

http://git.mpich.org/mpich.git/commitdiff/5838c8df1856a90faeb91e1f70d7f25a382552b3

commit 5838c8df1856a90faeb91e1f70d7f25a382552b3
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Thu Jun 6 14:19:47 2013 -0700

    Add macros to manipulate error bits in tag space.
    
    These macros are used to manipulate the error bit that has been added
    to the tag space to propagate error notification on top of other
    communication.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index d98ba9f..048ccf0 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3851,6 +3851,29 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);
 #define MPIR_ERROR_TAG                29
 #define MPIR_FIRST_NBC_TAG            30
 
+/* These macros must be used carefully. These macros will not work with
+ * negative tags. By definition, users are not to use negative tags and the
+ * only negative tag in MPICH is MPI_ANY_TAG which is checked seperately, but
+ * if there is a time where negative tags become more common, this setup won't
+ * work anymore. */
+
+/* This bitmask can be used to manually mask the tag space wherever it might
+ * be necessary to do so (for instance in the receive queue */
+#define MPIR_TAG_ERROR_BIT (1 << 30)
+
+/* This macro checks the value of the error bit in the MPI tag and returns 1
+ * if the tag is set and 0 if it is not. */
+#define MPIR_TAG_CHECK_ERROR_BIT(tag) ((MPIR_TAG_ERROR_BIT & tag) == MPIR_TAG_ERROR_BIT ? 1 : 0)
+
+/* This macro sets the value of the error bit in the MPI tag to 1 */
+#define MPIR_TAG_SET_ERROR_BIT(tag) (tag |= MPIR_TAG_ERROR_BIT)
+
+/* This macro clears the value of the error bit in the MPI tag */
+#define MPIR_TAG_CLEAR_ERROR_BIT(tag) (tag &= ~MPIR_TAG_ERROR_BIT)
+
+/* This macro masks the value of the error bit in the MPI tag */
+#define MPIR_TAG_MASK_ERROR_BIT(tag) (tag & ~MPIR_TAG_ERROR_BIT)
+
 /* These functions are used in the implementation of collective and
    other internal operations. They are wrappers around MPID send/recv
    functions. They do sends/receives by setting the context offset to
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 84c6301..35ddac4 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -119,7 +119,9 @@ typedef union {
 /* The first bit of the tag space is reserved for error propagation. We are
  * still well over the required tag size and this allows us to retain the
  * matching semantics while piggybacking the notification. If the message is
- * propagating an error, the data being transmitted is probably garbage.
+ * propagating an error, the data being transmitted is probably garbage. The
+ * macros to set/access this bit are in src/include/mpiimpl.h. If the
+ * location of this bit changes, those macros also need to be adjusted.
  */
 #define MPIDI_TAG_UB (0x3fffffff)
 

http://git.mpich.org/mpich.git/commitdiff/230060cdfdd6b0179c61e8e9325c2d3f481f9de2

commit 230060cdfdd6b0179c61e8e9325c2d3f481f9de2
Author: Wesley Bland <wbland at mcs.anl.gov>
Date:   Fri May 31 14:36:36 2013 -0500

    Block off the highest bit of tag space.
    
    The highest bit of tag space will now be reserved for failure
    notification. We are far above the required 32767, so this shouldn't be
    a problem.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 62c78a9..84c6301 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -116,7 +116,12 @@ typedef union {
  * upper level code may then modify this value after MPID_Init and before the
  * end of MPIR_Init_thread.  Don't use this value directly, always check the
  * runtime global value. */
-#define MPIDI_TAG_UB (0x7fffffff)
+/* The first bit of the tag space is reserved for error propagation. We are
+ * still well over the required tag size and this allows us to retain the
+ * matching semantics while piggybacking the notification. If the message is
+ * propagating an error, the data being transmitted is probably garbage.
+ */
+#define MPIDI_TAG_UB (0x3fffffff)
 
 /* Provides MPIDI_CH3_Pkt_t.  Must come after MPIDI_Message_match definition. */
 #include "mpidpkt.h"

-----------------------------------------------------------------------

Summary of changes:
 CHANGES                                 |    4 +
 src/include/mpiimpl.h                   |   60 ++--
 src/mpi/coll/allgather.c                |   18 +-
 src/mpi/coll/allgatherv.c               |   22 +-
 src/mpi/coll/allred_group.c             |   14 +-
 src/mpi/coll/allreduce.c                |   14 +-
 src/mpi/coll/alltoall.c                 |   22 +-
 src/mpi/coll/alltoallv.c                |   12 +-
 src/mpi/coll/alltoallw.c                |   14 +-
 src/mpi/coll/barrier.c                  |    2 +-
 src/mpi/coll/bcast.c                    |   28 +-
 src/mpi/coll/exscan.c                   |    2 +-
 src/mpi/coll/gather.c                   |   26 +-
 src/mpi/coll/gatherv.c                  |    8 +-
 src/mpi/coll/helper_fns.c               |  695 +++++++++++--------------------
 src/mpi/coll/igather.c                  |    4 +-
 src/mpi/coll/ired_scat.c                |    2 +-
 src/mpi/coll/ired_scat_block.c          |    2 +-
 src/mpi/coll/iscatter.c                 |    4 +-
 src/mpi/coll/red_scat.c                 |   28 +-
 src/mpi/coll/red_scat_block.c           |   28 +-
 src/mpi/coll/reduce.c                   |   26 +-
 src/mpi/coll/scan.c                     |   10 +-
 src/mpi/coll/scatter.c                  |   20 +-
 src/mpi/coll/scatterv.c                 |    6 +-
 src/mpi/comm/comm_create.c              |    8 +-
 src/mpi/comm/comm_split.c               |    2 +-
 src/mpi/comm/commutil.c                 |    4 +-
 src/mpi/comm/intercomm_create.c         |   19 +-
 src/mpi/comm/intercomm_merge.c          |    8 +-
 src/mpi/topo/dist_gr_create.c           |    8 +-
 src/mpid/ch3/include/mpidpre.h          |    9 +-
 src/mpid/ch3/src/ch3u_port.c            |   47 +-
 src/mpid/ch3/src/ch3u_recvq.c           |   51 ++-
 src/mpid/pamid/src/dyntask/mpidi_port.c |   29 +-
 src/pmi/pmi2/poe/poe2pmi.c              |    7 +-
 src/util/param/params.yml               |    4 +-
 37 files changed, 561 insertions(+), 706 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list