[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-289-g2ce01ca

Service Account noreply at mpich.org
Thu Apr 21 17:11:20 CDT 2016


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  2ce01cab749661faa315b8d4a9eb0b392d41044c (commit)
       via  22e559dfc7f6fd9d19840780cb32eca08f5ac9e5 (commit)
       via  3e5afcb2e1e9237dd496b53a1e3145c1a4550fff (commit)
       via  a1ecf0ad7e3ae6092d9fd9d06a2afa91f20c79b5 (commit)
       via  601e7efa64e7fd38ef09c77c7d5cfdeadb7fefa1 (commit)
       via  845aafae660ddfa82a135ce5ac0a9b1377c103e9 (commit)
       via  de6110fb16445529264f4bb456a235df67c52464 (commit)
       via  cfd8c8855619a325919155b19c32744dba5fe718 (commit)
       via  c14976d66dbd57f92776471a51110d0ea942700b (commit)
       via  46008f6384b41c5308546406b0da7cf2bb6860f9 (commit)
       via  ceb3cb52fc212972111f61a8088057126de188da (commit)
       via  dd20be4e8d3b41fdbd666f0139f1b1f98261eaf1 (commit)
       via  3b418a958be32f22412961c41995b29b5c0eb14c (commit)
       via  4459b29de71916d1df6663e943b0df767f34dd84 (commit)
       via  cff297b0a46908c9d4f40975eafb5337f19155e5 (commit)
       via  cb35f608b18c3045245db44eebee66a7a472ebeb (commit)
       via  19e8742ad7662dfe1f715b172461b0bfd4db5947 (commit)
       via  b01017cb2a613d1a58742ebae169db5713195ef4 (commit)
       via  78f7074624c37834587b8fb9940a8d52137e01c2 (commit)
       via  5439a3232b586c420431b73907f35a5add593527 (commit)
       via  e1e8c2299ad759d2f451fdaa4e304cb4736b12d8 (commit)
       via  0cd266b04a5f556cd011dad228a4f6d26baafa7e (commit)
       via  0d8882e5623014f1c0fecc412c00eb403f36455f (commit)
       via  3c8943305b900b51d8e2f6df95bf920b50ba9841 (commit)
       via  97591cb606b6baa764a2b461e68b72e8f6c6ee28 (commit)
       via  0da7aa4adc6af2771e03a1f9fa0cdf09c89990d5 (commit)
       via  6f61e8c0a7fb6eca45d09ec20775419b9577f1c6 (commit)
       via  85143b2644b68b5afabe15c7be6a71c2f4ce0d20 (commit)
       via  51a88997b68e28f9ec3372fba57e3f424ef71681 (commit)
       via  300493e0da2c63073652aff0f776142eed807329 (commit)
       via  c255813a99e9c68f94b0c5c9bc1b1399fb6f173e (commit)
       via  fb7b7c65bc70561de65883911e9ed1366507aa2d (commit)
       via  906f12ad953876376fcbbbe373b558dae3741c63 (commit)
       via  f322bec7a3e54802f55f0840728403651baf9ce2 (commit)
       via  a2091e6d99da355ef5d2134ec9456ee60f00f8be (commit)
       via  5a002ef7a80ddac35c3f7ee1eb0d804a1f9158e3 (commit)
       via  e347dd59ec4b0d3ac630f961a0eecfdd24fce5a8 (commit)
       via  415e17b1c909c0c37178d94349a47cedecc54832 (commit)
      from  a94a4b4596115cb60c94581ec57f824ce0638002 (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/2ce01cab749661faa315b8d4a9eb0b392d41044c

commit 2ce01cab749661faa315b8d4a9eb0b392d41044c
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Apr 21 11:46:19 2016 -0500

    Simplify lightweight request creation in ch3:ofi
    
    The lightweight request creation API duplicated the CH3/MPI-level
    functionality for request creation, which is unnecessary.  We should
    simply call the request_create API and then override whatever values
    we do not like.  A good compiler will see two consecutive stores and
    discard the earlier ones, so it should not add any additional
    instructions.
    
    Signed-off-by: Charles J Archer <charles.j.archer at intel.com>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 1492ac7..9934d76 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -263,32 +263,13 @@ static inline int MPID_nem_ofi_create_req_lw(MPIR_Request ** request, int refcnt
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *req;
 
-    req = (MPIR_Request *) MPIU_Handle_obj_alloc(&MPIR_Request_mem);
-    if (req == NULL)
-        MPID_Abort(NULL, MPI_ERR_NO_SPACE, -1, "Cannot allocate Request");
+    MPID_nem_ofi_create_req(&req, refcnt);
 
-    MPIU_Assert(req != NULL);
-    MPIU_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);
-
-    MPIU_Object_set_ref(req, refcnt);
+    /* resetting the kind and cc here should not add additional
+     * instructions since a good compiler will discard the kind and cc
+     * setting in the above request create anyway */
     req->kind = MPIR_REQUEST_KIND__SEND;
     MPIR_cc_set(&req->cc, 0); // request is already completed
-    req->cc_ptr  = &req->cc;
-    req->status.MPI_ERROR  = MPI_SUCCESS;
-    MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
-    req->comm = NULL;
-    req->greq_fns = NULL;
-    req->errflag = MPIR_ERR_NONE;
-    req->request_completed_cb = NULL;
-    req->dev.state = 0;
-    req->dev.datatype_ptr = NULL;
-    req->dev.segment_ptr = NULL;
-    req->dev.flags = MPIDI_CH3_PKT_FLAG_NONE;
-    req->dev.OnDataAvail = NULL;
-    req->dev.ext_hdr_ptr = NULL;
-    MPIDI_Request_clear_dbg(req);
-
-    MPID_nem_ofi_init_req(req);
 
     *request = req;
     return mpi_errno;

http://git.mpich.org/mpich.git/commitdiff/22e559dfc7f6fd9d19840780cb32eca08f5ac9e5

commit 22e559dfc7f6fd9d19840780cb32eca08f5ac9e5
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:48:42 2016 -0500

    Namespace MPIR_MPI_State_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 2dee4a8..efc2915 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -839,8 +839,8 @@ cvars:
 #ifdef HAVE_ERROR_CHECKING
 #define MPIR_ERRTEST_INITIALIZED_ORDIE()			\
 do {								\
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_PRE_INIT || \
-        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_FINALIZED) \
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__PRE_INIT || \
+        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_FINALIZED) \
     {								\
 	MPIR_Err_preOrPostInit();				\
     }                                                           \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 6741c12..1cb8a12 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2294,10 +2294,10 @@ extern struct MPIR_Commops  *MPIR_Comm_fns; /* Communicator creation functions *
 
 /* Per process data */
 typedef enum MPIR_MPI_State_t {
-    MPICH_PRE_INIT=0,
-    MPICH_IN_INIT,
-    MPICH_POST_INIT,
-    MPICH_POST_FINALIZED
+    MPICH_MPI_STATE__PRE_INIT=0,
+    MPICH_MPI_STATE__IN_INIT,
+    MPICH_MPI_STATE__POST_INIT,
+    MPICH_MPI_STATE__POST_FINALIZED
 } MPIR_MPI_State_t;
 
 typedef struct PreDefined_attrs {
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index a876bb8..5c41389 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -210,10 +210,10 @@ void MPIR_Errhandler_set_fc( MPI_Errhandler errhand )
 /* --BEGIN ERROR HANDLING-- */
 void MPIR_Err_preOrPostInit( void )
 {
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_PRE_INIT) {
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__PRE_INIT) {
 	MPL_error_printf("Attempting to use an MPI routine before initializing MPICH\n");
     }
-    else if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_FINALIZED) {
+    else if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_FINALIZED) {
 	MPL_error_printf("Attempting to use an MPI routine after finalizing MPICH\n");
     }
     else {
@@ -243,8 +243,8 @@ int MPIR_Err_return_comm( MPIR_Comm  *comm_ptr, const char fcname[],
     checkValidErrcode( error_class, fcname, &errcode );
 
     /* --BEGIN ERROR HANDLING-- */
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_PRE_INIT ||
-        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_FINALIZED)
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__PRE_INIT ||
+        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_FINALIZED)
     {
         /* for whatever reason, we aren't initialized (perhaps error 
 	   during MPI_Init) */
diff --git a/src/mpi/init/finalize.c b/src/mpi/init/finalize.c
index 846d074..e25e286 100644
--- a/src/mpi/init/finalize.c
+++ b/src/mpi/init/finalize.c
@@ -78,8 +78,8 @@ void MPIR_Add_finalize( int (*f)( void * ), void *extra_data, int priority )
 	   MPIR_Process.mpich_state to decide how to signal the error */
 	(void)MPL_internal_error_printf( "overflow in finalize stack! "
 		"Is MAX_FINALIZE_FUNC too small?\n" );
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_IN_INIT ||
-        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_INIT)
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__IN_INIT ||
+        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_INIT)
     {
 	    MPID_Abort( NULL, MPI_SUCCESS, 13, NULL );
 	}
@@ -258,7 +258,7 @@ int MPI_Finalize( void )
        finalize callbacks */
 
     MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
-    OPA_store_int(&MPIR_Process.mpich_state, MPICH_POST_FINALIZED);
+    OPA_store_int(&MPIR_Process.mpich_state, MPICH_MPI_STATE__POST_FINALIZED);
 
 #if defined(MPICH_IS_THREADED)
     MPIR_Thread_CS_Finalize();
@@ -318,7 +318,7 @@ int MPI_Finalize( void )
     }
 #   endif
     mpi_errno = MPIR_Err_return_comm( 0, FCNAME, mpi_errno );
-    if (OPA_load_int(&MPIR_Process.mpich_state) < MPICH_POST_FINALIZED) {
+    if (OPA_load_int(&MPIR_Process.mpich_state) < MPICH_MPI_STATE__POST_FINALIZED) {
         MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
     }
     goto fn_exit;
diff --git a/src/mpi/init/finalized.c b/src/mpi/init/finalized.c
index e4c2cd2..53a4014 100644
--- a/src/mpi/init/finalized.c
+++ b/src/mpi/init/finalized.c
@@ -69,7 +69,7 @@ int MPI_Finalized( int *flag )
 
     /* ... body of routine ...  */
     
-    *flag = (OPA_load_int(&MPIR_Process.mpich_state) >= MPICH_POST_FINALIZED);
+    *flag = (OPA_load_int(&MPIR_Process.mpich_state) >= MPICH_MPI_STATE__POST_FINALIZED);
     
     /* ... end of body of routine ... */
 
@@ -82,8 +82,8 @@ int MPI_Finalized( int *flag )
     /* --BEGIN ERROR HANDLING-- */
 #   ifdef HAVE_ERROR_CHECKING
   fn_fail:
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_IN_INIT ||
-        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_INIT)
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__IN_INIT ||
+        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_INIT)
     {
 	{
 	    mpi_errno = MPIR_Err_create_code(
diff --git a/src/mpi/init/init.c b/src/mpi/init/init.c
index b15489f..91a8f0e 100644
--- a/src/mpi/init/init.c
+++ b/src/mpi/init/init.c
@@ -135,7 +135,7 @@ int MPI_Init( int *argc, char ***argv )
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            if (OPA_load_int(&MPIR_Process.mpich_state) != MPICH_PRE_INIT) {
+            if (OPA_load_int(&MPIR_Process.mpich_state) != MPICH_MPI_STATE__PRE_INIT) {
                 mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
 						  "**inittwice", NULL );
 	    }
diff --git a/src/mpi/init/initialized.c b/src/mpi/init/initialized.c
index 0108a9f..b8938e2 100644
--- a/src/mpi/init/initialized.c
+++ b/src/mpi/init/initialized.c
@@ -69,7 +69,7 @@ int MPI_Initialized( int *flag )
 
     /* ... body of routine ...  */
     
-    *flag = (OPA_load_int(&MPIR_Process.mpich_state) >= MPICH_POST_INIT);
+    *flag = (OPA_load_int(&MPIR_Process.mpich_state) >= MPICH_MPI_STATE__POST_INIT);
     
     /* ... end of body of routine ... */
 
@@ -82,8 +82,8 @@ int MPI_Initialized( int *flag )
     /* --BEGIN ERROR HANDLING-- */
 #   ifdef HAVE_ERROR_CHECKING
   fn_fail:
-    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_IN_INIT ||
-        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_INIT)
+    if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__IN_INIT ||
+        OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_INIT)
     {
 	{
 	    mpi_errno = MPIR_Err_create_code(
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index fb619db..922576e 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -82,7 +82,7 @@ int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) __attr
 /* Any internal routines can go here.  Make them static if possible */
 
 /* Global variables can be initialized here */
-MPICH_PerProcess_t MPIR_Process = { OPA_INT_T_INITIALIZER(MPICH_PRE_INIT) };
+MPICH_PerProcess_t MPIR_Process = { OPA_INT_T_INITIALIZER(MPICH_MPI_STATE__PRE_INIT) };
      /* all other fields in MPIR_Process are irrelevant */
 MPIR_Thread_info_t MPIR_ThreadInfo = { 0 };
 
@@ -484,7 +484,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
 
     /* define MPI as initialized so that we can use MPI functions within 
        MPID_Init if necessary */
-    OPA_store_int(&MPIR_Process.mpich_state, MPICH_IN_INIT);
+    OPA_store_int(&MPIR_Process.mpich_state, MPICH_MPI_STATE__IN_INIT);
 
     /* We can't acquire any critical sections until this point.  Any
      * earlier the basic data structures haven't been initialized */
@@ -595,13 +595,13 @@ fn_exit:
     /* Make fields of MPIR_Process global visible and set mpich_state
        atomically so that MPI_Initialized() etc. are thread safe */
     OPA_write_barrier();
-    OPA_store_int(&MPIR_Process.mpich_state, MPICH_POST_INIT);
+    OPA_store_int(&MPIR_Process.mpich_state, MPICH_MPI_STATE__POST_INIT);
     return mpi_errno;
 
 fn_fail:
     /* --BEGIN ERROR HANDLING-- */
     /* signal to error handling routines that core services are unavailable */
-    OPA_store_int(&MPIR_Process.mpich_state, MPICH_PRE_INIT);
+    OPA_store_int(&MPIR_Process.mpich_state, MPICH_MPI_STATE__PRE_INIT);
 
     if (exit_init_cs_on_failure) {
         MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
@@ -673,7 +673,7 @@ int MPI_Init_thread( int *argc, char ***argv, int required, int *provided )
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            if (OPA_load_int(&MPIR_Process.mpich_state) != MPICH_PRE_INIT) {
+            if (OPA_load_int(&MPIR_Process.mpich_state) != MPICH_MPI_STATE__PRE_INIT) {
                 mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, "MPI_Init_thread", __LINE__, MPI_ERR_OTHER,
 						  "**inittwice", 0 );
 	    }

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

commit 3e5afcb2e1e9237dd496b53a1e3145c1a4550fff
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:47:30 2016 -0500

    Namespace MPIR_Op_kind_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 95ccf96..6741c12 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2024,23 +2024,23 @@ int MPID_Mem_was_alloced( void *ptr );  /* brad : this isn't used or implemented
   Collective-DS
   E*/
 typedef enum MPIR_Op_kind {
-    MPIR_OP_NULL=0,
-    MPIR_OP_MAX=1,
-    MPIR_OP_MIN=2,
-    MPIR_OP_SUM=3,
-    MPIR_OP_PROD=4,
-    MPIR_OP_LAND=5,
-    MPIR_OP_BAND=6,
-    MPIR_OP_LOR=7,
-    MPIR_OP_BOR=8,
-    MPIR_OP_LXOR=9,
-    MPIR_OP_BXOR=10,
-    MPIR_OP_MAXLOC=11,
-    MPIR_OP_MINLOC=12,
-    MPIR_OP_REPLACE=13,
-    MPIR_OP_NO_OP=14,
-    MPIR_OP_USER_NONCOMMUTE=32,
-    MPIR_OP_USER=33
+    MPIR_OP_KIND__NULL=0,
+    MPIR_OP_KIND__MAX=1,
+    MPIR_OP_KIND__MIN=2,
+    MPIR_OP_KIND__SUM=3,
+    MPIR_OP_KIND__PROD=4,
+    MPIR_OP_KIND__LAND=5,
+    MPIR_OP_KIND__BAND=6,
+    MPIR_OP_KIND__LOR=7,
+    MPIR_OP_KIND__BOR=8,
+    MPIR_OP_KIND__LXOR=9,
+    MPIR_OP_KIND__BXOR=10,
+    MPIR_OP_KIND__MAXLOC=11,
+    MPIR_OP_KIND__MINLOC=12,
+    MPIR_OP_KIND__REPLACE=13,
+    MPIR_OP_KIND__NO_OP=14,
+    MPIR_OP_KIND__USER_NONCOMMUTE=32,
+    MPIR_OP_KIND__USER=33
 } MPIR_Op_kind;
 
 /*S
diff --git a/src/mpi/coll/collutil.h b/src/mpi/coll/collutil.h
index be16930..8fc26d3 100644
--- a/src/mpi/coll/collutil.h
+++ b/src/mpi/coll/collutil.h
@@ -38,7 +38,7 @@ static inline int MPIR_Op_is_commutative(MPI_Op op)
     }
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             return FALSE;
         else
             return TRUE;
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 89a12b7..4c7620f 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -124,7 +124,7 @@ int MPIR_Exscan (
     }
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             is_commutative = 0;
         else
             is_commutative = 1;
diff --git a/src/mpi/coll/op_commutative.c b/src/mpi/coll/op_commutative.c
index 81dded3..773e416 100644
--- a/src/mpi/coll/op_commutative.c
+++ b/src/mpi/coll/op_commutative.c
@@ -82,7 +82,7 @@ int MPI_Op_commutative(MPI_Op op, int *commute)
         *commute = 1;
     }
     else {
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             *commute = 0;
         else
             *commute = 1;
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index f05c87f..e163311 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -124,7 +124,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
     /* --END ERROR HANDLING-- */
 
     op_ptr->language = MPIR_LANG__C;
-    op_ptr->kind     = commute ? MPIR_OP_USER : MPIR_OP_USER_NONCOMMUTE;
+    op_ptr->kind     = commute ? MPIR_OP_KIND__USER : MPIR_OP_KIND__USER_NONCOMMUTE;
     op_ptr->function.c_function = (void (*)(const void *, void *, 
 				   const int *, const MPI_Datatype *))user_fn;
     MPIU_Object_set_ref(op_ptr,1);
diff --git a/src/mpi/coll/op_free.c b/src/mpi/coll/op_free.c
index 9307de5..cfc5445 100644
--- a/src/mpi/coll/op_free.c
+++ b/src/mpi/coll/op_free.c
@@ -74,7 +74,7 @@ int MPI_Op_free(MPI_Op *op)
         {
 	    MPIR_Op_valid_ptr( op_ptr, mpi_errno );
 	    if (!mpi_errno) {
-		if (op_ptr->kind < MPIR_OP_USER_NONCOMMUTE) {
+		if (op_ptr->kind < MPIR_OP_KIND__USER_NONCOMMUTE) {
 		    mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, 
                          MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP,
 						      "**permop", 0 );
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 63aa171..2f4c35c 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -280,7 +280,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
     }
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             is_commutative = 0;
         else
             is_commutative = 1;
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 4afefd5..0d6f058 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -284,7 +284,7 @@ int MPIR_Reduce_scatter_block_intra (
     }
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             is_commutative = 0;
         else
             is_commutative = 1;
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 81b8202..9083bd2 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -753,7 +753,7 @@ int MPIR_Reduce_intra (
         is_commutative = 1;
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        is_commutative = (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE) ? 0 : 1;
+        is_commutative = (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE) ? 0 : 1;
     }
 
     MPID_Datatype_get_size_macro(datatype, type_size);
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index e4ebda1..1b14c0e 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -112,7 +112,7 @@ static int MPIR_Scan_generic (
     }
     else {
         MPIR_Op_get_ptr(op, op_ptr);
-        if (op_ptr->kind == MPIR_OP_USER_NONCOMMUTE)
+        if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE)
             is_commutative = 0;
         else
             is_commutative = 1;

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

commit a1ecf0ad7e3ae6092d9fd9d06a2afa91f20c79b5
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:45:25 2016 -0500

    Namespace MPIR_Comm_map_dir_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 8956998..95ccf96 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1116,10 +1116,10 @@ typedef enum {
 /* direction of mapping: local to local, local to remote, remote to
  * local, remote to remote */
 typedef enum {
-    MPIR_COMM_MAP_DIR_L2L,
-    MPIR_COMM_MAP_DIR_L2R,
-    MPIR_COMM_MAP_DIR_R2L,
-    MPIR_COMM_MAP_DIR_R2R
+    MPIR_COMM_MAP_DIR__L2L,
+    MPIR_COMM_MAP_DIR__L2R,
+    MPIR_COMM_MAP_DIR__R2L,
+    MPIR_COMM_MAP_DIR__R2R
 } MPIR_Comm_map_dir_t;
 
 typedef struct MPIR_Comm_map {
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index 282e0c6..f52467c 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -168,10 +168,10 @@ int MPIR_Comm_create_map(int         local_n,
     int mpi_errno = MPI_SUCCESS;
 
     MPIR_Comm_map_irregular(newcomm, mapping_comm, local_mapping,
-                            local_n, MPIR_COMM_MAP_DIR_L2L, NULL);
+                            local_n, MPIR_COMM_MAP_DIR__L2L, NULL);
     if (mapping_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         MPIR_Comm_map_irregular(newcomm, mapping_comm, remote_mapping,
-                                remote_n, MPIR_COMM_MAP_DIR_R2R, NULL);
+                                remote_n, MPIR_COMM_MAP_DIR__R2R, NULL);
     }
 
 fn_exit:
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 6ca5688..18d1424 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -316,7 +316,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
 	    MPIU_Sort_inttable( remotekeytable, new_remote_size );
 
             MPIR_Comm_map_irregular(*newcomm_ptr, comm_ptr, NULL,
-                                    new_size, MPIR_COMM_MAP_DIR_L2L,
+                                    new_size, MPIR_COMM_MAP_DIR__L2L,
                                     &mapper);
 
             for (i = 0; i < new_size; i++) {
@@ -342,7 +342,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
 
             MPIR_Comm_map_irregular(*newcomm_ptr, comm_ptr, NULL,
                                     new_remote_size,
-                                    MPIR_COMM_MAP_DIR_R2R, &mapper);
+                                    MPIR_COMM_MAP_DIR__R2R, &mapper);
 
             for (i = 0; i < new_remote_size; i++)
                 mapper->src_mapping[i] = remotekeytable[i].color;
@@ -359,7 +359,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
 	    (*newcomm_ptr)->remote_size    = new_size;
 
             MPIR_Comm_map_irregular(*newcomm_ptr, comm_ptr, NULL,
-                                    new_size, MPIR_COMM_MAP_DIR_L2L,
+                                    new_size, MPIR_COMM_MAP_DIR__L2L,
                                     &mapper);
 
             for (i = 0; i < new_size; i++) {
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 1d1992c..ce6b714 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -190,7 +190,7 @@ int MPIR_Setup_intercomm_localcomm(MPIR_Comm * intercomm_ptr)
     localcomm_ptr->local_size = intercomm_ptr->local_size;
     localcomm_ptr->rank = intercomm_ptr->rank;
 
-    MPIR_Comm_map_dup(localcomm_ptr, intercomm_ptr, MPIR_COMM_MAP_DIR_L2L);
+    MPIR_Comm_map_dup(localcomm_ptr, intercomm_ptr, MPIR_COMM_MAP_DIR__L2L);
 
     /* TODO More advanced version: if the group is available, dup it by
      * increasing the reference count instead of recreating it later */
@@ -604,7 +604,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_comm->remote_size = num_local;
 
             MPIR_Comm_map_irregular(comm->node_comm, comm, local_procs,
-                                    num_local, MPIR_COMM_MAP_DIR_L2L, NULL);
+                                    num_local, MPIR_COMM_MAP_DIR__L2L, NULL);
 
             mpi_errno = set_collops(comm->node_comm);
             if (mpi_errno)
@@ -637,7 +637,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_roots_comm->remote_size = num_external;
 
             MPIR_Comm_map_irregular(comm->node_roots_comm, comm,
-                                    external_procs, num_external, MPIR_COMM_MAP_DIR_L2L, NULL);
+                                    external_procs, num_external, MPIR_COMM_MAP_DIR__L2L, NULL);
 
             mpi_errno = set_collops(comm->node_roots_comm);
             if (mpi_errno)
@@ -770,17 +770,17 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
     if (size == comm_ptr->local_size) {
         /* Duplicate the network address mapping */
         if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
-            MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+            MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
         else
-            MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2R);
+            MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__R2R);
     }
     else {
         int i;
 
         if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
-            MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR_L2L, &map);
+            MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR__L2L, &map);
         else
-            MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR_R2R, &map);
+            MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR__R2R, &map);
         for (i = 0; i < size; i++) {
             /* For rank i in the new communicator, find the corresponding
              * rank in the input communicator */
@@ -790,7 +790,7 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
 
     /* If it is an intercomm, duplicate the local network address references */
     if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
-        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
     }
 
     /* Set the sizes and ranks */
@@ -871,13 +871,13 @@ int MPIR_Comm_copy_data(MPIR_Comm * comm_ptr, MPIR_Comm ** outcomm_ptr)
     newcomm_ptr->local_comm = 0;
 
     if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
-        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
     else
-        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2R);
+        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__R2R);
 
     /* If it is an intercomm, duplicate the network address mapping */
     if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
-        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+        MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
     }
 
     /* Set the sizes and ranks */
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 2573c07..807b06a 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -337,7 +337,7 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
     mpi_errno = MPID_Create_intercomm_from_lpids( *new_intercomm_ptr, remote_size, remote_lpids );
     if (mpi_errno) goto fn_fail;
 
-    MPIR_Comm_map_dup(*new_intercomm_ptr, local_comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+    MPIR_Comm_map_dup(*new_intercomm_ptr, local_comm_ptr, MPIR_COMM_MAP_DIR__L2L);
 
     /* Inherit the error handler (if any) */
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(local_comm_ptr));
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 3805fd0..b5a13ff 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -44,21 +44,21 @@ static int create_and_map(MPIR_Comm *comm_ptr, int local_high, MPIR_Comm *new_in
        from the existing comm */
     if (local_high) {
         /* remote group first */
-        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2L);
+        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__R2L);
 
-        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
         for (i = 0; i < comm_ptr->local_size; i++)
             if (i == comm_ptr->rank)
                 new_intracomm_ptr->rank = comm_ptr->remote_size + i;
     }
     else {
         /* local group first */
-        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
+        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__L2L);
         for (i = 0; i < comm_ptr->local_size; i++)
             if (i == comm_ptr->rank)
                 new_intracomm_ptr->rank = i;
 
-        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2L);
+        MPIR_Comm_map_dup(new_intracomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR__R2L);
     }
 
 fn_fail:
diff --git a/src/mpid/ch3/src/ch3u_comm.c b/src/mpid/ch3/src/ch3u_comm.c
index ce1a546..234f4ec 100644
--- a/src/mpid/ch3/src/ch3u_comm.c
+++ b/src/mpid/ch3/src/ch3u_comm.c
@@ -172,7 +172,7 @@ static inline int map_size(MPIR_Comm_map_t map)
 {
     if (map.type == MPIR_COMM_MAP_TYPE__IRREGULAR)
         return map.src_mapping_size;
-    else if (map.dir == MPIR_COMM_MAP_DIR_L2L || map.dir == MPIR_COMM_MAP_DIR_L2R)
+    else if (map.dir == MPIR_COMM_MAP_DIR__L2L || map.dir == MPIR_COMM_MAP_DIR__L2R)
         return map.src_comm->local_size;
     else
         return map.src_comm->remote_size;
@@ -202,19 +202,19 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
     /* do some sanity checks */
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
         if (mapper->src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
-            MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
-                        mapper->dir == MPIR_COMM_MAP_DIR_L2R);
+            MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L ||
+                        mapper->dir == MPIR_COMM_MAP_DIR__L2R);
         if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
-            MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
-                        mapper->dir == MPIR_COMM_MAP_DIR_R2L);
+            MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR__L2L ||
+                        mapper->dir == MPIR_COMM_MAP_DIR__R2L);
     }
 
     /* First, handle all the mappers that contribute to the local part
      * of the comm */
     vcrt_size = 0;
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2R ||
-            mapper->dir == MPIR_COMM_MAP_DIR_R2R)
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2R ||
+            mapper->dir == MPIR_COMM_MAP_DIR__R2R)
             continue;
 
         vcrt_size += map_size(*mapper);
@@ -223,11 +223,11 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
         src_comm = mapper->src_comm;
 
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2R ||
-            mapper->dir == MPIR_COMM_MAP_DIR_R2R)
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2R ||
+            mapper->dir == MPIR_COMM_MAP_DIR__R2R)
             continue;
 
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2L) {
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2L) {
             if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
@@ -243,7 +243,7 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
                 dup_vcrt(src_comm->dev.local_vcrt, &comm->dev.local_vcrt, mapper,
                          mapper->src_comm->local_size, vcrt_size, vcrt_offset);
         }
-        else {  /* mapper->dir == MPIR_COMM_MAP_DIR_R2L */
+        else {  /* mapper->dir == MPIR_COMM_MAP_DIR__R2L */
             MPIU_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
             if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->remote_size,
@@ -260,8 +260,8 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
      * of the comm (only valid for intercomms) */
     vcrt_size = 0;
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
-            mapper->dir == MPIR_COMM_MAP_DIR_R2L)
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2L ||
+            mapper->dir == MPIR_COMM_MAP_DIR__R2L)
             continue;
 
         vcrt_size += map_size(*mapper);
@@ -270,13 +270,13 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
         src_comm = mapper->src_comm;
 
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
-            mapper->dir == MPIR_COMM_MAP_DIR_R2L)
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2L ||
+            mapper->dir == MPIR_COMM_MAP_DIR__R2L)
             continue;
 
         MPIU_Assert(comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
-        if (mapper->dir == MPIR_COMM_MAP_DIR_L2R) {
+        if (mapper->dir == MPIR_COMM_MAP_DIR__L2R) {
             if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
@@ -284,7 +284,7 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
                 dup_vcrt(src_comm->dev.local_vcrt, &comm->dev.vcrt, mapper,
                          mapper->src_comm->local_size, vcrt_size, vcrt_offset);
         }
-        else {  /* mapper->dir == MPIR_COMM_MAP_DIR_R2R */
+        else {  /* mapper->dir == MPIR_COMM_MAP_DIR__R2R */
             MPIU_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
             dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->remote_size,
                      vcrt_size, vcrt_offset);

http://git.mpich.org/mpich.git/commitdiff/601e7efa64e7fd38ef09c77c7d5cfdeadb7fefa1

commit 601e7efa64e7fd38ef09c77c7d5cfdeadb7fefa1
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:44:54 2016 -0500

    Namespace MPIR_Comm_map_type_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 95ae9b4..8956998 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1109,8 +1109,8 @@ typedef enum MPIR_Comm_hierarchy_kind_t {
 /* Communicators */
 
 typedef enum {
-    MPIR_COMM_MAP_DUP,
-    MPIR_COMM_MAP_IRREGULAR
+    MPIR_COMM_MAP_TYPE__DUP,
+    MPIR_COMM_MAP_TYPE__IRREGULAR
 } MPIR_Comm_map_type_t;
 
 /* direction of mapping: local to local, local to remote, remote to
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 9a27d06..1d1992c 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -415,13 +415,13 @@ int MPIR_Comm_map_irregular(MPIR_Comm * newcomm, MPIR_Comm * src_comm,
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm_map_t *mapper;
     MPIU_CHKPMEM_DECL(3);
-    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_MAP_IRREGULAR);
+    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_MAP_TYPE__IRREGULAR);
 
-    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_MAP_IRREGULAR);
+    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_MAP_TYPE__IRREGULAR);
 
     MPIU_CHKPMEM_MALLOC(mapper, MPIR_Comm_map_t *, sizeof(MPIR_Comm_map_t), mpi_errno, "mapper");
 
-    mapper->type = MPIR_COMM_MAP_IRREGULAR;
+    mapper->type = MPIR_COMM_MAP_TYPE__IRREGULAR;
     mapper->src_comm = src_comm;
     mapper->dir = dir;
     mapper->src_mapping_size = src_mapping_size;
@@ -445,7 +445,7 @@ int MPIR_Comm_map_irregular(MPIR_Comm * newcomm, MPIR_Comm * src_comm,
 
   fn_exit:
     MPIU_CHKPMEM_COMMIT();
-    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_MAP_IRREGULAR);
+    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_MAP_TYPE__IRREGULAR);
     return mpi_errno;
   fn_fail:
     MPIU_CHKPMEM_REAP();
@@ -461,13 +461,13 @@ int MPIR_Comm_map_dup(MPIR_Comm * newcomm, MPIR_Comm * src_comm, MPIR_Comm_map_d
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm_map_t *mapper;
     MPIU_CHKPMEM_DECL(1);
-    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_MAP_DUP);
+    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_MAP_TYPE__DUP);
 
-    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_MAP_DUP);
+    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_MAP_TYPE__DUP);
 
     MPIU_CHKPMEM_MALLOC(mapper, MPIR_Comm_map_t *, sizeof(MPIR_Comm_map_t), mpi_errno, "mapper");
 
-    mapper->type = MPIR_COMM_MAP_DUP;
+    mapper->type = MPIR_COMM_MAP_TYPE__DUP;
     mapper->src_comm = src_comm;
     mapper->dir = dir;
 
@@ -477,7 +477,7 @@ int MPIR_Comm_map_dup(MPIR_Comm * newcomm, MPIR_Comm * src_comm, MPIR_Comm_map_d
 
   fn_exit:
     MPIU_CHKPMEM_COMMIT();
-    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_MAP_DUP);
+    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_MAP_TYPE__DUP);
     return mpi_errno;
   fn_fail:
     MPIU_CHKPMEM_REAP();
@@ -499,7 +499,7 @@ int MPIR_Comm_map_free(MPIR_Comm * comm)
 
     for (mapper = comm->mapper_head; mapper;) {
         tmp = mapper->next;
-        if (mapper->type == MPIR_COMM_MAP_IRREGULAR && mapper->free_mapping)
+        if (mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR && mapper->free_mapping)
             MPL_free(mapper->src_mapping);
         MPL_free(mapper);
         mapper = tmp;
diff --git a/src/mpid/ch3/src/ch3u_comm.c b/src/mpid/ch3/src/ch3u_comm.c
index fa49813..ce1a546 100644
--- a/src/mpid/ch3/src/ch3u_comm.c
+++ b/src/mpid/ch3/src/ch3u_comm.c
@@ -127,12 +127,12 @@ static void dup_vcrt(struct MPIDI_VCRT *src_vcrt, struct MPIDI_VCRT **dest_vcrt,
     /* try to find the simple case where the new comm is a simple
      * duplicate of the previous comm.  in that case, we simply add a
      * reference to the previous VCRT instead of recreating it. */
-    if (mapper->type == MPIR_COMM_MAP_DUP && src_comm_size == vcrt_size) {
+    if (mapper->type == MPIR_COMM_MAP_TYPE__DUP && src_comm_size == vcrt_size) {
         *dest_vcrt = src_vcrt;
         MPIDI_VCRT_Add_ref(src_vcrt);
         return;
     }
-    else if (mapper->type == MPIR_COMM_MAP_IRREGULAR &&
+    else if (mapper->type == MPIR_COMM_MAP_TYPE__IRREGULAR &&
              mapper->src_mapping_size == vcrt_size) {
         /* if the mapping array is exactly the same as the original
          * comm's VC list, there is no need to create a new VCRT.
@@ -156,7 +156,7 @@ static void dup_vcrt(struct MPIDI_VCRT *src_vcrt, struct MPIDI_VCRT **dest_vcrt,
     if (!vcrt_offset)
         MPIDI_VCRT_Create(vcrt_size, dest_vcrt);
 
-    if (mapper->type == MPIR_COMM_MAP_DUP) {
+    if (mapper->type == MPIR_COMM_MAP_TYPE__DUP) {
         for (i = 0; i < src_comm_size; i++)
             MPIDI_VCR_Dup(src_vcrt->vcr_table[i],
                           &((*dest_vcrt)->vcr_table[i + vcrt_offset]));
@@ -170,7 +170,7 @@ static void dup_vcrt(struct MPIDI_VCRT *src_vcrt, struct MPIDI_VCRT **dest_vcrt,
 
 static inline int map_size(MPIR_Comm_map_t map)
 {
-    if (map.type == MPIR_COMM_MAP_IRREGULAR)
+    if (map.type == MPIR_COMM_MAP_TYPE__IRREGULAR)
         return map.src_mapping_size;
     else if (map.dir == MPIR_COMM_MAP_DIR_L2L || map.dir == MPIR_COMM_MAP_DIR_L2R)
         return map.src_comm->local_size;

http://git.mpich.org/mpich.git/commitdiff/845aafae660ddfa82a135ce5ac0a9b1377c103e9

commit 845aafae660ddfa82a135ce5ac0a9b1377c103e9
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:44:09 2016 -0500

    Namespace MPIR_Comm_hierarchy_kind_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 4fc3b78..95ae9b4 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1100,11 +1100,11 @@ typedef enum MPIR_Comm_kind_t {
 /* ideally we could add these to MPIR_Comm_kind_t, but there's too much existing
  * code that assumes that the only valid values are INTRACOMM or INTERCOMM */
 typedef enum MPIR_Comm_hierarchy_kind_t {
-    MPIR_HIERARCHY_FLAT = 0,        /* no hierarchy */
-    MPIR_HIERARCHY_PARENT = 1,      /* has subcommunicators */
-    MPIR_HIERARCHY_NODE_ROOTS = 2,  /* is the subcomm for node roots */
-    MPIR_HIERARCHY_NODE = 3,        /* is the subcomm for a node */
-    MPIR_HIERARCHY_SIZE             /* cardinality of this enum */
+    MPIR_COMM_HIERARCHY_KIND__FLAT = 0,        /* no hierarchy */
+    MPIR_COMM_HIERARCHY_KIND__PARENT = 1,      /* has subcommunicators */
+    MPIR_COMM_HIERARCHY_KIND__NODE_ROOTS = 2,  /* is the subcomm for node roots */
+    MPIR_COMM_HIERARCHY_KIND__NODE = 3,        /* is the subcomm for a node */
+    MPIR_COMM_HIERARCHY_KIND__SIZE             /* cardinality of this enum */
 } MPIR_Comm_hierarchy_kind_t;
 /* Communicators */
 
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index fedb4ae..9a27d06 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -90,7 +90,7 @@ int MPIR_Comm_init(MPIR_Comm * comm_p)
     comm_p->name[0] = '\0';
     comm_p->info = NULL;
 
-    comm_p->hierarchy_kind = MPIR_HIERARCHY_FLAT;
+    comm_p->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__FLAT;
     comm_p->node_comm = NULL;
     comm_p->node_roots_comm = NULL;
     comm_p->intranode_table = NULL;
@@ -213,7 +213,7 @@ int MPIR_Setup_intercomm_localcomm(MPIR_Comm * intercomm_ptr)
 /* holds default collop "vtables" for _intracomms_, where
  * default[hierarchy_kind] is the pointer to the collop struct for that
  * hierarchy kind */
-static struct MPIR_Collops *default_collops[MPIR_HIERARCHY_SIZE] = { NULL };
+static struct MPIR_Collops *default_collops[MPIR_COMM_HIERARCHY_KIND__SIZE] = { NULL };
 
 /* default for intercomms */
 static struct MPIR_Collops *ic_default_collops = NULL;
@@ -225,7 +225,7 @@ static struct MPIR_Collops *ic_default_collops = NULL;
 static int cleanup_default_collops(void *unused)
 {
     int i;
-    for (i = 0; i < MPIR_HIERARCHY_SIZE; ++i) {
+    for (i = 0; i < MPIR_COMM_HIERARCHY_KIND__SIZE; ++i) {
         if (default_collops[i]) {
             MPIU_Assert(default_collops[i]->ref_count >= 1);
             if (--default_collops[i]->ref_count == 0)
@@ -250,10 +250,10 @@ static int init_default_collops(void)
     int mpi_errno = MPI_SUCCESS;
     int i;
     struct MPIR_Collops *ops = NULL;
-    MPIU_CHKPMEM_DECL(MPIR_HIERARCHY_SIZE + 1);
+    MPIU_CHKPMEM_DECL(MPIR_COMM_HIERARCHY_KIND__SIZE + 1);
 
     /* first initialize the intracomms */
-    for (i = 0; i < MPIR_HIERARCHY_SIZE; ++i) {
+    for (i = 0; i < MPIR_COMM_HIERARCHY_KIND__SIZE; ++i) {
         MPIU_CHKPMEM_CALLOC(ops, struct MPIR_Collops *, sizeof(struct MPIR_Collops), mpi_errno,
                             "default intracomm collops");
         ops->ref_count = 1;     /* force existence until finalize time */
@@ -289,17 +289,17 @@ static int init_default_collops(void)
 
         /* override defaults, such as for SMP */
         switch (i) {
-        case MPIR_HIERARCHY_FLAT:
+        case MPIR_COMM_HIERARCHY_KIND__FLAT:
             break;
-        case MPIR_HIERARCHY_PARENT:
+        case MPIR_COMM_HIERARCHY_KIND__PARENT:
             ops->Ibcast_sched = &MPIR_Ibcast_SMP;
             ops->Iscan_sched = &MPIR_Iscan_SMP;
             ops->Iallreduce_sched = &MPIR_Iallreduce_SMP;
             ops->Ireduce_sched = &MPIR_Ireduce_SMP;
             break;
-        case MPIR_HIERARCHY_NODE:
+        case MPIR_COMM_HIERARCHY_KIND__NODE:
             break;
-        case MPIR_HIERARCHY_NODE_ROOTS:
+        case MPIR_COMM_HIERARCHY_KIND__NODE_ROOTS:
             break;
 
             /* --BEGIN ERROR HANDLING-- */
@@ -596,7 +596,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_comm->recvcontext_id = comm->node_comm->context_id;
             comm->node_comm->rank = local_rank;
             comm->node_comm->comm_kind = MPIR_COMM_KIND__INTRACOMM;
-            comm->node_comm->hierarchy_kind = MPIR_HIERARCHY_NODE;
+            comm->node_comm->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__NODE;
             comm->node_comm->local_comm = NULL;
             MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Create node_comm=%p\n", comm->node_comm);
 
@@ -630,7 +630,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_roots_comm->recvcontext_id = comm->node_roots_comm->context_id;
             comm->node_roots_comm->rank = external_rank;
             comm->node_roots_comm->comm_kind = MPIR_COMM_KIND__INTRACOMM;
-            comm->node_roots_comm->hierarchy_kind = MPIR_HIERARCHY_NODE_ROOTS;
+            comm->node_roots_comm->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__NODE_ROOTS;
             comm->node_roots_comm->local_comm = NULL;
 
             comm->node_roots_comm->local_size = num_external;
@@ -652,7 +652,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             MPIR_Comm_map_free(comm->node_roots_comm);
         }
 
-        comm->hierarchy_kind = MPIR_HIERARCHY_PARENT;
+        comm->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__PARENT;
     }
 
   fn_exit:
@@ -672,7 +672,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
    collective communication, for example. */
 int MPIR_Comm_is_node_aware(MPIR_Comm * comm)
 {
-    return (comm->hierarchy_kind == MPIR_HIERARCHY_PARENT);
+    return (comm->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT);
 }
 
 /* Returns true if the communicator is node-aware and processes in all the nodes
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
index 1bfef18..4b65b33 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
@@ -33,7 +33,7 @@ int MPIDI_CH3I_comm_create(MPIR_Comm *comm, void *param)
 #endif
     
     /* set up intranode barrier iff this is an intranode communicator */
-    if (comm->hierarchy_kind == MPIR_HIERARCHY_NODE) {
+    if (comm->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__NODE) {
         MPIR_Collops *cf, **cf_p;
         comm->dev.ch.barrier_vars = NULL;
 
@@ -96,7 +96,7 @@ int MPIDI_CH3I_comm_destroy(MPIR_Comm *comm, void *param)
     goto fn_exit;
 #endif
     
-    if (comm->hierarchy_kind == MPIR_HIERARCHY_NODE) {
+    if (comm->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__NODE) {
         MPIR_Collops *cf = comm->coll_fns;
 
         /* replace previous coll_fns table */
@@ -168,7 +168,7 @@ static int barrier(MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag)
     int prev;
     int sense;
     
-    MPIU_Assert(comm_ptr->hierarchy_kind == MPIR_HIERARCHY_NODE);
+    MPIU_Assert(comm_ptr->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__NODE);
     
     /* Trivial barriers return immediately */
     if (comm_ptr->local_size == 1)

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

commit de6110fb16445529264f4bb456a235df67c52464
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:42:57 2016 -0500

    Namespace MPIR_Comm_kind_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 88751a2..2dee4a8 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -206,7 +206,7 @@ cvars:
     }
 
 #define MPIR_ERRTEST_COMM_INTRA(comm_ptr, err )                         \
-    if ((comm_ptr)->comm_kind != MPIR_INTRACOMM) {                      \
+    if ((comm_ptr)->comm_kind != MPIR_COMM_KIND__INTRACOMM) {                      \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_COMM,"**commnotintra",0);    \
         goto fn_fail;                                                   \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 55de079..4fc3b78 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1093,8 +1093,8 @@ void MPIR_Group_setup_lpid_list( MPIR_Group * );
   MPIR_Comm_kind_t - Name the two types of communicators
   E*/
 typedef enum MPIR_Comm_kind_t {
-    MPIR_INTRACOMM = 0,
-    MPIR_INTERCOMM = 1
+    MPIR_COMM_KIND__INTRACOMM = 0,
+    MPIR_COMM_KIND__INTERCOMM = 1
 } MPIR_Comm_kind_t;
 
 /* ideally we could add these to MPIR_Comm_kind_t, but there's too much existing
@@ -1220,7 +1220,7 @@ typedef struct MPIR_Comm {
     MPIR_Group   *local_group,   /* Groups in communicator. */
                  *remote_group;  /* The local and remote groups are the
                                     same for intra communicators */
-    MPIR_Comm_kind_t comm_kind;  /* MPIR_INTRACOMM or MPIR_INTERCOMM */
+    MPIR_Comm_kind_t comm_kind;  /* MPIR_COMM_KIND__INTRACOMM or MPIR_COMM_KIND__INTERCOMM */
     char          name[MPI_MAX_OBJECT_NAME];  /* Required for MPI-2 */
     MPIR_Errhandler *errhandler; /* Pointer to the error handler structure */
     struct MPIR_Comm    *local_comm; /* Defined only for intercomms, holds
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index ecff424..dac7dda 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -791,7 +791,7 @@ int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Allgather_intra(sendbuf, sendcount, sendtype,
                                          recvbuf, recvcount, recvtype,
@@ -934,7 +934,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             } else {
                 /* catch common aliasing cases */
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 02db271..c3767c3 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -896,7 +896,7 @@ int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Allgatherv_intra(sendbuf, sendcount, sendtype,
                                           recvbuf, recvcounts, displs, recvtype,
@@ -1046,7 +1046,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-	    if (comm_ptr->comm_kind == MPIR_INTERCOMM)
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM)
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             if (sendbuf != MPI_IN_PLACE) {
                 MPIR_ERRTEST_COUNT(sendcount, mpi_errno);
@@ -1061,7 +1061,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 MPIR_ERRTEST_USERBUFFER(sendbuf,sendcount,sendtype,mpi_errno);
 
                 /* catch common aliasing cases */
-                if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+                if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                         sendtype == recvtype &&
                         recvcounts[comm_ptr->rank] != 0 &&
                         sendcount != 0) {
@@ -1071,7 +1071,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 }
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
                 comm_size = comm_ptr->local_size;
             else
                 comm_size = comm_ptr->remote_size;
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index 1c37ac9..cb4a29a 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -370,7 +370,7 @@ int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count,
 {
     int mpi_errno = MPI_SUCCESS;
 
-    MPIR_ERR_CHKANDJUMP(comm_ptr->comm_kind != MPIR_INTRACOMM, mpi_errno, MPI_ERR_OTHER, "**commnotintra");
+    MPIR_ERR_CHKANDJUMP(comm_ptr->comm_kind != MPIR_COMM_KIND__INTRACOMM, mpi_errno, MPI_ERR_OTHER, "**commnotintra");
 
     mpi_errno = MPIR_Allreduce_group_intra(sendbuf, recvbuf, count, datatype,
                                            op, comm_ptr, group_ptr, tag, errflag);
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index caddf6b..423a14c 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -718,7 +718,7 @@ int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype d
 {
     int mpi_errno = MPI_SUCCESS;
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Allreduce_intra(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -758,7 +758,7 @@ int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datat
     }
     else
     {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
             /* intracommunicator */
             mpi_errno = MPIR_Allreduce_intra(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag);
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -860,7 +860,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, count, mpi_errno);
             } else {
                 if (count != 0 && sendbuf != MPI_IN_PLACE)
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 60edb28..d3a8381 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -559,7 +559,7 @@ int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Alltoall_intra(sendbuf, sendcount, sendtype,
                                         recvbuf, recvcount, recvtype,
@@ -688,7 +688,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 }
 
-                if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+                if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                         sendbuf != MPI_IN_PLACE &&
                         sendcount == recvcount &&
                         sendtype == recvtype &&
@@ -706,7 +706,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             }
             MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf, recvcount, mpi_errno);
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 19d5942..8fd3692 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -334,7 +334,7 @@ int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Alltoallv_intra(sendbuf, sendcounts, sdispls,
                                          sendtype, recvbuf, recvcounts,
@@ -465,12 +465,12 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
         {
 	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, comm_size;
-            int check_send = (comm_ptr->comm_kind == MPIR_INTRACOMM && sendbuf != MPI_IN_PLACE);
+            int check_send = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && sendbuf != MPI_IN_PLACE);
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 comm_size = comm_ptr->local_size;
 
                 if (sendbuf != MPI_IN_PLACE && sendtype == recvtype && sendcounts == recvcounts)
@@ -478,7 +478,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
             } else
                 comm_size = comm_ptr->remote_size;
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM && sendbuf == MPI_IN_PLACE) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM && sendbuf == MPI_IN_PLACE) {
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
             }
 
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 68216ff..08818b7 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -329,7 +329,7 @@ int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Alltoallw_intra(sendbuf, sendcounts, sdispls,
                                          sendtypes, recvbuf, recvcounts,
@@ -465,13 +465,13 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            check_send = (comm_ptr->comm_kind == MPIR_INTRACOMM && sendbuf != MPI_IN_PLACE);
+            check_send = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && sendbuf != MPI_IN_PLACE);
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM && sendbuf == MPI_IN_PLACE) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM && sendbuf == MPI_IN_PLACE) {
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 comm_size = comm_ptr->local_size;
 
                 if (sendbuf != MPI_IN_PLACE && sendcounts == recvcounts && sendtypes == recvtypes)
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 8785e3f..88499c8 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -285,7 +285,7 @@ int MPIR_Barrier(MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Barrier_intra( comm_ptr, errflag );
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 43bcf59..547f8ea 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -1470,7 +1470,7 @@ inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
 {
     int mpi_errno = MPI_SUCCESS;
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Bcast_intra( buffer, count, datatype, root, comm_ptr, errflag );
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -1558,7 +1558,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
-	    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 	    }
 	    else {
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 870099c..8c35426 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -678,7 +678,7 @@ int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Gather_intra(sendbuf, sendcount, sendtype,
                                       recvbuf, recvcount, recvtype, root,
@@ -807,7 +807,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-	    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 if (sendbuf != MPI_IN_PLACE) {
@@ -848,7 +848,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             }
 
-	    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 		MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 1f481c1..a09f360 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -101,9 +101,9 @@ int MPIR_Gatherv (
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
 
     /* If rank == root, then I recv lots, otherwise I send */
-    if (((comm_ptr->comm_kind == MPIR_INTRACOMM) && (root == rank)) ||
-        ((comm_ptr->comm_kind == MPIR_INTERCOMM) && (root == MPI_ROOT))) {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+    if (((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (root == rank)) ||
+        ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && (root == MPI_ROOT))) {
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             comm_size = comm_ptr->local_size;
         else
             comm_size = comm_ptr->remote_size;
@@ -119,7 +119,7 @@ int MPIR_Gatherv (
         reqs = 0;
         for (i = 0; i < comm_size; i++) {
             if (recvcounts[i]) {
-                if ((comm_ptr->comm_kind == MPIR_INTRACOMM) && (i == rank)) {
+                if ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (i == rank)) {
                     if (sendbuf != MPI_IN_PLACE) {
                         mpi_errno = MPIR_Localcopy(sendbuf, sendcount, sendtype,
                                                    ((char *)recvbuf+displs[rank]*extent), 
@@ -320,7 +320,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-	    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 if (sendbuf != MPI_IN_PLACE) {
@@ -370,7 +370,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             }
 
-	    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 		MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 53193a8..c5b2729 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -30,7 +30,7 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
 
     MPIR_Comm_get_ptr( comm, comm_ptr );
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
     
     mpi_errno = MPID_Probe(source, tag, comm_ptr, context_id, status);
@@ -292,7 +292,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
             MPIR_TAG_SET_ERROR_BIT(tag);
     }
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     mpi_errno = MPID_Send(buf, count, datatype, dest, tag, comm_ptr,
@@ -342,7 +342,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int
     MPIR_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
                          "**countneg", "**countneg %d", count);
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     if (status == MPI_STATUS_IGNORE)
@@ -399,7 +399,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
     MPIR_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
             "**countneg", "**countneg %d", count);
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     switch(*errflag) {
@@ -462,7 +462,7 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype
     MPIR_ERR_CHKANDJUMP1((recvcount < 0), mpi_errno, MPI_ERR_COUNT,
                          "**countneg", "**countneg %d", recvcount);
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     if (status == MPI_STATUS_IGNORE) status = &mystatus;
@@ -557,7 +557,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
             MPIR_TAG_SET_ERROR_BIT(sendtag);
     }
 
-    context_id_offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id_offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     if (count > 0 && dest != MPI_PROC_NULL) {
@@ -641,7 +641,7 @@ int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
             MPIR_TAG_SET_ERROR_BIT(tag);
     }
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     mpi_errno = MPID_Isend(buf, count, datatype, dest, tag, comm_ptr,
@@ -682,7 +682,7 @@ int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest
             MPIR_TAG_SET_ERROR_BIT(tag);
     }
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     mpi_errno = MPID_Issend(buf, count, datatype, dest, tag, comm_ptr,
@@ -712,7 +712,7 @@ int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source,
     MPIR_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
                          "**countneg", "**countneg %d", count);
 
-    context_id = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?
+    context_id = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?
         MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
 
     mpi_errno = MPID_Irecv(buf, count, datatype, source, tag, comm_ptr,
diff --git a/src/mpi/coll/iallgather.c b/src/mpi/coll/iallgather.c
index aa7f5dc..b352a6f 100644
--- a/src/mpi/coll/iallgather.c
+++ b/src/mpi/coll/iallgather.c
@@ -708,7 +708,7 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
             /* catch common aliasing cases */
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM && recvbuf != MPI_IN_PLACE && sendtype == recvtype && sendcount == recvcount && sendcount != 0) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && recvbuf != MPI_IN_PLACE && sendtype == recvtype && sendcount == recvcount && sendcount != 0) {
                 int recvtype_size;
                 MPID_Datatype_get_size_macro(recvtype, recvtype_size);
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, (char*)recvbuf + comm_ptr->rank*recvcount*recvtype_size, mpi_errno);
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index e9f23e1..1631d33 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -802,7 +802,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v
                 }
 
                 /* catch common aliasing cases */
-                if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+                if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                         sendtype == recvtype &&
                         recvcounts[comm_ptr->rank] != 0 &&
                         sendcount != 0) {
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index 2839fcc..3539d04 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -439,7 +439,7 @@ int MPIR_Iallreduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     int mpi_errno = MPI_SUCCESS;
     int comm_size, is_homogeneous, pof2, type_size;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     is_homogeneous = TRUE;
 #ifdef MPID_HAS_HETERO
@@ -509,7 +509,7 @@ int MPIR_Iallreduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     int rank, root;
     MPIR_Comm *lcomm_ptr = NULL;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
     rank = comm_ptr->rank;
 
@@ -758,7 +758,7 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
             }
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM)
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM)
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, count, mpi_errno);
 
             if (sendbuf != MPI_IN_PLACE)
@@ -766,7 +766,7 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM && count != 0 && sendbuf != MPI_IN_PLACE)
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && count != 0 && sendbuf != MPI_IN_PLACE)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
 
             /* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
diff --git a/src/mpi/coll/ialltoall.c b/src/mpi/coll/ialltoall.c
index 77c0595..21b9868 100644
--- a/src/mpi/coll/ialltoall.c
+++ b/src/mpi/coll/ialltoall.c
@@ -637,7 +637,7 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                     sendbuf != MPI_IN_PLACE &&
                     sendcount == recvcount &&
                     sendtype == recvtype &&
diff --git a/src/mpi/coll/ialltoallv.c b/src/mpi/coll/ialltoallv.c
index e6b4c14..5ee8033 100644
--- a/src/mpi/coll/ialltoallv.c
+++ b/src/mpi/coll/ialltoallv.c
@@ -47,7 +47,7 @@ int MPIR_Ialltoallv_intra(const void *sendbuf, const int sendcounts[], const int
     int dst, rank;
     MPIR_SCHED_CHKPMEM_DECL(1);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
@@ -182,7 +182,7 @@ int MPIR_Ialltoallv_inter(const void *sendbuf, const int sendcounts[], const int
     int src, dst, rank, sendcount, recvcount;
     char *sendaddr, *recvaddr;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
     local_size = comm_ptr->local_size;
     remote_size = comm_ptr->remote_size;
@@ -373,7 +373,7 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                     sendbuf != MPI_IN_PLACE &&
                     sendcounts == recvcounts &&
                     sendtype == recvtype)
diff --git a/src/mpi/coll/ialltoallw.c b/src/mpi/coll/ialltoallw.c
index 8174038..20a0321 100644
--- a/src/mpi/coll/ialltoallw.c
+++ b/src/mpi/coll/ialltoallw.c
@@ -354,7 +354,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
                 MPIR_ERRTEST_ARGNULL(sdispls,"sdispls", mpi_errno);
                 MPIR_ERRTEST_ARGNULL(sendtypes,"sendtypes", mpi_errno);
 
-                if (comm_ptr->comm_kind == MPIR_INTRACOMM &&
+                if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
                         sendcounts == recvcounts &&
                         sendtypes == recvtypes)
                     MPIR_ERRTEST_ALIAS_COLL(sendbuf,recvbuf,mpi_errno);
@@ -362,7 +362,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
             MPIR_ERRTEST_ARGNULL(recvcounts,"recvcounts", mpi_errno);
             MPIR_ERRTEST_ARGNULL(rdispls,"rdispls", mpi_errno);
             MPIR_ERRTEST_ARGNULL(recvtypes,"recvtypes", mpi_errno);
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM && sendbuf == MPI_IN_PLACE) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM && sendbuf == MPI_IN_PLACE) {
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**sendbuf_inplace");
             }
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
diff --git a/src/mpi/coll/ibarrier.c b/src/mpi/coll/ibarrier.c
index fcd5184..9ee44e9 100644
--- a/src/mpi/coll/ibarrier.c
+++ b/src/mpi/coll/ibarrier.c
@@ -58,7 +58,7 @@ int MPIR_Ibarrier_intra(MPIR_Comm *comm_ptr, MPID_Sched_t s)
     int mpi_errno = MPI_SUCCESS;
     int size, rank, src, dst, mask;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     size = comm_ptr->local_size;
     rank = comm_ptr->rank;
@@ -103,7 +103,7 @@ int MPIR_Ibarrier_inter(MPIR_Comm *comm_ptr, MPID_Sched_t s)
     MPIR_SCHED_CHKPMEM_DECL(1);
     char *buf = NULL;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
     rank = comm_ptr->rank;
 
@@ -178,7 +178,7 @@ int MPIR_Ibarrier_impl(MPIR_Comm *comm_ptr, MPI_Request *request)
 
     *request = MPI_REQUEST_NULL;
 
-    if (comm_ptr->local_size != 1 || comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->local_size != 1 || comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         mpi_errno = MPID_Sched_next_tag(comm_ptr, &tag);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
         mpi_errno = MPID_Sched_create(&s);
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 8144a74..6373a05 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -867,7 +867,7 @@ int MPIR_Ibcast_intra(void *buffer, int count, MPI_Datatype datatype, int root,
     int comm_size, is_homogeneous ATTRIBUTE((unused));
     MPI_Aint type_size, nbytes;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     is_homogeneous = 1;
 #ifdef MPID_HAS_HETERO
@@ -916,7 +916,7 @@ int MPIR_Ibcast_inter(void *buffer, int count, MPI_Datatype datatype, int root,
 {
     int mpi_errno = MPI_SUCCESS;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
     /* Intercommunicator broadcast.
      * Root sends to rank 0 in remote group. Remote group does local
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index a5dd321..1110c1a 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -83,7 +83,7 @@ int MPIR_Igather_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendt
     is_homogeneous = !comm_ptr->is_hetero;
 #endif
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     /* Use binomial tree algorithm. */
 
@@ -625,7 +625,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 if (sendbuf != MPI_IN_PLACE) {
@@ -666,7 +666,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/igatherv.c b/src/mpi/coll/igatherv.c
index 88baf00..c31ad92 100644
--- a/src/mpi/coll/igatherv.c
+++ b/src/mpi/coll/igatherv.c
@@ -46,10 +46,10 @@ int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi
     rank = comm_ptr->rank;
 
     /* If rank == root, then I recv lots, otherwise I send */
-    if (((comm_ptr->comm_kind == MPIR_INTRACOMM) && (root == rank)) ||
-        ((comm_ptr->comm_kind == MPIR_INTERCOMM) && (root == MPI_ROOT)))
+    if (((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (root == rank)) ||
+        ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && (root == MPI_ROOT)))
     {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             comm_size = comm_ptr->local_size;
         else
             comm_size = comm_ptr->remote_size;
@@ -60,7 +60,7 @@ int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi
 
         for (i = 0; i < comm_size; i++) {
             if (recvcounts[i]) {
-                if ((comm_ptr->comm_kind == MPIR_INTRACOMM) && (i == rank)) {
+                if ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (i == rank)) {
                     if (sendbuf != MPI_IN_PLACE) {
                         mpi_errno = MPID_Sched_copy(sendbuf, sendcount, sendtype,
                                                     ((char *)recvbuf+displs[rank]*extent),
@@ -209,7 +209,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 if (sendbuf != MPI_IN_PLACE) {
@@ -259,7 +259,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
                     MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sendcount, mpi_errno);
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index b6fd8e0..d7b3c98 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -1128,7 +1128,7 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
 
             while (i < comm_ptr->remote_size && recvcounts[i] == 0) ++i;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM && sendbuf != MPI_IN_PLACE && i < comm_ptr->remote_size)
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && sendbuf != MPI_IN_PLACE && i < comm_ptr->remote_size)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 322ce29..f0eeb52 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -1025,7 +1025,7 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM && sendbuf != MPI_IN_PLACE && recvcount != 0)
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM && sendbuf != MPI_IN_PLACE && recvcount != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index f483c26..2308189 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -42,7 +42,7 @@ int MPIR_Ireduce_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     void *tmp_buf;
     MPIR_SCHED_CHKPMEM_DECL(2);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     if (count == 0) return MPI_SUCCESS;
 
@@ -544,7 +544,7 @@ int MPIR_Ireduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Dataty
     int mpi_errno = MPI_SUCCESS;
     int pof2, type_size, comm_size;
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     comm_size = comm_ptr->local_size;
 
@@ -592,7 +592,7 @@ int MPIR_Ireduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
     if (!MPIR_CVAR_ENABLE_SMP_COLLECTIVES || !MPIR_CVAR_ENABLE_SMP_REDUCE)
         MPID_Abort(comm_ptr, MPI_ERR_OTHER, 1, "SMP collectives are disabled!");
     MPIU_Assert(MPIR_Comm_is_node_aware(comm_ptr));
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     nc = comm_ptr->node_comm;
     nrc = comm_ptr->node_roots_comm;
@@ -699,7 +699,7 @@ int MPIR_Ireduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Dataty
     void *tmp_buf = NULL;
     MPIR_SCHED_CHKPMEM_DECL(1);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
 /*  Intercommunicator reduce.
     Remote group does a local intracommunicator
@@ -883,7 +883,7 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 if (sendbuf != MPI_IN_PLACE)
                     MPIR_ERRTEST_USERBUFFER(sendbuf,count,datatype,mpi_errno);
 
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index a1451b5..027ec38 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -639,7 +639,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
         {
             MPIR_Datatype *sendtype_ptr, *recvtype_ptr;
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 if (comm_ptr->rank == root) {
@@ -679,7 +679,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 }
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/iscatterv.c b/src/mpi/coll/iscatterv.c
index 00c26b5..ad5bb03 100644
--- a/src/mpi/coll/iscatterv.c
+++ b/src/mpi/coll/iscatterv.c
@@ -62,10 +62,10 @@ int MPIR_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs
     rank = comm_ptr->rank;
 
     /* If I'm the root, then scatter */
-    if (((comm_ptr->comm_kind == MPIR_INTRACOMM) && (root == rank)) ||
-        ((comm_ptr->comm_kind == MPIR_INTERCOMM) && (root == MPI_ROOT)))
+    if (((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (root == rank)) ||
+        ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && (root == MPI_ROOT)))
     {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             comm_size = comm_ptr->local_size;
         else
             comm_size = comm_ptr->remote_size;
@@ -81,7 +81,7 @@ int MPIR_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs
 
         for (i = 0; i < comm_size; i++) {
             if (sendcounts[i]) {
-                if ((comm_ptr->comm_kind == MPIR_INTRACOMM) && (i == rank)) {
+                if ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (i == rank)) {
                     if (recvbuf != MPI_IN_PLACE) {
                         mpi_errno = MPID_Sched_copy(((char *)sendbuf+displs[rank]*extent),
                                                     sendcounts[rank], sendtype,
@@ -218,7 +218,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
                 rank = comm_ptr->rank;
                 comm_size = comm_ptr->local_size;
@@ -272,7 +272,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
                 }
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
                 if (root == MPI_ROOT) {
                     comm_size = comm_ptr->remote_size;
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index b052f30..63aa171 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -1048,7 +1048,7 @@ int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Reduce_scatter_intra(sendbuf, recvbuf, recvcounts,
                                               datatype, op, comm_ptr, errflag);
@@ -1193,7 +1193,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
             }
 
             MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf, recvcounts[comm_ptr->rank], mpi_errno);
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sum, mpi_errno);
             } else if (sendbuf != MPI_IN_PLACE && sum != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index f0bef42..4afefd5 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -1017,7 +1017,7 @@ int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Reduce_scatter_block_intra(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -1054,7 +1054,7 @@ int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf,
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	/* --END USEREXTENSION-- */
     } else {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
             /* intracommunicator */
             mpi_errno = MPIR_Reduce_scatter_block_intra(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag);
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -1158,7 +1158,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
             }
 
             MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf, recvcount, mpi_errno);
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, recvcount, mpi_errno);
             } else if (sendbuf != MPI_IN_PLACE && recvcount != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 8ce9d0e..81b8202 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -1039,7 +1039,7 @@ int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Reduce_intra(sendbuf, recvbuf, count, datatype,
                                       op, root, comm_ptr, errflag);
@@ -1077,7 +1077,7 @@ int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	/* --END USEREXTENSION-- */
     } else {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
             /* intracommunicator */
             mpi_errno = MPIR_Reduce_intra(sendbuf, recvbuf, count, datatype,
                                           op, root, comm_ptr, errflag);
@@ -1175,7 +1175,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-	    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 MPIR_ERRTEST_COUNT(count, mpi_errno);
@@ -1203,7 +1203,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
                     MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, count, mpi_errno);
             }
 
-	    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 		MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 42dc7ee..2faf560 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -577,7 +577,7 @@ int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
         
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* intracommunicator */
         mpi_errno = MPIR_Scatter_intra(sendbuf, sendcount, sendtype,
                                        recvbuf, recvcount, recvtype, root,
@@ -706,7 +706,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-	    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+	    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
 
                 rank = comm_ptr->rank;
@@ -747,7 +747,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 }
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 		MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
 
                 if (root == MPI_ROOT) {
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 94a66dd..c915917 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -71,9 +71,9 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
 
     /* If I'm the root, then scatter */
-    if (((comm_ptr->comm_kind == MPIR_INTRACOMM) && (root == rank)) ||
-        ((comm_ptr->comm_kind == MPIR_INTERCOMM) && (root == MPI_ROOT))) {
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+    if (((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (root == rank)) ||
+        ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && (root == MPI_ROOT))) {
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             comm_size = comm_ptr->local_size;
         else
             comm_size = comm_ptr->remote_size;
@@ -93,7 +93,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
         reqs = 0;
         for (i = 0; i < comm_size; i++) {
             if (sendcounts[i]) {
-                if ((comm_ptr->comm_kind == MPIR_INTRACOMM) && (i == rank)) {
+                if ((comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) && (i == rank)) {
                     if (recvbuf != MPI_IN_PLACE) {
                         mpi_errno = MPIR_Localcopy(((char *)sendbuf+displs[rank]*extent), 
                                                    sendcounts[rank], sendtype,
@@ -267,7 +267,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 		MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
                 rank = comm_ptr->rank;
                 comm_size = comm_ptr->local_size;
@@ -320,7 +320,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                 }
             }
 
-            if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+            if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 		MPIR_ERRTEST_INTER_ROOT(comm_ptr, root, mpi_errno);
                 if (root == MPI_ROOT) {
                     comm_size = comm_ptr->remote_size;
diff --git a/src/mpi/comm/comm_compare.c b/src/mpi/comm/comm_compare.c
index e9f4322..c97368a 100644
--- a/src/mpi/comm/comm_compare.c
+++ b/src/mpi/comm/comm_compare.c
@@ -118,7 +118,7 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
     else if (comm1 == comm2) {
 	*result = MPI_IDENT;
     }
-    else if (comm_ptr1->comm_kind == MPIR_INTRACOMM) {
+    else if (comm_ptr1->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 	MPIR_Group *group_ptr1, *group_ptr2;
 
         mpi_errno = MPIR_Comm_group_impl(comm_ptr1, &group_ptr1);
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index f58f7bd..282e0c6 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -79,7 +79,7 @@ int MPIR_Comm_create_calculate_mapping(MPIR_Group  *group_ptr,
     MPIR_Group_setup_lpid_list( group_ptr );
 
     /* Optimize for groups contained within MPI_COMM_WORLD. */
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         int wsize;
         subsetOfWorld = 1;
         wsize         = MPIR_Process.comm_world->local_size;
@@ -169,7 +169,7 @@ int MPIR_Comm_create_map(int         local_n,
 
     MPIR_Comm_map_irregular(newcomm, mapping_comm, local_mapping,
                             local_n, MPIR_COMM_MAP_DIR_L2L, NULL);
-    if (mapping_comm->comm_kind == MPIR_INTERCOMM) {
+    if (mapping_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         MPIR_Comm_map_irregular(newcomm, mapping_comm, remote_mapping,
                                 remote_n, MPIR_COMM_MAP_DIR_R2R, NULL);
     }
@@ -198,7 +198,7 @@ int MPIR_Comm_create_intra(MPIR_Comm *comm_ptr, MPIR_Group *group_ptr,
 
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_CREATE_INTRA);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     n = group_ptr->size;
     *newcomm_ptr = NULL;
@@ -299,7 +299,7 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPIR_Comm *comm_ptr, MPIR_Group *group_ptr
 
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_CREATE_INTER);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
     /* Create a new communicator from the specified group members */
 
@@ -536,12 +536,12 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm)
 
 
     /* ... body of routine ...  */
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         mpi_errno = MPIR_Comm_create_intra(comm_ptr, group_ptr, &newcomm_ptr);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
     else {
-        MPIU_Assert(comm_ptr->comm_kind == MPIR_INTERCOMM);
+        MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
         mpi_errno = MPIR_Comm_create_inter(comm_ptr, group_ptr, &newcomm_ptr);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
diff --git a/src/mpi/comm/comm_create_group.c b/src/mpi/comm/comm_create_group.c
index e5e1573..ae41026 100644
--- a/src/mpi/comm/comm_create_group.c
+++ b/src/mpi/comm/comm_create_group.c
@@ -44,7 +44,7 @@ int MPIR_Comm_create_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_CREATE_GROUP);
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_CREATE_GROUP);
 
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
 
     n = group_ptr->size;
     *newcomm_ptr = NULL;
diff --git a/src/mpi/comm/comm_idup.c b/src/mpi/comm/comm_idup.c
index 1d766e2..240c226 100644
--- a/src/mpi/comm/comm_idup.c
+++ b/src/mpi/comm/comm_idup.c
@@ -55,7 +55,7 @@ int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcommp, MPIR_Request
 
     /* We now have a mostly-valid new communicator, so begin the process of
      * allocating a context ID to use for actual communication */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         mpi_errno = MPIR_Get_intercomm_contextid_nonblock(comm_ptr, *newcommp, reqp);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
diff --git a/src/mpi/comm/comm_remote_group.c b/src/mpi/comm/comm_remote_group.c
index fc7f82d..bfb28ad 100644
--- a/src/mpi/comm/comm_remote_group.c
+++ b/src/mpi/comm/comm_remote_group.c
@@ -130,7 +130,7 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group)
             /* Validate comm_ptr */
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, TRUE );
 	    /* If comm_ptr is not valid, it will be reset to null */
-	    if (comm_ptr && comm_ptr->comm_kind != MPIR_INTERCOMM) {
+	    if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) {
 		mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, 
                       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_COMM, 
 						  "**commnotinter", 0 );
diff --git a/src/mpi/comm/comm_remote_size.c b/src/mpi/comm/comm_remote_size.c
index f713767..86bb4d8 100644
--- a/src/mpi/comm/comm_remote_size.c
+++ b/src/mpi/comm/comm_remote_size.c
@@ -84,7 +84,7 @@ int MPI_Comm_remote_size(MPI_Comm comm, int *size)
             /* Validate comm_ptr */
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, TRUE );
 	    /* If comm_ptr is not valid, it will be reset to null */
-	    if (comm_ptr && comm_ptr->comm_kind != MPIR_INTERCOMM) {
+	    if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) {
 		mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, 
                         MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_COMM, 
 						  "**commnotinter", 0 );
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 5c3dbd7..6ca5688 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -153,7 +153,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
 
     /* Get the communicator to use in collectives on the local group of 
        processes */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 	if (!comm_ptr->local_comm) {
 	    MPIR_Setup_intercomm_localcomm( comm_ptr );
 	}
@@ -191,7 +191,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
     /* If we're an intercomm, we need to do the same thing for the remote
        table, as we need to know the size of the remote group of the
        same color before deciding to create the communicator */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 	splittype mypair;
 	/* For the remote group, the situation is more complicated.
 	   We need to find the size of our "partner" group in the
@@ -253,7 +253,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
     MPIU_Assert(new_context_id != 0);
 
     /* In the intercomm case, we need to exchange the context ids */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 	if (comm_ptr->rank == 0) {
 	    mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, 0,
 				       &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 
@@ -301,7 +301,7 @@ int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **ne
 	   process in the input communicator */
 	MPIU_Sort_inttable( keytable, new_size );
 
-	if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+	if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 	    MPIU_CHKLMEM_MALLOC(remotekeytable,sorttype*,
 				new_remote_size*sizeof(sorttype),
 				mpi_errno,"remote keytable");
diff --git a/src/mpi/comm/comm_test_inter.c b/src/mpi/comm/comm_test_inter.c
index b64e1bd..6b7383b 100644
--- a/src/mpi/comm/comm_test_inter.c
+++ b/src/mpi/comm/comm_test_inter.c
@@ -92,7 +92,7 @@ int MPI_Comm_test_inter(MPI_Comm comm, int *flag)
 
     /* ... body of routine ...  */
     
-    *flag = (comm_ptr->comm_kind == MPIR_INTERCOMM);
+    *flag = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM);
     
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 0584284..fedb4ae 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -183,7 +183,7 @@ int MPIR_Setup_intercomm_localcomm(MPIR_Comm * intercomm_ptr)
                       localcomm_ptr->recvcontext_id));
 
     /* Save the kind of the communicator */
-    localcomm_ptr->comm_kind = MPIR_INTRACOMM;
+    localcomm_ptr->comm_kind = MPIR_COMM_KIND__INTRACOMM;
 
     /* Set the sizes and ranks */
     localcomm_ptr->remote_size = intercomm_ptr->local_size;
@@ -388,7 +388,7 @@ static int set_collops(MPIR_Comm * comm)
         initialized = TRUE;
     }
 
-    if (comm->comm_kind == MPIR_INTRACOMM) {
+    if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
         /* FIXME MT what protects access to this structure and ic_default_collops? */
         comm->coll_fns = default_collops[comm->hierarchy_kind];
     }
@@ -549,7 +549,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
 
     MPIR_Comm_map_free(comm);
 
-    if (comm->comm_kind == MPIR_INTRACOMM) {
+    if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
 
         mpi_errno = MPIU_Find_local_and_external(comm,
                                                  &num_local, &local_rank, &local_procs,
@@ -595,7 +595,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_comm->context_id = comm->context_id + MPIR_CONTEXT_INTRANODE_OFFSET;
             comm->node_comm->recvcontext_id = comm->node_comm->context_id;
             comm->node_comm->rank = local_rank;
-            comm->node_comm->comm_kind = MPIR_INTRACOMM;
+            comm->node_comm->comm_kind = MPIR_COMM_KIND__INTRACOMM;
             comm->node_comm->hierarchy_kind = MPIR_HIERARCHY_NODE;
             comm->node_comm->local_comm = NULL;
             MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Create node_comm=%p\n", comm->node_comm);
@@ -629,7 +629,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
             comm->node_roots_comm->context_id = comm->context_id + MPIR_CONTEXT_INTERNODE_OFFSET;
             comm->node_roots_comm->recvcontext_id = comm->node_roots_comm->context_id;
             comm->node_roots_comm->rank = external_rank;
-            comm->node_roots_comm->comm_kind = MPIR_INTRACOMM;
+            comm->node_roots_comm->comm_kind = MPIR_COMM_KIND__INTRACOMM;
             comm->node_roots_comm->hierarchy_kind = MPIR_HIERARCHY_NODE_ROOTS;
             comm->node_roots_comm->local_comm = NULL;
 
@@ -727,7 +727,7 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
     /* If there is a context id cache in oldcomm, use it here.  Otherwise,
      * use the appropriate algorithm to get a new context id.  Be careful
      * of intercomms here */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         mpi_errno = MPIR_Get_intercomm_contextid(comm_ptr, &new_context_id, &new_recvcontext_id);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
@@ -769,7 +769,7 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
      * test that matches the test on rank above. */
     if (size == comm_ptr->local_size) {
         /* Duplicate the network address mapping */
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
         else
             MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2R);
@@ -777,7 +777,7 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
     else {
         int i;
 
-        if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR_L2L, &map);
         else
             MPIR_Comm_map_irregular(newcomm_ptr, comm_ptr, NULL, size, MPIR_COMM_MAP_DIR_R2R, &map);
@@ -789,13 +789,13 @@ int MPIR_Comm_copy(MPIR_Comm * comm_ptr, int size, MPIR_Comm ** outcomm_ptr)
     }
 
     /* If it is an intercomm, duplicate the local network address references */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
     }
 
     /* Set the sizes and ranks */
     newcomm_ptr->rank = comm_ptr->rank;
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         newcomm_ptr->local_size = comm_ptr->local_size;
         newcomm_ptr->remote_size = comm_ptr->remote_size;
         newcomm_ptr->is_low_group = comm_ptr->is_low_group;
@@ -870,13 +870,13 @@ int MPIR_Comm_copy_data(MPIR_Comm * comm_ptr, MPIR_Comm ** outcomm_ptr)
     newcomm_ptr->comm_kind = comm_ptr->comm_kind;
     newcomm_ptr->local_comm = 0;
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
         MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
     else
         MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_R2R);
 
     /* If it is an intercomm, duplicate the network address mapping */
-    if (comm_ptr->comm_kind == MPIR_INTERCOMM) {
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         MPIR_Comm_map_dup(newcomm_ptr, comm_ptr, MPIR_COMM_MAP_DIR_L2L);
     }
 
@@ -970,7 +970,7 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr)
             comm_ptr->coll_fns = NULL;
         }
 
-        if (comm_ptr->comm_kind == MPIR_INTERCOMM && comm_ptr->local_comm)
+        if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm_ptr->local_comm)
             MPIR_Comm_release(comm_ptr->local_comm);
 
         /* Free the local and remote groups, if they exist */
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 7946c04..611be2a 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -481,7 +481,7 @@ int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr
             st.local_mask[ALL_OWN_MASK_FLAG] = 0;
 
         /* Now, try to get a context id */
-        MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+        MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
         /* In the global and brief-global cases, note that this routine will
          * release that global lock when it needs to wait.  That will allow
          * other processes to enter the global or brief global critical section.
@@ -685,7 +685,7 @@ static int sched_cb_gcn_bcast(MPIR_Comm * comm, int tag, void *state)
     int mpi_errno = MPI_SUCCESS;
     struct gcn_state *st = state;
 
-    if (st->gcn_cid_kind == MPIR_INTERCOMM) {
+    if (st->gcn_cid_kind == MPIR_COMM_KIND__INTERCOMM) {
         if (st->comm_ptr_inter->rank == 0) {
             mpi_errno =
                 MPID_Sched_recv(st->ctx1, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter,
@@ -966,7 +966,7 @@ static int sched_get_cid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcomm,
     MPIU_CHKPMEM_MALLOC(st, struct gcn_state *, sizeof(struct gcn_state), mpi_errno, "gcn_state");
     st->ctx0 = ctx0;
     st->ctx1 = ctx1;
-    if (gcn_cid_kind == MPIR_INTRACOMM) {
+    if (gcn_cid_kind == MPIR_COMM_KIND__INTRACOMM) {
         st->comm_ptr = comm_ptr;
         st->comm_ptr_inter = NULL;
     }
@@ -1028,7 +1028,7 @@ int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPIR
     /* add some entries to it */
     mpi_errno =
         sched_get_cid_nonblock(comm_ptr, newcommp, &newcommp->context_id, &newcommp->recvcontext_id,
-                               s, MPIR_INTRACOMM);
+                               s, MPIR_COMM_KIND__INTRACOMM);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -1080,7 +1080,7 @@ int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newc
     /* first get a context ID over the local comm */
     mpi_errno =
         sched_get_cid_nonblock(comm_ptr, newcommp, &newcommp->recvcontext_id, &newcommp->context_id,
-                               s, MPIR_INTERCOMM);
+                               s, MPIR_COMM_KIND__INTERCOMM);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 88f6571..2573c07 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -8,7 +8,7 @@
 #include "mpiimpl.h"
 #include "mpicomm.h"
 
-#define MPIR_INTERCOMM_CREATE_TAG 0
+#define MPIR_COMM_KIND__INTERCOMM_CREATE_TAG 0
 
 /* -- Begin Profiling Symbol Block for routine MPI_Intercomm_create */
 #if defined(HAVE_PRAGMA_WEAK)
@@ -133,13 +133,13 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
     int cts_tag;
     MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(4);
-    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_CREATE_IMPL);
+    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_CREATE_IMPL);
 
-    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_INTERCOMM_CREATE_IMPL);
+    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_CREATE_IMPL);
 
     /* Shift tag into the tagged coll space (tag provided by the user 
        is ignored as of MPI 3.0) */
-    cts_tag = MPIR_INTERCOMM_CREATE_TAG | MPIR_Process.tagged_coll_mask;
+    cts_tag = MPIR_COMM_KIND__INTERCOMM_CREATE_TAG | MPIR_Process.tagged_coll_mask;
 
     /*
      * Error checking for this routine requires care.  Because this
@@ -330,7 +330,7 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
     (*new_intercomm_ptr)->remote_size    = remote_size;
     (*new_intercomm_ptr)->local_size     = local_comm_ptr->local_size;
     (*new_intercomm_ptr)->rank           = local_comm_ptr->rank;
-    (*new_intercomm_ptr)->comm_kind      = MPIR_INTERCOMM;
+    (*new_intercomm_ptr)->comm_kind      = MPIR_COMM_KIND__INTERCOMM;
     (*new_intercomm_ptr)->local_comm     = 0;
     (*new_intercomm_ptr)->is_low_group   = is_low_group;
 
@@ -353,7 +353,7 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
 
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
-    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_INTERCOMM_CREATE_IMPL);
+    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_CREATE_IMPL);
     return mpi_errno;
  fn_fail:
     goto fn_exit;
@@ -503,7 +503,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
 		   process that is the local leader (local_comm_ptr->rank == 
 		   local_leader because we can then use peer_comm_ptr->rank
 		   to get the rank in peer_comm of the local leader. */
-		if (peer_comm_ptr->comm_kind == MPIR_INTRACOMM &&
+		if (peer_comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM &&
 		    local_comm_ptr->rank == local_leader && 
 		    peer_comm_ptr->rank == remote_leader) {
 		    MPIR_ERR_SET(mpi_errno,MPI_ERR_RANK,"**ranksdistinct");
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index b84d8f0..3805fd0 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -75,9 +75,9 @@ int MPIR_Intercomm_merge_impl(MPIR_Comm *comm_ptr, int high, MPIR_Comm **new_int
     int  local_high, remote_high, new_size;
     MPIU_Context_id_t new_context_id;
     MPIR_Errflag_t errflag = MPIR_ERR_NONE;
-    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
+    MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_MERGE_IMPL);
 
-    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
+    MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_MERGE_IMPL);
     /* Make sure that we have a local intercommunicator */
     if (!comm_ptr->local_comm) {
         /* Manufacture the local communicator */
@@ -153,7 +153,7 @@ int MPIR_Intercomm_merge_impl(MPIR_Comm *comm_ptr, int high, MPIR_Comm **new_int
     (*new_intracomm_ptr)->recvcontext_id = (*new_intracomm_ptr)->context_id;
     (*new_intracomm_ptr)->remote_size    = (*new_intracomm_ptr)->local_size   = new_size;
     (*new_intracomm_ptr)->rank           = -1;
-    (*new_intracomm_ptr)->comm_kind      = MPIR_INTRACOMM;
+    (*new_intracomm_ptr)->comm_kind      = MPIR_COMM_KIND__INTRACOMM;
 
     /* Now we know which group comes first.  Build the new mapping
        from the existing comm */
@@ -187,7 +187,7 @@ int MPIR_Intercomm_merge_impl(MPIR_Comm *comm_ptr, int high, MPIR_Comm **new_int
 
     (*new_intracomm_ptr)->remote_size    = (*new_intracomm_ptr)->local_size   = new_size;
     (*new_intracomm_ptr)->rank           = -1;
-    (*new_intracomm_ptr)->comm_kind      = MPIR_INTRACOMM;
+    (*new_intracomm_ptr)->comm_kind      = MPIR_COMM_KIND__INTRACOMM;
     (*new_intracomm_ptr)->context_id = new_context_id;
     (*new_intracomm_ptr)->recvcontext_id = new_context_id;
 
@@ -198,7 +198,7 @@ int MPIR_Intercomm_merge_impl(MPIR_Comm *comm_ptr, int high, MPIR_Comm **new_int
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
  fn_exit:
-    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
+    MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_KIND__INTERCOMM_MERGE_IMPL);
     return mpi_errno;
  fn_fail:
     goto fn_exit;
@@ -284,7 +284,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
             /* Validate comm_ptr */
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
 	    /* If comm_ptr is not valid, it will be reset to null */
-	    if (comm_ptr && comm_ptr->comm_kind != MPIR_INTERCOMM) {
+	    if (comm_ptr && comm_ptr->comm_kind != MPIR_COMM_KIND__INTERCOMM) {
 		mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, 
 		    MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_COMM,
 						  "**commnotinter", 0 );
diff --git a/src/mpi/group/grouputil.c b/src/mpi/group/grouputil.c
index 749f0f5..735c889 100644
--- a/src/mpi/group/grouputil.c
+++ b/src/mpi/group/grouputil.c
@@ -378,7 +378,7 @@ int MPIR_Group_check_subset( MPIR_Group *group_ptr, MPIR_Comm *comm_ptr )
     int mpi_errno = MPI_SUCCESS;
     int g1_idx, g2_idx, l1_pid, l2_pid, i;
     MPIR_Group_pmap_t *vmap=0;
-    int vsize = comm_ptr->comm_kind == MPIR_INTERCOMM ? comm_ptr->local_size :
+    int vsize = comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM ? comm_ptr->local_size :
         comm_ptr->remote_size;
     MPIU_CHKLMEM_DECL(1);
 
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index f2e522a..fb619db 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -424,7 +424,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
     MPIR_Process.comm_world->handle	    = MPI_COMM_WORLD;
     MPIR_Process.comm_world->context_id	    = 0 << MPIR_CONTEXT_PREFIX_SHIFT;
     MPIR_Process.comm_world->recvcontext_id = 0 << MPIR_CONTEXT_PREFIX_SHIFT;
-    MPIR_Process.comm_world->comm_kind	    = MPIR_INTRACOMM;
+    MPIR_Process.comm_world->comm_kind	    = MPIR_COMM_KIND__INTRACOMM;
     /* This initialization of the comm name could be done only when 
        comm_get_name is called */
     MPL_strncpy(MPIR_Process.comm_world->name, "MPI_COMM_WORLD",
@@ -435,7 +435,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
     MPIR_Process.comm_self->handle	    = MPI_COMM_SELF;
     MPIR_Process.comm_self->context_id	    = 1 << MPIR_CONTEXT_PREFIX_SHIFT;
     MPIR_Process.comm_self->recvcontext_id  = 1 << MPIR_CONTEXT_PREFIX_SHIFT;
-    MPIR_Process.comm_self->comm_kind	    = MPIR_INTRACOMM;
+    MPIR_Process.comm_self->comm_kind	    = MPIR_COMM_KIND__INTRACOMM;
     MPL_strncpy(MPIR_Process.comm_self->name, "MPI_COMM_SELF",
 		 MPI_MAX_OBJECT_NAME);
 
@@ -445,7 +445,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
     MPIR_Process.icomm_world->handle	    = MPIR_ICOMM_WORLD;
     MPIR_Process.icomm_world->context_id    = 2 << MPIR_CONTEXT_PREFIX_SHIFT;
     MPIR_Process.icomm_world->recvcontext_id= 2 << MPIR_CONTEXT_PREFIX_SHIFT;
-    MPIR_Process.icomm_world->comm_kind	    = MPIR_INTRACOMM;
+    MPIR_Process.icomm_world->comm_kind	    = MPIR_COMM_KIND__INTRACOMM;
     MPL_strncpy(MPIR_Process.icomm_world->name, "MPI_ICOMM_WORLD",
 		 MPI_MAX_OBJECT_NAME);
 
diff --git a/src/mpid/ch3/src/ch3u_comm.c b/src/mpid/ch3/src/ch3u_comm.c
index d37a709..fa49813 100644
--- a/src/mpid/ch3/src/ch3u_comm.c
+++ b/src/mpid/ch3/src/ch3u_comm.c
@@ -201,10 +201,10 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
 
     /* do some sanity checks */
     MPL_LL_FOREACH(comm->mapper_head, mapper) {
-        if (mapper->src_comm->comm_kind == MPIR_INTRACOMM)
+        if (mapper->src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
                         mapper->dir == MPIR_COMM_MAP_DIR_L2R);
-        if (comm->comm_kind == MPIR_INTRACOMM)
+        if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
             MPIU_Assert(mapper->dir == MPIR_COMM_MAP_DIR_L2L ||
                         mapper->dir == MPIR_COMM_MAP_DIR_R2L);
     }
@@ -228,14 +228,14 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
             continue;
 
         if (mapper->dir == MPIR_COMM_MAP_DIR_L2L) {
-            if (src_comm->comm_kind == MPIR_INTRACOMM && comm->comm_kind == MPIR_INTRACOMM) {
+            if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
             }
-            else if (src_comm->comm_kind == MPIR_INTRACOMM && comm->comm_kind == MPIR_INTERCOMM)
+            else if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM && comm->comm_kind == MPIR_COMM_KIND__INTERCOMM)
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.local_vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
-            else if (src_comm->comm_kind == MPIR_INTERCOMM && comm->comm_kind == MPIR_INTRACOMM) {
+            else if (src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM && comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 dup_vcrt(src_comm->dev.local_vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
             }
@@ -244,8 +244,8 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
                          mapper->src_comm->local_size, vcrt_size, vcrt_offset);
         }
         else {  /* mapper->dir == MPIR_COMM_MAP_DIR_R2L */
-            MPIU_Assert(src_comm->comm_kind == MPIR_INTERCOMM);
-            if (comm->comm_kind == MPIR_INTRACOMM) {
+            MPIU_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
+            if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->remote_size,
                          vcrt_size, vcrt_offset);
             }
@@ -274,10 +274,10 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
             mapper->dir == MPIR_COMM_MAP_DIR_R2L)
             continue;
 
-        MPIU_Assert(comm->comm_kind == MPIR_INTERCOMM);
+        MPIU_Assert(comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
 
         if (mapper->dir == MPIR_COMM_MAP_DIR_L2R) {
-            if (src_comm->comm_kind == MPIR_INTRACOMM)
+            if (src_comm->comm_kind == MPIR_COMM_KIND__INTRACOMM)
                 dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->local_size,
                          vcrt_size, vcrt_offset);
             else
@@ -285,14 +285,14 @@ int MPIDI_CH3I_Comm_create_hook(MPIR_Comm *comm)
                          mapper->src_comm->local_size, vcrt_size, vcrt_offset);
         }
         else {  /* mapper->dir == MPIR_COMM_MAP_DIR_R2R */
-            MPIU_Assert(src_comm->comm_kind == MPIR_INTERCOMM);
+            MPIU_Assert(src_comm->comm_kind == MPIR_COMM_KIND__INTERCOMM);
             dup_vcrt(src_comm->dev.vcrt, &comm->dev.vcrt, mapper, mapper->src_comm->remote_size,
                      vcrt_size, vcrt_offset);
         }
         vcrt_offset += map_size(*mapper);
     }
 
-    if (comm->comm_kind == MPIR_INTERCOMM) {
+    if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         /* setup the vcrt for the local_comm in the intercomm */
         if (comm->local_comm) {
             comm->local_comm->dev.vcrt = comm->dev.local_vcrt;
@@ -332,7 +332,7 @@ int MPIDI_CH3I_Comm_destroy_hook(MPIR_Comm *comm)
     mpi_errno = MPIDI_VCRT_Release(comm->dev.vcrt, comm->dev.is_disconnected);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    if (comm->comm_kind == MPIR_INTERCOMM) {
+    if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
         mpi_errno = MPIDI_VCRT_Release(comm->dev.local_vcrt, comm->dev.is_disconnected);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 3b76447..7887f69 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -273,7 +273,7 @@ static int MPIDI_CH3I_Initialize_tmp_comm(MPIR_Comm **comm_pptr,
     /* Fill in new intercomm */
     tmp_comm->local_size   = 1;
     tmp_comm->rank         = 0;
-    tmp_comm->comm_kind    = MPIR_INTERCOMM;
+    tmp_comm->comm_kind    = MPIR_COMM_KIND__INTERCOMM;
     tmp_comm->local_comm   = NULL;
     tmp_comm->is_low_group = is_low_group;
 
@@ -1164,7 +1164,7 @@ static int SetupNewIntercomm( MPIR_Comm *comm_ptr, int remote_comm_size,
     intercomm->rank         = comm_ptr->rank;
     intercomm->local_group  = NULL;
     intercomm->remote_group = NULL;
-    intercomm->comm_kind    = MPIR_INTERCOMM;
+    intercomm->comm_kind    = MPIR_COMM_KIND__INTERCOMM;
     intercomm->local_comm   = NULL;
     intercomm->coll_fns     = NULL;
 
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 96daa93..fc28c7d 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -961,7 +961,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
 
         if (MPIR_Comm_is_node_aware(comm_ptr)) {
             int offset;
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTRANODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -975,7 +975,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTRANODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -989,7 +989,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTERNODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -1003,7 +1003,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTERNODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -1053,7 +1053,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
 
         if (MPIR_Comm_is_node_aware(comm_ptr)) {
             int offset;
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTRANODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -1067,7 +1067,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTRANODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -1081,7 +1081,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_PT2PT : MPIR_CONTEXT_INTER_PT2PT;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTERNODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
@@ -1095,7 +1095,7 @@ int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr)
                 }
             }
 
-            offset = (comm_ptr->comm_kind == MPIR_INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
+            offset = (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) ?  MPIR_CONTEXT_INTRA_COLL : MPIR_CONTEXT_INTER_COLL;
             match.parts.context_id = comm_ptr->recvcontext_id + MPIR_CONTEXT_INTERNODE_OFFSET + offset;
 
             if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index 5b651e0..1105509 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -45,7 +45,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
     
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, context_offset, MPIDI_REQUEST_TYPE_RSEND, &sreq);
 	goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index f1ebd05..ad91ad1 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -58,7 +58,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
     
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, 
 			    context_offset, MPIDI_REQUEST_TYPE_SEND, &sreq);
diff --git a/src/mpid/ch3/src/mpid_issend.c b/src/mpid/ch3/src/mpid_issend.c
index 450ed2a..5397b24 100644
--- a/src/mpid/ch3/src/mpid_issend.c
+++ b/src/mpid/ch3/src/mpid_issend.c
@@ -44,7 +44,7 @@ int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, in
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
     
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, context_offset, MPIDI_REQUEST_TYPE_SSEND, &sreq);
 	goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_rsend.c b/src/mpid/ch3/src/mpid_rsend.c
index 019d792..794fef9 100644
--- a/src/mpid/ch3/src/mpid_rsend.c
+++ b/src/mpid/ch3/src/mpid_rsend.c
@@ -47,7 +47,7 @@ int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
     
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, context_offset, MPIDI_REQUEST_TYPE_RSEND, &sreq);
 	goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index 9b7ed2c..c438d72 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -45,7 +45,7 @@ int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
 
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, 
 				     context_offset, MPIDI_REQUEST_TYPE_SEND, 
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 7b582d4..94f9f1b 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -44,7 +44,7 @@ int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
         MPIR_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
 
-    if (rank == comm->rank && comm->comm_kind != MPIR_INTERCOMM)
+    if (rank == comm->rank && comm->comm_kind != MPIR_COMM_KIND__INTERCOMM)
     {
 	mpi_errno = MPIDI_Isend_self(buf, count, datatype, rank, tag, comm, 
 				     context_offset, MPIDI_REQUEST_TYPE_SSEND, 
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index 8d59de7..3541876 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -306,7 +306,7 @@ int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, MPIU_BOOL i
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_VCR_GET_LPID);
 
-    if (comm_ptr->comm_kind == MPIR_INTRACOMM)
+    if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
         *lpid_ptr = comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
     else if (is_remote)
         *lpid_ptr = comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
diff --git a/src/mpid/common/hcoll/hcoll_init.c b/src/mpid/common/hcoll/hcoll_init.c
index f426417..1935e40 100644
--- a/src/mpid/common/hcoll/hcoll_init.c
+++ b/src/mpid/common/hcoll/hcoll_init.c
@@ -161,7 +161,7 @@ int hcoll_comm_create(MPIR_Comm * comm_ptr, void *param)
         goto fn_exit;
     }
     num_ranks = comm_ptr->local_size;
-    if ((MPIR_INTRACOMM != comm_ptr->comm_kind) || (2 > num_ranks)) {
+    if ((MPIR_COMM_KIND__INTRACOMM != comm_ptr->comm_kind) || (2 > num_ranks)) {
         comm_ptr->hcoll_priv.is_hcoll_init = 0;
         goto fn_exit;
     }
diff --git a/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c b/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
index dcfe437..d207f45 100644
--- a/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
+++ b/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
@@ -159,7 +159,7 @@ int MPIDO_Reduce_scatter_block(const void *sendbuf,
          rcbuf = recvbuf;
 
        int cuda_res;
-       if(comm_ptr->comm_kind == MPIR_INTRACOMM)
+       if(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
          cuda_res =  MPIR_Reduce_scatter_block_intra(scbuf, rcbuf, recvcount, datatype, op, comm_ptr, mpierrno);
        else 
          cuda_res =  MPIR_Reduce_scatter_block_inter(scbuf, rcbuf, recvcount, datatype, op, comm_ptr, mpierrno);
@@ -175,7 +175,7 @@ int MPIDO_Reduce_scatter_block(const void *sendbuf,
     }
     else
 #endif
-       if(comm_ptr->comm_kind == MPIR_INTRACOMM)
+       if(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
          return MPIR_Reduce_scatter_block_intra(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, mpierrno);
        else 
          return MPIR_Reduce_scatter_block_inter(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, mpierrno);
diff --git a/src/mpid/pamid/src/comm/mpid_comm.c b/src/mpid/pamid/src/comm/mpid_comm.c
index 30fbefa..ab21b69 100644
--- a/src/mpid/pamid/src/comm/mpid_comm.c
+++ b/src/mpid/pamid/src/comm/mpid_comm.c
@@ -227,7 +227,7 @@ void MPIDI_Coll_comm_create(MPIR_Comm *comm)
   if (!MPIDI_Process.optimized.collectives)
     return;
 
-  if(comm->comm_kind != MPIR_INTRACOMM) return;
+  if(comm->comm_kind != MPIR_COMM_KIND__INTRACOMM) return;
   /* Create a geometry */
 
   comm->coll_fns = MPL_calloc0(1, MPIR_Collops);
@@ -372,7 +372,7 @@ void MPIDI_Coll_comm_destroy(MPIR_Comm *comm)
   if (!MPIDI_Process.optimized.collectives)
     return;
 
-  if(comm->comm_kind != MPIR_INTRACOMM)
+  if(comm->comm_kind != MPIR_COMM_KIND__INTRACOMM)
     return;
 
   /* It's possible (MPIR_Setup_intercomm_localcomm) to have an intracomm
diff --git a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
index 33ab772..1135fd6 100644
--- a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
+++ b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
@@ -216,7 +216,7 @@ int MPID_Comm_disconnect(MPIR_Comm *comm_ptr)
     char jobId[jobIdSize];
     int MY_TASKID = PAMIX_Client_query(MPIDI_Client, PAMI_CLIENT_TASK_ID  ).value.intval;
 
-    /*if( (comm_ptr->comm_kind == MPIR_INTERCOMM) && (comm_ptr->mpid.world_ids != NULL)) { */
+    /*if( (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && (comm_ptr->mpid.world_ids != NULL)) { */
     if(comm_ptr->mpid.world_ids != NULL) {
         rc = MPID_Iprobe(comm_ptr->rank, MPI_ANY_TAG, comm_ptr, MPIR_CONTEXT_INTER_PT2PT, &probe_flag, &status);
         if(rc || probe_flag) {
@@ -250,7 +250,7 @@ int MPID_Comm_disconnect(MPIR_Comm *comm_ptr)
 	   * the GROUPREMLIST, so these tasks will have to be use in addition
 	   * to the tasks in GROUPLIST to construct lcomm
 	   **/
-          if(comm_ptr->comm_kind == MPIR_INTERCOMM) {
+          if(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
 	    for(i=0;i<comm_ptr->remote_size;i++) {
 	      for(j=0;j<gsize;j++) {
 		if(comm_ptr->vcr[i]->taskid == glist[j]->taskid) {
@@ -271,7 +271,7 @@ int MPID_Comm_disconnect(MPIR_Comm *comm_ptr)
 		ranks[k++] = j;
 	    }
 	  }
-          if((comm_ptr->comm_kind == MPIR_INTERCOMM) && localtasks_in_remglist) {
+          if((comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) && localtasks_in_remglist) {
 	    for(i=0;i<comm_ptr->remote_size;i++) {
 	      for(j=0;j<gsize;j++) {
 		if(comm_ptr->vcr[i]->taskid == glist[j]->taskid)
@@ -326,7 +326,7 @@ int MPID_Comm_disconnect(MPIR_Comm *comm_ptr)
 	  /* FIXME - we probably need a unique context_id. */
 
 	  /* Fill in new intercomm */
-          lcomm->comm_kind    = MPIR_INTRACOMM;
+          lcomm->comm_kind    = MPIR_COMM_KIND__INTRACOMM;
 	  lcomm->remote_size = lcomm->local_size = local_tasks;
 
 	  /* Set up VC reference table */
@@ -477,7 +477,7 @@ void MPIDI_get_allremote_leaders(int *tid_arr, MPIR_Comm *comm_ptr)
     if(tmp_node==NULL) {TRACE_ERR("_conn_info_list is NULL\n");}
     while(tmp_node != NULL) {
       if(tmp_node->rem_world_id == comm_ptr->mpid.world_ids[i]) {
-        if(comm_ptr->comm_kind == MPIR_INTRACOMM) {
+        if(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) {
           glist = comm_ptr->local_vcr;
           gsize = comm_ptr->local_size;
         }
@@ -505,7 +505,7 @@ void MPIDI_get_allremote_leaders(int *tid_arr, MPIR_Comm *comm_ptr)
 	 * of world-x in my GROUPLIST and then see which of the two leaders is the
 	 * smallest one. The smallest one is the one in which I am interested.
 	 **/
-        if(comm_ptr->comm_kind == MPIR_INTERCOMM) {
+        if(comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) {
           found=0;
           glist = comm_ptr->local_vcr;
           gsize = comm_ptr->local_size;
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index f0b5fe7..10c6c86 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -409,7 +409,7 @@ static int MPIDI_Initialize_tmp_comm(struct MPIR_Comm **comm_pptr,
     /* Fill in new intercomm */
     tmp_comm->local_size   = 1;
     tmp_comm->rank         = 0;
-    tmp_comm->comm_kind    = MPIR_INTERCOMM;
+    tmp_comm->comm_kind    = MPIR_COMM_KIND__INTERCOMM;
     tmp_comm->local_comm   = NULL;
     tmp_comm->is_low_group = is_low_group;
 
@@ -1409,7 +1409,7 @@ static int MPIDI_SetupNewIntercomm( struct MPIR_Comm *comm_ptr, int remote_comm_
     intercomm->rank         = comm_ptr->rank;
     intercomm->local_group  = NULL;
     intercomm->remote_group = NULL;
-    intercomm->comm_kind    = MPIR_INTERCOMM;
+    intercomm->comm_kind    = MPIR_COMM_KIND__INTERCOMM;
     intercomm->local_comm   = NULL;
     intercomm->coll_fns     = NULL;
     intercomm->mpid.world_ids = NULL; /*FIXME*/
diff --git a/src/util/procmap/local_proc.c b/src/util/procmap/local_proc.c
index fee6a8a..2ebb358 100644
--- a/src/util/procmap/local_proc.c
+++ b/src/util/procmap/local_proc.c
@@ -235,7 +235,7 @@ int MPIU_Get_internode_rank(MPIR_Comm *comm_ptr, int r)
     MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, TRUE );
     MPIU_Assert(mpi_errno == MPI_SUCCESS);
     MPIU_Assert(r < comm_ptr->remote_size);
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
     MPIU_Assert(comm_ptr->internode_table != NULL);
 
     return comm_ptr->internode_table[r];
@@ -256,7 +256,7 @@ int MPIU_Get_intranode_rank(MPIR_Comm *comm_ptr, int r)
     MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, TRUE );
     MPIU_Assert(mpi_errno == MPI_SUCCESS);
     MPIU_Assert(r < comm_ptr->remote_size);
-    MPIU_Assert(comm_ptr->comm_kind == MPIR_INTRACOMM);
+    MPIU_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM);
     MPIU_Assert(comm_ptr->intranode_table != NULL);
 
     /* FIXME this could/should be a list of ranks on the local node, which

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

commit cfd8c8855619a325919155b19c32744dba5fe718
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:41:55 2016 -0500

    Namespace MPIR_Lang_t elements.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index f101ee5..55de079 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -331,13 +331,13 @@ extern MPID_Thread_tls_t MPIR_Per_thread_key;
   Attribute-DS
   E*/
 typedef enum MPIR_Lang_t {
-    MPIR_LANG_C
+    MPIR_LANG__C
 #ifdef HAVE_FORTRAN_BINDING
-    , MPIR_LANG_FORTRAN
-    , MPIR_LANG_FORTRAN90
+    , MPIR_LANG__FORTRAN
+    , MPIR_LANG__FORTRAN90
 #endif
 #ifdef HAVE_CXX_BINDING
-    , MPIR_LANG_CXX
+    , MPIR_LANG__CXX
 #endif
 } MPIR_Lang_t;
 
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index dddb47a..f05c87f 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -43,7 +43,7 @@ void MPIR_Op_set_cxx( MPI_Op op, void (*opcall)(void) )
     MPIR_Op *op_ptr;
     
     MPIR_Op_get_ptr( op, op_ptr );
-    op_ptr->language		= MPIR_LANG_CXX;
+    op_ptr->language		= MPIR_LANG__CXX;
     MPIR_Process.cxx_call_op_fn	= (void (*)(const void *, void *, int,
 				    MPI_Datatype, MPI_User_function *))opcall;
 }
@@ -58,7 +58,7 @@ void MPIR_Op_set_fc( MPI_Op op )
     MPIR_Op *op_ptr;
     
     MPIR_Op_get_ptr( op, op_ptr );
-    op_ptr->language = MPIR_LANG_FORTRAN;
+    op_ptr->language = MPIR_LANG__FORTRAN;
 }
 #endif
 
@@ -123,7 +123,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
     }
     /* --END ERROR HANDLING-- */
 
-    op_ptr->language = MPIR_LANG_C;
+    op_ptr->language = MPIR_LANG__C;
     op_ptr->kind     = commute ? MPIR_OP_USER : MPIR_OP_USER_NONCOMMUTE;
     op_ptr->function.c_function = (void (*)(const void *, void *, 
 				   const int *, const MPI_Datatype *))user_fn;
diff --git a/src/mpi/coll/reduce_local.c b/src/mpi/coll/reduce_local.c
index d76c155..ffa7cf5 100644
--- a/src/mpi/coll/reduce_local.c
+++ b/src/mpi/coll/reduce_local.c
@@ -65,14 +65,14 @@ int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Dat
         MPIR_Op_get_ptr(op, op_ptr);
 
 #ifdef HAVE_CXX_BINDING
-        if (op_ptr->language == MPIR_LANG_CXX) {
+        if (op_ptr->language == MPIR_LANG__CXX) {
             uop = (MPI_User_function *) op_ptr->function.c_function;
             is_cxx_uop = 1;
         }
         else
 #endif
         {
-            if (op_ptr->language == MPIR_LANG_C) {
+            if (op_ptr->language == MPIR_LANG__C) {
                 uop = (MPI_User_function *) op_ptr->function.c_function;
             }
             else {
diff --git a/src/mpi/errhan/comm_call_errhandler.c b/src/mpi/errhan/comm_call_errhandler.c
index 04fa93d..cb3245e 100644
--- a/src/mpi/errhan/comm_call_errhandler.c
+++ b/src/mpi/errhan/comm_call_errhandler.c
@@ -125,20 +125,20 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode)
 
     /* Process any user-defined error handling function */
     switch (comm_ptr->errhandler->language) {
-    case MPIR_LANG_C:
+    case MPIR_LANG__C:
 	(*comm_ptr->errhandler->errfn.C_Comm_Handler_function)( 
 	    &comm_ptr->handle, &errorcode );
 	break;
 #ifdef HAVE_CXX_BINDING
-    case MPIR_LANG_CXX:
+    case MPIR_LANG__CXX:
 	MPIR_Process.cxx_call_errfn( 0, &comm_ptr->handle, 
 				     &errorcode, 
      (void (*)(void))comm_ptr->errhandler->errfn.C_Comm_Handler_function );
 	break;
 #endif
 #ifdef HAVE_FORTRAN_BINDING
-    case MPIR_LANG_FORTRAN90:
-    case MPIR_LANG_FORTRAN:
+    case MPIR_LANG__FORTRAN90:
+    case MPIR_LANG__FORTRAN:
 	{
 	    /* If int and MPI_Fint aren't the same size, we need to 
 	       convert.  As this is not performance critical, we
diff --git a/src/mpi/errhan/comm_create_errhandler.c b/src/mpi/errhan/comm_create_errhandler.c
index dbc1137..4dbb52e 100644
--- a/src/mpi/errhan/comm_create_errhandler.c
+++ b/src/mpi/errhan/comm_create_errhandler.c
@@ -39,7 +39,7 @@ int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function *comm_errhandl
     errhan_ptr = (MPIR_Errhandler *)MPIU_Handle_obj_alloc( &MPIR_Errhandler_mem );
     MPIR_ERR_CHKANDJUMP(!errhan_ptr, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
-    errhan_ptr->language = MPIR_LANG_C;
+    errhan_ptr->language = MPIR_LANG__C;
     errhan_ptr->kind	 = MPIR_COMM;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Comm_Handler_function = comm_errhandler_fn;
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index 93c94ee..a876bb8 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -181,7 +181,7 @@ void MPIR_Errhandler_set_cxx( MPI_Errhandler errhand, void (*errcall)(void) )
     MPIR_Errhandler *errhand_ptr;
     
     MPIR_Errhandler_get_ptr( errhand, errhand_ptr );
-    errhand_ptr->language		= MPIR_LANG_CXX;
+    errhand_ptr->language		= MPIR_LANG__CXX;
     MPIR_Process.cxx_call_errfn	= (void (*)( int, int *, int *, 
 					    void (*)(void) ))errcall;
 }
@@ -193,7 +193,7 @@ void MPIR_Errhandler_set_fc( MPI_Errhandler errhand )
     MPIR_Errhandler *errhand_ptr;
     
     MPIR_Errhandler_get_ptr( errhand, errhand_ptr );
-    errhand_ptr->language = MPIR_LANG_FORTRAN;
+    errhand_ptr->language = MPIR_LANG__FORTRAN;
 }
 
 #endif
@@ -306,12 +306,12 @@ int MPIR_Err_return_comm( MPIR_Comm  *comm_ptr, const char fcname[],
 	   because MPICH-1 expected that */
 	switch (comm_ptr->errhandler->language)
 	{
-	case MPIR_LANG_C:
+	case MPIR_LANG__C:
 	    (*comm_ptr->errhandler->errfn.C_Comm_Handler_function)( 
 		&comm_ptr->handle, &errcode, 0 );
 	    break;
 #ifdef HAVE_CXX_BINDING
-	case MPIR_LANG_CXX:
+	case MPIR_LANG__CXX:
 	    (*MPIR_Process.cxx_call_errfn)( 0, &comm_ptr->handle, &errcode, 
 		    (void (*)(void))*comm_ptr->errhandler->errfn.C_Comm_Handler_function );
 	    /* The C++ code throws an exception if the error handler 
@@ -321,8 +321,8 @@ int MPIR_Err_return_comm( MPIR_Comm  *comm_ptr, const char fcname[],
 	    break;
 #endif /* CXX_BINDING */
 #ifdef HAVE_FORTRAN_BINDING
-	case MPIR_LANG_FORTRAN90:
-	case MPIR_LANG_FORTRAN:
+	case MPIR_LANG__FORTRAN90:
+	case MPIR_LANG__FORTRAN:
 	{
 	    /* If int and MPI_Fint aren't the same size, we need to 
 	       convert.  As this is not performance critical, we
@@ -384,12 +384,12 @@ int MPIR_Err_return_win( MPIR_Win  *win_ptr, const char fcname[], int errcode )
 	   because MPICH-1 expected that */
 	switch (win_ptr->errhandler->language)
 	{
-	    case MPIR_LANG_C:
+	    case MPIR_LANG__C:
 		(*win_ptr->errhandler->errfn.C_Win_Handler_function)( 
 		    &win_ptr->handle, &errcode, 0 );
 		break;
 #ifdef HAVE_CXX_BINDING
-	    case MPIR_LANG_CXX:
+	    case MPIR_LANG__CXX:
 	    (*MPIR_Process.cxx_call_errfn)( 2, &win_ptr->handle, &errcode, 
 		    (void (*)(void))*win_ptr->errhandler->errfn.C_Win_Handler_function );
 	    /* The C++ code throws an exception if the error handler 
@@ -399,8 +399,8 @@ int MPIR_Err_return_win( MPIR_Win  *win_ptr, const char fcname[], int errcode )
 	    break;
 #endif /* CXX_BINDING */
 #ifdef HAVE_FORTRAN_BINDING
-	    case MPIR_LANG_FORTRAN90:
-	    case MPIR_LANG_FORTRAN:
+	    case MPIR_LANG__FORTRAN90:
+	    case MPIR_LANG__FORTRAN:
 		{
 		    /* If int and MPI_Fint aren't the same size, we need to 
 		       convert.  As this is not performance critical, we
diff --git a/src/mpi/errhan/file_call_errhandler.c b/src/mpi/errhan/file_call_errhandler.c
index d5ea20b..d0473b4 100644
--- a/src/mpi/errhan/file_call_errhandler.c
+++ b/src/mpi/errhan/file_call_errhandler.c
@@ -100,11 +100,11 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode)
     }
 
     switch (e->language) {
-    case MPIR_LANG_C:
+    case MPIR_LANG__C:
 	(*e->errfn.C_File_Handler_function)( &fh, &errorcode );
 	break;
 #ifdef HAVE_CXX_BINDING
-    case MPIR_LANG_CXX:
+    case MPIR_LANG__CXX:
 	/* See HAVE_LANGUAGE_FORTRAN below for an explanation */
     { void *fh1 = (void *)&fh;
 	(*MPIR_Process.cxx_call_errfn)( 1, fh1, &errorcode, 
@@ -113,8 +113,8 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode)
 	break;
 #endif
 #ifdef HAVE_FORTRAN_BINDING
-    case MPIR_LANG_FORTRAN90:
-    case MPIR_LANG_FORTRAN:
+    case MPIR_LANG__FORTRAN90:
+    case MPIR_LANG__FORTRAN:
 	/* The assignemt to a local variable prevents the compiler
 	   from generating a warning about a type-punned pointer.  Since
 	   the value is really const (but MPI didn't define error handlers 
diff --git a/src/mpi/errhan/file_create_errhandler.c b/src/mpi/errhan/file_create_errhandler.c
index c8419cb..18fac11 100644
--- a/src/mpi/errhan/file_create_errhandler.c
+++ b/src/mpi/errhan/file_create_errhandler.c
@@ -76,7 +76,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn,
     
     errhan_ptr = (MPIR_Errhandler *)MPIU_Handle_obj_alloc( &MPIR_Errhandler_mem );
     MPIR_ERR_CHKANDJUMP(!errhan_ptr,mpi_errno,MPI_ERR_OTHER,"**nomem");
-    errhan_ptr->language = MPIR_LANG_C;
+    errhan_ptr->language = MPIR_LANG__C;
     errhan_ptr->kind	 = MPIR_FILE;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_File_Handler_function = file_errhandler_fn;
diff --git a/src/mpi/errhan/file_set_errhandler.c b/src/mpi/errhan/file_set_errhandler.c
index 6cd6411..203c7c7 100644
--- a/src/mpi/errhan/file_set_errhandler.c
+++ b/src/mpi/errhan/file_set_errhandler.c
@@ -207,7 +207,7 @@ void MPIR_Get_file_error_routine( MPI_Errhandler e,
 	       interface.  This is MPIR_File_call_cxx_errhandler.  
 	       See file_call_errhandler.c */
 #ifdef HAVE_CXX_BINDING
-	    if (e_ptr->language == MPIR_LANG_CXX) *kind = 3;
+	    if (e_ptr->language == MPIR_LANG__CXX) *kind = 3;
 #endif
 	}
     }
diff --git a/src/mpi/errhan/win_call_errhandler.c b/src/mpi/errhan/win_call_errhandler.c
index a3f6bcc..bd76666 100644
--- a/src/mpi/errhan/win_call_errhandler.c
+++ b/src/mpi/errhan/win_call_errhandler.c
@@ -118,20 +118,20 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode)
     }
 #endif
     switch (win_ptr->errhandler->language) {
-    case MPIR_LANG_C:
+    case MPIR_LANG__C:
 	(*win_ptr->errhandler->errfn.C_Win_Handler_function)( 
 	    &win_ptr->handle, &errorcode );
 	break;
 #ifdef HAVE_CXX_BINDING
-    case MPIR_LANG_CXX:
+    case MPIR_LANG__CXX:
 	MPIR_Process.cxx_call_errfn( 2, &win_ptr->handle, 
 				     &errorcode, 
      (void (*)(void))win_ptr->errhandler->errfn.C_Win_Handler_function );
 	break;
 #endif
 #ifdef HAVE_FORTRAN_BINDING
-    case MPIR_LANG_FORTRAN90:
-    case MPIR_LANG_FORTRAN:
+    case MPIR_LANG__FORTRAN90:
+    case MPIR_LANG__FORTRAN:
 	{
 	    /* If int and MPI_Fint aren't the same size, we need to 
 	       convert.  As this is not performance critical, we
diff --git a/src/mpi/errhan/win_create_errhandler.c b/src/mpi/errhan/win_create_errhandler.c
index 638f632..3cbbea8 100644
--- a/src/mpi/errhan/win_create_errhandler.c
+++ b/src/mpi/errhan/win_create_errhandler.c
@@ -79,7 +79,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn,
     errhan_ptr = (MPIR_Errhandler *)MPIU_Handle_obj_alloc( &MPIR_Errhandler_mem );
     MPIR_ERR_CHKANDJUMP1(!errhan_ptr,mpi_errno,MPI_ERR_OTHER,"**nomem",
 			 "**nomem %s", "MPI_Errhandler");
-    errhan_ptr->language = MPIR_LANG_C;
+    errhan_ptr->language = MPIR_LANG__C;
     errhan_ptr->kind	 = MPIR_WIN;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Win_Handler_function = win_errhandler_fn;
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index f88025e..ed9a159 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -98,7 +98,7 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
     (*request_ptr)->u.ureq.greq_fns->poll_fn              = NULL;
     (*request_ptr)->u.ureq.greq_fns->wait_fn              = NULL;
     (*request_ptr)->u.ureq.greq_fns->grequest_extra_state = extra_state;
-    (*request_ptr)->u.ureq.greq_fns->greq_lang            = MPIR_LANG_C;
+    (*request_ptr)->u.ureq.greq_fns->greq_lang            = MPIR_LANG__C;
 
     /* Add an additional reference to the greq.  One of them will be
      * released when we complete the request, and the second one, when
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 1e98c43..511f14a 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -313,9 +313,9 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
     
 	    switch (request_ptr->u.ureq.greq_fns->greq_lang)
 	    {
-		case MPIR_LANG_C:
+		case MPIR_LANG__C:
 #ifdef HAVE_CXX_BINDING
-		case MPIR_LANG_CXX:
+		case MPIR_LANG__CXX:
 #endif
 		    rc = (request_ptr->u.ureq.greq_fns->query_fn)(
 			request_ptr->u.ureq.greq_fns->grequest_extra_state,
@@ -324,8 +324,8 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 			MPI_ERR_OTHER,;, "**user", "**userquery %d", rc);
 		    break;
 #ifdef HAVE_FORTRAN_BINDING
-		case MPIR_LANG_FORTRAN:
-		case MPIR_LANG_FORTRAN90:
+		case MPIR_LANG__FORTRAN:
+		case MPIR_LANG__FORTRAN90:
 		{
 		    MPI_Fint ierr;
 		    MPI_Fint is[sizeof(MPI_Status)/sizeof(int)];
@@ -378,7 +378,7 @@ void MPIR_Grequest_set_lang_f77( MPI_Request greq )
 
     MPIR_Request_get_ptr( greq, greq_ptr );
 
-    greq_ptr->u.ureq.greq_fns->greq_lang = MPIR_LANG_FORTRAN;
+    greq_ptr->u.ureq.greq_fns->greq_lang = MPIR_LANG__FORTRAN;
 }
 #endif
 
@@ -394,9 +394,9 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
     
     switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
-	case MPIR_LANG_C:
+	case MPIR_LANG__C:
 #ifdef HAVE_CXX_BINDING
-	case MPIR_LANG_CXX:
+	case MPIR_LANG__CXX:
 #endif
 	    rc = (request_ptr->u.ureq.greq_fns->cancel_fn)(
 		request_ptr->u.ureq.greq_fns->grequest_extra_state, complete);
@@ -404,8 +404,8 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
 		MPI_ERR_OTHER,;, "**user", "**usercancel %d", rc);
 	    break;
 #ifdef HAVE_FORTRAN_BINDING
-	case MPIR_LANG_FORTRAN:
-	case MPIR_LANG_FORTRAN90:
+	case MPIR_LANG__FORTRAN:
+	case MPIR_LANG__FORTRAN90:
 	{
 	    MPI_Fint ierr;
 	    MPI_Fint icomplete = complete;
@@ -445,9 +445,9 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr)
     
     switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
-	case MPIR_LANG_C:
+	case MPIR_LANG__C:
 #ifdef HAVE_CXX_BINDING
-	case MPIR_LANG_CXX:
+	case MPIR_LANG__CXX:
 #endif
 	    rc = (request_ptr->u.ureq.greq_fns->query_fn)(request_ptr->u.ureq.greq_fns->grequest_extra_state,
 		&request_ptr->status);
@@ -455,8 +455,8 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr)
 		{;}, "**user", "**userquery %d", rc);
 	    break;
 #ifdef HAVE_FORTRAN_BINDING
-	case MPIR_LANG_FORTRAN:
-	case MPIR_LANG_FORTRAN90:
+	case MPIR_LANG__FORTRAN:
+	case MPIR_LANG__FORTRAN90:
 	{
 	    MPI_Fint ierr;
 	    MPI_Fint is[sizeof(MPI_Status)/sizeof(int)];
@@ -496,17 +496,17 @@ int MPIR_Grequest_free(MPIR_Request * request_ptr)
     
     switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
-	case MPIR_LANG_C:
+	case MPIR_LANG__C:
 #ifdef HAVE_CXX_BINDING
-	case MPIR_LANG_CXX:
+	case MPIR_LANG__CXX:
 #endif
 	    rc = (request_ptr->u.ureq.greq_fns->free_fn)(request_ptr->u.ureq.greq_fns->grequest_extra_state);
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,
 		{;}, "**user", "**userfree %d", rc);
 	    break;
 #ifdef HAVE_FORTRAN_BINDING
-	case MPIR_LANG_FORTRAN:
-	case MPIR_LANG_FORTRAN90:
+	case MPIR_LANG__FORTRAN:
+	case MPIR_LANG__FORTRAN90:
 	{
 	    MPI_Fint ierr;
 		    

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

commit c14976d66dbd57f92776471a51110d0ea942700b
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 20:40:39 2016 -0500

    White-space cleanup.
    
    Improve the layout of enums to make them more readable.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index c312b38..f101ee5 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -330,13 +330,14 @@ extern MPID_Thread_tls_t MPIR_Per_thread_key;
   Module:
   Attribute-DS
   E*/
-typedef enum MPIR_Lang_t { MPIR_LANG_C
+typedef enum MPIR_Lang_t {
+    MPIR_LANG_C
 #ifdef HAVE_FORTRAN_BINDING
-			   , MPIR_LANG_FORTRAN
-			   , MPIR_LANG_FORTRAN90
+    , MPIR_LANG_FORTRAN
+    , MPIR_LANG_FORTRAN90
 #endif
 #ifdef HAVE_CXX_BINDING
-			   , MPIR_LANG_CXX
+    , MPIR_LANG_CXX
 #endif
 } MPIR_Lang_t;
 
@@ -1093,7 +1094,8 @@ void MPIR_Group_setup_lpid_list( MPIR_Group * );
   E*/
 typedef enum MPIR_Comm_kind_t {
     MPIR_INTRACOMM = 0,
-    MPIR_INTERCOMM = 1 } MPIR_Comm_kind_t;
+    MPIR_INTERCOMM = 1
+} MPIR_Comm_kind_t;
 
 /* ideally we could add these to MPIR_Comm_kind_t, but there's too much existing
  * code that assumes that the only valid values are INTRACOMM or INTERCOMM */
@@ -2021,14 +2023,25 @@ int MPID_Mem_was_alloced( void *ptr );  /* brad : this isn't used or implemented
   Module:
   Collective-DS
   E*/
-typedef enum MPIR_Op_kind { MPIR_OP_NULL=0, MPIR_OP_MAX=1, MPIR_OP_MIN=2,
-			    MPIR_OP_SUM=3, MPIR_OP_PROD=4,
-	       MPIR_OP_LAND=5, MPIR_OP_BAND=6, MPIR_OP_LOR=7, MPIR_OP_BOR=8,
-	       MPIR_OP_LXOR=9, MPIR_OP_BXOR=10, MPIR_OP_MAXLOC=11,
-               MPIR_OP_MINLOC=12, MPIR_OP_REPLACE=13,
-               MPIR_OP_NO_OP=14,
-               MPIR_OP_USER_NONCOMMUTE=32, MPIR_OP_USER=33 }
-  MPIR_Op_kind;
+typedef enum MPIR_Op_kind {
+    MPIR_OP_NULL=0,
+    MPIR_OP_MAX=1,
+    MPIR_OP_MIN=2,
+    MPIR_OP_SUM=3,
+    MPIR_OP_PROD=4,
+    MPIR_OP_LAND=5,
+    MPIR_OP_BAND=6,
+    MPIR_OP_LOR=7,
+    MPIR_OP_BOR=8,
+    MPIR_OP_LXOR=9,
+    MPIR_OP_BXOR=10,
+    MPIR_OP_MAXLOC=11,
+    MPIR_OP_MINLOC=12,
+    MPIR_OP_REPLACE=13,
+    MPIR_OP_NO_OP=14,
+    MPIR_OP_USER_NONCOMMUTE=32,
+    MPIR_OP_USER=33
+} MPIR_Op_kind;
 
 /*S
   MPIR_User_function - Definition of a user function for MPI_Op types.

http://git.mpich.org/mpich.git/commitdiff/46008f6384b41c5308546406b0da7cf2bb6860f9

commit 46008f6384b41c5308546406b0da7cf2bb6860f9
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 17:38:28 2016 -0500

    Rename request kinds to make naming clear.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index d6af3c1..88751a2 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -191,15 +191,15 @@ cvars:
     }
 
 #define MPIR_ERRTEST_PERSISTENT(reqp,err)                               \
-    if ((reqp)->kind != MPIR_PREQUEST_SEND && reqp->kind != MPIR_PREQUEST_RECV) { \
+    if ((reqp)->kind != MPIR_REQUEST_KIND__PREQUEST_SEND && reqp->kind != MPIR_REQUEST_KIND__PREQUEST_RECV) { \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_REQUEST, "**requestnotpersist", 0 ); \
         goto fn_fail;                                                   \
     }
 
 #define MPIR_ERRTEST_PERSISTENT_ACTIVE(reqp,err)                        \
-    if (((reqp)->kind == MPIR_PREQUEST_SEND ||                          \
-         reqp->kind == MPIR_PREQUEST_RECV) && reqp->u.persist.real_request != NULL) { \
+    if (((reqp)->kind == MPIR_REQUEST_KIND__PREQUEST_SEND ||                          \
+         reqp->kind == MPIR_REQUEST_KIND__PREQUEST_RECV) && reqp->u.persist.real_request != NULL) { \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_REQUEST, "**requestpersistactive", 0 ); \
         goto fn_fail;                                                   \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index da3dd94..c312b38 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1434,12 +1434,12 @@ void MPIR_Free_contextid( MPIU_Context_id_t );
 /* Requests */
 /* This currently defines a single structure type for all requests.  
    Eventually, we may want a union type, as used in MPICH-1 */
-/* NOTE-R1: MPIR_REQUEST_MPROBE signifies that this is a request created by
+/* NOTE-R1: MPIR_REQUEST_KIND__MPROBE signifies that this is a request created by
  * MPI_Mprobe or MPI_Improbe.  Since we use MPI_Request objects as our
  * MPI_Message objects, we use this separate kind in order to provide stronger
  * error checking.  Once a message (backed by a request) is promoted to a real
  * request by calling MPI_Mrecv/MPI_Imrecv, we actually modify the kind to be
- * MPIR_REQUEST_RECV in order to keep completion logic as simple as possible. */
+ * MPIR_REQUEST_KIND__RECV in order to keep completion logic as simple as possible. */
 /*E
   MPIR_Request_kind - Kinds of MPI Requests
 
@@ -1448,18 +1448,18 @@ void MPIR_Free_contextid( MPIU_Context_id_t );
 
   E*/
 typedef enum MPIR_Request_kind_t {
-    MPIR_REQUEST_UNDEFINED,
-    MPIR_REQUEST_SEND,
-    MPIR_REQUEST_RECV,
-    MPIR_PREQUEST_SEND,
-    MPIR_PREQUEST_RECV,
-    MPIR_UREQUEST,
-    MPIR_COLL_REQUEST,
-    MPIR_REQUEST_MPROBE, /* see NOTE-R1 */
-    MPIR_WIN_REQUEST,
-    MPIR_LAST_REQUEST_KIND
-#ifdef MPID_DEV_REQUEST_KIND_DECL
-    , MPID_DEV_REQUEST_KIND_DECL
+    MPIR_REQUEST_KIND__UNDEFINED,
+    MPIR_REQUEST_KIND__SEND,
+    MPIR_REQUEST_KIND__RECV,
+    MPIR_REQUEST_KIND__PREQUEST_SEND,
+    MPIR_REQUEST_KIND__PREQUEST_RECV,
+    MPIR_REQUEST_KIND__GREQUEST,
+    MPIR_REQUEST_KIND__COLL,
+    MPIR_REQUEST_KIND__MPROBE, /* see NOTE-R1 */
+    MPIR_REQUEST_KIND__RMA,
+    MPIR_REQUEST_KIND__LAST
+#ifdef MPID_REQUEST_KIND_DECL
+    , MPID_REQUEST_KIND_DECL
 #endif
 } MPIR_Request_kind_t;
 
@@ -1604,10 +1604,10 @@ typedef struct MPIR_Request {
     union {
         struct {
             struct MPIR_Grequest_fns *greq_fns;
-        } ureq; /* kind : MPIR_UREQUEST */
+        } ureq; /* kind : MPIR_REQUEST_KIND__GREQUEST */
         struct {
             MPIR_Errflag_t errflag;
-        } nbc;  /* kind : MPIR_COLL_REQUEST */
+        } nbc;  /* kind : MPIR_REQUEST_KIND__COLL */
 #if defined HAVE_DEBUGGER_SUPPORT
         struct {
             struct MPIR_Sendq *dbg_next;
@@ -1728,7 +1728,7 @@ static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind)
         req->request_completed_cb  = NULL;
 
         switch(kind) {
-        case MPIR_COLL_REQUEST:
+        case MPIR_REQUEST_KIND__COLL:
             req->u.nbc.errflag = MPIR_ERR_NONE;
             break;
         default:
@@ -1788,7 +1788,7 @@ static inline void MPIR_Request_free(MPIR_Request *req)
             MPIR_Comm_release(req->comm);
         }
 
-        if (req->kind == MPIR_UREQUEST && req->u.ureq.greq_fns != NULL) {
+        if (req->kind == MPIR_REQUEST_KIND__GREQUEST && req->u.ureq.greq_fns != NULL) {
             MPL_free(req->u.ureq.greq_fns);
         }
 
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 148178c..53193a8 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -212,7 +212,7 @@ int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t *errflag)
 
     MPL_DBG_MSG_S(MPIR_DBG_PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
 
-    if (request_ptr->kind == MPIR_REQUEST_SEND)
+    if (request_ptr->kind == MPIR_REQUEST_KIND__SEND)
         request_ptr->status.MPI_TAG = 0;
 
     if (!MPIR_Request_is_complete(request_ptr))
@@ -228,7 +228,7 @@ int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t *errflag)
 	MPID_Progress_end(&progress_state);
     }
 
-    if (request_ptr->kind == MPIR_REQUEST_RECV)
+    if (request_ptr->kind == MPIR_REQUEST_KIND__RECV)
         MPIR_Process_status(&request_ptr->status, errflag);
 
     MPIR_TAG_CLEAR_ERROR_BITS(request_ptr->status.MPI_TAG);
diff --git a/src/mpi/pt2pt/cancel.c b/src/mpi/pt2pt/cancel.c
index 2c1df30..8ceb998 100644
--- a/src/mpi/pt2pt/cancel.c
+++ b/src/mpi/pt2pt/cancel.c
@@ -36,24 +36,24 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
         
     switch (request_ptr->kind)
     {
-	case MPIR_REQUEST_SEND:
+	case MPIR_REQUEST_KIND__SEND:
 	{
 	    mpi_errno = MPID_Cancel_send(request_ptr);
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	    break;
 	}
 
-	case MPIR_REQUEST_RECV:
+	case MPIR_REQUEST_KIND__RECV:
 	{
 	    mpi_errno = MPID_Cancel_recv(request_ptr);
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	    break;
 	}
 
-	case MPIR_PREQUEST_SEND:
+	case MPIR_REQUEST_KIND__PREQUEST_SEND:
 	{
 	    if (request_ptr->u.persist.real_request != NULL) {
-		if (request_ptr->u.persist.real_request->kind != MPIR_UREQUEST) {
+		if (request_ptr->u.persist.real_request->kind != MPIR_REQUEST_KIND__GREQUEST) {
                     /* jratt at us.ibm.com: I don't know about the bsend
                      * comment below, but the CC stuff on the next
                      * line is *really* needed for persistent Bsend
@@ -86,7 +86,7 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
 	    break;
 	}
 
-	case MPIR_PREQUEST_RECV:
+	case MPIR_REQUEST_KIND__PREQUEST_RECV:
 	{
 	    if (request_ptr->u.persist.real_request != NULL) {
 		mpi_errno = MPID_Cancel_recv(request_ptr->u.persist.real_request);
@@ -97,7 +97,7 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
 	    break;
 	}
 
-	case MPIR_UREQUEST:
+	case MPIR_REQUEST_KIND__GREQUEST:
 	{
             mpi_errno = MPIR_Grequest_cancel(request_ptr, MPIR_cc_is_complete(&request_ptr->cc));
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpi/pt2pt/greq_complete.c b/src/mpi/pt2pt/greq_complete.c
index 419b2c0..19749c7 100644
--- a/src/mpi/pt2pt/greq_complete.c
+++ b/src/mpi/pt2pt/greq_complete.c
@@ -95,7 +95,7 @@ int MPI_Grequest_complete( MPI_Request request )
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_Request_valid_ptr(request_ptr,mpi_errno);
-	    if (request_ptr && request_ptr->kind != MPIR_UREQUEST) {
+	    if (request_ptr && request_ptr->kind != MPIR_REQUEST_KIND__GREQUEST) {
  	        mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_ARG, 
 						  "**notgenreq", 0 );
 	    }
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 7a0db3e..f88025e 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -84,7 +84,7 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
 
     /* MT FIXME this routine is not thread-safe in the non-global case */
     
-    *request_ptr = MPIR_Request_create(MPIR_UREQUEST);
+    *request_ptr = MPIR_Request_create(MPIR_REQUEST_KIND__GREQUEST);
     MPIR_ERR_CHKANDJUMP1(request_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "generalized request");
     
     MPIU_Object_set_ref( *request_ptr, 1 );
diff --git a/src/mpi/pt2pt/imrecv.c b/src/mpi/pt2pt/imrecv.c
index 4b7a2e4..e5955e5 100644
--- a/src/mpi/pt2pt/imrecv.c
+++ b/src/mpi/pt2pt/imrecv.c
@@ -97,7 +97,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
             if (*message != MPI_MESSAGE_NO_PROC) {
                 MPIR_Request_valid_ptr(msgp, mpi_errno);
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-                MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_MPROBE),
+                MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_KIND__MPROBE),
                                      mpi_errno, MPI_ERR_ARG, "**reqnotmsg");
             }
 
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index ee05809..1e98c43 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -73,7 +73,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
     *active = TRUE;
     switch(request_ptr->kind)
     {
-	case MPIR_REQUEST_SEND:
+	case MPIR_REQUEST_KIND__SEND:
 	{
 	    if (status != MPI_STATUS_IGNORE)
 	    {
@@ -85,7 +85,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
             if (NULL != request) *request = MPI_REQUEST_NULL;
 	    break;
 	}
-	case MPIR_REQUEST_RECV:
+	case MPIR_REQUEST_KIND__RECV:
 	{
 	    MPIR_Request_extract_status(request_ptr, status);
 	    mpi_errno = request_ptr->status.MPI_ERROR;
@@ -94,7 +94,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	    break;
 	}
 			
-	case MPIR_PREQUEST_SEND:
+	case MPIR_REQUEST_KIND__PREQUEST_SEND:
 	{
 	    if (request_ptr->u.persist.real_request != NULL)
 	    {
@@ -105,7 +105,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 		request_ptr->cc_ptr = &request_ptr->cc;
 		request_ptr->u.persist.real_request = NULL;
 		
-		if (prequest_ptr->kind != MPIR_UREQUEST)
+		if (prequest_ptr->kind != MPIR_REQUEST_KIND__GREQUEST)
 		{
 		    if (status != MPI_STATUS_IGNORE)
 		    {
@@ -162,7 +162,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	    break;
 	}
 	
-	case MPIR_PREQUEST_RECV:
+	case MPIR_REQUEST_KIND__PREQUEST_RECV:
 	{
 	    if (request_ptr->u.persist.real_request != NULL)
 	    {
@@ -198,7 +198,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	    break;
 	}
 
-	case MPIR_UREQUEST:
+	case MPIR_REQUEST_KIND__GREQUEST:
 	{
             int rc;
             
@@ -220,8 +220,8 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	    break;
 	}
 
-        case MPIR_COLL_REQUEST:
-        case MPIR_WIN_REQUEST:
+        case MPIR_REQUEST_KIND__COLL:
+        case MPIR_REQUEST_KIND__RMA:
         {
             mpi_errno = request_ptr->status.MPI_ERROR;
             MPIR_Request_extract_status(request_ptr, status);
@@ -260,19 +260,19 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 
     switch(request_ptr->kind)
     {
-	case MPIR_REQUEST_SEND:
-	case MPIR_REQUEST_RECV:
-        case MPIR_COLL_REQUEST:
+	case MPIR_REQUEST_KIND__SEND:
+	case MPIR_REQUEST_KIND__RECV:
+        case MPIR_REQUEST_KIND__COLL:
 	{
 	    mpi_errno = request_ptr->status.MPI_ERROR;
 	    break;
 	}
 
-	case MPIR_PREQUEST_SEND:
+	case MPIR_REQUEST_KIND__PREQUEST_SEND:
 	{
 	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		if (request_ptr->u.persist.real_request->kind == MPIR_UREQUEST)
+		if (request_ptr->u.persist.real_request->kind == MPIR_REQUEST_KIND__GREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_query(
@@ -291,7 +291,7 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 	    break;
 	}
 
-	case MPIR_PREQUEST_RECV:
+	case MPIR_REQUEST_KIND__PREQUEST_RECV:
 	{
 	    if (request_ptr->u.persist.real_request != NULL)
 	    {
@@ -305,7 +305,7 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 	    break;
 	}
 
-	case MPIR_UREQUEST:
+	case MPIR_REQUEST_KIND__GREQUEST:
 	{
 	    int rc;
 	    
@@ -559,7 +559,7 @@ int MPIR_Grequest_progress_poke(int count,
     for (i=0, j=0, n_classes=1, n_native=0, n_greq=0; i< count; i++)
     {
 	if (request_ptrs[i] == NULL || MPIR_Request_is_complete(request_ptrs[i])) continue;
-	if (request_ptrs[i]->kind == MPIR_UREQUEST)
+	if (request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST)
 	{
 	    n_greq += 1;
 	    wait_fn = request_ptrs[i]->u.ureq.greq_fns->wait_fn;
@@ -582,7 +582,7 @@ int MPIR_Grequest_progress_poke(int count,
 	for (i = 0; i< count; i++ )
 	{
 	    if (request_ptrs[i] != NULL && 
-                request_ptrs[i]->kind == MPIR_UREQUEST && 
+                request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST &&
                 !MPIR_Request_is_complete(request_ptrs[i]) &&
                 request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
             {
@@ -635,7 +635,7 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
     for (i = 0; i < count; ++i)
     {
         /* skip over requests we're not interested in */
-        if (request_ptrs[i] == NULL || *request_ptrs[i]->cc_ptr == 0 ||  request_ptrs[i]->kind != MPIR_UREQUEST)
+        if (request_ptrs[i] == NULL || *request_ptrs[i]->cc_ptr == 0 ||  request_ptrs[i]->kind != MPIR_REQUEST_KIND__GREQUEST)
             continue;
         
         if (n_greq == 0 || request_ptrs[i]->u.ureq.greq_fns->greq_class == curr_class)
@@ -674,7 +674,7 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
         /* skip over requests we're not interested in */
         if (request_ptrs[i] == NULL ||
             MPIR_Request_is_complete(request_ptrs[i]) ||
-            request_ptrs[i]->kind != MPIR_UREQUEST ||
+            request_ptrs[i]->kind != MPIR_REQUEST_KIND__GREQUEST ||
             request_ptrs[i]->u.ureq.greq_fns->wait_fn == NULL)
         {
             continue;
@@ -690,7 +690,7 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
     {
         if (request_ptrs[i] == NULL ||
             MPIR_Request_is_complete(request_ptrs[i]) ||
-            request_ptrs[i]->kind != MPIR_UREQUEST)
+            request_ptrs[i]->kind != MPIR_REQUEST_KIND__GREQUEST)
         {
             continue;
         }
diff --git a/src/mpi/pt2pt/mrecv.c b/src/mpi/pt2pt/mrecv.c
index d946005..64ca570 100644
--- a/src/mpi/pt2pt/mrecv.c
+++ b/src/mpi/pt2pt/mrecv.c
@@ -96,7 +96,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
             if (*message != MPI_MESSAGE_NO_PROC) {
                 MPIR_Request_valid_ptr(msgp, mpi_errno);
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-                MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_MPROBE),
+                MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_KIND__MPROBE),
                                     mpi_errno, MPI_ERR_ARG, "**reqnotmsg");
             }
 
diff --git a/src/mpi/pt2pt/request_free.c b/src/mpi/pt2pt/request_free.c
index 42d22b6..00a119a 100644
--- a/src/mpi/pt2pt/request_free.c
+++ b/src/mpi/pt2pt/request_free.c
@@ -109,23 +109,23 @@ int MPI_Request_free(MPI_Request *request)
     
     switch (request_ptr->kind)
     {
-	case MPIR_REQUEST_SEND:
+	case MPIR_REQUEST_KIND__SEND:
 	{
 	    MPIR_SENDQ_FORGET(request_ptr);
 	    break;
 	}
-	case MPIR_REQUEST_RECV:
+	case MPIR_REQUEST_KIND__RECV:
 	{
 	    break;
 	}
 	
-	case MPIR_PREQUEST_SEND:
+	case MPIR_REQUEST_KIND__PREQUEST_SEND:
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
 	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		if (request_ptr->u.persist.real_request->kind == MPIR_UREQUEST)
+		if (request_ptr->u.persist.real_request->kind == MPIR_REQUEST_KIND__GREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_free(
@@ -137,7 +137,7 @@ int MPI_Request_free(MPI_Request *request)
 	}
 
 	    
-	case MPIR_PREQUEST_RECV:
+	case MPIR_REQUEST_KIND__PREQUEST_RECV:
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
@@ -148,7 +148,7 @@ int MPI_Request_free(MPI_Request *request)
 	    break;
 	}
 	
-	case MPIR_UREQUEST:
+	case MPIR_REQUEST_KIND__GREQUEST:
 	{
 	    mpi_errno = MPIR_Grequest_free(request_ptr);
 	    break;
diff --git a/src/mpi/pt2pt/request_get_status.c b/src/mpi/pt2pt/request_get_status.c
index 7269de6..224cf64 100644
--- a/src/mpi/pt2pt/request_get_status.c
+++ b/src/mpi/pt2pt/request_get_status.c
@@ -117,7 +117,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
     {
 	switch(request_ptr->kind)
 	{
-        case MPIR_REQUEST_SEND:
+        case MPIR_REQUEST_KIND__SEND:
         {
             if (status != MPI_STATUS_IGNORE)
             {
@@ -127,20 +127,20 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
         
-        case MPIR_REQUEST_RECV:
+        case MPIR_REQUEST_KIND__RECV:
         {
             MPIR_Request_extract_status(request_ptr, status);
             mpi_errno = request_ptr->status.MPI_ERROR;
             break;
         }
         
-        case MPIR_PREQUEST_SEND:
+        case MPIR_REQUEST_KIND__PREQUEST_SEND:
         {
             MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
             
             if (prequest_ptr != NULL)
             {
-		if (prequest_ptr->kind != MPIR_UREQUEST)
+		if (prequest_ptr->kind != MPIR_REQUEST_KIND__GREQUEST)
 		{
 		    if (status != MPI_STATUS_IGNORE)
 		    {
@@ -189,7 +189,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
         
-        case MPIR_PREQUEST_RECV:
+        case MPIR_REQUEST_KIND__PREQUEST_RECV:
         {
             MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
             
@@ -209,7 +209,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
 
-        case MPIR_UREQUEST:
+        case MPIR_REQUEST_KIND__GREQUEST:
         {
             int rc;
             
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index 9876864..25ca804 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -52,7 +52,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
     mpi_errno = MPID_Progress_test();
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    if (request_ptr->kind == MPIR_UREQUEST &&
+    if (request_ptr->kind == MPIR_REQUEST_KIND__GREQUEST &&
         request_ptr->u.ureq.greq_fns != NULL &&
         request_ptr->u.ureq.greq_fns->poll_fn != NULL)
     {
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index 398a891..a8c144c 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -87,7 +87,7 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
     for (i = 0; i < count; i++)
     {
         if (request_ptrs[i] != NULL &&
-                request_ptrs[i]->kind == MPIR_UREQUEST &&
+                request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST &&
                 request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
         {
             mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index 0ca07d5..013aad4 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -162,7 +162,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
     for (i = 0; i < count; i++)
     {
 	if (request_ptrs[i] != NULL && 
-            request_ptrs[i]->kind == MPIR_UREQUEST &&
+            request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST &&
             request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	{
             mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 57c4e67..3a4112a 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -162,7 +162,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
     for (i = 0; i < incount; i++)
     {
 	if (request_ptrs[i] != NULL && 
-            request_ptrs[i]->kind == MPIR_UREQUEST &&
+            request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST &&
             request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	{
             mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index 3844848..ea92615 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -61,7 +61,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
         while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    mpi_errno = MPIR_Grequest_progress_poke(1, &request_ptr, status);
-	    if (request_ptr->kind == MPIR_UREQUEST &&
+	    if (request_ptr->kind == MPIR_REQUEST_KIND__GREQUEST &&
                 request_ptr->u.ureq.greq_fns->wait_fn != NULL)
 	    {
 		if (mpi_errno) {
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index 5d9546e..6983246 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -32,7 +32,7 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_
 
 
 /* The "fastpath" version of MPIR_Request_complete.  It only handles
- * MPIR_REQUEST_SEND and MPIR_REQUEST_RECV kinds, and it does not attempt to
+ * MPIR_REQUEST_KIND__SEND and MPIR_REQUEST_KIND__RECV kinds, and it does not attempt to
  * deal with status structures under the assumption that bleeding fast code will
  * pass either MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE as appropriate.  This
  * routine (or some a variation of it) is an unfortunately necessary stunt to
@@ -46,9 +46,9 @@ static inline int request_complete_fastpath(MPI_Request *request, MPIR_Request *
 {
     int mpi_errno = MPI_SUCCESS;
 
-    MPIU_Assert(request_ptr->kind == MPIR_REQUEST_SEND || request_ptr->kind == MPIR_REQUEST_RECV);
+    MPIU_Assert(request_ptr->kind == MPIR_REQUEST_KIND__SEND || request_ptr->kind == MPIR_REQUEST_KIND__RECV);
 
-    if (request_ptr->kind == MPIR_REQUEST_SEND) {
+    if (request_ptr->kind == MPIR_REQUEST_KIND__SEND) {
         /* FIXME: are Ibsend requests added to the send queue? */
         MPIR_SENDQ_FORGET(request_ptr);
     }
@@ -106,19 +106,19 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
 		{
 		    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
                     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-                    MPIR_ERR_CHKANDJUMP1((request_ptrs[i]->kind == MPIR_REQUEST_MPROBE),
+                    MPIR_ERR_CHKANDJUMP1((request_ptrs[i]->kind == MPIR_REQUEST_KIND__MPROBE),
                                          mpi_errno, MPI_ERR_ARG, "**msgnotreq", "**msgnotreq %d", i);
 		}
 		MPID_END_ERROR_CHECKS;
 	    }
 #           endif
-            if (request_ptrs[i]->kind != MPIR_REQUEST_RECV &&
-                request_ptrs[i]->kind != MPIR_REQUEST_SEND)
+            if (request_ptrs[i]->kind != MPIR_REQUEST_KIND__RECV &&
+                request_ptrs[i]->kind != MPIR_REQUEST_KIND__SEND)
             {
                 optimize = FALSE;
             }
 
-            if (request_ptrs[i]->kind == MPIR_UREQUEST)
+            if (request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST)
                 ++n_greqs;
 
             /* If one of the requests is an anysource on a communicator that's
@@ -212,7 +212,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
         while (!MPIR_Request_is_complete(request_ptrs[i]))
         {
             /* generalized requests should already be finished */
-            MPIU_Assert(request_ptrs[i]->kind != MPIR_UREQUEST);
+            MPIU_Assert(request_ptrs[i]->kind != MPIR_REQUEST_KIND__GREQUEST);
             
             mpi_errno = MPID_Progress_wait(&progress_state);
             if (mpi_errno != MPI_SUCCESS) {
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index 1bdb87b..f74fa0a 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -157,7 +157,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
             /* we found at least one non-null request */
             found_nonnull_req = TRUE;
 
-            if (request_ptrs[i]->kind == MPIR_UREQUEST && request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
+            if (request_ptrs[i]->kind == MPIR_REQUEST_KIND__GREQUEST && request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	    {
                 /* this is a generalized request; make progress on it */
                 mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state, status);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
index ef38a63..0cc55e9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -85,8 +85,8 @@ static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
     kind = sreq->kind;
     switch (kind) {
         unsigned int reqtype;
-    case MPIR_REQUEST_SEND:
-    case MPIR_PREQUEST_SEND:{
+    case MPIR_REQUEST_KIND__SEND:
+    case MPIR_REQUEST_KIND__PREQUEST_SEND:{
             reqtype = MPIDI_Request_get_type(sreq);
 
             /* Free temporal buffer for non-contiguous data.
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
index ccb4cd2..e2276c4 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
@@ -157,9 +157,9 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 2);
-        req->kind = MPIR_REQUEST_MPROBE;
+        req->kind = MPIR_REQUEST_KIND__MPROBE;
         req->comm = comm;
         MPIR_Comm_add_ref(comm);
         req->ch.vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 8f1048e..02e179e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -43,10 +43,10 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
 
     /* Used in llc_poll --> MPID_nem_llc_send_handler */
     sreq->ch.vc = vc;
@@ -186,10 +186,10 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "hdr type   = %d", ((MPIDI_CH3_Pkt_t *) hdr)->type);
 
     /* create a request */
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
 
     sreq->ch.vc = vc;
     sreq->dev.OnDataAvail = 0;
@@ -264,8 +264,8 @@ int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, in
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_ISENDCONTIGMSG);
 
-    if (sreq->kind == MPIR_REQUEST_UNDEFINED) {
-        sreq->kind = MPIR_REQUEST_SEND;
+    if (sreq->kind == MPIR_REQUEST_KIND__UNDEFINED) {
+        sreq->kind = MPIR_REQUEST_KIND__SEND;
     }
     dprintf("llc_iSendConitig,sreq=%p,hdr=%p,hdr_sz=%ld,data=%p,data_sz=%ld\n",
             sreq, hdr, hdr_sz, data, data_sz);
@@ -814,7 +814,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                 lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id;
                 MPIR_Request *req = ((struct llc_cmd_area *) lcmd->usr_area)->cbarg;
 
-                if (req->kind != MPIR_REQUEST_MPROBE) {
+                if (req->kind != MPIR_REQUEST_KIND__MPROBE) {
                     /* Unpack non-contiguous dt */
                     int is_contig;
                     MPIDU_Datatype_is_contig(req->dev.datatype, &is_contig);
@@ -976,10 +976,10 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
 
     /* Used in llc_poll --> MPID_nem_llc_send_handler */
     sreq->ch.vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
index 3e77796..88d1b7a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
@@ -135,9 +135,9 @@ int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 2);
-        req->kind = MPIR_REQUEST_MPROBE;
+        req->kind = MPIR_REQUEST_KIND__MPROBE;
         req->comm = comm;
         MPIR_Comm_add_ref(comm);
         req->ch.vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index 112ab12..d6313b6 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -113,11 +113,11 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr);
 
     /* create a request */
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     MPIU_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t));
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.tmpbuf = NULL;
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
index b935292..2816090 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
@@ -551,7 +551,7 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc)
     my_bc_len = OFI_KVSAPPSTRLEN - my_bc_len;
 
     MPID_nem_ofi_create_req(&sreq, 1);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.next = NULL;
     REQ_OFI(sreq)->event_callback = MPID_nem_ofi_connect_to_root_callback;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index b3e7adc..1492ac7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -249,7 +249,7 @@ static inline int MPID_nem_ofi_create_req(MPIR_Request ** request, int refcnt)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *req;
-    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(req);
     MPIDI_Request_clear_dbg(req);
     MPIU_Object_set_ref(req, refcnt);
@@ -271,7 +271,7 @@ static inline int MPID_nem_ofi_create_req_lw(MPIR_Request ** request, int refcnt
     MPIU_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);
 
     MPIU_Object_set_ref(req, refcnt);
-    req->kind = MPIR_REQUEST_SEND;
+    req->kind = MPIR_REQUEST_KIND__SEND;
     MPIR_cc_set(&req->cc, 0); // request is already completed
     req->cc_ptr  = &req->cc;
     req->status.MPI_ERROR  = MPI_SUCCESS;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index e6f88fe..29258c8 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -322,7 +322,7 @@ int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
     MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
 
     MPID_nem_ofi_create_req(&sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.next = NULL;
     pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
index aac2e5b..4ee0746 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
@@ -52,7 +52,7 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
     BEGIN_FUNC(FCNAME);
     if (rreq_ptr) {
         MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_create_req(&rreq, 1));
-        rreq->kind = MPIR_REQUEST_RECV;
+        rreq->kind = MPIR_REQUEST_KIND__RECV;
 
         *rreq_ptr = rreq;
         rreq->comm = comm;
@@ -165,7 +165,7 @@ int ADD_SUFFIX(MPID_nem_ofi_improbe)(struct MPIDI_VC *vc,
                                              tag, comm, context_offset, flag, status, message);
     if (*flag) {
         status->MPI_ERROR = old_error;
-        (*message)->kind = MPIR_REQUEST_MPROBE;
+        (*message)->kind = MPIR_REQUEST_KIND__MPROBE;
     }
     END_FUNC(FCNAME);
     return s;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
index d53e734..f3ec603 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
@@ -94,10 +94,10 @@ int MPID_nem_ofi_poll(int in_blocking_poll)
                     /* Other kinds of requests, this is fatal.               */
                     /* ----------------------------------------------------- */
                     req = context_to_req(error.op_context);
-                    if (req->kind == MPIR_REQUEST_SEND) {
+                    if (req->kind == MPIR_REQUEST_KIND__SEND) {
                         mpi_errno = REQ_OFI(req)->event_callback(NULL, req);
                     }
-                    else if (req->kind == MPIR_REQUEST_RECV) {
+                    else if (req->kind == MPIR_REQUEST_KIND__RECV) {
                         mpi_errno = REQ_OFI(req)->event_callback(&wc, req);
                         req->status.MPI_ERROR = MPI_ERR_TRUNCATE;
                         req->status.MPI_TAG = error.tag;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index 12bf495..5cfae09 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -124,7 +124,7 @@ static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc,
     /* Create the MPI request                               */
     /* ---------------------------------------------------- */
     MPID_nem_ofi_create_req(&sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = NULL;
     REQ_OFI(sreq)->event_callback = MPID_nem_ofi_send_callback;
     REQ_OFI(sreq)->vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index 8cf7788..68aab68 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -68,9 +68,9 @@ static inline MPID_nem_ptl_req_area * REQ_PTL(MPIR_Request *req) {
     } while (0)
 
 #define MPID_nem_ptl_request_create_sreq(sreq_, errno_, comm_) do {                                             \
-        (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);               \
+        (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);               \
         MPIU_Object_set_ref((sreq_), 2);                                                                        \
-        (sreq_)->kind               = MPIR_REQUEST_SEND;                                                        \
+        (sreq_)->kind               = MPIR_REQUEST_KIND__SEND;                                                        \
         MPIR_Comm_add_ref(comm_);                                                                               \
         (sreq_)->comm               = comm_;                                                                    \
         (sreq_)->status.MPI_ERROR   = MPI_SUCCESS;                                                              \
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index 7862417..2a0cf8e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -365,10 +365,10 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* create a request */
-    *sreq_ptr = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    *sreq_ptr = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert(*sreq_ptr != NULL);
     MPIU_Object_set_ref(*sreq_ptr, 2);
-    (*sreq_ptr)->kind = MPIR_REQUEST_SEND;
+    (*sreq_ptr)->kind = MPIR_REQUEST_KIND__SEND;
     (*sreq_ptr)->dev.OnDataAvail = NULL;
     (*sreq_ptr)->dev.user_buf = NULL;
 
@@ -484,7 +484,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                         MPIR_ERR_POP(mpi_errno);
                 }
                 else {
-                    MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+                    MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
                     /* This request is actually complete; just needs to wait to enforce ordering */
                     TMPBUF(req) = MPL_malloc(packet_sz);
                     MPIU_Assert(TMPBUF(req));
@@ -501,7 +501,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                 char *buf_ptr;
                 ptl_size_t target_offset;
 
-                MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+                MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
                 MPIU_Assert(req != NULL);
                 MPIDI_CH3U_Request_decrement_cc(req, &incomplete);  /* We'll increment it below */
                 REQ_PTL(req)->event_handler = MPID_nem_ptl_nm_ctl_event_handler;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index 977d37c..006c5ba 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -127,7 +127,7 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     id_any.phys.pid = PTL_PID_ANY;
     
     /* create a request */
-    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
     REQ_PTL(req)->event_handler = handle_probe;
@@ -202,12 +202,12 @@ int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, i
     id_any.phys.pid = PTL_PID_ANY;
 
     /* create a request */
-    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPID_nem_ptl_init_req(req);
     MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
     REQ_PTL(req)->event_handler = handle_mprobe;
-    req->kind = MPIR_REQUEST_MPROBE;
+    req->kind = MPIR_REQUEST_KIND__MPROBE;
 
     /* create a dummy ME to use for searching the list */
     me.start = NULL;
@@ -323,11 +323,11 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
 
     /* create a dummy request and search for the message */
     /* create a request */
-    search_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    search_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPID_nem_ptl_init_req(search_req);
     MPIR_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(search_req, 2); /* 1 ref for progress engine and 1 ref for us */
-    search_req->kind = MPIR_REQUEST_MPROBE;
+    search_req->kind = MPIR_REQUEST_KIND__MPROBE;
 
     /* create a dummy ME to use for searching the list */
     me.start = NULL;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index 81667b0..b0f1c20 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -306,10 +306,10 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
 
     sreq->dev.OnDataAvail = 0;
     sreq->ch.vc = vc;
@@ -445,10 +445,10 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
 
     sreq->dev.OnDataAvail = 0;
     sreq->ch.vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index b380182..810f8a5 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -89,10 +89,10 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPIR_Reques
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "enqueuing");
 
 	/* create a request */
-	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+	sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	MPIU_Assert (sreq != NULL);
 	MPIU_Object_set_ref (sreq, 2);
-	sreq->kind = MPIR_REQUEST_SEND;
+	sreq->kind = MPIR_REQUEST_KIND__SEND;
 
 	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
 	sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index 0b249ce..ea5942b 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -117,10 +117,10 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	{
             /* Create a new request and save remaining portions of the
 	     * iov in it. */
-            sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+            sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	    MPIU_Assert(sreq != NULL);
 	    MPIU_Object_set_ref(sreq, 2);
-	    sreq->kind = MPIR_REQUEST_SEND;
+	    sreq->kind = MPIR_REQUEST_KIND__SEND;
 	    for (j = 0; j < remaining_n_iov; ++j)
 	    {
 		sreq->dev.iov[j] = remaining_iov[j];
@@ -148,10 +148,10 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "request enqueued");
 	/* create a request */
-	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+	sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
-	sreq->kind = MPIR_REQUEST_SEND;
+	sreq->kind = MPIR_REQUEST_KIND__SEND;
 
 	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
 	sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index da2e358..68acd83 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -96,10 +96,10 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int
     if (*sreq_ptr == NULL)
     {
 	/* create a request */
-	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+	sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
-	sreq->kind = MPIR_REQUEST_SEND;
+	sreq->kind = MPIR_REQUEST_KIND__SEND;
         sreq->dev.OnDataAvail = 0;
     }
 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index df28f2e..c28f4a6 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -18,13 +18,13 @@ static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
 
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
     /* --END ERROR HANDLING-- */
     MPIU_Object_set_ref(sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t));
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
     sreq->dev.iov[0].MPL_IOV_BUF = 
@@ -126,11 +126,11 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_write failed, rc=%d", rc);
-		sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+		sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 		if (!sreq) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
-		sreq->kind = MPIR_REQUEST_SEND;
+		sreq->kind = MPIR_REQUEST_KIND__SEND;
 		MPIR_cc_set(&(sreq->cc), 0);
 		sreq->status.MPI_ERROR = MPIR_Err_create_code( rc,
 			       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
@@ -194,11 +194,11 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+	sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	if (!sreq) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
-	sreq->kind = MPIR_REQUEST_SEND;
+	sreq->kind = MPIR_REQUEST_KIND__SEND;
 	MPIR_cc_set(&sreq->cc, 0);
 	
 	sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS,
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index b5c5d9b..1edc491 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -19,13 +19,13 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
     
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
     /* --END ERROR HANDLING-- */
     MPIU_Object_set_ref(sreq, 2);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     
     for (i = 0; i < iov_count; i++)
     {
@@ -158,11 +158,11 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_writev failed, rc=%d", rc);
-		sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+		sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 		if (sreq == NULL) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
-		sreq->kind = MPIR_REQUEST_SEND;
+		sreq->kind = MPIR_REQUEST_KIND__SEND;
         MPIR_cc_set(&(sreq->cc), 0);
 		sreq->status.MPI_ERROR = MPIR_Err_create_code( rc,
 			       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
@@ -226,11 +226,11 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+	sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
 	if (sreq == NULL) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
-	sreq->kind = MPIR_REQUEST_SEND;
+	sreq->kind = MPIR_REQUEST_KIND__SEND;
     MPIR_cc_set(&(sreq->cc), 0);
 	sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS,
 		       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index 132a273..e4c855c 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -314,11 +314,11 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
      * always need a request to be passed in. */
 
     /* create a new request */
-    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(req, 2);
-    req->kind = MPIR_REQUEST_SEND;
+    req->kind = MPIR_REQUEST_KIND__SEND;
 
     /* set extended packet header, it is freed when the request is freed.  */
     if (ext_hdr_sz > 0) {
@@ -676,7 +676,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -771,7 +771,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -899,7 +899,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
      * and pass a handle to it in the get packet. When the get
      * response comes from the target, it will contain the request
      * handle. */
-    curr_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    curr_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     if (curr_req == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1022,7 +1022,7 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the RMW response.  Store the origin buf, count, and
      * datatype in it, and pass the request's handle RMW packet. When the
      * response comes from the target, it will contain the request handle. */
-    curr_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    curr_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(curr_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     /* Set refs on the request to 2: one for the response message, and one for
@@ -1085,7 +1085,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the GACC response.  Store the response buf, count, and
      * datatype in it, and pass the request's handle in the GACC packet. When the
      * response comes from the target, it will contain the request handle. */
-    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(resp_req, 2);
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 73d9558..11f1c3e 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -287,9 +287,9 @@ extern MPIDI_Process_t MPIDI_Process;
 */
 #define MPIDI_Request_create_sreq(sreq_, mpi_errno_, FAIL_)	\
 {								\
-    (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);           \
+    (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);           \
     MPIU_Object_set_ref((sreq_), 2);				\
-    (sreq_)->kind = MPIR_REQUEST_SEND;				\
+    (sreq_)->kind = MPIR_REQUEST_KIND__SEND;				\
     (sreq_)->comm = comm;					\
     (sreq_)->dev.partner_request   = NULL;                         \
     MPIR_Comm_add_ref(comm);					\
@@ -306,9 +306,9 @@ extern MPIDI_Process_t MPIDI_Process;
 /* This is the receive request version of MPIDI_Request_create_sreq */
 #define MPIDI_Request_create_rreq(rreq_, mpi_errno_, FAIL_)	\
 {								\
-    (rreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);           \
+    (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);           \
     MPIU_Object_set_ref((rreq_), 2);				\
-    (rreq_)->kind = MPIR_REQUEST_RECV;				\
+    (rreq_)->kind = MPIR_REQUEST_KIND__RECV;				\
     (rreq_)->dev.partner_request   = NULL;                         \
 }
 
@@ -316,12 +316,12 @@ extern MPIDI_Process_t MPIDI_Process;
  * returning when a user passed MPI_PROC_NULL */
 #define MPIDI_Request_create_null_rreq(rreq_, mpi_errno_, FAIL_)           \
     do {                                                                   \
-        (rreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);               \
+        (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);               \
         if ((rreq_) != NULL) {                                             \
             MPIU_Object_set_ref((rreq_), 1);                               \
             /* MT FIXME should these be handled by MPIR_Request_create? */ \
             MPIR_cc_set(&(rreq_)->cc, 0);                                  \
-            (rreq_)->kind = MPIR_REQUEST_RECV;                             \
+            (rreq_)->kind = MPIR_REQUEST_KIND__RECV;                             \
             MPIR_Status_set_procnull(&(rreq_)->status);                    \
         }                                                                  \
         else {                                                             \
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index edfd22c..284f80e 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -483,7 +483,7 @@ MPIR_REQUEST_DECL
 #endif
 
 #ifdef MPIDI_CH3_REQUEST_KIND_DECL
-#define MPID_DEV_REQUEST_KIND_DECL MPIDI_CH3_REQUEST_KIND_DECL
+#define MPID_REQUEST_KIND_DECL MPIDI_CH3_REQUEST_KIND_DECL
 #endif
 
 #endif
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 213216b..9a35ee0 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -455,7 +455,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
         }
 
         /* create request to receive upcoming requests */
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 1);
 
         /* fill in area in req that will be used in Receive_data_found() */
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 211b155..c79082b 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -318,7 +318,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
     MPIDU_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);
 
-    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIU_Object_set_ref(resp_req, 1);
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP);
@@ -455,7 +455,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
 
     /* Create response request */
-    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_FOP_RESP);
     MPIU_Object_set_ref(resp_req, 1);
@@ -879,10 +879,10 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
     create_derived_datatype(rreq, dtype_info, &new_dtp);
 
     /* create request for sending data */
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(sreq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_GET_RESP);
     sreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GetSendComplete;
     sreq->dev.OnFinal = MPIDI_CH3_ReqHandler_GetSendComplete;
@@ -1198,14 +1198,14 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
     MPIU_Object_set_ref(sreq, 1);
 
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_GET_RESP);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GetSendComplete;
     sreq->dev.OnFinal = MPIDI_CH3_ReqHandler_GetSendComplete;
 
@@ -1374,14 +1374,14 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    sreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
     MPIU_Object_set_ref(sreq, 1);
 
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP);
-    sreq->kind = MPIR_REQUEST_SEND;
+    sreq->kind = MPIR_REQUEST_KIND__SEND;
     sreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumSendComplete;
     sreq->dev.OnFinal = MPIDI_CH3_ReqHandler_GaccumSendComplete;
 
@@ -1588,7 +1588,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr,
         fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     if (fop_pkt->type == MPIDI_CH3_PKT_FOP) {
-        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         if (resp_req == NULL) {
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
         }
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 3c41578..3923ffa 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -315,7 +315,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
         data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 1);
 
         req->dev.user_buf = put_pkt->addr;
@@ -464,7 +464,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         goto fn_exit;
     }
 
-    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     req->dev.target_win_handle = get_pkt->target_win_handle;
     req->dev.flags = get_pkt->flags;
 
@@ -491,7 +491,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_GET_RESP);
         req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GetSendComplete;
         req->dev.OnFinal = MPIDI_CH3_ReqHandler_GetSendComplete;
-        req->kind = MPIR_REQUEST_SEND;
+        req->kind = MPIR_REQUEST_KIND__SEND;
 
         if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) {
             MPIDI_Pkt_init(get_resp_pkt, MPIDI_CH3_PKT_GET_RESP_IMMED);
@@ -705,7 +705,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
     else {
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_ACCUMULATE);
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -905,14 +905,14 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         /* Immed packet type is used when target datatype is predefined datatype. */
         MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype));
 
-        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        resp_req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         resp_req->dev.target_win_handle = get_accum_pkt->target_win_handle;
         resp_req->dev.flags = get_accum_pkt->flags;
 
         MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP);
         resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumSendComplete;
         resp_req->dev.OnFinal = MPIDI_CH3_ReqHandler_GaccumSendComplete;
-        resp_req->kind = MPIR_REQUEST_SEND;
+        resp_req->kind = MPIR_REQUEST_KIND__SEND;
 
         /* here we increment the Active Target counter to guarantee the GET-like
          * operation are completed when counter reaches zero. */
@@ -978,7 +978,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_GET_ACCUM);
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -1436,7 +1436,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         if (fop_pkt->op == MPI_NO_OP)
             is_empty_origin = TRUE;
 
-        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+        req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_FOP_RECV);
         *rreqp = req;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index b6c55ff..920d66a 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -37,9 +37,9 @@ int MPID_Rput(const void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    ureq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
-    ureq->kind = MPIR_WIN_REQUEST;
+    ureq->kind = MPIR_REQUEST_KIND__RMA;
 
     /* This request is referenced by user and ch3 by default. */
     MPIU_Object_set_ref(ureq, 2);
@@ -100,9 +100,9 @@ int MPID_Rget(void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    ureq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
-    ureq->kind = MPIR_WIN_REQUEST;
+    ureq->kind = MPIR_REQUEST_KIND__RMA;
 
     /* This request is referenced by user and ch3 by default. */
     MPIU_Object_set_ref(ureq, 2);
@@ -161,9 +161,9 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    ureq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
-    ureq->kind = MPIR_WIN_REQUEST;
+    ureq->kind = MPIR_REQUEST_KIND__RMA;
 
     /* This request is referenced by user and ch3 by default. */
     MPIU_Object_set_ref(ureq, 2);
@@ -225,9 +225,9 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    ureq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
-    ureq->kind = MPIR_WIN_REQUEST;
+    ureq->kind = MPIR_REQUEST_KIND__RMA;
 
     /* This request is referenced by user and ch3 by default. */
     MPIU_Object_set_ref(ureq, 2);
diff --git a/src/mpid/ch3/src/mpid_cancel_recv.c b/src/mpid/ch3/src/mpid_cancel_recv.c
index 3c8a025..69da3a1 100644
--- a/src/mpid/ch3/src/mpid_cancel_recv.c
+++ b/src/mpid/ch3/src/mpid_cancel_recv.c
@@ -19,7 +19,7 @@ int MPID_Cancel_recv(MPIR_Request * rreq)
     
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_CANCEL_RECV);
     
-    MPIU_Assert(rreq->kind == MPIR_REQUEST_RECV);
+    MPIU_Assert(rreq->kind == MPIR_REQUEST_KIND__RECV);
     
     /* If the netmod has its own cancel_recv function, we need to call
        it here. ANYSOURCE cancels (netmod and otherwise) are handled by
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 3df04ce..2e6d7ff 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -24,7 +24,7 @@ int MPID_Cancel_send(MPIR_Request * sreq)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_CANCEL_SEND);
     
-    MPIU_Assert(sreq->kind == MPIR_REQUEST_SEND);
+    MPIU_Assert(sreq->kind == MPIR_REQUEST_KIND__SEND);
 
     MPIDI_Request_cancel_pending(sreq, &flag);
     if (flag)
diff --git a/src/mpid/ch3/src/mpid_comm_failure_ack.c b/src/mpid/ch3/src/mpid_comm_failure_ack.c
index d05c7f0..037611e 100644
--- a/src/mpid/ch3/src/mpid_comm_failure_ack.c
+++ b/src/mpid/ch3/src/mpid_comm_failure_ack.c
@@ -89,7 +89,7 @@ int MPID_Comm_AS_enabled(MPIR_Comm *comm_ptr) {
 int MPID_Request_is_anysource(MPIR_Request *request_ptr) {
     int ret = 0;
 
-    if (request_ptr->kind == MPIR_REQUEST_RECV)
+    if (request_ptr->kind == MPIR_REQUEST_KIND__RECV)
         ret = request_ptr->dev.match.parts.rank == MPI_ANY_SOURCE;
 
     return ret;
diff --git a/src/mpid/ch3/src/mpid_improbe.c b/src/mpid/ch3/src/mpid_improbe.c
index ed7fbbe..28d29a1 100644
--- a/src/mpid/ch3/src/mpid_improbe.c
+++ b/src/mpid/ch3/src/mpid_improbe.c
@@ -99,7 +99,7 @@ int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset,
     }
 
     if (*flag && *message) {
-        (*message)->kind = MPIR_REQUEST_MPROBE;
+        (*message)->kind = MPIR_REQUEST_KIND__MPROBE;
         MPIR_Request_extract_status((*message), status);
     }
 
diff --git a/src/mpid/ch3/src/mpid_imrecv.c b/src/mpid/ch3/src/mpid_imrecv.c
index 4dde4eb..23be8f2 100644
--- a/src/mpid/ch3/src/mpid_imrecv.c
+++ b/src/mpid/ch3/src/mpid_imrecv.c
@@ -28,10 +28,10 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
     }
 
     MPIU_Assert(message != NULL);
-    MPIU_Assert(message->kind == MPIR_REQUEST_MPROBE);
+    MPIU_Assert(message->kind == MPIR_REQUEST_KIND__MPROBE);
 
     /* promote the request object to be a "real" recv request */
-    message->kind = MPIR_REQUEST_RECV;
+    message->kind = MPIR_REQUEST_KIND__RECV;
 
     *rreqp = rreq = message;
 
diff --git a/src/mpid/ch3/src/mpid_mprobe.c b/src/mpid/ch3/src/mpid_mprobe.c
index 163495a..f68b9b7 100644
--- a/src/mpid/ch3/src/mpid_mprobe.c
+++ b/src/mpid/ch3/src/mpid_mprobe.c
@@ -106,7 +106,7 @@ int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset,
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
     if (*message) {
-        (*message)->kind = MPIR_REQUEST_MPROBE;
+        (*message)->kind = MPIR_REQUEST_KIND__MPROBE;
         MPIR_Request_extract_status((*message), status);
     }
 
diff --git a/src/mpid/ch3/src/mpid_startall.c b/src/mpid/ch3/src/mpid_startall.c
index e4aea41..e45d66c 100644
--- a/src/mpid/ch3/src/mpid_startall.c
+++ b/src/mpid/ch3/src/mpid_startall.c
@@ -22,7 +22,7 @@
 /* This macro initializes all of the fields in a persistent request */
 #define MPIDI_Request_create_psreq(sreq_, mpi_errno_, FAIL_)		\
 {									\
-    (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);                  \
+    (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);                  \
     if ((sreq_) == NULL)						\
     {									\
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"send request allocation failed");\
@@ -32,7 +32,7 @@
 									\
     MPIU_Object_set_ref((sreq_), 1);					\
     MPIR_cc_set(&(sreq_)->cc, 0);                                       \
-    (sreq_)->kind = MPIR_PREQUEST_SEND;					\
+    (sreq_)->kind = MPIR_REQUEST_KIND__PREQUEST_SEND;					\
     (sreq_)->comm = comm;						\
     MPIR_Comm_add_ref(comm);						\
     (sreq_)->dev.match.parts.rank = rank;				\
@@ -299,7 +299,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_RECV_INIT);
     
-    rreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
+    rreq = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
     if (rreq == NULL)
     {
 	/* --BEGIN ERROR HANDLING-- */
@@ -309,7 +309,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
     }
     
     MPIU_Object_set_ref(rreq, 1);
-    rreq->kind = MPIR_PREQUEST_RECV;
+    rreq->kind = MPIR_REQUEST_KIND__PREQUEST_RECV;
     rreq->comm = comm;
     MPIR_cc_set(&rreq->cc, 0);
     MPIR_Comm_add_ref(comm);
diff --git a/src/mpid/common/hcoll/hcoll_rte.c b/src/mpid/common/hcoll/hcoll_rte.c
index acd3076..235e076 100644
--- a/src/mpid/common/hcoll/hcoll_rte.c
+++ b/src/mpid/common/hcoll/hcoll_rte.c
@@ -386,7 +386,7 @@ static int group_id(rte_grp_handle_t group)
 static void *get_coll_handle(void)
 {
     MPIR_Request *req;
-    req = MPIR_Request_create(MPIR_COLL_REQUEST);
+    req = MPIR_Request_create(MPIR_REQUEST_KIND__COLL);
     return (void *) req;
 }
 
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 0a7f396..41872d8 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -407,7 +407,7 @@ int MPIDU_Sched_start(MPID_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request
     MPIU_Assert(s->entries != NULL);
 
     /* now create and populate the request */
-    r = MPIR_Request_create(MPIR_COLL_REQUEST);
+    r = MPIR_Request_create(MPIR_REQUEST_KIND__COLL);
     if (!r)
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem");
     /* FIXME is this right when comm/datatype GC is used? */
diff --git a/src/mpid/pamid/src/coll/allgather/mpido_iallgather.c b/src/mpid/pamid/src/coll/allgather/mpido_iallgather.c
index 34b8bbd..1f3f3ab 100644
--- a/src/mpid/pamid/src/coll/allgather/mpido_iallgather.c
+++ b/src/mpid/pamid/src/coll/allgather/mpido_iallgather.c
@@ -62,7 +62,7 @@ MPIDO_Iallgather(const void *sendbuf,
        * perform an additional iallgather.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/allgatherv/mpido_iallgatherv.c b/src/mpid/pamid/src/coll/allgatherv/mpido_iallgatherv.c
index 1b9efb0..b7570cd 100644
--- a/src/mpid/pamid/src/coll/allgatherv/mpido_iallgatherv.c
+++ b/src/mpid/pamid/src/coll/allgatherv/mpido_iallgatherv.c
@@ -66,7 +66,7 @@ MPIDO_Iallgatherv(const void *sendbuf,
        * perform an additional iallgather.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/allreduce/mpido_iallreduce.c b/src/mpid/pamid/src/coll/allreduce/mpido_iallreduce.c
index 3f0c219..d504b80 100644
--- a/src/mpid/pamid/src/coll/allreduce/mpido_iallreduce.c
+++ b/src/mpid/pamid/src/coll/allreduce/mpido_iallreduce.c
@@ -62,7 +62,7 @@ int MPIDO_Iallreduce(const void *sendbuf,
        * perform an additional iallreduce.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/alltoall/mpido_ialltoall.c b/src/mpid/pamid/src/coll/alltoall/mpido_ialltoall.c
index 90f014b..7ecfb2c 100644
--- a/src/mpid/pamid/src/coll/alltoall/mpido_ialltoall.c
+++ b/src/mpid/pamid/src/coll/alltoall/mpido_ialltoall.c
@@ -64,7 +64,7 @@ int MPIDO_Ialltoall(const void *sendbuf,
        * perform an additional ialltoall.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/alltoallv/mpido_ialltoallv.c b/src/mpid/pamid/src/coll/alltoallv/mpido_ialltoallv.c
index 5c88f07..a296664 100644
--- a/src/mpid/pamid/src/coll/alltoallv/mpido_ialltoallv.c
+++ b/src/mpid/pamid/src/coll/alltoallv/mpido_ialltoallv.c
@@ -66,7 +66,7 @@ int MPIDO_Ialltoallv(const void *sendbuf,
        * perform an additional ialltoallv.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/alltoallw/mpido_ialltoallw.c b/src/mpid/pamid/src/coll/alltoallw/mpido_ialltoallw.c
index 0f82a4f..2569bfa 100644
--- a/src/mpid/pamid/src/coll/alltoallw/mpido_ialltoallw.c
+++ b/src/mpid/pamid/src/coll/alltoallw/mpido_ialltoallw.c
@@ -66,7 +66,7 @@ int MPIDO_Ialltoallw(const void *sendbuf,
        * perform an additional ialltoallw.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/barrier/mpido_ibarrier.c b/src/mpid/pamid/src/coll/barrier/mpido_ibarrier.c
index fc48a0b..eb093fa 100644
--- a/src/mpid/pamid/src/coll/barrier/mpido_ibarrier.c
+++ b/src/mpid/pamid/src/coll/barrier/mpido_ibarrier.c
@@ -54,7 +54,7 @@ int MPIDO_Ibarrier(MPIR_Comm *comm_ptr, MPIR_Request **request)
       int rc = MPIR_Barrier(comm_ptr, &mpierrno);
 
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/bcast/mpido_ibcast.c b/src/mpid/pamid/src/coll/bcast/mpido_ibcast.c
index 630e379..85134dd 100644
--- a/src/mpid/pamid/src/coll/bcast/mpido_ibcast.c
+++ b/src/mpid/pamid/src/coll/bcast/mpido_ibcast.c
@@ -56,7 +56,7 @@ int MPIDO_Ibcast(void *buffer,
        * object so the MPIR_Ibcast_impl() function does not perform the bcast.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/exscan/mpido_iexscan.c b/src/mpid/pamid/src/coll/exscan/mpido_iexscan.c
index 4d2b90f..2da2b08 100644
--- a/src/mpid/pamid/src/coll/exscan/mpido_iexscan.c
+++ b/src/mpid/pamid/src/coll/exscan/mpido_iexscan.c
@@ -54,7 +54,7 @@ int MPIDO_Iexscan(const void *sendbuf, void *recvbuf,
        * perform an additional iexscan.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/gather/mpido_igather.c b/src/mpid/pamid/src/coll/gather/mpido_igather.c
index 1ce2b4f..f55eea4 100644
--- a/src/mpid/pamid/src/coll/gather/mpido_igather.c
+++ b/src/mpid/pamid/src/coll/gather/mpido_igather.c
@@ -61,7 +61,7 @@ int MPIDO_Igather(const void *sendbuf,
        * perform an additional igather.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/gatherv/mpido_igatherv.c b/src/mpid/pamid/src/coll/gatherv/mpido_igatherv.c
index b6be41b..3a315d6 100644
--- a/src/mpid/pamid/src/coll/gatherv/mpido_igatherv.c
+++ b/src/mpid/pamid/src/coll/gatherv/mpido_igatherv.c
@@ -66,7 +66,7 @@ int MPIDO_Igatherv(const void *sendbuf,
        * perform an additional igatherv.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/ired_scat/mpido_ired_scat.c b/src/mpid/pamid/src/coll/ired_scat/mpido_ired_scat.c
index 3e841bc..80d54d8 100644
--- a/src/mpid/pamid/src/coll/ired_scat/mpido_ired_scat.c
+++ b/src/mpid/pamid/src/coll/ired_scat/mpido_ired_scat.c
@@ -61,7 +61,7 @@ int MPIDO_Ireduce_scatter(const void *sendbuf,
        * does not perform an additional ireduce_scatter.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/ired_scat_block/mpido_ired_scat_block.c b/src/mpid/pamid/src/coll/ired_scat_block/mpido_ired_scat_block.c
index 8027664..1a9f738 100644
--- a/src/mpid/pamid/src/coll/ired_scat_block/mpido_ired_scat_block.c
+++ b/src/mpid/pamid/src/coll/ired_scat_block/mpido_ired_scat_block.c
@@ -61,7 +61,7 @@ int MPIDO_Ireduce_scatter_block(const void *sendbuf,
        * does not perform an additional ireduce_scatter_block.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/reduce/mpido_ireduce.c b/src/mpid/pamid/src/coll/reduce/mpido_ireduce.c
index a610b77..e7f7c57 100644
--- a/src/mpid/pamid/src/coll/reduce/mpido_ireduce.c
+++ b/src/mpid/pamid/src/coll/reduce/mpido_ireduce.c
@@ -61,7 +61,7 @@ int MPIDO_Ireduce(const void *sendbuf,
        * does not perform an additional ireduce.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/scan/mpido_scan.c b/src/mpid/pamid/src/coll/scan/mpido_scan.c
index efb17eb..ee4c8d2 100644
--- a/src/mpid/pamid/src/coll/scan/mpido_scan.c
+++ b/src/mpid/pamid/src/coll/scan/mpido_scan.c
@@ -74,7 +74,7 @@ int MPIDO_Iscan(const void *sendbuf, void *recvbuf,
        * does not perform an additional iscan.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/scatter/mpido_iscatter.c b/src/mpid/pamid/src/coll/scatter/mpido_iscatter.c
index 98f12f9..9d11d91 100644
--- a/src/mpid/pamid/src/coll/scatter/mpido_iscatter.c
+++ b/src/mpid/pamid/src/coll/scatter/mpido_iscatter.c
@@ -63,7 +63,7 @@ int MPIDO_Iscatter(const void *sendbuf,
        * does not perform an additional iscatter.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/coll/scatterv/mpido_iscatterv.c b/src/mpid/pamid/src/coll/scatterv/mpido_iscatterv.c
index 203b68b..11d9173 100644
--- a/src/mpid/pamid/src/coll/scatterv/mpido_iscatterv.c
+++ b/src/mpid/pamid/src/coll/scatterv/mpido_iscatterv.c
@@ -62,7 +62,7 @@ int MPIDO_Iscatterv(const void *sendbuf,
        * does not perform an additional iscatterv.
        */
       MPIR_Request * mpid_request = MPID_Request_create_inline();
-      mpid_request->kind = MPIR_COLL_REQUEST;
+      mpid_request->kind = MPIR_REQUEST_KIND__COLL;
       *request = mpid_request;
       MPIDI_Request_complete_norelease_inline(mpid_request);
 
diff --git a/src/mpid/pamid/src/mpid_improbe.c b/src/mpid/pamid/src/mpid_improbe.c
index eba7b17..97e8d7a 100644
--- a/src/mpid/pamid/src/mpid_improbe.c
+++ b/src/mpid/pamid/src/mpid_improbe.c
@@ -38,7 +38,7 @@ int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset,
       MPID_Progress_poke();
     }
     else {
-      rreq->kind = MPIR_REQUEST_MPROBE;
+      rreq->kind = MPIR_REQUEST_KIND__MPROBE;
       MPIR_Request_extract_status(rreq, status);
     }
 
diff --git a/src/mpid/pamid/src/mpid_imrecv.c b/src/mpid/pamid/src/mpid_imrecv.c
index a7f9242..426707e 100644
--- a/src/mpid/pamid/src/mpid_imrecv.c
+++ b/src/mpid/pamid/src/mpid_imrecv.c
@@ -20,7 +20,7 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
     {
       rreq = MPIDI_Request_create2();
       MPIR_Status_set_procnull(&rreq->status);
-      rreq->kind = MPIR_REQUEST_RECV;
+      rreq->kind = MPIR_REQUEST_KIND__RECV;
       MPIDI_Request_complete(rreq);
       *rreqp = rreq;
       return MPI_SUCCESS;
@@ -28,10 +28,10 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
     }
 
   MPIU_Assert(message != NULL);
-  MPIU_Assert(message->kind == MPIR_REQUEST_MPROBE);
+  MPIU_Assert(message->kind == MPIR_REQUEST_KIND__MPROBE);
 
   /* promote the request object to be a "real" recv request */
-  message->kind = MPIR_REQUEST_RECV;
+  message->kind = MPIR_REQUEST_KIND__RECV;
 
   *rreqp = rreq = message;
 
diff --git a/src/mpid/pamid/src/mpid_mprobe.c b/src/mpid/pamid/src/mpid_mprobe.c
index 740c6f9..29a27b5 100644
--- a/src/mpid/pamid/src/mpid_mprobe.c
+++ b/src/mpid/pamid/src/mpid_mprobe.c
@@ -32,7 +32,7 @@ int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset,
 #endif
 
     if (rreq) {
-       rreq->kind = MPIR_REQUEST_MPROBE;
+       rreq->kind = MPIR_REQUEST_KIND__MPROBE;
        MPIR_Request_extract_status(rreq, status);
     }
      *message = rreq;
diff --git a/src/mpid/pamid/src/mpid_recvq.c b/src/mpid/pamid/src/mpid_recvq.c
index e478cbb..f0e00cb 100644
--- a/src/mpid/pamid/src/mpid_recvq.c
+++ b/src/mpid/pamid/src/mpid_recvq.c
@@ -742,7 +742,7 @@ MPIDI_Recvq_AEU(MPIR_Request *newreq, int source, pami_task_t pami_source, int t
      queue */
   MPIR_Request *rreq;
   rreq = newreq;
-  rreq->kind = MPIR_REQUEST_RECV;
+  rreq->kind = MPIR_REQUEST_KIND__RECV;
   TRACE_MEMSET_R(pami_source,msg_seqno,recv_status);
   TRACE_SET_REQ_VAL(rreq->mpid.envelope.msginfo.MPIseqno,-1);
   TRACE_SET_REQ_VAL(rreq->mpid.envelope.length,-1);
diff --git a/src/mpid/pamid/src/mpid_recvq.h b/src/mpid/pamid/src/mpid_recvq.h
index 5d1864d..12b8733 100644
--- a/src/mpid/pamid/src/mpid_recvq.h
+++ b/src/mpid/pamid/src/mpid_recvq.h
@@ -209,7 +209,7 @@ MPIDI_Recvq_FDU_or_AEP(MPIR_Request *newreq, int source, pami_task_t pami_source
   TRACE_SET_REQ_VAL(rreq->mpid.envelope.msginfo.MPIseqno,-1);
   TRACE_SET_REQ_VAL(rreq->mpid.envelope.length,-1);
   TRACE_SET_REQ_VAL(rreq->mpid.envelope.data,(void *) 0);
-  rreq->kind = MPIR_REQUEST_RECV;
+  rreq->kind = MPIR_REQUEST_KIND__RECV;
   MPIDI_Request_setMatch(rreq, tag, source, context_id);
 #ifdef QUEUE_BINARY_SEARCH_SUPPORT
   if(MPIDI_Process.queue_binary_search_support_on)
diff --git a/src/mpid/pamid/src/onesided/mpid_win_reqops.c b/src/mpid/pamid/src/onesided/mpid_win_reqops.c
index 0807f53..36518d1 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_reqops.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_reqops.c
@@ -60,7 +60,7 @@ MPID_Rput(const void  *origin_addr,
   
     MPIR_Request *rreq = MPIDI_Request_create1();
     *request = rreq;
-    rreq->kind = MPIR_WIN_REQUEST;
+    rreq->kind = MPIR_REQUEST_KIND__RMA;
     win->mpid.rreq = rreq;
     win->mpid.request_based = 1;
 
@@ -111,7 +111,7 @@ MPID_Rget(void         *origin_addr,
     }
 
     MPIR_Request *rreq = MPIDI_Request_create1();
-    rreq->kind = MPIR_WIN_REQUEST;
+    rreq->kind = MPIR_REQUEST_KIND__RMA;
     *request = rreq;
     win->mpid.rreq = rreq;
     win->mpid.request_based = 1;
@@ -170,7 +170,7 @@ MPID_Raccumulate(const void  *origin_addr,
     }
 
     MPIR_Request *rreq = MPIDI_Request_create1();
-    rreq->kind = MPIR_WIN_REQUEST;
+    rreq->kind = MPIR_REQUEST_KIND__RMA;
     *request = rreq;
     win->mpid.rreq = rreq;
     win->mpid.request_based = 1;
@@ -235,7 +235,7 @@ MPID_Rget_accumulate(const void         *origin_addr,
     }
 
     MPIR_Request *rreq = MPIDI_Request_create1();
-    rreq->kind = MPIR_WIN_REQUEST;
+    rreq->kind = MPIR_REQUEST_KIND__RMA;
     *request = rreq;
     win->mpid.rreq = rreq;
     win->mpid.request_based = 1;
diff --git a/src/mpid/pamid/src/pt2pt/mpid_cancel.c b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
index 987d73e..d40443e 100644
--- a/src/mpid/pamid/src/pt2pt/mpid_cancel.c
+++ b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
@@ -25,7 +25,7 @@
 int
 MPID_Cancel_recv(MPIR_Request * rreq)
 {
-  MPID_assert(rreq->kind == MPIR_REQUEST_RECV);
+  MPID_assert(rreq->kind == MPIR_REQUEST_KIND__RECV);
   if (MPIDI_Recvq_FDPR(rreq))
     {
       MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
diff --git a/src/mpid/pamid/src/pt2pt/mpid_isend.h b/src/mpid/pamid/src/pt2pt/mpid_isend.h
index 368c402..c2aa646 100644
--- a/src/mpid/pamid/src/pt2pt/mpid_isend.h
+++ b/src/mpid/pamid/src/pt2pt/mpid_isend.h
@@ -113,7 +113,7 @@ MPID_Isend_inline(const void    * buf,
   unsigned ncontexts = MPIDI_Process.avail_contexts;
   /* communicator & destination info */
   sreq->comm = comm;
-  sreq->kind = MPIR_REQUEST_SEND;
+  sreq->kind = MPIR_REQUEST_KIND__SEND;
   MPIR_Comm_add_ref(comm);
 
   pami_context_t context = MPIDI_Context[MPIDI_Context_hash(rank, context_id, 0, ncontexts)];
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
index 2765072..16092e6 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
@@ -152,7 +152,7 @@ MPIDI_RecvMsg_procnull(MPIR_Comm     * comm,
       MPIR_Request * rreq;
       rreq = MPIDI_Request_create2();
       MPIR_Status_set_procnull(&rreq->status);
-      rreq->kind = MPIR_REQUEST_RECV;
+      rreq->kind = MPIR_REQUEST_KIND__RECV;
       rreq->comm = comm;
       MPIR_Comm_add_ref(comm);
       MPIDI_Request_complete(rreq);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_send.h b/src/mpid/pamid/src/pt2pt/mpidi_send.h
index 911c872..b061771 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_send.h
+++ b/src/mpid/pamid/src/pt2pt/mpidi_send.h
@@ -106,7 +106,7 @@ MPIDI_Send(const void    * buf,
   MPIDI_Request_setPeerRank_comm(sreq, rank);
 
   /* message type info */
-  sreq->kind = MPIR_REQUEST_SEND;
+  sreq->kind = MPIR_REQUEST_KIND__SEND;
   /* ----------------------------------------- */
   /*      start the message                    */
   /* ----------------------------------------- */
diff --git a/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c b/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
index 50e0249..63ebbeb 100644
--- a/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
+++ b/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
@@ -35,7 +35,7 @@ int MPID_Recv_init(void * buf,
 {
   MPIR_Request * rreq = *request = MPIDI_Request_create2();
 
-  rreq->kind = MPIR_PREQUEST_RECV;
+  rreq->kind = MPIR_REQUEST_KIND__PREQUEST_RECV;
   rreq->comm = comm;
   MPIR_Comm_add_ref(comm);
   MPIDI_Request_setMatch(rreq, tag, rank, comm->recvcontext_id+context_offset);
diff --git a/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c b/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
index 08427cf..35080e5 100644
--- a/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
+++ b/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
@@ -41,7 +41,7 @@ MPID_PSendRequest(const void    * buf,
 {
   MPIR_Request* sreq = *request = MPIDI_Request_create2();
 
-  sreq->kind              = MPIR_PREQUEST_SEND;
+  sreq->kind              = MPIR_REQUEST_KIND__PREQUEST_SEND;
   sreq->comm              = comm;
   MPIR_Comm_add_ref(comm);
   MPIDI_Request_setMatch(sreq, tag, rank, comm->context_id+context_offset);

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

commit ceb3cb52fc212972111f61a8088057126de188da
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Apr 19 10:12:48 2016 -0500

    Enable dbg_next only in debug mode.
    
    When no debugger is attached, this field is unnecessary.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 9b26724..da3dd94 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1608,9 +1608,11 @@ typedef struct MPIR_Request {
         struct {
             MPIR_Errflag_t errflag;
         } nbc;  /* kind : MPIR_COLL_REQUEST */
+#if defined HAVE_DEBUGGER_SUPPORT
         struct {
             struct MPIR_Sendq *dbg_next;
         } send; /* kind : MPID_REQUEST_SEND */
+#endif  /* HAVE_DEBUGGER_SUPPORT */
         struct {
             /* Persistent requests have their own "real" requests */
             struct MPIR_Request *real_request;
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index aae5730..1838087 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -351,6 +351,7 @@ static MPIR_Sendq *pool = 0;
 void MPIR_Sendq_remember( MPIR_Request *req,
 			  int rank, int tag, int context_id )
 {
+#if defined HAVE_DEBUGGER_SUPPORT
     MPIR_Sendq *p;
 
     MPID_THREAD_CS_ENTER(POBJ, req->pobj_mutex);
@@ -377,10 +378,12 @@ void MPIR_Sendq_remember( MPIR_Request *req,
     req->u.send.dbg_next = p;
 fn_exit:
     MPID_THREAD_CS_EXIT(POBJ, req->pobj_mutex);
+#endif  /* HAVE_DEBUGGER_SUPPORT */
 }
 
 void MPIR_Sendq_forget( MPIR_Request *req )
 {
+#if defined HAVE_DEBUGGER_SUPPORT
     MPIR_Sendq *p, *prev;
 
     MPID_THREAD_CS_ENTER(POBJ, req->pobj_mutex);
@@ -398,6 +401,7 @@ void MPIR_Sendq_forget( MPIR_Request *req )
     p->next = pool;
     pool    = p;
     MPID_THREAD_CS_EXIT(POBJ, req->pobj_mutex);
+#endif  /* HAVE_DEBUGGER_SUPPORT */
 }
 
 static int SendqFreePool( void *d )

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

commit dd20be4e8d3b41fdbd666f0139f1b1f98261eaf1
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Mar 1 16:08:37 2016 +0900

    Restructure MPIR_Request to have kind-specific fields.
    
    Depending on the kind of request, some fields are irrelevant.  Simply
    including all fields into the request structure bloats up the size of
    the request.  This patch moves the fields into kind-specific
    structures out of which a union is created.  This seems to reduce the
    size of the request by around 16 bytes.
    
    For persistent requests, we separate out the "partner request" into
    "real request" and "partner request".  The latter is only used within
    the device and need not be exposed to the upper layers.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 0d0cb18..d6af3c1 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -199,7 +199,7 @@ cvars:
 
 #define MPIR_ERRTEST_PERSISTENT_ACTIVE(reqp,err)                        \
     if (((reqp)->kind == MPIR_PREQUEST_SEND ||                          \
-         reqp->kind == MPIR_PREQUEST_RECV) && reqp->partner_request != NULL) { \
+         reqp->kind == MPIR_PREQUEST_RECV) && reqp->u.persist.real_request != NULL) { \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_REQUEST, "**requestpersistactive", 0 ); \
         goto fn_fail;                                                   \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 651b79f..9b26724 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1600,18 +1600,22 @@ typedef struct MPIR_Request {
     MPIR_Comm *comm;
     /* Status is needed for wait/test/recv */
     MPI_Status status;
-    /* Persistent requests have their own "real" requests.  Receive requests
-       have partnering send requests when src=dest. etc. */
-    struct MPIR_Request *partner_request;
 
-    /* User-defined request support via a "vtable".  Saves space in the already
-     * bloated request for regular pt2pt and NBC requests. */
-    struct MPIR_Grequest_fns *greq_fns;
-
-    struct MPIR_Sendq *dbg_next;
-
-    /* Errflag for NBC requests. Not used by other requests. */
-    MPIR_Errflag_t errflag;
+    union {
+        struct {
+            struct MPIR_Grequest_fns *greq_fns;
+        } ureq; /* kind : MPIR_UREQUEST */
+        struct {
+            MPIR_Errflag_t errflag;
+        } nbc;  /* kind : MPIR_COLL_REQUEST */
+        struct {
+            struct MPIR_Sendq *dbg_next;
+        } send; /* kind : MPID_REQUEST_SEND */
+        struct {
+            /* Persistent requests have their own "real" requests */
+            struct MPIR_Request *real_request;
+        } persist;  /* kind : MPID_PREQUEST_SEND or MPID_PREQUEST_RECV */
+    } u;
 
     /* Notes about request_completed_cb:
      *
@@ -1719,10 +1723,16 @@ static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind)
         MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
 
 	req->comm		   = NULL;
-        req->greq_fns              = NULL;
-        req->errflag               = MPIR_ERR_NONE;
         req->request_completed_cb  = NULL;
 
+        switch(kind) {
+        case MPIR_COLL_REQUEST:
+            req->u.nbc.errflag = MPIR_ERR_NONE;
+            break;
+        default:
+            break;
+        }
+
         MPID_Request_init(req);
     }
     else
@@ -1776,8 +1786,8 @@ static inline void MPIR_Request_free(MPIR_Request *req)
             MPIR_Comm_release(req->comm);
         }
 
-        if (req->greq_fns != NULL) {
-            MPL_free(req->greq_fns);
+        if (req->kind == MPIR_UREQUEST && req->u.ureq.greq_fns != NULL) {
+            MPL_free(req->u.ureq.greq_fns);
         }
 
         MPID_Request_finalize(req);
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 74cdca1..aae5730 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -362,7 +362,7 @@ void MPIR_Sendq_remember( MPIR_Request *req,
 	p = (MPIR_Sendq *)MPL_malloc( sizeof(MPIR_Sendq) );
 	if (!p) {
 	    /* Just ignore it */
-            req->dbg_next = NULL;
+            req->u.send.dbg_next = NULL;
             goto fn_exit;
 	}
     }
@@ -374,7 +374,7 @@ void MPIR_Sendq_remember( MPIR_Request *req,
     p->prev       = NULL;
     MPIR_Sendq_head = p;
     if (p->next) p->next->prev = p;
-    req->dbg_next = p;
+    req->u.send.dbg_next = p;
 fn_exit:
     MPID_THREAD_CS_EXIT(POBJ, req->pobj_mutex);
 }
@@ -384,7 +384,7 @@ void MPIR_Sendq_forget( MPIR_Request *req )
     MPIR_Sendq *p, *prev;
 
     MPID_THREAD_CS_ENTER(POBJ, req->pobj_mutex);
-    p    = req->dbg_next;
+    p    = req->u.send.dbg_next;
     if (!p) {
         /* Just ignore it */
         MPID_THREAD_CS_EXIT(POBJ, req->pobj_mutex);
diff --git a/src/mpi/pt2pt/cancel.c b/src/mpi/pt2pt/cancel.c
index 929c1a7..2c1df30 100644
--- a/src/mpi/pt2pt/cancel.c
+++ b/src/mpi/pt2pt/cancel.c
@@ -52,8 +52,8 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
 
 	case MPIR_PREQUEST_SEND:
 	{
-	    if (request_ptr->partner_request != NULL) {
-		if (request_ptr->partner_request->kind != MPIR_UREQUEST) {
+	    if (request_ptr->u.persist.real_request != NULL) {
+		if (request_ptr->u.persist.real_request->kind != MPIR_UREQUEST) {
                     /* jratt at us.ibm.com: I don't know about the bsend
                      * comment below, but the CC stuff on the next
                      * line is *really* needed for persistent Bsend
@@ -68,16 +68,16 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
                      * causing an MPI_Wait on the parent to block
                      * until the child is canceled or completed.
                      */
-		    request_ptr->cc_ptr = request_ptr->partner_request->cc_ptr;
-		    mpi_errno = MPID_Cancel_send(request_ptr->partner_request);
+		    request_ptr->cc_ptr = request_ptr->u.persist.real_request->cc_ptr;
+		    mpi_errno = MPID_Cancel_send(request_ptr->u.persist.real_request);
                     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 		} else {
 		    /* This is needed for persistent Bsend requests */
                     /* FIXME why do we directly access the partner request's
                      * cc field?  shouldn't our cc_ptr be set to the address
                      * of the partner req's cc field? */
-                    mpi_errno = MPIR_Grequest_cancel(request_ptr->partner_request,
-                                                     MPIR_cc_is_complete(&request_ptr->partner_request->cc));
+                    mpi_errno = MPIR_Grequest_cancel(request_ptr->u.persist.real_request,
+                                                     MPIR_cc_is_complete(&request_ptr->u.persist.real_request->cc));
                     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 		}
 	    } else {
@@ -88,8 +88,8 @@ int MPIR_Cancel_impl(MPIR_Request *request_ptr)
 
 	case MPIR_PREQUEST_RECV:
 	{
-	    if (request_ptr->partner_request != NULL) {
-		mpi_errno = MPID_Cancel_recv(request_ptr->partner_request);
+	    if (request_ptr->u.persist.real_request != NULL) {
+		mpi_errno = MPID_Cancel_recv(request_ptr->u.persist.real_request);
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	    } else {
 		MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_REQUEST,"**requestpersistactive");
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 0c39b6e..7a0db3e 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -91,15 +91,14 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
     (*request_ptr)->cc_ptr               = &(*request_ptr)->cc;
     MPIR_cc_set((*request_ptr)->cc_ptr, 1);
     (*request_ptr)->comm                 = NULL;
-    (*request_ptr)->greq_fns             = NULL;
-    MPIU_CHKPMEM_MALLOC((*request_ptr)->greq_fns, struct MPIR_Grequest_fns *, sizeof(struct MPIR_Grequest_fns), mpi_errno, "greq_fns");
-    (*request_ptr)->greq_fns->cancel_fn            = cancel_fn;
-    (*request_ptr)->greq_fns->free_fn              = free_fn;
-    (*request_ptr)->greq_fns->query_fn             = query_fn;
-    (*request_ptr)->greq_fns->poll_fn              = NULL;
-    (*request_ptr)->greq_fns->wait_fn              = NULL;
-    (*request_ptr)->greq_fns->grequest_extra_state = extra_state;
-    (*request_ptr)->greq_fns->greq_lang            = MPIR_LANG_C;
+    MPIU_CHKPMEM_MALLOC((*request_ptr)->u.ureq.greq_fns, struct MPIR_Grequest_fns *, sizeof(struct MPIR_Grequest_fns), mpi_errno, "greq_fns");
+    (*request_ptr)->u.ureq.greq_fns->cancel_fn            = cancel_fn;
+    (*request_ptr)->u.ureq.greq_fns->free_fn              = free_fn;
+    (*request_ptr)->u.ureq.greq_fns->query_fn             = query_fn;
+    (*request_ptr)->u.ureq.greq_fns->poll_fn              = NULL;
+    (*request_ptr)->u.ureq.greq_fns->wait_fn              = NULL;
+    (*request_ptr)->u.ureq.greq_fns->grequest_extra_state = extra_state;
+    (*request_ptr)->u.ureq.greq_fns->greq_lang            = MPIR_LANG_C;
 
     /* Add an additional reference to the greq.  One of them will be
      * released when we complete the request, and the second one, when
@@ -362,9 +361,9 @@ int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
 	if (mpi_errno == MPI_SUCCESS)
 	{
             *request = lrequest_ptr->handle;
-            lrequest_ptr->greq_fns->poll_fn     = class_ptr->poll_fn;
-            lrequest_ptr->greq_fns->wait_fn     = class_ptr->wait_fn;
-            lrequest_ptr->greq_fns->greq_class  = greq_class;
+            lrequest_ptr->u.ureq.greq_fns->poll_fn     = class_ptr->poll_fn;
+            lrequest_ptr->u.ureq.greq_fns->wait_fn     = class_ptr->wait_fn;
+            lrequest_ptr->u.ureq.greq_fns->greq_class  = greq_class;
 	}
 	return mpi_errno;
 }
@@ -436,8 +435,8 @@ int MPIX_Grequest_start_impl( MPI_Grequest_query_function *query_fn,
     mpi_errno = MPIR_Grequest_start_impl(query_fn, free_fn, cancel_fn, extra_state, request);
 
     if (mpi_errno == MPI_SUCCESS) {
-        (*request)->greq_fns->poll_fn = poll_fn;
-        (*request)->greq_fns->wait_fn = wait_fn;
+        (*request)->u.ureq.greq_fns->poll_fn = poll_fn;
+        (*request)->u.ureq.greq_fns->wait_fn = wait_fn;
     }
 
     return mpi_errno;
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index ab4ad49..ee05809 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -96,14 +96,14 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 			
 	case MPIR_PREQUEST_SEND:
 	{
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		MPIR_Request * prequest_ptr = request_ptr->partner_request;
+		MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
 
 		/* reset persistent request to inactive state */
                 MPIR_cc_set(&request_ptr->cc, 0);
 		request_ptr->cc_ptr = &request_ptr->cc;
-		request_ptr->partner_request = NULL;
+		request_ptr->u.persist.real_request = NULL;
 		
 		if (prequest_ptr->kind != MPIR_UREQUEST)
 		{
@@ -164,14 +164,14 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	
 	case MPIR_PREQUEST_RECV:
 	{
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		MPIR_Request * prequest_ptr = request_ptr->partner_request;
+		MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
 
 		/* reset persistent request to inactive state */
                 MPIR_cc_set(&request_ptr->cc, 0);
 		request_ptr->cc_ptr = &request_ptr->cc;
-		request_ptr->partner_request = NULL;
+		request_ptr->u.persist.real_request = NULL;
 		
 		MPIR_Request_extract_status(prequest_ptr, status);
 		mpi_errno = prequest_ptr->status.MPI_ERROR;
@@ -270,17 +270,17 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 
 	case MPIR_PREQUEST_SEND:
 	{
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		if (request_ptr->partner_request->kind == MPIR_UREQUEST)
+		if (request_ptr->u.persist.real_request->kind == MPIR_UREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_query(
-			request_ptr->partner_request);
+			request_ptr->u.persist.real_request);
 		}
 		if (mpi_errno == MPI_SUCCESS)
 		{
-		    mpi_errno = request_ptr->partner_request->status.MPI_ERROR;
+		    mpi_errno = request_ptr->u.persist.real_request->status.MPI_ERROR;
 		}
 	    }
 	    else
@@ -293,9 +293,9 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 
 	case MPIR_PREQUEST_RECV:
 	{
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		mpi_errno = request_ptr->partner_request->status.MPI_ERROR;
+		mpi_errno = request_ptr->u.persist.real_request->status.MPI_ERROR;
 	    }
 	    else
 	    {
@@ -311,14 +311,14 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 	    
 	    /* Note that we've acquired the thread private storage above */
     
-	    switch (request_ptr->greq_fns->greq_lang)
+	    switch (request_ptr->u.ureq.greq_fns->greq_lang)
 	    {
 		case MPIR_LANG_C:
 #ifdef HAVE_CXX_BINDING
 		case MPIR_LANG_CXX:
 #endif
-		    rc = (request_ptr->greq_fns->query_fn)(
-			request_ptr->greq_fns->grequest_extra_state,
+		    rc = (request_ptr->u.ureq.greq_fns->query_fn)(
+			request_ptr->u.ureq.greq_fns->grequest_extra_state,
 			&request_ptr->status);
 		    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno,
 			MPI_ERR_OTHER,;, "**user", "**userquery %d", rc);
@@ -329,8 +329,8 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 		{
 		    MPI_Fint ierr;
 		    MPI_Fint is[sizeof(MPI_Status)/sizeof(int)];
-		    ((MPIR_Grequest_f77_query_function*)(request_ptr->greq_fns->query_fn))( 
-			request_ptr->greq_fns->grequest_extra_state, is,
+		    ((MPIR_Grequest_f77_query_function*)(request_ptr->u.ureq.greq_fns->query_fn))(
+			request_ptr->u.ureq.greq_fns->grequest_extra_state, is,
 			&ierr );
 		    rc = (int) ierr;
 		    if (rc == MPI_SUCCESS)
@@ -347,7 +347,7 @@ int MPIR_Request_get_error(MPIR_Request * request_ptr)
 		    /* This should not happen */
 		    MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_INTERN,;, 
 				 "**badcase", 
-				 "**badcase %d", request_ptr->greq_fns->greq_lang);
+				 "**badcase %d", request_ptr->u.ureq.greq_fns->greq_lang);
 		    break;
 		    /* --END ERROR HANDLING-- */
 		}
@@ -378,7 +378,7 @@ void MPIR_Grequest_set_lang_f77( MPI_Request greq )
 
     MPIR_Request_get_ptr( greq, greq_ptr );
 
-    greq_ptr->greq_fns->greq_lang = MPIR_LANG_FORTRAN;
+    greq_ptr->u.ureq.greq_fns->greq_lang = MPIR_LANG_FORTRAN;
 }
 #endif
 
@@ -392,14 +392,14 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
     int rc;
     int mpi_errno = MPI_SUCCESS;
     
-    switch (request_ptr->greq_fns->greq_lang)
+    switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
 	case MPIR_LANG_C:
 #ifdef HAVE_CXX_BINDING
 	case MPIR_LANG_CXX:
 #endif
-	    rc = (request_ptr->greq_fns->cancel_fn)(
-		request_ptr->greq_fns->grequest_extra_state, complete);
+	    rc = (request_ptr->u.ureq.greq_fns->cancel_fn)(
+		request_ptr->u.ureq.greq_fns->grequest_extra_state, complete);
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno,
 		MPI_ERR_OTHER,;, "**user", "**usercancel %d", rc);
 	    break;
@@ -410,8 +410,8 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
 	    MPI_Fint ierr;
 	    MPI_Fint icomplete = complete;
 
-	    ((MPIR_Grequest_f77_cancel_function *)(request_ptr->greq_fns->cancel_fn))(
-		request_ptr->greq_fns->grequest_extra_state, &icomplete, &ierr);
+	    ((MPIR_Grequest_f77_cancel_function *)(request_ptr->u.ureq.greq_fns->cancel_fn))(
+		request_ptr->u.ureq.greq_fns->grequest_extra_state, &icomplete, &ierr);
 	    rc = (int) ierr;
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,
 		{;}, "**user", "**usercancel %d", rc);
@@ -424,7 +424,7 @@ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
 	    /* --BEGIN ERROR HANDLING-- */
 	    /* This should not happen */
 	    MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_INTERN,;, "**badcase",
-		"**badcase %d", request_ptr->greq_fns->greq_lang);
+		"**badcase %d", request_ptr->u.ureq.greq_fns->greq_lang);
 	    break;
 	    /* --END ERROR HANDLING-- */
 	}
@@ -443,13 +443,13 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr)
     int rc;
     int mpi_errno = MPI_SUCCESS;
     
-    switch (request_ptr->greq_fns->greq_lang)
+    switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
 	case MPIR_LANG_C:
 #ifdef HAVE_CXX_BINDING
 	case MPIR_LANG_CXX:
 #endif
-	    rc = (request_ptr->greq_fns->query_fn)(request_ptr->greq_fns->grequest_extra_state,
+	    rc = (request_ptr->u.ureq.greq_fns->query_fn)(request_ptr->u.ureq.greq_fns->grequest_extra_state,
 		&request_ptr->status);
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,
 		{;}, "**user", "**userquery %d", rc);
@@ -460,8 +460,8 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr)
 	{
 	    MPI_Fint ierr;
 	    MPI_Fint is[sizeof(MPI_Status)/sizeof(int)];
-	    ((MPIR_Grequest_f77_query_function *)(request_ptr->greq_fns->query_fn))( 
-		request_ptr->greq_fns->grequest_extra_state, is, &ierr );
+	    ((MPIR_Grequest_f77_query_function *)(request_ptr->u.ureq.greq_fns->query_fn))(
+		request_ptr->u.ureq.greq_fns->grequest_extra_state, is, &ierr );
 	    rc = (int)ierr;
 	    if (rc == MPI_SUCCESS) 
 		PMPI_Status_f2c( is, &request_ptr->status );
@@ -475,7 +475,7 @@ int MPIR_Grequest_query(MPIR_Request * request_ptr)
 	    /* --BEGIN ERROR HANDLING-- */
 	    /* This should not happen */
 	    MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_INTERN,;, "**badcase",
-		"**badcase %d", request_ptr->greq_fns->greq_lang);
+		"**badcase %d", request_ptr->u.ureq.greq_fns->greq_lang);
 	    break;
 	    /* --END ERROR HANDLING-- */
 	}
@@ -494,13 +494,13 @@ int MPIR_Grequest_free(MPIR_Request * request_ptr)
     int rc;
     int mpi_errno = MPI_SUCCESS;
     
-    switch (request_ptr->greq_fns->greq_lang)
+    switch (request_ptr->u.ureq.greq_fns->greq_lang)
     {
 	case MPIR_LANG_C:
 #ifdef HAVE_CXX_BINDING
 	case MPIR_LANG_CXX:
 #endif
-	    rc = (request_ptr->greq_fns->free_fn)(request_ptr->greq_fns->grequest_extra_state);
+	    rc = (request_ptr->u.ureq.greq_fns->free_fn)(request_ptr->u.ureq.greq_fns->grequest_extra_state);
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,
 		{;}, "**user", "**userfree %d", rc);
 	    break;
@@ -510,8 +510,8 @@ int MPIR_Grequest_free(MPIR_Request * request_ptr)
 	{
 	    MPI_Fint ierr;
 		    
-	    ((MPIR_Grequest_f77_free_function *)(request_ptr->greq_fns->free_fn))(
-		request_ptr->greq_fns->grequest_extra_state, &ierr);
+	    ((MPIR_Grequest_f77_free_function *)(request_ptr->u.ureq.greq_fns->free_fn))(
+		request_ptr->u.ureq.greq_fns->grequest_extra_state, &ierr);
 	    rc = (int) ierr;
 	    MPIR_ERR_CHKANDSTMT1((rc != MPI_SUCCESS), mpi_errno, MPI_ERR_OTHER,
 		{;}, "**user", "**userfree %d", rc);
@@ -524,7 +524,7 @@ int MPIR_Grequest_free(MPIR_Request * request_ptr)
 	    /* --BEGIN ERROR HANDLING-- */
 	    /* This should not happen */
 	    MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_INTERN, {;}, "**badcase",
-		"**badcase %d", request_ptr->greq_fns->greq_lang);
+		"**badcase %d", request_ptr->u.ureq.greq_fns->greq_lang);
 	    break;
 	    /* --END ERROR HANDLING-- */
 	}
@@ -562,13 +562,13 @@ int MPIR_Grequest_progress_poke(int count,
 	if (request_ptrs[i]->kind == MPIR_UREQUEST)
 	{
 	    n_greq += 1;
-	    wait_fn = request_ptrs[i]->greq_fns->wait_fn;
-	    state_ptrs[j] = request_ptrs[i]->greq_fns->grequest_extra_state;
+	    wait_fn = request_ptrs[i]->u.ureq.greq_fns->wait_fn;
+	    state_ptrs[j] = request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state;
 	    j++;
 	    if (i+1 < count) {
 	        if (request_ptrs[i+1] == NULL ||
-			(request_ptrs[i]->greq_fns->greq_class != 
-				request_ptrs[i+1]->greq_fns->greq_class) )
+			(request_ptrs[i]->u.ureq.greq_fns->greq_class !=
+				request_ptrs[i+1]->u.ureq.greq_fns->greq_class) )
 	            n_classes += 1;
 	    }
 	} else {
@@ -582,11 +582,11 @@ int MPIR_Grequest_progress_poke(int count,
 	for (i = 0; i< count; i++ )
 	{
 	    if (request_ptrs[i] != NULL && 
-                request_ptrs[i]->kind == MPIR_UREQUEST &&
+                request_ptrs[i]->kind == MPIR_UREQUEST && 
                 !MPIR_Request_is_complete(request_ptrs[i]) &&
-                request_ptrs[i]->greq_fns->poll_fn != NULL)
+                request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
             {
-		mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state, &(array_of_statuses[i]));
+		mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state, &(array_of_statuses[i]));
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	    }
 	}
@@ -638,13 +638,13 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
         if (request_ptrs[i] == NULL || *request_ptrs[i]->cc_ptr == 0 ||  request_ptrs[i]->kind != MPIR_UREQUEST)
             continue;
         
-        if (n_greq == 0 || request_ptrs[i]->greq_fns->greq_class == curr_class)
+        if (n_greq == 0 || request_ptrs[i]->u.ureq.greq_fns->greq_class == curr_class)
         {
             /* if this is the first grequest of a group, or if it's the
                same class as the last one, add its state to the list  */
-            curr_class = request_ptrs[i]->greq_fns->greq_class;
-            wait_fn = request_ptrs[i]->greq_fns->wait_fn;
-            state_ptrs[n_greq] = request_ptrs[i]->greq_fns->grequest_extra_state;
+            curr_class = request_ptrs[i]->u.ureq.greq_fns->greq_class;
+            wait_fn = request_ptrs[i]->u.ureq.greq_fns->wait_fn;
+            state_ptrs[n_greq] = request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state;
             ++n_greq;
         }
         else
@@ -654,9 +654,9 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
             mpi_error = (wait_fn)(n_greq, state_ptrs, 0, NULL);
             if (mpi_error) MPIR_ERR_POP(mpi_error);
 
-            curr_class = request_ptrs[i]->greq_fns->greq_class;
-            wait_fn = request_ptrs[i]->greq_fns->wait_fn;
-            state_ptrs[0] = request_ptrs[i]->greq_fns->grequest_extra_state;
+            curr_class = request_ptrs[i]->u.ureq.greq_fns->greq_class;
+            wait_fn = request_ptrs[i]->u.ureq.greq_fns->wait_fn;
+            state_ptrs[0] = request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state;
             n_greq = 1;
         }
     }
@@ -675,12 +675,12 @@ int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
         if (request_ptrs[i] == NULL ||
             MPIR_Request_is_complete(request_ptrs[i]) ||
             request_ptrs[i]->kind != MPIR_UREQUEST ||
-            request_ptrs[i]->greq_fns->wait_fn == NULL)
+            request_ptrs[i]->u.ureq.greq_fns->wait_fn == NULL)
         {
             continue;
         }
 
-        mpi_error = (request_ptrs[i]->greq_fns->wait_fn)(1, &request_ptrs[i]->greq_fns->grequest_extra_state, 0, NULL);
+        mpi_error = (request_ptrs[i]->u.ureq.greq_fns->wait_fn)(1, &request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state, 0, NULL);
         if (mpi_error) MPIR_ERR_POP(mpi_error);
         MPIU_Assert(MPIR_Request_is_complete(request_ptrs[i]));
     }
diff --git a/src/mpi/pt2pt/request_free.c b/src/mpi/pt2pt/request_free.c
index db8249f..42d22b6 100644
--- a/src/mpi/pt2pt/request_free.c
+++ b/src/mpi/pt2pt/request_free.c
@@ -123,15 +123,15 @@ int MPI_Request_free(MPI_Request *request)
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		if (request_ptr->partner_request->kind == MPIR_UREQUEST)
+		if (request_ptr->u.persist.real_request->kind == MPIR_UREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_free(
-			request_ptr->partner_request);
+			request_ptr->u.persist.real_request);
 		}
-		MPIR_Request_free(request_ptr->partner_request);
+		MPIR_Request_free(request_ptr->u.persist.real_request);
 	    }
 	    break;
 	}
@@ -141,9 +141,9 @@ int MPI_Request_free(MPI_Request *request)
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
-	    if (request_ptr->partner_request != NULL)
+	    if (request_ptr->u.persist.real_request != NULL)
 	    {
-		MPIR_Request_free(request_ptr->partner_request);
+		MPIR_Request_free(request_ptr->u.persist.real_request);
 	    }
 	    break;
 	}
diff --git a/src/mpi/pt2pt/request_get_status.c b/src/mpi/pt2pt/request_get_status.c
index 7af680a..7269de6 100644
--- a/src/mpi/pt2pt/request_get_status.c
+++ b/src/mpi/pt2pt/request_get_status.c
@@ -136,7 +136,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
         
         case MPIR_PREQUEST_SEND:
         {
-            MPIR_Request * prequest_ptr = request_ptr->partner_request;
+            MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
             
             if (prequest_ptr != NULL)
             {
@@ -191,7 +191,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
         
         case MPIR_PREQUEST_RECV:
         {
-            MPIR_Request * prequest_ptr = request_ptr->partner_request;
+            MPIR_Request * prequest_ptr = request_ptr->u.persist.real_request;
             
             if (prequest_ptr != NULL)
             {
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index cbca7e9..9876864 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -53,10 +53,10 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
     if (request_ptr->kind == MPIR_UREQUEST &&
-        request_ptr->greq_fns != NULL &&
-        request_ptr->greq_fns->poll_fn != NULL)
+        request_ptr->u.ureq.greq_fns != NULL &&
+        request_ptr->u.ureq.greq_fns->poll_fn != NULL)
     {
-        mpi_errno = (request_ptr->greq_fns->poll_fn)(request_ptr->greq_fns->grequest_extra_state, status);
+        mpi_errno = (request_ptr->u.ureq.greq_fns->poll_fn)(request_ptr->u.ureq.greq_fns->grequest_extra_state, status);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
 
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index 65ab270..398a891 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -88,9 +88,9 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
     {
         if (request_ptrs[i] != NULL &&
                 request_ptrs[i]->kind == MPIR_UREQUEST &&
-                request_ptrs[i]->greq_fns->poll_fn != NULL)
+                request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
         {
-            mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
+            mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
                     &(array_of_statuses[i]));
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
         }
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index 9f5a7e8..0ca07d5 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -163,9 +163,9 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
     {
 	if (request_ptrs[i] != NULL && 
             request_ptrs[i]->kind == MPIR_UREQUEST &&
-            request_ptrs[i]->greq_fns->poll_fn != NULL)
+            request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	{
-            mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
+            mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
                                                              status);
 	    if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 	}
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 4412abf..57c4e67 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -163,9 +163,9 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
     {
 	if (request_ptrs[i] != NULL && 
             request_ptrs[i]->kind == MPIR_UREQUEST &&
-            request_ptrs[i]->greq_fns->poll_fn != NULL)
+            request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	{
-            mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
+            mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state,
                                                              array_of_statuses);
 	    if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 	}
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index 5b289c9..3844848 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -62,7 +62,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
 	{
 	    mpi_errno = MPIR_Grequest_progress_poke(1, &request_ptr, status);
 	    if (request_ptr->kind == MPIR_UREQUEST &&
-                request_ptr->greq_fns->wait_fn != NULL)
+                request_ptr->u.ureq.greq_fns->wait_fn != NULL)
 	    {
 		if (mpi_errno) {
 		    /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index eb3b677..1bdb87b 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -157,10 +157,10 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
             /* we found at least one non-null request */
             found_nonnull_req = TRUE;
 
-            if (request_ptrs[i]->kind == MPIR_UREQUEST && request_ptrs[i]->greq_fns->poll_fn != NULL)
+            if (request_ptrs[i]->kind == MPIR_UREQUEST && request_ptrs[i]->u.ureq.greq_fns->poll_fn != NULL)
 	    {
                 /* this is a generalized request; make progress on it */
-                mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state, status);
+                mpi_errno = (request_ptrs[i]->u.ureq.greq_fns->poll_fn)(request_ptrs[i]->u.ureq.greq_fns->grequest_extra_state, status);
 		if (mpi_errno != MPI_SUCCESS) goto fn_progress_end_fail;
 	    }
             if (MPIR_Request_is_complete(request_ptrs[i]))
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index e00042e..112ab12 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -270,7 +270,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
         MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
         MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.tmpbuf = NULL;
     sreq->ch.vc = vc;
@@ -373,7 +373,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
         MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
         MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.tmpbuf = NULL;
     sreq->ch.vc = vc;
@@ -476,7 +476,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
         MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
         MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.tmpbuf = NULL;
     sreq->ch.vc = vc;
@@ -579,7 +579,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
         MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
         MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
     sreq->dev.tmpbuf = NULL;
     sreq->ch.vc = vc;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index da5c49c..d49da80 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -107,7 +107,7 @@ int MPID_nem_lmt_RndvSend(MPIR_Request **sreq_p, const void * buf, MPI_Aint coun
 
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
 		   "sending lmt RTS, data_sz=%" PRIdPTR, data_sz);
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
     sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
 	
     MPIDI_Pkt_init(rts_pkt, MPIDI_NEM_PKT_LMT_RTS);
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index ffe7c67..73d9558 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -267,7 +267,7 @@ extern MPIDI_Process_t MPIDI_Process;
 #endif
 
 #ifdef HAVE_DEBUGGER_SUPPORT
-#define MPIDI_Request_clear_dbg(sreq_) ((sreq_)->dbg_next = NULL)
+#define MPIDI_Request_clear_dbg(sreq_) ((sreq_)->u.send.dbg_next = NULL)
 #else
 #define MPIDI_Request_clear_dbg(sreq_)
 #endif
@@ -291,7 +291,7 @@ extern MPIDI_Process_t MPIDI_Process;
     MPIU_Object_set_ref((sreq_), 2);				\
     (sreq_)->kind = MPIR_REQUEST_SEND;				\
     (sreq_)->comm = comm;					\
-    (sreq_)->partner_request   = NULL;                          \
+    (sreq_)->dev.partner_request   = NULL;                         \
     MPIR_Comm_add_ref(comm);					\
     (sreq_)->dev.match.parts.rank = rank;			\
     (sreq_)->dev.match.parts.tag = tag;				\
@@ -309,7 +309,7 @@ extern MPIDI_Process_t MPIDI_Process;
     (rreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);           \
     MPIU_Object_set_ref((rreq_), 2);				\
     (rreq_)->kind = MPIR_REQUEST_RECV;				\
-    (rreq_)->partner_request   = NULL;                          \
+    (rreq_)->dev.partner_request   = NULL;                         \
 }
 
 /* creates a new, trivially complete recv request that is suitable for
@@ -425,8 +425,8 @@ extern MPIDI_Process_t MPIDI_Process;
    partner RTS sreq and nullify partner request */
 #define MPIDI_Request_fetch_and_clear_rts_sreq(sreq_, rts_sreq_)	\
     {									\
-    	*(rts_sreq_) = (sreq_)->partner_request;			\
-    	(sreq_)->partner_request = NULL;				\
+        *(rts_sreq_) = (sreq_)->dev.partner_request;			\
+        (sreq_)->dev.partner_request = NULL;				\
     }
 
 /* FIXME: We've moved to allow finer-grain critical sections... */
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index dcfd83a..edfd22c 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -464,6 +464,11 @@ typedef struct MPIDI_Request {
        Question: do we want to make this a link instead of reserving 
        a fixed spot in the request? */
     MPIDI_CH3_Pkt_t pending_pkt;
+
+    /* partner send request when a receive request is created by the
+     * sender (only used for self send) */
+    struct MPIR_Request * partner_request;
+
     struct MPIR_Request * next;
 } MPIDI_Request;
 #define MPIR_REQUEST_DECL MPIDI_Request dev;
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index d73c1b1..414fa81 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -229,7 +229,7 @@ void MPIDI_CH3U_Buffer_copy(
 int MPIDI_CH3_RecvFromSelf( MPIR_Request *rreq, void *buf, MPI_Aint count,
 			    MPI_Datatype datatype )
 {
-    MPIR_Request * const sreq = rreq->partner_request;
+    MPIR_Request * const sreq = rreq->dev.partner_request;
     int mpi_errno = MPI_SUCCESS;
 
     if (sreq != NULL)
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index a684b04..3408084 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -34,7 +34,7 @@ int MPIDI_CH3_RndvSend( MPIR_Request **sreq_p, const void * buf, MPI_Aint count,
 
     sreq->dev.OnDataAvail = 0;
     
-    sreq->partner_request = NULL;
+    sreq->dev.partner_request = NULL;
 	
     MPIDI_Pkt_init(rts_pkt, MPIDI_CH3_PKT_RNDV_REQ_TO_SEND);
     rts_pkt->match.parts.rank	      = comm->rank;
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 3583b0c..3df04ce 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -61,7 +61,7 @@ int MPID_Cancel_send(MPIR_Request * sreq)
 	MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
 	if (rreq)
 	{
-	    MPIU_Assert(rreq->partner_request == sreq);
+	    MPIU_Assert(rreq->dev.partner_request == sreq);
 	    
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
              "send-to-self cancellation successful, sreq=0x%08x, rreq=0x%08x",
diff --git a/src/mpid/ch3/src/mpid_startall.c b/src/mpid/ch3/src/mpid_startall.c
index ea1acbd..e4aea41 100644
--- a/src/mpid/ch3/src/mpid_startall.c
+++ b/src/mpid/ch3/src/mpid_startall.c
@@ -41,7 +41,7 @@
     (sreq_)->dev.user_buf = (void *) buf;				\
     (sreq_)->dev.user_count = count;					\
     (sreq_)->dev.datatype = datatype;					\
-    (sreq_)->partner_request = NULL;					\
+    (sreq_)->u.persist.real_request = NULL;                             \
 }
 
 	
@@ -74,7 +74,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	    {
 		rc = MPID_Irecv(preq->dev.user_buf, preq->dev.user_count, preq->dev.datatype, preq->dev.match.parts.rank,
 		    preq->dev.match.parts.tag, preq->comm, preq->dev.match.parts.context_id - preq->comm->recvcontext_id,
-		    &preq->partner_request);
+		    &preq->u.persist.real_request);
 		break;
 	    }
 	    
@@ -82,7 +82,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	    {
 		rc = MPID_Isend(preq->dev.user_buf, preq->dev.user_count, preq->dev.datatype, preq->dev.match.parts.rank,
 		    preq->dev.match.parts.tag, preq->comm, preq->dev.match.parts.context_id - preq->comm->context_id,
-		    &preq->partner_request);
+		    &preq->u.persist.real_request);
 		break;
 	    }
 		
@@ -90,7 +90,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	    {
 		rc = MPID_Irsend(preq->dev.user_buf, preq->dev.user_count, preq->dev.datatype, preq->dev.match.parts.rank,
 		    preq->dev.match.parts.tag, preq->comm, preq->dev.match.parts.context_id - preq->comm->context_id,
-		    &preq->partner_request);
+		    &preq->u.persist.real_request);
 		break;
 	    }
 		
@@ -98,7 +98,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	    {
 		rc = MPID_Issend(preq->dev.user_buf, preq->dev.user_count, preq->dev.datatype, preq->dev.match.parts.rank,
 		    preq->dev.match.parts.tag, preq->comm, preq->dev.match.parts.context_id - preq->comm->context_id,
-		    &preq->partner_request);
+		    &preq->u.persist.real_request);
 		break;
 	    }
 
@@ -112,7 +112,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
                                       &sreq_handle);
                 if (rc == MPI_SUCCESS)
                 {
-                    MPIR_Request_get_ptr(sreq_handle, preq->partner_request);
+                    MPIR_Request_get_ptr(sreq_handle, preq->u.persist.real_request);
                 }
 		break;
 	    }
@@ -129,7 +129,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	if (rc == MPI_SUCCESS)
 	{
 	    preq->status.MPI_ERROR = MPI_SUCCESS;
-	    preq->cc_ptr = &preq->partner_request->cc;
+	    preq->cc_ptr = &preq->u.persist.real_request->cc;
 	}
 	/* --BEGIN ERROR HANDLING-- */
 	else
@@ -139,7 +139,7 @@ int MPID_Startall(int count, MPIR_Request * requests[])
 	       the error code in the persistent request.  The wait and test
 	       routines will look at the error code in the persistent
 	       request if a partner request is not present. */
-	    preq->partner_request = NULL;
+	    preq->u.persist.real_request = NULL;
 	    preq->status.MPI_ERROR = rc;
 	    preq->cc_ptr = &preq->cc;
             MPIR_cc_set(&preq->cc, 0);
@@ -319,7 +319,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
     rreq->dev.user_buf = (void *) buf;
     rreq->dev.user_count = count;
     rreq->dev.datatype = datatype;
-    rreq->partner_request = NULL;
+    rreq->u.persist.real_request = NULL;
     MPIDI_Request_set_type(rreq, MPIDI_REQUEST_TYPE_RECV);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index b5808a3..5da4cd2 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -118,7 +118,7 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
 		MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
 		MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
 	    }
-	    rreq->partner_request = sreq;
+	    rreq->dev.partner_request = sreq;
 	    rreq->dev.sender_req_id = sreq->handle;
 	    MPIDU_Datatype_get_size_macro(datatype, dt_sz);
 	    MPIR_STATUS_SET_COUNT(rreq->status, count * dt_sz);
@@ -132,7 +132,7 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
 							  "**rsendnomatch", "**rsendnomatch %d %d", rank, tag);
 	    rreq->status.MPI_ERROR = sreq->status.MPI_ERROR;
 	    
-	    rreq->partner_request = NULL;
+	    rreq->dev.partner_request = NULL;
 	    rreq->dev.sender_req_id = MPI_REQUEST_NULL;
 	    MPIR_STATUS_SET_COUNT(rreq->status, 0);
 	    
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 9c70876..0a7f396 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -142,30 +142,30 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
              * &send.count, but this requires patching up the pointers
              * during realloc of entries, so this is easier */
             ret_errno = MPIC_Isend(e->u.send.buf, *e->u.send.count_p, e->u.send.datatype,
-                                   e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->errflag);
+                                   e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->u.nbc.errflag);
         }
         else {
             if (e->u.send.is_sync) {
                 ret_errno = MPIC_Issend(e->u.send.buf, e->u.send.count, e->u.send.datatype,
-                                        e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->errflag);
+                                        e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->u.nbc.errflag);
             }
             else {
                 ret_errno = MPIC_Isend(e->u.send.buf, e->u.send.count, e->u.send.datatype,
-                                       e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->errflag);
+                                       e->u.send.dest, s->tag, comm, &e->u.send.sreq, &r->u.nbc.errflag);
             }
         }
         /* Check if the error is actually fatal to the NBC or we can continue. */
         if (unlikely(ret_errno)) {
-            if (MPIR_ERR_NONE == r->errflag) {
+            if (MPIR_ERR_NONE == r->u.nbc.errflag) {
                 if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
-                    r->errflag = MPIR_ERR_PROC_FAILED;
+                    r->u.nbc.errflag = MPIR_ERR_PROC_FAILED;
                 }
                 else {
-                    r->errflag = MPIR_ERR_OTHER;
+                    r->u.nbc.errflag = MPIR_ERR_OTHER;
                 }
             }
             e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
-            MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Sched SEND failed. Errflag: %d\n", (int) r->errflag);
+            MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Sched SEND failed. Errflag: %d\n", (int) r->u.nbc.errflag);
         }
         else {
             e->status = MPIDU_SCHED_ENTRY_STATUS_STARTED;
@@ -178,18 +178,18 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
                                e->u.recv.src, s->tag, comm, &e->u.recv.rreq);
         /* Check if the error is actually fatal to the NBC or we can continue. */
         if (unlikely(ret_errno)) {
-            if (MPIR_ERR_NONE == r->errflag) {
+            if (MPIR_ERR_NONE == r->u.nbc.errflag) {
                 if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
-                    r->errflag = MPIR_ERR_PROC_FAILED;
+                    r->u.nbc.errflag = MPIR_ERR_PROC_FAILED;
                 }
                 else {
-                    r->errflag = MPIR_ERR_OTHER;
+                    r->u.nbc.errflag = MPIR_ERR_OTHER;
                 }
             }
             /* We should set the status to failed here - since the request is not freed. this
              * will be handled later in MPIDU_Sched_progress_state, so set to started here */
             e->status = MPIDU_SCHED_ENTRY_STATUS_STARTED;
-            MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Sched RECV failed. Errflag: %d\n", (int) r->errflag);
+            MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "Sched RECV failed. Errflag: %d\n", (int) r->u.nbc.errflag);
         }
         else {
             e->status = MPIDU_SCHED_ENTRY_STATUS_STARTED;
@@ -231,12 +231,12 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
             /* Sched entries list can be reallocated inside callback */
             e = &s->entries[idx];
             if (unlikely(ret_errno)) {
-                if (MPIR_ERR_NONE == r->errflag) {
+                if (MPIR_ERR_NONE == r->u.nbc.errflag) {
                     if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
-                        r->errflag = MPIR_ERR_PROC_FAILED;
+                        r->u.nbc.errflag = MPIR_ERR_PROC_FAILED;
                     }
                     else {
-                        r->errflag = MPIR_ERR_OTHER;
+                        r->u.nbc.errflag = MPIR_ERR_OTHER;
                     }
                 }
                 e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
@@ -250,12 +250,12 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI
             /* Sched entries list can be reallocated inside callback */
             e = &s->entries[idx];
             if (unlikely(ret_errno)) {
-                if (MPIR_ERR_NONE == r->errflag) {
+                if (MPIR_ERR_NONE == r->u.nbc.errflag) {
                     if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(ret_errno)) {
-                        r->errflag = MPIR_ERR_PROC_FAILED;
+                        r->u.nbc.errflag = MPIR_ERR_PROC_FAILED;
                     }
                     else {
-                        r->errflag = MPIR_ERR_OTHER;
+                        r->u.nbc.errflag = MPIR_ERR_OTHER;
                     }
                 }
                 e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
@@ -890,7 +890,7 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made
                     MPL_DBG_MSG_FMT(MPIR_DBG_COMM, VERBOSE,
                                      (MPL_DBG_FDEST, "completed SEND entry %d, sreq=%p\n", (int) i,
                                       e->u.send.sreq));
-                    if (s->req->errflag != MPIR_ERR_NONE)
+                    if (s->req->u.nbc.errflag != MPIR_ERR_NONE)
                         e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
                     else
                         e->status = MPIDU_SCHED_ENTRY_STATUS_COMPLETE;
@@ -905,14 +905,14 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made
                     MPL_DBG_MSG_FMT(MPIR_DBG_COMM, VERBOSE,
                                      (MPL_DBG_FDEST, "completed RECV entry %d, rreq=%p\n", (int) i,
                                       e->u.recv.rreq));
-                    MPIR_Process_status(&e->u.recv.rreq->status, &s->req->errflag);
+                    MPIR_Process_status(&e->u.recv.rreq->status, &s->req->u.nbc.errflag);
                     if (e->u.recv.status != MPI_STATUS_IGNORE) {
                         int recvd;
                         e->u.recv.status->MPI_ERROR = e->u.recv.rreq->status.MPI_ERROR;
                         MPIR_Get_count_impl(&e->u.recv.rreq->status, MPI_BYTE, &recvd);
                         MPIR_STATUS_SET_COUNT(*(e->u.recv.status), recvd);
                     }
-                    if (s->req->errflag != MPIR_ERR_NONE)
+                    if (s->req->u.nbc.errflag != MPIR_ERR_NONE)
                         e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
                     else
                         e->status = MPIDU_SCHED_ENTRY_STATUS_COMPLETE;
@@ -952,7 +952,7 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made
             MPL_DL_DELETE(state->head, s);
 
             /* TODO refactor into a sched_complete routine? */
-            switch (s->req->errflag) {
+            switch (s->req->u.nbc.errflag) {
             case MPIR_ERR_PROC_FAILED:
                 MPIR_ERR_SET(s->req->status.MPI_ERROR, MPIX_ERR_PROC_FAILED, "**comm");
                 break;
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index 5f74269..c260864 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -136,7 +136,7 @@ void    MPIDI_Request_allocate_pool();
 #endif
 
 #ifdef HAVE_DEBUGGER_SUPPORT
-#define MPIDI_Request_clear_dbg(req_) ((req_)->dbg_next = NULL)
+#define MPIDI_Request_clear_dbg(req_) ((req_)->u.send.dbg_next = NULL)
 #else
 #define MPIDI_Request_clear_dbg(req_)
 #endif

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

commit 3b418a958be32f22412961c41995b29b5c0eb14c
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Apr 19 09:49:18 2016 -0500

    Do not initialize unnecessary fields.
    
    Some fields were being defensively initialized inside the request
    allocation function, thus increasing the instruction count in request
    allocation.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 10682c5..651b79f 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1715,12 +1715,7 @@ static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind)
         MPIR_cc_set(&req->cc, 1);
 	req->cc_ptr		   = &req->cc;
 
-	/* FIXME: status fields meaningful only for receive, and even
-         * then should not need to be set. */
-	req->status.MPI_SOURCE	   = MPI_UNDEFINED;
-	req->status.MPI_TAG	   = MPI_UNDEFINED;
 	req->status.MPI_ERROR	   = MPI_SUCCESS;
-        MPIR_STATUS_SET_COUNT(req->status, 0);
         MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
 
 	req->comm		   = NULL;

http://git.mpich.org/mpich.git/commitdiff/4459b29de71916d1df6663e943b0df767f34dd84

commit 4459b29de71916d1df6663e943b0df767f34dd84
Author: Pavan Balaji <balaji at anl.gov>
Date:   Mon Apr 18 15:51:11 2016 -0500

    Modify MPID_Request_create to take request type argument.
    
    Passing the request type allows the request allocation to optimize for
    specific request types, since it does not need to initialize all
    fields.
    
    The current ch3 code simply allocates all requests as UNDEFINED.  This
    is at the same position we were before we added the request type
    argument.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index fc2047c..10682c5 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1685,7 +1685,7 @@ void MPID_Request_finalize(MPIR_Request *);
 @*/
 int MPID_Request_complete(MPIR_Request *);
 
-static inline MPIR_Request *MPIR_Request_create(void)
+static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind)
 {
     MPIR_Request *req;
 
@@ -1711,7 +1711,7 @@ static inline MPIR_Request *MPIR_Request_create(void)
          * kind to UNDEFINED? And should the RMA values be set only
          * for RMA requests? */
 	MPIU_Object_set_ref(req, 1);
-	req->kind = MPIR_REQUEST_UNDEFINED;
+	req->kind = kind;
         MPIR_cc_set(&req->cc, 1);
 	req->cc_ptr		   = &req->cc;
 
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index bd91733..0c39b6e 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -84,10 +84,9 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
 
     /* MT FIXME this routine is not thread-safe in the non-global case */
     
-    *request_ptr = MPIR_Request_create();
+    *request_ptr = MPIR_Request_create(MPIR_UREQUEST);
     MPIR_ERR_CHKANDJUMP1(request_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "generalized request");
     
-    (*request_ptr)->kind                 = MPIR_UREQUEST;
     MPIU_Object_set_ref( *request_ptr, 1 );
     (*request_ptr)->cc_ptr               = &(*request_ptr)->cc;
     MPIR_cc_set((*request_ptr)->cc_ptr, 1);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
index 70b47d3..ccb4cd2 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
@@ -157,7 +157,7 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 2);
         req->kind = MPIR_REQUEST_MPROBE;
         req->comm = comm;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 389b3f0..8f1048e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -43,7 +43,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPIR_Request_create();
+    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -186,7 +186,7 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "hdr type   = %d", ((MPIDI_CH3_Pkt_t *) hdr)->type);
 
     /* create a request */
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -976,7 +976,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPIR_Request_create();
+    struct MPIR_Request *sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
index 437ac38..3e77796 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
@@ -135,7 +135,7 @@ int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 2);
         req->kind = MPIR_REQUEST_MPROBE;
         req->comm = comm;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index 8546b53..e00042e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -113,7 +113,7 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr);
 
     /* create a request */
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     MPIU_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t));
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 5b052e9..b3e7adc 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -249,7 +249,7 @@ static inline int MPID_nem_ofi_create_req(MPIR_Request ** request, int refcnt)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *req;
-    req = MPIR_Request_create();
+    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(req);
     MPIDI_Request_clear_dbg(req);
     MPIU_Object_set_ref(req, refcnt);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index 043d6ea..8cf7788 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -68,7 +68,7 @@ static inline MPID_nem_ptl_req_area * REQ_PTL(MPIR_Request *req) {
     } while (0)
 
 #define MPID_nem_ptl_request_create_sreq(sreq_, errno_, comm_) do {                                             \
-        (sreq_) = MPIR_Request_create();                                                                        \
+        (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);               \
         MPIU_Object_set_ref((sreq_), 2);                                                                        \
         (sreq_)->kind               = MPIR_REQUEST_SEND;                                                        \
         MPIR_Comm_add_ref(comm_);                                                                               \
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index 44b651a..7862417 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -365,7 +365,7 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* create a request */
-    *sreq_ptr = MPIR_Request_create();
+    *sreq_ptr = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert(*sreq_ptr != NULL);
     MPIU_Object_set_ref(*sreq_ptr, 2);
     (*sreq_ptr)->kind = MPIR_REQUEST_SEND;
@@ -484,7 +484,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                         MPIR_ERR_POP(mpi_errno);
                 }
                 else {
-                    MPIR_Request *req = MPIR_Request_create();
+                    MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
                     /* This request is actually complete; just needs to wait to enforce ordering */
                     TMPBUF(req) = MPL_malloc(packet_sz);
                     MPIU_Assert(TMPBUF(req));
@@ -501,7 +501,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                 char *buf_ptr;
                 ptl_size_t target_offset;
 
-                MPIR_Request *req = MPIR_Request_create();
+                MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
                 MPIU_Assert(req != NULL);
                 MPIDI_CH3U_Request_decrement_cc(req, &incomplete);  /* We'll increment it below */
                 REQ_PTL(req)->event_handler = MPID_nem_ptl_nm_ctl_event_handler;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index da36d85..977d37c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -127,7 +127,7 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     id_any.phys.pid = PTL_PID_ANY;
     
     /* create a request */
-    req = MPIR_Request_create();
+    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
     REQ_PTL(req)->event_handler = handle_probe;
@@ -202,7 +202,7 @@ int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, i
     id_any.phys.pid = PTL_PID_ANY;
 
     /* create a request */
-    req = MPIR_Request_create();
+    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPID_nem_ptl_init_req(req);
     MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
@@ -323,7 +323,7 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
 
     /* create a dummy request and search for the message */
     /* create a request */
-    search_req = MPIR_Request_create();
+    search_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPID_nem_ptl_init_req(search_req);
     MPIR_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(search_req, 2); /* 1 ref for progress engine and 1 ref for us */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index 3ed5558..81667b0 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -306,7 +306,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -445,7 +445,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index 56dfb65..b380182 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -89,7 +89,7 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPIR_Reques
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "enqueuing");
 
 	/* create a request */
-	sreq = MPIR_Request_create();
+	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	MPIU_Assert (sreq != NULL);
 	MPIU_Object_set_ref (sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index 46128f0..0b249ce 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -117,7 +117,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	{
             /* Create a new request and save remaining portions of the
 	     * iov in it. */
-            sreq = MPIR_Request_create();
+            sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	    MPIU_Assert(sreq != NULL);
 	    MPIU_Object_set_ref(sreq, 2);
 	    sreq->kind = MPIR_REQUEST_SEND;
@@ -148,7 +148,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "request enqueued");
 	/* create a request */
-	sreq = MPIR_Request_create();
+	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index 32dd078..da2e358 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -96,7 +96,7 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int
     if (*sreq_ptr == NULL)
     {
 	/* create a request */
-	sreq = MPIR_Request_create();
+	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 5027519..df28f2e 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -18,7 +18,7 @@ static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
 
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
@@ -126,7 +126,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_write failed, rc=%d", rc);
-		sreq = MPIR_Request_create();
+		sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 		if (!sreq) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
@@ -194,7 +194,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPIR_Request_create();
+	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	if (!sreq) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index da1b8ad..b5c5d9b 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -19,7 +19,7 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
     
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
@@ -57,7 +57,7 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
  * the request.
  */
 
-/* XXX - What do we do if MPIR_Request_create() returns NULL???
+/* XXX - What do we do if MPIR_Request_create returns NULL???
    If MPIDI_CH3_iStartMsgv() returns NULL, the calling code
    assumes the request completely successfully, but the reality is that we 
    couldn't allocate the memory for a request.  This
@@ -158,7 +158,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_writev failed, rc=%d", rc);
-		sreq = MPIR_Request_create();
+		sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 		if (sreq == NULL) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
@@ -226,7 +226,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPIR_Request_create();
+	sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
 	if (sreq == NULL) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index ebf7043..132a273 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -314,7 +314,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
      * always need a request to be passed in. */
 
     /* create a new request */
-    req = MPIR_Request_create();
+    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(req, 2);
@@ -676,7 +676,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPIR_Request_create();
+        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -771,7 +771,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPIR_Request_create();
+        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -899,7 +899,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
      * and pass a handle to it in the get packet. When the get
      * response comes from the target, it will contain the request
      * handle. */
-    curr_req = MPIR_Request_create();
+    curr_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     if (curr_req == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1022,7 +1022,7 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the RMW response.  Store the origin buf, count, and
      * datatype in it, and pass the request's handle RMW packet. When the
      * response comes from the target, it will contain the request handle. */
-    curr_req = MPIR_Request_create();
+    curr_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(curr_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     /* Set refs on the request to 2: one for the response message, and one for
@@ -1085,7 +1085,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the GACC response.  Store the response buf, count, and
      * datatype in it, and pass the request's handle in the GACC packet. When the
      * response comes from the target, it will contain the request handle. */
-    resp_req = MPIR_Request_create();
+    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(resp_req, 2);
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 21dcdaa..ffe7c67 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -287,7 +287,7 @@ extern MPIDI_Process_t MPIDI_Process;
 */
 #define MPIDI_Request_create_sreq(sreq_, mpi_errno_, FAIL_)	\
 {								\
-    (sreq_) = MPIR_Request_create();                            \
+    (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);           \
     MPIU_Object_set_ref((sreq_), 2);				\
     (sreq_)->kind = MPIR_REQUEST_SEND;				\
     (sreq_)->comm = comm;					\
@@ -306,7 +306,7 @@ extern MPIDI_Process_t MPIDI_Process;
 /* This is the receive request version of MPIDI_Request_create_sreq */
 #define MPIDI_Request_create_rreq(rreq_, mpi_errno_, FAIL_)	\
 {								\
-    (rreq_) = MPIR_Request_create();                            \
+    (rreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);           \
     MPIU_Object_set_ref((rreq_), 2);				\
     (rreq_)->kind = MPIR_REQUEST_RECV;				\
     (rreq_)->partner_request   = NULL;                          \
@@ -316,7 +316,7 @@ extern MPIDI_Process_t MPIDI_Process;
  * returning when a user passed MPI_PROC_NULL */
 #define MPIDI_Request_create_null_rreq(rreq_, mpi_errno_, FAIL_)           \
     do {                                                                   \
-        (rreq_) = MPIR_Request_create();                                   \
+        (rreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);               \
         if ((rreq_) != NULL) {                                             \
             MPIU_Object_set_ref((rreq_), 1);                               \
             /* MT FIXME should these be handled by MPIR_Request_create? */ \
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index c8c75d7..213216b 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -455,7 +455,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
         }
 
         /* create request to receive upcoming requests */
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 1);
 
         /* fill in area in req that will be used in Receive_data_found() */
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 8125271..211b155 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -318,7 +318,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
     MPIDU_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);
 
-    resp_req = MPIR_Request_create();
+    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIU_Object_set_ref(resp_req, 1);
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP);
@@ -455,7 +455,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
 
     /* Create response request */
-    resp_req = MPIR_Request_create();
+    resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_FOP_RESP);
     MPIU_Object_set_ref(resp_req, 1);
@@ -879,7 +879,7 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
     create_derived_datatype(rreq, dtype_info, &new_dtp);
 
     /* create request for sending data */
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(sreq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     sreq->kind = MPIR_REQUEST_SEND;
@@ -1198,7 +1198,7 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1374,7 +1374,7 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPIR_Request_create();
+    sreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1588,7 +1588,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr,
         fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     if (fop_pkt->type == MPIDI_CH3_PKT_FOP) {
-        resp_req = MPIR_Request_create();
+        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         if (resp_req == NULL) {
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
         }
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 310a6d8..3c41578 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -315,7 +315,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
         data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 1);
 
         req->dev.user_buf = put_pkt->addr;
@@ -464,7 +464,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         goto fn_exit;
     }
 
-    req = MPIR_Request_create();
+    req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     req->dev.target_win_handle = get_pkt->target_win_handle;
     req->dev.flags = get_pkt->flags;
 
@@ -705,7 +705,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
     else {
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_ACCUMULATE);
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -905,7 +905,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         /* Immed packet type is used when target datatype is predefined datatype. */
         MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype));
 
-        resp_req = MPIR_Request_create();
+        resp_req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         resp_req->dev.target_win_handle = get_accum_pkt->target_win_handle;
         resp_req->dev.flags = get_accum_pkt->flags;
 
@@ -978,7 +978,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_GET_ACCUM);
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -1436,7 +1436,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         if (fop_pkt->op == MPI_NO_OP)
             is_empty_origin = TRUE;
 
-        req = MPIR_Request_create();
+        req = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
         MPIU_Object_set_ref(req, 1);
         MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_FOP_RECV);
         *rreqp = req;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 70401ca..b6c55ff 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -37,7 +37,7 @@ int MPID_Rput(const void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create();
+    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -100,7 +100,7 @@ int MPID_Rget(void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create();
+    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -161,7 +161,7 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create();
+    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -225,7 +225,7 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPIR_Request_create();
+    ureq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
diff --git a/src/mpid/ch3/src/mpid_startall.c b/src/mpid/ch3/src/mpid_startall.c
index fc103a8..ea1acbd 100644
--- a/src/mpid/ch3/src/mpid_startall.c
+++ b/src/mpid/ch3/src/mpid_startall.c
@@ -22,7 +22,7 @@
 /* This macro initializes all of the fields in a persistent request */
 #define MPIDI_Request_create_psreq(sreq_, mpi_errno_, FAIL_)		\
 {									\
-    (sreq_) = MPIR_Request_create();				\
+    (sreq_) = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);                  \
     if ((sreq_) == NULL)						\
     {									\
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"send request allocation failed");\
@@ -299,7 +299,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_RECV_INIT);
     
-    rreq = MPIR_Request_create();
+    rreq = MPIR_Request_create(MPIR_REQUEST_UNDEFINED);
     if (rreq == NULL)
     {
 	/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpid/common/hcoll/hcoll_rte.c b/src/mpid/common/hcoll/hcoll_rte.c
index 68d479a..acd3076 100644
--- a/src/mpid/common/hcoll/hcoll_rte.c
+++ b/src/mpid/common/hcoll/hcoll_rte.c
@@ -386,8 +386,7 @@ static int group_id(rte_grp_handle_t group)
 static void *get_coll_handle(void)
 {
     MPIR_Request *req;
-    req = MPIR_Request_create();
-    req->kind = MPIR_COLL_REQUEST;
+    req = MPIR_Request_create(MPIR_COLL_REQUEST);
     return (void *) req;
 }
 
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 3c95f20..9c70876 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -407,10 +407,9 @@ int MPIDU_Sched_start(MPID_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request
     MPIU_Assert(s->entries != NULL);
 
     /* now create and populate the request */
-    r = MPIR_Request_create();
+    r = MPIR_Request_create(MPIR_COLL_REQUEST);
     if (!r)
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem");
-    r->kind = MPIR_COLL_REQUEST;
     /* FIXME is this right when comm/datatype GC is used? */
     MPIR_Comm_add_ref(comm);
     r->comm = comm;

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

commit cff297b0a46908c9d4f40975eafb5337f19155e5
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Apr 19 14:42:11 2016 -0500

    Move cc_ptr close to cc in the MPIR_Request structure.
    
    In most cases, cc_ptr points to the address of cc in the same request
    structure.  It makes sense to keep these fields close to each other to
    maximize cache hits.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 6e018fe..fc2047c 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1585,17 +1585,19 @@ extern MPL_dbg_class MPIR_DBG_ASSERT;
   S*/
 typedef struct MPIR_Request {
     MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
+
     MPIR_Request_kind_t kind;
-    /* pointer to the completion counter */
-    /* This is necessary for the case when an operation is described by a 
-       list of requests */
+
+    /* pointer to the completion counter.  This is necessary for the
+     * case when an operation is described by a list of requests */
     MPIR_cc_t *cc_ptr;
+    /* the actual completion counter.  Ensure cc and status are in the
+     * same cache line, assuming the cache line size is a multiple of
+     * 32 bytes and 32-bit integers */
+    MPIR_cc_t cc;
+
     /* A comm is needed to find the proper error handler */
     MPIR_Comm *comm;
-    /* completion counter.  Ensure cc and status are in the same cache
-       line, assuming the cache line size is a multiple of 32 bytes
-       and 32-bit integers */
-    MPIR_cc_t cc;
     /* Status is needed for wait/test/recv */
     MPI_Status status;
     /* Persistent requests have their own "real" requests.  Receive requests

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

commit cb35f608b18c3045245db44eebee66a7a472ebeb
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Apr 20 16:36:15 2016 -0500

    Request creation/destruction reformatting.
    
    Request creation/destruction are really MPIR-level functionality,
    where the device can include hooks to manage its part of the fields.
    This patch moves this functionality to the MPIR layer.  The patch also
    moves around some definitions in mpiimpl.h to allow the code
    dependencies to be met.
    
    Signed-off-by: Wesley Bland <wesley.bland at intel.com>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index c2df158..6e018fe 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1482,6 +1482,90 @@ struct MPIR_Grequest_fns {
                                                        the generalize req */
 };
 
+#if defined (MPL_USE_DBG_LOGGING)
+extern MPL_dbg_class MPIR_DBG_INIT;
+extern MPL_dbg_class MPIR_DBG_PT2PT;
+extern MPL_dbg_class MPIR_DBG_THREAD;
+extern MPL_dbg_class MPIR_DBG_DATATYPE;
+extern MPL_dbg_class MPIR_DBG_COMM;
+extern MPL_dbg_class MPIR_DBG_BSEND;
+extern MPL_dbg_class MPIR_DBG_ERRHAND;
+extern MPL_dbg_class MPIR_DBG_OTHER;
+extern MPL_dbg_class MPIR_DBG_REQUEST;
+extern MPL_dbg_class MPIR_DBG_ASSERT;
+#endif /* MPL_USE_DBG_LOGGING */
+
+/* MPI_Status manipulation macros */
+#define MPIR_BITS_IN_INT (8 * SIZEOF_INT)
+
+/* We use bits from the "count_lo" and "count_hi_and_cancelled" fields
+ * to represent the 'count' and 'cancelled' objects.  The LSB of the
+ * "count_hi_and_cancelled" field represents the 'cancelled' object.
+ * The 'count' object is split between the "count_lo" and
+ * "count_hi_and_cancelled" fields, with the lower order bits going
+ * into the "count_lo" field, and the higher order bits goin into the
+ * "count_hi_and_cancelled" field.  This gives us 2N-1 bits for the
+ * 'count' object, where N is the size of int.  However, the value
+ * returned to the user is bounded by the definition on MPI_Count. */
+/* NOTE: The below code assumes that the count value is never
+ * negative.  For negative values, right-shifting can have weird
+ * implementation specific consequences. */
+#define MPIR_STATUS_SET_COUNT(status_, count_)                          \
+    {                                                                   \
+        (status_).count_lo = ((int) count_);                            \
+        (status_).count_hi_and_cancelled &= 1;                          \
+        (status_).count_hi_and_cancelled |= (int) ((MPIR_Ucount) count_ >> MPIR_BITS_IN_INT << 1); \
+    }
+
+#define MPIR_STATUS_GET_COUNT(status_)                                  \
+    ((MPI_Count) ((((MPIR_Ucount) (((unsigned int) (status_).count_hi_and_cancelled) >> 1)) << MPIR_BITS_IN_INT) + (unsigned int) (status_).count_lo))
+
+#define MPIR_STATUS_SET_CANCEL_BIT(status_, cancelled_)	\
+    {                                                   \
+        (status_).count_hi_and_cancelled &= ~1;         \
+        (status_).count_hi_and_cancelled |= cancelled_; \
+    }
+
+#define MPIR_STATUS_GET_CANCEL_BIT(status_)	((status_).count_hi_and_cancelled & 1)
+
+/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
+#define MPIR_Status_set_empty(status_)                          \
+    {                                                           \
+        if ((status_) != MPI_STATUS_IGNORE)                     \
+        {                                                       \
+            (status_)->MPI_SOURCE = MPI_ANY_SOURCE;             \
+            (status_)->MPI_TAG = MPI_ANY_TAG;                   \
+            MPIR_STATUS_SET_COUNT(*(status_), 0);               \
+            MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE);      \
+        }                                                       \
+    }
+/* See MPI 1.1, section 3.11, Null Processes */
+/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
+#define MPIR_Status_set_procnull(status_)                       \
+    {                                                           \
+        if ((status_) != MPI_STATUS_IGNORE)                     \
+        {                                                       \
+            (status_)->MPI_SOURCE = MPI_PROC_NULL;              \
+            (status_)->MPI_TAG = MPI_ANY_TAG;                   \
+            MPIR_STATUS_SET_COUNT(*(status_), 0);               \
+            MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE);      \
+        }                                                       \
+    }
+
+#define MPIR_Request_extract_status(request_ptr_, status_)								\
+{															\
+    if ((status_) != MPI_STATUS_IGNORE)											\
+    {															\
+	int error__;													\
+															\
+	/* According to the MPI 1.1 standard page 22 lines 9-12, the MPI_ERROR field may not be modified except by the	\
+	   functions in section 3.7.5 which return MPI_ERR_IN_STATUSES (MPI_Wait{all,some} and MPI_Test{all,some}). */	\
+	error__ = (status_)->MPI_ERROR;											\
+	*(status_) = (request_ptr_)->status;										\
+	(status_)->MPI_ERROR = error__;											\
+    }															\
+}
+
 #define MPIR_Request_is_complete(req_) (MPIR_cc_is_complete((req_)->cc_ptr))
 
 /*S
@@ -1563,12 +1647,148 @@ extern MPIU_Object_alloc_t MPIR_Request_mem;
 /* Preallocated request objects */
 extern MPIR_Request MPIR_Request_direct[];
 
+/*@
+  MPID_Request_init - Initialize device parts of request
+
+  Return value:
+  None
+  @*/
+void MPID_Request_init(MPIR_Request *);
+
+/*@
+  MPID_Request_finalize - Deallocate device parts of request
+
+  Input Parameter:
+. request - request to release
+
+  Module:
+  Request
+@*/
+void MPID_Request_finalize(MPIR_Request *);
+
+/*@
+  MPID_Request_complete - Complete a request
+
+  Input Parameter:
+. request - request to complete
+
+  Notes:
+  This routine is called to decrement the completion count of a
+  request object.  If the completion count of the request object has
+  reached zero, the reference count for the object will be
+  decremented.
+
+  Module:
+  Request
+@*/
+int MPID_Request_complete(MPIR_Request *);
+
+static inline MPIR_Request *MPIR_Request_create(void)
+{
+    MPIR_Request *req;
+
+    req = MPIU_Handle_obj_alloc(&MPIR_Request_mem);
+    if (req != NULL) {
+	MPL_DBG_MSG_P(MPIR_DBG_REQUEST,VERBOSE,
+                      "allocated request, handle=0x%08x", req->handle);
+#ifdef MPICH_DBG_OUTPUT
+	/*MPIU_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);*/
+	if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST)
+	{
+	    int mpi_errno;
+	    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,
+                                             FCNAME, __LINE__, MPI_ERR_OTHER,
+                                             "**invalid_handle", "**invalid_handle %d", req->handle);
+	    MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
+	}
+#endif
+	/* FIXME: This makes request creation expensive.  We need to
+         * trim this to the basics, with additional setup for
+         * special-purpose requests (think base class and
+         * inheritance).  For example, do we really* want to set the
+         * kind to UNDEFINED? And should the RMA values be set only
+         * for RMA requests? */
+	MPIU_Object_set_ref(req, 1);
+	req->kind = MPIR_REQUEST_UNDEFINED;
+        MPIR_cc_set(&req->cc, 1);
+	req->cc_ptr		   = &req->cc;
+
+	/* FIXME: status fields meaningful only for receive, and even
+         * then should not need to be set. */
+	req->status.MPI_SOURCE	   = MPI_UNDEFINED;
+	req->status.MPI_TAG	   = MPI_UNDEFINED;
+	req->status.MPI_ERROR	   = MPI_SUCCESS;
+        MPIR_STATUS_SET_COUNT(req->status, 0);
+        MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
+
+	req->comm		   = NULL;
+        req->greq_fns              = NULL;
+        req->errflag               = MPIR_ERR_NONE;
+        req->request_completed_cb  = NULL;
+
+        MPID_Request_init(req);
+    }
+    else
+    {
+	/* FIXME: This fails to fail if debugging is turned off */
+	MPL_DBG_MSG(MPIR_DBG_REQUEST,TYPICAL,"unable to allocate a request");
+    }
+
+    return req;
+}
+
 #define MPIR_Request_add_ref( _req ) \
     do { MPIU_Object_add_ref( _req ); } while (0)
 
 #define MPIR_Request_release_ref( _req, _inuse ) \
     do { MPIU_Object_release_ref( _req, _inuse ); } while (0)
 
+static inline void MPIR_Request_free(MPIR_Request *req)
+{
+    int inuse;
+
+    MPIR_Request_release_ref(req, &inuse);
+    if (inuse == 0) {
+        MPL_DBG_MSG_P(MPIR_DBG_REQUEST,VERBOSE,
+                       "freeing request, handle=0x%08x", req->handle);
+
+#ifdef MPICH_DBG_OUTPUT
+        if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST)
+        {
+            int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,
+                                                 FCNAME, __LINE__, MPI_ERR_OTHER,
+                                                 "**invalid_handle", "**invalid_handle %d", req->handle);
+            MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
+        }
+
+        if (req->ref_count != 0)
+        {
+            int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,
+                                                 FCNAME, __LINE__, MPI_ERR_OTHER,
+                                                 "**invalid_refcount", "**invalid_refcount %d", req->ref_count);
+            MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
+        }
+#endif
+
+        /* FIXME: We need a better way to handle these so that we do
+         * not always need to initialize these fields and check them
+         * when we destroy a request */
+        /* FIXME: We need a way to call these routines ONLY when the
+         * related ref count has become zero. */
+        if (req->comm != NULL) {
+            MPIR_Comm_release(req->comm);
+        }
+
+        if (req->greq_fns != NULL) {
+            MPL_free(req->greq_fns);
+        }
+
+        MPID_Request_finalize(req);
+
+        MPIU_Handle_obj_free(&MPIR_Request_mem, req);
+    }
+}
+
 /* These macros allow us to implement a sendq when debugger support is
    selected.  As there is extra overhead for this, we only do this
    when specifically requested 
@@ -2111,19 +2331,6 @@ typedef struct MPICH_PerProcess_t {
 } MPICH_PerProcess_t;
 extern MPICH_PerProcess_t MPIR_Process;
 
-#if defined (MPL_USE_DBG_LOGGING)
-extern MPL_dbg_class MPIR_DBG_INIT;
-extern MPL_dbg_class MPIR_DBG_PT2PT;
-extern MPL_dbg_class MPIR_DBG_THREAD;
-extern MPL_dbg_class MPIR_DBG_DATATYPE;
-extern MPL_dbg_class MPIR_DBG_COMM;
-extern MPL_dbg_class MPIR_DBG_BSEND;
-extern MPL_dbg_class MPIR_DBG_ERRHAND;
-extern MPL_dbg_class MPIR_DBG_OTHER;
-
-extern MPL_dbg_class MPIR_DBG_ASSERT;
-#endif /* MPL_USE_DBG_LOGGING */
-
 /* ------------------------------------------------------------------------- */
 /* In MPICH, each function has an "enter" and "exit" macro.  These can be 
  * used to add various features to each function at compile time, or they
@@ -2215,76 +2422,6 @@ void MPIR_Err_print_stack(FILE *, int);
 /* ------------------------------------------------------------------------- */
 
 
-/* MPI_Status manipulation macros */
-#define MPIR_BITS_IN_INT (8 * SIZEOF_INT)
-
-/* We use bits from the "count_lo" and "count_hi_and_cancelled" fields
- * to represent the 'count' and 'cancelled' objects.  The LSB of the
- * "count_hi_and_cancelled" field represents the 'cancelled' object.
- * The 'count' object is split between the "count_lo" and
- * "count_hi_and_cancelled" fields, with the lower order bits going
- * into the "count_lo" field, and the higher order bits goin into the
- * "count_hi_and_cancelled" field.  This gives us 2N-1 bits for the
- * 'count' object, where N is the size of int.  However, the value
- * returned to the user is bounded by the definition on MPI_Count. */
-/* NOTE: The below code assumes that the count value is never
- * negative.  For negative values, right-shifting can have weird
- * implementation specific consequences. */
-#define MPIR_STATUS_SET_COUNT(status_, count_)                          \
-    {                                                                   \
-        (status_).count_lo = ((int) count_);                            \
-        (status_).count_hi_and_cancelled &= 1;                          \
-        (status_).count_hi_and_cancelled |= (int) ((MPIR_Ucount) count_ >> MPIR_BITS_IN_INT << 1); \
-    }
-
-#define MPIR_STATUS_GET_COUNT(status_)                                  \
-    ((MPI_Count) ((((MPIR_Ucount) (((unsigned int) (status_).count_hi_and_cancelled) >> 1)) << MPIR_BITS_IN_INT) + (unsigned int) (status_).count_lo))
-
-#define MPIR_STATUS_SET_CANCEL_BIT(status_, cancelled_)	\
-    {                                                   \
-        (status_).count_hi_and_cancelled &= ~1;         \
-        (status_).count_hi_and_cancelled |= cancelled_; \
-    }
-
-#define MPIR_STATUS_GET_CANCEL_BIT(status_)	((status_).count_hi_and_cancelled & 1)
-
-/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
-#define MPIR_Status_set_empty(status_)                          \
-    {                                                           \
-        if ((status_) != MPI_STATUS_IGNORE)                     \
-        {                                                       \
-            (status_)->MPI_SOURCE = MPI_ANY_SOURCE;             \
-            (status_)->MPI_TAG = MPI_ANY_TAG;                   \
-            MPIR_STATUS_SET_COUNT(*(status_), 0);               \
-            MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE);      \
-        }                                                       \
-    }
-/* See MPI 1.1, section 3.11, Null Processes */
-/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
-#define MPIR_Status_set_procnull(status_)                       \
-    {                                                           \
-        if ((status_) != MPI_STATUS_IGNORE)                     \
-        {                                                       \
-            (status_)->MPI_SOURCE = MPI_PROC_NULL;              \
-            (status_)->MPI_TAG = MPI_ANY_TAG;                   \
-            MPIR_STATUS_SET_COUNT(*(status_), 0);               \
-            MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE);      \
-        }                                                       \
-    }
-
-#define MPIR_Request_extract_status(request_ptr_, status_)								\
-{															\
-    if ((status_) != MPI_STATUS_IGNORE)											\
-    {															\
-	int error__;													\
-															\
-	/* According to the MPI 1.1 standard page 22 lines 9-12, the MPI_ERROR field may not be modified except by the	\
-	   functions in section 3.7.5 which return MPI_ERR_IN_STATUSES (MPI_Wait{all,some} and MPI_Test{all,some}). */	\
-	error__ = (status_)->MPI_ERROR;											\
-	*(status_) = (request_ptr_)->status;										\
-	(status_)->MPI_ERROR = error__;											\
-    }															\
-}
 /* ------------------------------------------------------------------------- */
 
 /* FIXME: The bindings should be divided into three groups:
@@ -3473,56 +3610,6 @@ int MPID_Progress_test(void);
   @*/
 int MPID_Progress_poke(void);
 
-/*@
-  MPID_Request_create - Create and return a bare request
-
-  Return value:
-  A pointer to a new request object.
-
-  Notes:
-  This routine is intended for use by 'MPI_Grequest_start' only.  Note that 
-  once a request is created with this routine, any progress engine must assume 
-  that an outside function can complete a request with 
-  'MPID_Request_complete'.
-
-  The request object returned by this routine should be initialized such that
-  ref_count is one and handle contains a valid handle referring to the object.
-  @*/
-MPIR_Request * MPID_Request_create(void);
-
-/*@
-  MPID_Request_release - Release a request 
-
-  Input Parameter:
-. request - request to release
-
-  Notes:
-  This routine is called to release a reference to request object.  If
-  the reference count of the request object has reached zero, the object will
-  be deallocated.
-
-  Module:
-  Request
-@*/
-void MPID_Request_release(MPIR_Request *);
-
-/*@
-  MPID_Request_complete - Complete a request
-
-  Input Parameter:
-. request - request to complete
-
-  Notes:
-  This routine is called to decrement the completion count of a
-  request object.  If the completion count of the request object has
-  reached zero, the reference count for the object will be
-  decremented.
-
-  Module:
-  Request
-@*/
-int MPID_Request_complete(MPIR_Request *);
-
 typedef struct MPIR_Grequest_class {
      MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
      MPI_Grequest_query_function *query_fn;
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 1df8e15..148178c 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -301,7 +301,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
     if (request_ptr) {
         mpi_errno = MPIC_Wait(request_ptr, errflag);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-        MPID_Request_release(request_ptr);
+        MPIR_Request_free(request_ptr);
     }
 
  fn_exit:
@@ -310,7 +310,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
     return mpi_errno;
  fn_fail:
     /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) MPID_Request_release(request_ptr);
+    if (request_ptr) MPIR_Request_free(request_ptr);
     if (mpi_errno && !*errflag) {
         if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(mpi_errno)) {
             *errflag = MPIR_ERR_PROC_FAILED;
@@ -358,7 +358,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int
 
         *status = request_ptr->status;
         mpi_errno = status->MPI_ERROR;
-        MPID_Request_release(request_ptr);
+        MPIR_Request_free(request_ptr);
     } else {
         MPIR_Process_status(status, errflag);
 
@@ -375,7 +375,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int
     return mpi_errno;
  fn_fail:
     /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) MPID_Request_release(request_ptr);
+    if (request_ptr) MPIR_Request_free(request_ptr);
     goto fn_exit;
     /* --END ERROR HANDLING-- */
 }
@@ -417,7 +417,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
     if (request_ptr) {
         mpi_errno = MPIC_Wait(request_ptr, errflag);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-        MPID_Request_release(request_ptr);
+        MPIR_Request_free(request_ptr);
     }
 
  fn_exit:
@@ -426,7 +426,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
     return mpi_errno;
  fn_fail:
     /* --BEGIN ERROR HANDLING-- */
-    if (request_ptr) MPID_Request_release(request_ptr);
+    if (request_ptr) MPIR_Request_free(request_ptr);
     if (mpi_errno && !*errflag) {
         if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(mpi_errno)) {
             *errflag = MPIR_ERR_PROC_FAILED;
@@ -497,8 +497,8 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype
         }
     }
 
-    MPID_Request_release(send_req_ptr);
-    MPID_Request_release(recv_req_ptr);
+    MPIR_Request_free(send_req_ptr);
+    MPIR_Request_free(recv_req_ptr);
 
  fn_exit:
     MPL_DBG_MSG_D(MPIR_DBG_PT2PT, TYPICAL, "OUT: errflag = %d", *errflag);
@@ -507,9 +507,9 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype
     return mpi_errno;
  fn_fail:
     if (send_req_ptr)
-        MPID_Request_release(send_req_ptr);
+        MPIR_Request_free(send_req_ptr);
     if (recv_req_ptr)
-        MPID_Request_release(recv_req_ptr);
+        MPIR_Request_free(recv_req_ptr);
     goto fn_exit;
 }
 
@@ -578,7 +578,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
         /* --BEGIN ERROR HANDLING-- */
         /* FIXME: should we cancel the pending (possibly completed) receive
          * request or wait for it to complete? */
-        MPID_Request_release(rreq);
+        MPIR_Request_free(rreq);
         MPIR_ERR_POP(mpi_errno);
         /* --END ERROR HANDLING-- */
     }
@@ -598,8 +598,8 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
         }
     }
 
-    MPID_Request_release(sreq);
-    MPID_Request_release(rreq);
+    MPIR_Request_free(sreq);
+    MPIR_Request_free(rreq);
 
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
@@ -608,9 +608,9 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
     return mpi_errno;
  fn_fail:
      if (sreq)
-         MPID_Request_release(sreq);
+         MPIR_Request_free(sreq);
      if (rreq)
-         MPID_Request_release(rreq);
+         MPIR_Request_free(rreq);
     goto fn_exit;
 }
 
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 867c104..f2e522a 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -304,6 +304,7 @@ MPL_dbg_class MPIR_DBG_COMM;
 MPL_dbg_class MPIR_DBG_BSEND;
 MPL_dbg_class MPIR_DBG_ERRHAND;
 MPL_dbg_class MPIR_DBG_OTHER;
+MPL_dbg_class MPIR_DBG_REQUEST;
 
 /* these classes might need to move out later */
 MPL_dbg_class MPIR_DBG_ASSERT;
@@ -560,6 +561,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
     MPIR_DBG_BSEND = MPL_dbg_class_alloc("BSEND", "bsend");
     MPIR_DBG_ERRHAND = MPL_dbg_class_alloc("ERRHAND", "errhand");
     MPIR_DBG_OTHER = MPL_dbg_class_alloc("OTHER", "other");
+    MPIR_DBG_REQUEST = MPL_dbg_class_alloc("REQUEST", "request");
 
     MPIR_DBG_ASSERT = MPL_dbg_class_alloc("ASSERT", "assert");
     MPIR_DBG_STRING = MPL_dbg_class_alloc("STRING", "string");
diff --git a/src/mpi/pt2pt/greq_complete.c b/src/mpi/pt2pt/greq_complete.c
index 7ab42ee..419b2c0 100644
--- a/src/mpi/pt2pt/greq_complete.c
+++ b/src/mpi/pt2pt/greq_complete.c
@@ -40,7 +40,7 @@ void MPIR_Grequest_complete_impl(MPIR_Request *request_ptr)
     MPID_Request_complete( request_ptr );
 
     /* The request release comes with the wait/test, not this complete
-       routine, so we don't call the MPID_Request_release routine */
+       routine, so we don't call the MPIR_Request_free routine */
 }
 
 #endif
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 39faae4..bd91733 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -84,7 +84,7 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
 
     /* MT FIXME this routine is not thread-safe in the non-global case */
     
-    *request_ptr = MPID_Request_create();
+    *request_ptr = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP1(request_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "generalized request");
     
     (*request_ptr)->kind                 = MPIR_UREQUEST;
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 97f066a..ab4ad49 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -81,7 +81,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	    }
 	    mpi_errno = request_ptr->status.MPI_ERROR;
 	    MPIR_SENDQ_FORGET(request_ptr);
-	    MPID_Request_release(request_ptr);
+	    MPIR_Request_free(request_ptr);
             if (NULL != request) *request = MPI_REQUEST_NULL;
 	    break;
 	}
@@ -89,7 +89,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 	{
 	    MPIR_Request_extract_status(request_ptr, status);
 	    mpi_errno = request_ptr->status.MPI_ERROR;
-	    MPID_Request_release(request_ptr);
+	    MPIR_Request_free(request_ptr);
             if (NULL != request) *request = MPI_REQUEST_NULL;
 	    break;
 	}
@@ -138,7 +138,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
                     }
 		}
 
-		MPID_Request_release(prequest_ptr);
+		MPIR_Request_free(prequest_ptr);
 	    }
 	    else
 	    {
@@ -176,7 +176,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 		MPIR_Request_extract_status(prequest_ptr, status);
 		mpi_errno = prequest_ptr->status.MPI_ERROR;
 
-		MPID_Request_release(prequest_ptr);
+		MPIR_Request_free(prequest_ptr);
 	    }
 	    else
 	    {
@@ -214,7 +214,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
                 mpi_errno = rc;
             }
             
-            MPID_Request_release(request_ptr);
+            MPIR_Request_free(request_ptr);
             if (NULL != request) *request = MPI_REQUEST_NULL;
 	    
 	    break;
@@ -225,7 +225,7 @@ int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
         {
             mpi_errno = request_ptr->status.MPI_ERROR;
             MPIR_Request_extract_status(request_ptr, status);
-            MPID_Request_release(request_ptr);
+            MPIR_Request_free(request_ptr);
             if (NULL != request) *request = MPI_REQUEST_NULL;
             break;
         }
diff --git a/src/mpi/pt2pt/recv.c b/src/mpi/pt2pt/recv.c
index 132db58..3c4bbde 100644
--- a/src/mpi/pt2pt/recv.c
+++ b/src/mpi/pt2pt/recv.c
@@ -181,7 +181,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
 
     mpi_errno = request_ptr->status.MPI_ERROR;
     MPIR_Request_extract_status(request_ptr, status);
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
diff --git a/src/mpi/pt2pt/request_free.c b/src/mpi/pt2pt/request_free.c
index 8f91575..db8249f 100644
--- a/src/mpi/pt2pt/request_free.c
+++ b/src/mpi/pt2pt/request_free.c
@@ -131,7 +131,7 @@ int MPI_Request_free(MPI_Request *request)
 		    mpi_errno = MPIR_Grequest_free(
 			request_ptr->partner_request);
 		}
-		MPID_Request_release(request_ptr->partner_request);
+		MPIR_Request_free(request_ptr->partner_request);
 	    }
 	    break;
 	}
@@ -143,7 +143,7 @@ int MPI_Request_free(MPI_Request *request)
 	       release the partner request. */
 	    if (request_ptr->partner_request != NULL)
 	    {
-		MPID_Request_release(request_ptr->partner_request);
+		MPIR_Request_free(request_ptr->partner_request);
 	    }
 	    break;
 	}
@@ -165,7 +165,7 @@ int MPI_Request_free(MPI_Request *request)
 	/* --END ERROR HANDLING-- */
     }
 
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
     *request = MPI_REQUEST_NULL;
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/pt2pt/rsend.c b/src/mpi/pt2pt/rsend.c
index 8c697c1..d958ae9 100644
--- a/src/mpi/pt2pt/rsend.c
+++ b/src/mpi/pt2pt/rsend.c
@@ -150,7 +150,7 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
     }
 
     mpi_errno = request_ptr->status.MPI_ERROR;
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
 		
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
diff --git a/src/mpi/pt2pt/send.c b/src/mpi/pt2pt/send.c
index 537a9f5..edb2a81 100644
--- a/src/mpi/pt2pt/send.c
+++ b/src/mpi/pt2pt/send.c
@@ -155,7 +155,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
     }
 
     mpi_errno = request_ptr->status.MPI_ERROR;
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
     
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
diff --git a/src/mpi/pt2pt/sendrecv.c b/src/mpi/pt2pt/sendrecv.c
index 4f34c55..bfa03df 100644
--- a/src/mpi/pt2pt/sendrecv.c
+++ b/src/mpi/pt2pt/sendrecv.c
@@ -169,7 +169,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
 	/* --BEGIN ERROR HANDLING-- */
 	/* FIXME: should we cancel the pending (possibly completed) receive request or wait for it to complete? */
-	MPID_Request_release(rreq);
+	MPIR_Request_free(rreq);
 	goto fn_fail;
 	/* --END ERROR HANDLING-- */
     }
@@ -212,13 +212,13 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
     mpi_errno = rreq->status.MPI_ERROR;
     MPIR_Request_extract_status(rreq, status);
-    MPID_Request_release(rreq);
+    MPIR_Request_free(rreq);
     
     if (mpi_errno == MPI_SUCCESS)
     {
 	mpi_errno = sreq->status.MPI_ERROR;
     }
-    MPID_Request_release(sreq);
+    MPIR_Request_free(sreq);
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
     
diff --git a/src/mpi/pt2pt/sendrecv_rep.c b/src/mpi/pt2pt/sendrecv_rep.c
index 0092f62..e9d2f11 100644
--- a/src/mpi/pt2pt/sendrecv_rep.c
+++ b/src/mpi/pt2pt/sendrecv_rep.c
@@ -168,7 +168,7 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 	{
 	    /* --BEGIN ERROR HANDLING-- */
 	    /* FIXME: should we cancel the pending (possibly completed) receive request or wait for it to complete? */
-	    MPID_Request_release(rreq);
+	    MPIR_Request_free(rreq);
 	    goto fn_fail;
 	    /* --END ERROR HANDLING-- */
 	}
@@ -208,8 +208,8 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 	    }
 	}
     
-	MPID_Request_release(sreq);
-	MPID_Request_release(rreq);
+	MPIR_Request_free(sreq);
+	MPIR_Request_free(rreq);
     }
 #   endif
 
diff --git a/src/mpi/pt2pt/ssend.c b/src/mpi/pt2pt/ssend.c
index 80ed009..38880a2 100644
--- a/src/mpi/pt2pt/ssend.c
+++ b/src/mpi/pt2pt/ssend.c
@@ -133,7 +133,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
     mpi_errno = request_ptr->status.MPI_ERROR;
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
     
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index 273753c..5d9546e 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -56,7 +56,7 @@ static inline int request_complete_fastpath(MPI_Request *request, MPIR_Request *
     /* the completion path for SEND and RECV is the same at this time, modulo
      * the SENDQ hook above */
     mpi_errno = request_ptr->status.MPI_ERROR;
-    MPID_Request_release(request_ptr);
+    MPIR_Request_free(request_ptr);
     *request = MPI_REQUEST_NULL;
 
     /* avoid normal fn_exit/fn_fail jump pattern to reduce jumps and compiler confusion */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index 24d0f7d..12601ab 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -159,8 +159,8 @@ typedef union MPIDI_CH3_nem_pkt
             if (NULL != _rts_req) {                                                                     \
                 /* error case: drop both the ch3 and nemesis                                            \
                  * references, so the request can be cleanly freed */                                   \
-                MPID_Request_release(_rts_req);                                                         \
-                MPID_Request_release(_rts_req);                                                         \
+                MPIR_Request_free(_rts_req);                                                         \
+                MPIR_Request_free(_rts_req);                                                         \
             }                                                                                           \
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rtspkt");                                  \
         }                                                                                               \
@@ -172,11 +172,11 @@ typedef union MPIDI_CH3_nem_pkt
                 mpi_errno = _rts_req->status.MPI_ERROR;                                                 \
                 /* error case: drop both the ch3 and nemesis                                            \
                  * references, so the request can be cleanly freed */                                   \
-                MPID_Request_release(_rts_req);                                                         \
-                MPID_Request_release(_rts_req);                                                         \
+                MPIR_Request_free(_rts_req);                                                         \
+                MPIR_Request_free(_rts_req);                                                         \
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rtspkt");                              \
             }                                                                                           \
-            MPID_Request_release(_rts_req);                                                             \
+            MPIR_Request_free(_rts_req);                                                             \
         }                                                                                               \
     } while (0)
 
@@ -202,7 +202,7 @@ typedef union MPIDI_CH3_nem_pkt
         if (_cts_req != NULL)                                                                           \
         {                                                                                               \
             MPIR_ERR_CHKANDJUMP(_cts_req->status.MPI_ERROR, mpi_errno, MPI_ERR_OTHER, "**ctspkt");      \
-            MPID_Request_release(_cts_req);                                                             \
+            MPIR_Request_free(_cts_req);                                                             \
         }                                                                                               \
     } while (0)
         
@@ -253,7 +253,7 @@ static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPIR_Request *req,
     if (cookie_req != NULL)
     {
         MPIR_ERR_CHKANDJUMP(cookie_req->status.MPI_ERROR, mpi_errno, MPI_ERR_OTHER, "**cookiepkt");
-        MPID_Request_release(cookie_req);
+        MPIR_Request_free(cookie_req);
     }
 
 fn_fail:
@@ -273,7 +273,7 @@ fn_fail:
         if (_done_req != NULL)                                                                                  \
         {                                                                                                       \
             MPIR_ERR_CHKANDJUMP(_done_req->status.MPI_ERROR, mpi_errno, MPI_ERR_OTHER, "**donepkt");            \
-            MPID_Request_release(_done_req);                                                                    \
+            MPIR_Request_free(_done_req);                                                                    \
         }                                                                                                       \
     } while (0)   
 
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
index 54fd0ab..92b27af 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
@@ -40,7 +40,7 @@ extern struct MPIR_Request *MPIDI_CH3I_shm_active_send;
         MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST,                         \
                           "MPIDI_CH3I_Sendq_dequeuereq=%p (handle=%#x), queue=%p",      \
                           *(ep), *(ep) ? (*(ep))->handle : -1, qp));                    \
-        MPID_Request_release(*(ep));                                                    \
+        MPIR_Request_free(*(ep));                                                    \
     } while (0)
 #define MPIDI_CH3I_Sendq_enqueue_multiple_no_refcount(qp, ep0, ep1)             \
     /* used to move reqs from one queue to another, so we don't update */       \
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
index d6015f9..ef38a63 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -96,7 +96,7 @@ static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
              * control message send follows
              * MPIDI_CH3_iStartMsg/v-->MPID_nem_llc_iStartContigMsg-->MPID_nem_llc_iSendContig
              * and MPID_nem_llc_iSendContig set req->dev.state to zero
-             * because MPID_Request_create (in src/mpid/ch3/src/ch3u_request.c)
+             * because MPIR_Request_create
              * sets it to zero. In addition, eager-short message has req->comm of zero. */
 #ifndef	notdef_leak_0001_hack
             /* See also MPIDI_CH3_Request_create and _destory() */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
index 0e84902..70b47d3 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
@@ -157,7 +157,7 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 2);
         req->kind = MPIR_REQUEST_MPROBE;
         req->comm = comm;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 37ebaa5..389b3f0 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -43,7 +43,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPID_Request_create();
+    struct MPIR_Request *sreq = MPIR_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -186,7 +186,7 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "hdr type   = %d", ((MPIDI_CH3_Pkt_t *) hdr)->type);
 
     /* create a request */
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -976,7 +976,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPIR_Request *sreq = MPID_Request_create();
+    struct MPIR_Request *sreq = MPIR_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
index 661904b..f577c68 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -200,7 +200,7 @@ typedef GENERIC_Q_DECL(struct MPIR_Request) MPID_nem_mxm_reqq_t;
         MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST,                         \
                           "MPID_nem_mxm_queue_dequeuereq=%p (handle=%#x), queue=%p",      \
                           *(ep), *(ep) ? (*(ep))->handle : -1, qp));                    \
-        MPID_Request_release(*(ep));                                                    \
+        MPIR_Request_free(*(ep));                                                    \
     } while (0)
 
 typedef struct MPID_nem_mxm_module_t {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
index 020ca84..437ac38 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
@@ -135,7 +135,7 @@ int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
         *flag = 1;
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 2);
         req->kind = MPIR_REQUEST_MPROBE;
         req->comm = comm;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index 49c489c..8546b53 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -113,7 +113,7 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
     MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *) hdr);
 
     /* create a request */
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     MPIU_Memcpy(&(sreq->dev.pending_pkt), (char *) hdr, sizeof(MPIDI_CH3_Pkt_t));
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 6c389f6..5b052e9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -249,7 +249,7 @@ static inline int MPID_nem_ofi_create_req(MPIR_Request ** request, int refcnt)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *req;
-    req = MPID_Request_create();
+    req = MPIR_Request_create();
     MPIU_Assert(req);
     MPIDI_Request_clear_dbg(req);
     MPIU_Object_set_ref(req, refcnt);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
index 5f46527..aac2e5b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
@@ -99,7 +99,7 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
     ret = fi_trecvmsg(gl_data.endpoint,&msg,msgflags);
     if(ret == -ENOMSG) {
       if (rreq_ptr) {
-        MPID_Request_release(rreq);
+        MPIR_Request_free(rreq);
         *rreq_ptr = NULL;
         *flag = 0;
       }
@@ -115,7 +115,7 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
 
     if (PEEK_NOT_FOUND == REQ_OFI(rreq)->match_state) {
         if (rreq_ptr) {
-            MPID_Request_release(rreq);
+            MPIR_Request_free(rreq);
             *rreq_ptr = NULL;
             *flag = 0;
         }
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index 8f0d725..043d6ea 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -68,7 +68,7 @@ static inline MPID_nem_ptl_req_area * REQ_PTL(MPIR_Request *req) {
     } while (0)
 
 #define MPID_nem_ptl_request_create_sreq(sreq_, errno_, comm_) do {                                             \
-        (sreq_) = MPID_Request_create();                                                                        \
+        (sreq_) = MPIR_Request_create();                                                                        \
         MPIU_Object_set_ref((sreq_), 2);                                                                        \
         (sreq_)->kind               = MPIR_REQUEST_SEND;                                                        \
         MPIR_Comm_add_ref(comm_);                                                                               \
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index 2b59c89..44b651a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -54,7 +54,7 @@ static inline int handle_request(MPIR_Request *req)
     incr_expected_recv_ptr(REQ_PTL(req)->bytes_put);
     /* Free resources */
     MPL_free(TMPBUF(req));
-    MPID_Request_release(req);
+    MPIR_Request_free(req);
     return mpi_errno;
 }
 
@@ -365,7 +365,7 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* create a request */
-    *sreq_ptr = MPID_Request_create();
+    *sreq_ptr = MPIR_Request_create();
     MPIU_Assert(*sreq_ptr != NULL);
     MPIU_Object_set_ref(*sreq_ptr, 2);
     (*sreq_ptr)->kind = MPIR_REQUEST_SEND;
@@ -484,7 +484,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                         MPIR_ERR_POP(mpi_errno);
                 }
                 else {
-                    MPIR_Request *req = MPID_Request_create();
+                    MPIR_Request *req = MPIR_Request_create();
                     /* This request is actually complete; just needs to wait to enforce ordering */
                     TMPBUF(req) = MPL_malloc(packet_sz);
                     MPIU_Assert(TMPBUF(req));
@@ -501,7 +501,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                 char *buf_ptr;
                 ptl_size_t target_offset;
 
-                MPIR_Request *req = MPID_Request_create();
+                MPIR_Request *req = MPIR_Request_create();
                 MPIU_Assert(req != NULL);
                 MPIDI_CH3U_Request_decrement_cc(req, &incomplete);  /* We'll increment it below */
                 REQ_PTL(req)->event_handler = MPID_nem_ptl_nm_ctl_event_handler;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index 8c3d342..da36d85 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -127,8 +127,8 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     id_any.phys.pid = PTL_PID_ANY;
     
     /* create a request */
-    req = MPID_Request_create();
-    MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Request_create");
+    req = MPIR_Request_create();
+    MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
     REQ_PTL(req)->event_handler = handle_probe;
 
@@ -171,7 +171,7 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     if (status != MPI_STATUS_IGNORE)
         *status = req->status;
     
-    MPID_Request_release(req);
+    MPIR_Request_free(req);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_PTL_IPROBE);
@@ -202,9 +202,9 @@ int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, i
     id_any.phys.pid = PTL_PID_ANY;
 
     /* create a request */
-    req = MPID_Request_create();
+    req = MPIR_Request_create();
     MPID_nem_ptl_init_req(req);
-    MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Request_create");
+    MPIR_ERR_CHKANDJUMP1(!req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(req, 2); /* 1 ref for progress engine and 1 ref for us */
     REQ_PTL(req)->event_handler = handle_mprobe;
     req->kind = MPIR_REQUEST_MPROBE;
@@ -251,7 +251,7 @@ int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, i
         *message = req;
     }
     else {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
  fn_exit:
@@ -323,9 +323,9 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
 
     /* create a dummy request and search for the message */
     /* create a request */
-    search_req = MPID_Request_create();
+    search_req = MPIR_Request_create();
     MPID_nem_ptl_init_req(search_req);
-    MPIR_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Request_create");
+    MPIR_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIR_Request_create");
     MPIU_Object_set_ref(search_req, 2); /* 1 ref for progress engine and 1 ref for us */
     search_req->kind = MPIR_REQUEST_MPROBE;
 
@@ -368,9 +368,9 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
     if (REQ_PTL(search_req)->found)
         MPL_free(search_req->dev.tmpbuf);
 
-    MPID_Request_release(search_req);
+    MPIR_Request_free(search_req);
     if (resp_req != NULL)
-        MPID_Request_release(resp_req);
+        MPIR_Request_free(resp_req);
 
  fn_exit:
     return mpi_errno;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index c7da822..35a9358 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -324,7 +324,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     return mpi_errno;
  fn_fail:
     if (sreq) {
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
         sreq = NULL;
     }
     MPIU_CHKPMEM_REAP();
@@ -405,7 +405,7 @@ int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc,  struct MPIR_Request *sreq)
                                  0, &csr_sreq);
 
     if (csr_sreq != NULL)
-        MPID_Request_release(csr_sreq);
+        MPIR_Request_free(csr_sreq);
 
  fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
index 1bded15..7f91c72 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
@@ -88,7 +88,7 @@ int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t *vc)
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     if (unpause_req) {
         if (unpause_req->status.MPI_ERROR) MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
-        MPID_Request_release(unpause_req);
+        MPIR_Request_free(unpause_req);
         if (mpi_errno) goto fn_fail;
     }
 
@@ -125,10 +125,10 @@ int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc)
     if (sreq != NULL) {
         if (sreq->status.MPI_ERROR != MPI_SUCCESS) {
             mpi_errno = sreq->status.MPI_ERROR;
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
             MPIR_ERR_INTERNALANDJUMP(mpi_errno, "Failed to send checkpoint unpause pkt.");
         }
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
     }
     
 fn_exit:
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index 417fbd1..3ed5558 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -306,7 +306,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -445,7 +445,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "enqueuing");
 
     /* create a request */
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     MPIU_Assert (sreq != NULL);
     MPIU_Object_set_ref (sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -854,7 +854,7 @@ fn_exit:
     MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TCP_SENDNONCONTIG);
     return mpi_errno;
 fn_fail:
-    MPID_Request_release(sreq);
+    MPIR_Request_free(sreq);
     goto fn_exit;
 }
 
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index cb226e3..56dfb65 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -89,7 +89,7 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPIR_Reques
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "enqueuing");
 
 	/* create a request */
-	sreq = MPID_Request_create();
+	sreq = MPIR_Request_create();
 	MPIU_Assert (sreq != NULL);
 	MPIU_Object_set_ref (sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index 2732eea..46128f0 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -117,7 +117,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	{
             /* Create a new request and save remaining portions of the
 	     * iov in it. */
- 	    sreq = MPID_Request_create();
+            sreq = MPIR_Request_create();
 	    MPIU_Assert(sreq != NULL);
 	    MPIU_Object_set_ref(sreq, 2);
 	    sreq->kind = MPIR_REQUEST_SEND;
@@ -148,7 +148,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request
 	
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "request enqueued");
 	/* create a request */
-	sreq = MPID_Request_create();
+	sreq = MPIR_Request_create();
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index d3b7a8f..f38211b 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -119,7 +119,7 @@ static int check_terminating_vcs(void)
     while (!TERMQ_EMPTY() && MPIR_Request_is_complete(TERMQ_HEAD()->req)) {
         vc_term_element_t *ep;
         TERMQ_DEQUEUE(&ep);
-        MPID_Request_release(ep->req);
+        MPIR_Request_free(ep->req);
         mpi_errno = shm_connection_terminated(ep->vc);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
         MPL_free(ep);
@@ -1166,7 +1166,7 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
             req->status.MPI_ERROR = MPI_SUCCESS;
             MPIR_ERR_SET1(req->status.MPI_ERROR, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank);
             
-            MPID_Request_release(req); /* ref count was incremented when added to queue */
+            MPIR_Request_free(req); /* ref count was incremented when added to queue */
             mpi_errno = MPID_Request_complete(req);
             if (mpi_errno != MPI_SUCCESS) {
                 MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
index 3b9ac78..6ab78a0 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
@@ -445,7 +445,7 @@ int MPIDI_nem_ckpt_start(void)
         if (req != NULL)
         {
             MPIR_ERR_CHKANDJUMP(req->status.MPI_ERROR, mpi_errno, MPI_ERR_OTHER, "**ckptpkt");
-            MPID_Request_release(req);
+            MPIR_Request_free(req);
         }
 
         if (!vc_ch->is_local) {
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index f0b016a..da5c49c 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -339,7 +339,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
        the RTS request object. */
     MPIDI_Request_fetch_and_clear_rts_sreq(sreq, &rts_sreq);
     if (rts_sreq != NULL)
-        MPID_Request_release(rts_sreq);
+        MPIR_Request_free(rts_sreq);
 
     if (cts_pkt->cookie_len != 0)
     {
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index dafd598..32dd078 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -96,7 +96,7 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int
     if (*sreq_ptr == NULL)
     {
 	/* create a request */
-	sreq = MPID_Request_create();
+	sreq = MPIR_Request_create();
 	MPIU_Assert(sreq != NULL);
 	MPIU_Object_set_ref(sreq, 2);
 	sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
index 884b799..f7f6cd4 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
@@ -57,7 +57,7 @@
     {									\
 	vcch->sendq_tail = NULL;					\
     }									\
-    MPID_Request_release(req_);                                         \
+    MPIR_Request_free(req_);                                         \
 }
 
 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 882d4cf..5027519 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -18,7 +18,7 @@ static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
 
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
@@ -126,7 +126,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_write failed, rc=%d", rc);
-		sreq = MPID_Request_create();
+		sreq = MPIR_Request_create();
 		if (!sreq) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
@@ -194,7 +194,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPID_Request_create();
+	sreq = MPIR_Request_create();
 	if (!sreq) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index 07214bb..da1b8ad 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -19,7 +19,7 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
     
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     /* --BEGIN ERROR HANDLING-- */
     if (sreq == NULL)
 	return NULL;
@@ -57,7 +57,7 @@ static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
  * the request.
  */
 
-/* XXX - What do we do if MPID_Request_create() returns NULL???  
+/* XXX - What do we do if MPIR_Request_create() returns NULL???
    If MPIDI_CH3_iStartMsgv() returns NULL, the calling code
    assumes the request completely successfully, but the reality is that we 
    couldn't allocate the memory for a request.  This
@@ -158,7 +158,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
 	    {
 		MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,TYPICAL,
 			       "ERROR - MPIDU_Sock_writev failed, rc=%d", rc);
-		sreq = MPID_Request_create();
+		sreq = MPIR_Request_create();
 		if (sreq == NULL) {
 		    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
@@ -226,7 +226,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov,
     {
 	/* Connection failed, so allocate a request and return an error. */
 	MPL_DBG_VCUSE(vc,"ERROR - connection failed");
-	sreq = MPID_Request_create();
+	sreq = MPIR_Request_create();
 	if (sreq == NULL) {
 	    MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
diff --git a/src/mpid/ch3/include/mpid_coll.h b/src/mpid/ch3/include/mpid_coll.h
index f9a0498..9adb88b 100644
--- a/src/mpid/ch3/include/mpid_coll.h
+++ b/src/mpid/ch3/include/mpid_coll.h
@@ -10,7 +10,7 @@
 #define FUNCNAME MPID_Barrier
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPID_Barrier(MPID_Comm * comm, MPIR_Errflag_t * errflag)
+static inline int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -24,7 +24,7 @@ static inline int MPID_Barrier(MPID_Comm * comm, MPIR_Errflag_t * errflag)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
-                             MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                             MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -38,7 +38,7 @@ static inline int MPID_Bcast(void *buffer, int count, MPI_Datatype datatype, int
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, int count,
-                                 MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                                  MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -54,7 +54,7 @@ static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                 MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                                 MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -70,7 +70,7 @@ static inline int MPID_Allgather(const void *sendbuf, int sendcount, MPI_Datatyp
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                   void *recvbuf, const int *recvcounts, const int *displs,
-                                  MPI_Datatype recvtype, MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                                  MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -86,7 +86,7 @@ static inline int MPID_Allgatherv(const void *sendbuf, int sendcount, MPI_Dataty
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                               int root, MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                               int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -102,7 +102,7 @@ static inline int MPID_Scatter(const void *sendbuf, int sendcount, MPI_Datatype
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                                 MPI_Datatype sendtype, void *recvbuf, int recvcount,
-                                MPI_Datatype recvtype, int root, MPID_Comm * comm,
+                                MPI_Datatype recvtype, int root, MPIR_Comm * comm,
                                 MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -119,7 +119,7 @@ static inline int MPID_Scatterv(const void *sendbuf, const int *sendcounts, cons
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                               void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                              int root, MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                              int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -135,7 +135,7 @@ static inline int MPID_Gather(const void *sendbuf, int sendcount, MPI_Datatype s
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                void *recvbuf, const int *recvcounts, const int *displs,
-                               MPI_Datatype recvtype, int root, MPID_Comm * comm,
+                               MPI_Datatype recvtype, int root, MPIR_Comm * comm,
                                MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -152,7 +152,7 @@ static inline int MPID_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -168,7 +168,7 @@ static inline int MPID_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
                                  MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
-                                 const int *rdispls, MPI_Datatype recvtype, MPID_Comm * comm,
+                                 const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm,
                                  MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -186,7 +186,7 @@ static inline int MPID_Alltoallv(const void *sendbuf, const int *sendcounts, con
 static inline int MPID_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[],
                                  const MPI_Datatype sendtypes[], void *recvbuf,
                                  const int recvcounts[], const int rdispls[],
-                                 const MPI_Datatype recvtypes[], MPID_Comm * comm_ptr,
+                                 const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr,
                                  MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -204,7 +204,7 @@ static inline int MPID_Alltoallw(const void *sendbuf, const int sendcounts[], co
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, int count,
                               MPI_Datatype datatype, MPI_Op op, int root,
-                              MPID_Comm * comm, MPIR_Errflag_t * errflag)
+                              MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -218,7 +218,7 @@ static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, int count,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
-                                      MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm_ptr,
+                                      MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr,
                                       MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -235,7 +235,7 @@ static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
                                             int recvcount, MPI_Datatype datatype,
-                                            MPI_Op op, MPID_Comm * comm_ptr,
+                                            MPI_Op op, MPIR_Comm * comm_ptr,
                                             MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -251,7 +251,7 @@ static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Scan(const void *sendbuf, void *recvbuf, int count,
-                            MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                            MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                             MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -266,7 +266,7 @@ static inline int MPID_Scan(const void *sendbuf, void *recvbuf, int count,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, int count,
-                              MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                              MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                               MPIR_Errflag_t * errflag)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -282,7 +282,7 @@ static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                           void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                          MPID_Comm * comm)
+                                          MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -299,7 +299,7 @@ static inline int MPID_Neighbor_allgather(const void *sendbuf, int sendcount, MP
 static inline int MPID_Neighbor_allgatherv(const void *sendbuf, int sendcount,
                                            MPI_Datatype sendtype, void *recvbuf,
                                            const int recvcounts[], const int displs[],
-                                           MPI_Datatype recvtype, MPID_Comm * comm)
+                                           MPI_Datatype recvtype, MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -317,7 +317,7 @@ static inline int MPID_Neighbor_alltoallv(const void *sendbuf, const int sendcou
                                           const int sdispls[], MPI_Datatype sendtype,
                                           void *recvbuf, const int recvcounts[],
                                           const int rdispls[], MPI_Datatype recvtype,
-                                          MPID_Comm * comm)
+                                          MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -335,7 +335,7 @@ static inline int MPID_Neighbor_alltoallw(const void *sendbuf, const int sendcou
                                           const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
                                           void *recvbuf, const int recvcounts[],
                                           const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
-                                          MPID_Comm * comm)
+                                          MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -352,7 +352,7 @@ static inline int MPID_Neighbor_alltoallw(const void *sendbuf, const int sendcou
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                          void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                         MPID_Comm * comm)
+                                         MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -368,7 +368,7 @@ static inline int MPID_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ineighbor_allgather(const void *sendbuf, int sendcount,
                                            MPI_Datatype sendtype, void *recvbuf, int recvcount,
-                                           MPI_Datatype recvtype, MPID_Comm * comm,
+                                           MPI_Datatype recvtype, MPIR_Comm * comm,
                                            MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -386,7 +386,7 @@ static inline int MPID_Ineighbor_allgather(const void *sendbuf, int sendcount,
 static inline int MPID_Ineighbor_allgatherv(const void *sendbuf, int sendcount,
                                             MPI_Datatype sendtype, void *recvbuf,
                                             const int recvcounts[], const int displs[],
-                                            MPI_Datatype recvtype, MPID_Comm * comm,
+                                            MPI_Datatype recvtype, MPIR_Comm * comm,
                                             MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -404,7 +404,7 @@ static inline int MPID_Ineighbor_allgatherv(const void *sendbuf, int sendcount,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                           void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                          MPID_Comm * comm, MPI_Request * request)
+                                          MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -422,7 +422,7 @@ static inline int MPID_Ineighbor_alltoallv(const void *sendbuf, const int sendco
                                            const int sdispls[], MPI_Datatype sendtype,
                                            void *recvbuf, const int recvcounts[],
                                            const int rdispls[], MPI_Datatype recvtype,
-                                           MPID_Comm * comm, MPI_Request * request)
+                                           MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -441,7 +441,7 @@ static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const int sendco
                                            const MPI_Aint sdispls[], const MPI_Datatype sendtypes[],
                                            void *recvbuf, const int recvcounts[],
                                            const MPI_Aint rdispls[], const MPI_Datatype recvtypes[],
-                                           MPID_Comm * comm, MPI_Request * request)
+                                           MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -456,7 +456,7 @@ static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const int sendco
 #define FUNCNAME MPID_Ibarrier
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPID_Ibarrier(MPID_Comm * comm, MPI_Request * request)
+static inline int MPID_Ibarrier(MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -470,7 +470,7 @@ static inline int MPID_Ibarrier(MPID_Comm * comm, MPI_Request * request)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root,
-                              MPID_Comm * comm, MPI_Request * request)
+                              MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -485,7 +485,7 @@ static inline int MPID_Ibcast(void *buffer, int count, MPI_Datatype datatype, in
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                  MPID_Comm * comm, MPI_Request * request)
+                                  MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -501,7 +501,7 @@ static inline int MPID_Iallgather(const void *sendbuf, int sendcount, MPI_Dataty
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                    void *recvbuf, const int *recvcounts, const int *displs,
-                                   MPI_Datatype recvtype, MPID_Comm * comm, MPI_Request * request)
+                                   MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -516,7 +516,7 @@ static inline int MPID_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datat
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, int count,
-                                  MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                                  MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                                   MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -532,7 +532,7 @@ static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                 MPID_Comm * comm, MPI_Request * request)
+                                 MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -550,7 +550,7 @@ static inline int MPID_Ialltoallv(const void *sendbuf, const int sendcounts[],
                                   const int sdispls[], MPI_Datatype sendtype,
                                   void *recvbuf, const int recvcounts[],
                                   const int rdispls[], MPI_Datatype recvtype,
-                                  MPID_Comm * comm, MPI_Request * request)
+                                  MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -568,7 +568,7 @@ static inline int MPID_Ialltoallw(const void *sendbuf, const int sendcounts[],
                                   const int sdispls[], const MPI_Datatype sendtypes[],
                                   void *recvbuf, const int recvcounts[],
                                   const int rdispls[], const MPI_Datatype recvtypes[],
-                                  MPID_Comm * comm, MPI_Request * request)
+                                  MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -583,7 +583,7 @@ static inline int MPID_Ialltoallw(const void *sendbuf, const int sendcounts[],
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, int count,
-                               MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                               MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                                MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -599,7 +599,7 @@ static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                               int root, MPID_Comm * comm, MPI_Request * request)
+                               int root, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -615,7 +615,7 @@ static inline int MPID_Igather(const void *sendbuf, int sendcount, MPI_Datatype
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                 void *recvbuf, const int *recvcounts, const int *displs,
-                                MPI_Datatype recvtype, int root, MPID_Comm * comm,
+                                MPI_Datatype recvtype, int root, MPIR_Comm * comm,
                                 MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -631,7 +631,7 @@ static inline int MPID_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
-                                             MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                                             MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                                              MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -647,7 +647,7 @@ static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
-                                       MPI_Datatype datatype, MPI_Op op, MPID_Comm * comm,
+                                       MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
                                        MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -663,7 +663,7 @@ static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                               MPI_Op op, int root, MPID_Comm * comm, MPI_Request * request)
+                               MPI_Op op, int root, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -677,7 +677,7 @@ static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, int count, MP
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                             MPI_Op op, MPID_Comm * comm, MPI_Request * request)
+                             MPI_Op op, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -692,7 +692,7 @@ static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int MPID_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                int root, MPID_Comm * comm, MPI_Request * request)
+                                int root, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -709,7 +709,7 @@ static inline int MPID_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype
 static inline int MPID_Iscatterv(const void *sendbuf, const int *sendcounts,
                                  const int *displs, MPI_Datatype sendtype,
                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                 int root, MPID_Comm * comm, MPI_Request * request)
+                                 int root, MPIR_Comm * comm, MPI_Request * request)
 {
     int mpi_errno = MPI_SUCCESS;
 
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index 8210bdb..ebf7043 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -314,7 +314,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
      * always need a request to be passed in. */
 
     /* create a new request */
-    req = MPID_Request_create();
+    req = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(req, 2);
@@ -381,7 +381,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
             MPIDU_Datatype_release(req->dev.datatype_ptr);
         if (req->dev.ext_hdr_ptr)
             MPL_free(req->dev.ext_hdr_ptr);
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
     (*req_ptr) = NULL;
@@ -676,7 +676,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPID_Request_create();
+        resp_req = MPIR_Request_create();
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -697,7 +697,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
 
         if (curr_req != NULL) {
-            MPID_Request_release(curr_req);
+            MPIR_Request_free(curr_req);
         }
 
         rma_op->single_req = resp_req;
@@ -771,7 +771,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* Create a request for the GACC response.  Store the response buf, count, and
          * datatype in it, and pass the request's handle in the GACC packet. When the
          * response comes from the target, it will contain the request handle. */
-        resp_req = MPID_Request_create();
+        resp_req = MPIR_Request_create();
         MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
         MPIU_Object_set_ref(resp_req, 2);
@@ -814,7 +814,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
             MPIR_ERR_POP(mpi_errno);
 
         if (curr_req != NULL) {
-            MPID_Request_release(curr_req);
+            MPIR_Request_free(curr_req);
         }
 
         if (rma_op->reqs_size == 1)
@@ -847,8 +847,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
         /* error case: drop both our reference to the request and the
          * progress engine's reference to it, since the progress
          * engine didn't get a chance to see it yet. */
-        MPID_Request_release(rma_op->single_req);
-        MPID_Request_release(rma_op->single_req);
+        MPIR_Request_free(rma_op->single_req);
+        MPIR_Request_free(rma_op->single_req);
         rma_op->single_req = NULL;
     }
     else if (rma_op->reqs_size > 1) {
@@ -858,8 +858,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
                  * and the progress engine's reference to it, since
                  * the progress engine didn't get a chance to see it
                  * yet. */
-                MPID_Request_release(rma_op->multi_reqs[i]);
-                MPID_Request_release(rma_op->multi_reqs[i]);
+                MPIR_Request_free(rma_op->multi_reqs[i]);
+                MPIR_Request_free(rma_op->multi_reqs[i]);
             }
         }
         MPL_free(rma_op->multi_reqs);
@@ -899,7 +899,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
      * and pass a handle to it in the get packet. When the get
      * response comes from the target, it will contain the request
      * handle. */
-    curr_req = MPID_Request_create();
+    curr_req = MPIR_Request_create();
     if (curr_req == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -982,7 +982,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
 
     /* release the request returned by iStartMsg or iStartMsgv */
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
     rma_op->single_req = curr_req;
@@ -1022,7 +1022,7 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the RMW response.  Store the origin buf, count, and
      * datatype in it, and pass the request's handle RMW packet. When the
      * response comes from the target, it will contain the request handle. */
-    curr_req = MPID_Request_create();
+    curr_req = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(curr_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     /* Set refs on the request to 2: one for the response message, and one for
@@ -1045,7 +1045,7 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op,
     MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
 
     if (rmw_req != NULL) {
-        MPID_Request_release(rmw_req);
+        MPIR_Request_free(rmw_req);
     }
 
     rma_op->single_req = curr_req;
@@ -1085,7 +1085,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     /* Create a request for the GACC response.  Store the response buf, count, and
      * datatype in it, and pass the request's handle in the GACC packet. When the
      * response comes from the target, it will contain the request handle. */
-    resp_req = MPID_Request_create();
+    resp_req = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     MPIU_Object_set_ref(resp_req, 2);
@@ -1118,7 +1118,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     }
 
     if (curr_req != NULL) {
-        MPID_Request_release(curr_req);
+        MPIR_Request_free(curr_req);
     }
 
     rma_op->single_req = resp_req;
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 8df8a17..21dcdaa 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -287,7 +287,7 @@ extern MPIDI_Process_t MPIDI_Process;
 */
 #define MPIDI_Request_create_sreq(sreq_, mpi_errno_, FAIL_)	\
 {								\
-    (sreq_) = MPID_Request_create();                            \
+    (sreq_) = MPIR_Request_create();                            \
     MPIU_Object_set_ref((sreq_), 2);				\
     (sreq_)->kind = MPIR_REQUEST_SEND;				\
     (sreq_)->comm = comm;					\
@@ -306,7 +306,7 @@ extern MPIDI_Process_t MPIDI_Process;
 /* This is the receive request version of MPIDI_Request_create_sreq */
 #define MPIDI_Request_create_rreq(rreq_, mpi_errno_, FAIL_)	\
 {								\
-    (rreq_) = MPID_Request_create();                            \
+    (rreq_) = MPIR_Request_create();                            \
     MPIU_Object_set_ref((rreq_), 2);				\
     (rreq_)->kind = MPIR_REQUEST_RECV;				\
     (rreq_)->partner_request   = NULL;                          \
@@ -316,10 +316,10 @@ extern MPIDI_Process_t MPIDI_Process;
  * returning when a user passed MPI_PROC_NULL */
 #define MPIDI_Request_create_null_rreq(rreq_, mpi_errno_, FAIL_)           \
     do {                                                                   \
-        (rreq_) = MPID_Request_create();                                   \
+        (rreq_) = MPIR_Request_create();                                   \
         if ((rreq_) != NULL) {                                             \
             MPIU_Object_set_ref((rreq_), 1);                               \
-            /* MT FIXME should these be handled by MPID_Request_create? */ \
+            /* MT FIXME should these be handled by MPIR_Request_create? */ \
             MPIR_cc_set(&(rreq_)->cc, 0);                                  \
             (rreq_)->kind = MPIR_REQUEST_RECV;                             \
             MPIR_Status_set_procnull(&(rreq_)->status);                    \
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 16045fe..dcfd83a 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -131,7 +131,7 @@ typedef union {
  * MPIDI_CH3_CA_COMPLETE - The last operation for this request has completed.
  * The completion counter should be decremented.  If
  * it has reached zero, then the request should be released by calling 
- * MPID_Request_release().
+ * MPIR_Request_free().
  *
  * MPIDI_CH3_CA_UNPACK_UEBUF_AND_COMPLETE - This is a special case of the 
  * MPIDI_CH3_CA_COMPLETE.  The data for an unexpected
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 325682d..c8c75d7 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -48,7 +48,7 @@ static inline int send_lock_msg(int dest, int lock_type, MPIR_Win * win_ptr)
 
     /* release the request returned by iStartMsg */
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_exit:
@@ -91,7 +91,7 @@ static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_fl
 
     /* Release the request returned by iStartMsg */
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_exit:
@@ -142,7 +142,7 @@ static inline int MPIDI_CH3I_Send_lock_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_p
     }
 
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_fail:
@@ -189,7 +189,7 @@ static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * wi
     }
 
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_fail:
@@ -226,7 +226,7 @@ static inline int MPIDI_CH3I_Send_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr,
     }
 
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_fail:
@@ -264,7 +264,7 @@ static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, MPIDI_CH3_Pk
     }
 
     if (request != NULL) {
-        MPID_Request_release(request);
+        MPIR_Request_free(request);
     }
 
   fn_exit:
@@ -304,7 +304,7 @@ static inline int send_flush_msg(int dest, MPIR_Win * win_ptr)
 
     /* Release the request returned by iStartMsg */
     if (req != NULL) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 
   fn_exit:
@@ -455,7 +455,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
         }
 
         /* create request to receive upcoming requests */
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 1);
 
         /* fill in area in req that will be used in Receive_data_found() */
@@ -662,7 +662,7 @@ static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Tar
             continue;
 
         if (MPIR_Request_is_complete((*req))) {
-            MPID_Request_release((*req));
+            MPIR_Request_free((*req));
             (*req) = NULL;
         }
         else {
@@ -677,7 +677,7 @@ static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Tar
                 (*req)->dev.request_handle = rma_op->ureq->handle;
             }
 
-            MPID_Request_release((*req));
+            MPIR_Request_free((*req));
         }
     }
 
@@ -769,13 +769,13 @@ static inline int handle_lock_ack_with_op(MPIR_Win * win_ptr,
          * operation. */
         if (op->reqs_size == 1) {
             MPIU_Assert(op->single_req != NULL);
-            MPID_Request_release(op->single_req);
+            MPIR_Request_free(op->single_req);
             op->single_req = NULL;
             op->reqs_size = 0;
         }
         else if (op->reqs_size > 1) {
             MPIU_Assert(op->multi_reqs != NULL && op->multi_reqs[0] != NULL);
-            MPID_Request_release(op->multi_reqs[0]);
+            MPIR_Request_free(op->multi_reqs[0]);
             /* free req array in this op */
             MPL_free(op->multi_reqs);
             op->multi_reqs = NULL;
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 5baeb21..e5b332e 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -54,7 +54,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPIR_Request *sreq,
 	/* --BEGIN ERROR HANDLING-- */
 	if (mpi_errno != MPI_SUCCESS)
 	{
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
 	}
 	/* --END ERROR HANDLING-- */
@@ -65,7 +65,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPIR_Request *sreq,
     else
     {
 	/* --BEGIN ERROR HANDLING-- */
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|loadsendiov");
 	/* --END ERROR HANDLING-- */
     }
@@ -568,7 +568,7 @@ int MPIDI_CH3_EagerContigIsend( MPIR_Request **sreq_p,
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno != MPI_SUCCESS)
     {
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
 	*sreq_p = NULL;
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
     }
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index a0dbd95..61aa0ae 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -81,7 +81,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **sreq_p,
 	{
         /* Make sure to destroy the request before setting the pointer to
          * NULL, otherwise we lose the handle on the request */
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
 	    *sreq_p = NULL;
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
 	}
@@ -152,7 +152,7 @@ int MPIDI_CH3_EagerSyncZero(MPIR_Request **sreq_p, int rank, int tag,
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno != MPI_SUCCESS)
     {
-	MPID_Request_release(sreq);
+	MPIR_Request_free(sreq);
 	*sreq_p = NULL;
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
     }
@@ -185,7 +185,7 @@ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *vc, MPIR_Request *rreq )
     }
     if (esa_req != NULL)
     {
-	MPID_Request_release(esa_req);
+	MPIR_Request_free(esa_req);
     }
  fn_fail:
     return mpi_errno;
@@ -299,7 +299,7 @@ int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 				"**ch3|syncack");
 	}
 	if (esa_req != NULL) {
-	    MPID_Request_release(esa_req);
+	    MPIR_Request_free(esa_req);
 	}
     }
     else
diff --git a/src/mpid/ch3/src/ch3u_handle_connection.c b/src/mpid/ch3/src/ch3u_handle_connection.c
index 7850b96..46e2948 100644
--- a/src/mpid/ch3/src/ch3u_handle_connection.c
+++ b/src/mpid/ch3/src/ch3u_handle_connection.c
@@ -258,7 +258,7 @@ int MPIDI_CH3U_VC_SendClose( MPIDI_VC_t *vc, int rank )
     if (sreq != NULL) {
 	/* There is still another reference being held by the channel.  It
 	   will not be released until the pkt is actually sent. */
-	MPID_Request_release(sreq);
+	MPIR_Request_free(sreq);
     }
 
  fn_exit:
@@ -300,7 +300,7 @@ int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	{
 	    /* There is still another reference being held by the channel.  It
 	       will not be released until the pkt is actually sent. */
-	    MPID_Request_release(resp_sreq);
+	    MPIR_Request_free(resp_sreq);
 	}
     }
     
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 7183cf1..8125271 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -318,7 +318,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
     MPIDU_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);
 
-    resp_req = MPID_Request_create();
+    resp_req = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIU_Object_set_ref(resp_req, 1);
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_GET_ACCUM_RESP);
@@ -455,7 +455,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPIR_Request * rreq, i
     MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
 
     /* Create response request */
-    resp_req = MPID_Request_create();
+    resp_req = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_FOP_RESP);
     MPIU_Object_set_ref(resp_req, 1);
@@ -879,7 +879,7 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
     create_derived_datatype(rreq, dtype_info, &new_dtp);
 
     /* create request for sending data */
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(sreq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
 
     sreq->kind = MPIR_REQUEST_SEND;
@@ -919,7 +919,7 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
     /* MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); */
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno != MPI_SUCCESS) {
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
         sreq = NULL;
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
     }
@@ -1198,7 +1198,7 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1251,7 +1251,7 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr,
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
         if (mpi_errno != MPI_SUCCESS) {
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
     }
@@ -1264,7 +1264,7 @@ static inline int perform_get_in_lock_queue(MPIR_Win * win_ptr,
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
         if (mpi_errno != MPI_SUCCESS) {
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
     }
@@ -1374,7 +1374,7 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr,
     /* Make sure that all data is received for this op. */
     MPIU_Assert(target_lock_entry->all_data_recved == 1);
 
-    sreq = MPID_Request_create();
+    sreq = MPIR_Request_create();
     if (sreq == NULL) {
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     }
@@ -1448,7 +1448,7 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr,
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
         if (mpi_errno != MPI_SUCCESS) {
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
 
@@ -1533,7 +1533,7 @@ static inline int perform_get_acc_in_lock_queue(MPIR_Win * win_ptr,
 
     mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
     if (mpi_errno != MPI_SUCCESS) {
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
     }
 
@@ -1588,7 +1588,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr,
         fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     if (fop_pkt->type == MPIDI_CH3_PKT_FOP) {
-        resp_req = MPID_Request_create();
+        resp_req = MPIR_Request_create();
         if (resp_req == NULL) {
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomemreq");
         }
@@ -1679,11 +1679,11 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr,
                  * operation are completed when counter reaches zero. */
                 win_ptr->at_completion_counter++;
 
-                MPID_Request_release(resp_req);
+                MPIR_Request_free(resp_req);
                 goto fn_exit;
             }
             else {
-                MPID_Request_release(resp_req);
+                MPIR_Request_free(resp_req);
             }
         }
     }
@@ -1696,7 +1696,7 @@ static inline int perform_fop_in_lock_queue(MPIR_Win * win_ptr,
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, resp_req, iov, iovcnt);
         if (mpi_errno != MPI_SUCCESS) {
-            MPID_Request_release(resp_req);
+            MPIR_Request_free(resp_req);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
         goto fn_exit;
@@ -1779,11 +1779,11 @@ static inline int perform_cas_in_lock_queue(MPIR_Win * win_ptr,
              * operation are completed when counter reaches zero. */
             win_ptr->at_completion_counter++;
 
-            MPID_Request_release(send_req);
+            MPIR_Request_free(send_req);
             goto fn_exit;
         }
         else
-            MPID_Request_release(send_req);
+            MPIR_Request_free(send_req);
     }
 
     /* do final action */
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 934b493..2d3090c 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -24,88 +24,42 @@
 /* See the comments above about request creation.  Some routines will
    use macros in mpidimpl.h *instead* of this routine */
 #undef FUNCNAME
-#define FUNCNAME MPID_Request_create
+#define FUNCNAME MPID_Request_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-MPIR_Request * MPID_Request_create(void)
+void MPID_Request_init(MPIR_Request *req)
 {
-    MPIR_Request * req;
-    MPIDI_STATE_DECL(MPID_STATE_MPIR_REQUEST_CREATE);
+    MPIDI_STATE_DECL(MPID_STATE_MPID_REQUEST_INIT);
 
-    MPIDI_FUNC_ENTER(MPID_STATE_MPIR_REQUEST_CREATE);
+    MPIDI_FUNC_ENTER(MPID_STATE_MPID_REQUEST_INIT);
     
-    req = MPIU_Handle_obj_alloc(&MPIR_Request_mem);
-    if (req != NULL)
-    {
-	MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-		       "allocated request, handle=0x%08x", req->handle);
-#ifdef MPICH_DBG_OUTPUT
-	/*MPIU_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);*/
-	if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST)
-	{
-	    int mpi_errno;
-	    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, 
-		       FCNAME, __LINE__, MPI_ERR_OTHER, 
-		       "**invalid_handle", "**invalid_handle %d", req->handle);
-	    MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
-	}
-#endif
-	/* FIXME: This makes request creation expensive.  We need to trim
-	   this to the basics, with additional setup for special-purpose 
-	   requests (think base class and inheritance).  For example, do we 
-	   *really* want to set the kind to UNDEFINED? And should the RMA 
-	   values be set only for RMA requests? */
-	MPIU_Object_set_ref(req, 1);
-	req->kind		   = MPIR_REQUEST_UNDEFINED;
-        MPIR_cc_set(&req->cc, 1);
-	req->cc_ptr		   = &req->cc;
-	/* FIXME: status fields meaningful only for receive, and even then
-	   should not need to be set. */
-	req->status.MPI_SOURCE	   = MPI_UNDEFINED;
-	req->status.MPI_TAG	   = MPI_UNDEFINED;
-	req->status.MPI_ERROR	   = MPI_SUCCESS;
-        MPIR_STATUS_SET_COUNT(req->status, 0);
-        MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
-	req->comm		   = NULL;
-        req->greq_fns              = NULL;
-        req->errflag               = MPIR_ERR_NONE;
-        req->request_completed_cb  = NULL;
-	req->dev.datatype_ptr	   = NULL;
-	req->dev.segment_ptr	   = NULL;
-	/* Masks and flags for channel device state in an MPIR_Request */
-	req->dev.state		   = 0;
-	req->dev.cancel_pending	   = FALSE;
-	/* FIXME: RMA ops shouldn't need to be set except when creating a
-	   request for RMA operations */
-	req->dev.target_win_handle = MPI_WIN_NULL;
-	req->dev.source_win_handle = MPI_WIN_NULL;
-        req->dev.target_lock_queue_entry = NULL;
-	req->dev.dataloop	   = NULL;
-	req->dev.iov_offset        = 0;
-        req->dev.flags             = MPIDI_CH3_PKT_FLAG_NONE;
-        req->dev.resp_request_handle = MPI_REQUEST_NULL;
-        req->dev.user_buf          = NULL;
-        req->dev.OnDataAvail       = NULL;
-        req->dev.OnFinal           = NULL;
-        req->dev.user_buf          = NULL;
-        req->dev.drop_data         = FALSE;
-        req->dev.tmpbuf            = NULL;
-        req->dev.ext_hdr_ptr       = NULL;
-        req->dev.ext_hdr_sz        = 0;
-        req->dev.rma_target_ptr    = NULL;
-        req->dev.request_handle    = MPI_REQUEST_NULL;
+    req->dev.datatype_ptr	   = NULL;
+    req->dev.segment_ptr	   = NULL;
+    /* Masks and flags for channel device state in an MPID_Request */
+    req->dev.state		   = 0;
+    req->dev.cancel_pending	   = FALSE;
+    /* FIXME: RMA ops shouldn't need to be set except when creating a
+     * request for RMA operations */
+    req->dev.target_win_handle = MPI_WIN_NULL;
+    req->dev.source_win_handle = MPI_WIN_NULL;
+    req->dev.target_lock_queue_entry = NULL;
+    req->dev.dataloop	   = NULL;
+    req->dev.iov_offset        = 0;
+    req->dev.flags             = MPIDI_CH3_PKT_FLAG_NONE;
+    req->dev.resp_request_handle = MPI_REQUEST_NULL;
+    req->dev.user_buf          = NULL;
+    req->dev.OnDataAvail       = NULL;
+    req->dev.OnFinal           = NULL;
+    req->dev.user_buf          = NULL;
+    req->dev.drop_data         = FALSE;
+    req->dev.tmpbuf            = NULL;
+    req->dev.ext_hdr_ptr       = NULL;
+    req->dev.ext_hdr_sz        = 0;
+    req->dev.rma_target_ptr    = NULL;
+    req->dev.request_handle    = MPI_REQUEST_NULL;
 #ifdef MPIDI_CH3_REQUEST_INIT
-	MPIDI_CH3_REQUEST_INIT(req);
+    MPIDI_CH3_REQUEST_INIT(req);
 #endif
-    }
-    else
-    {
-	/* FIXME: This fails to fail if debugging is turned off */
-	MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL,"unable to allocate a request");
-    }
-    
-    MPIDI_FUNC_EXIT(MPID_STATE_MPIR_REQUEST_CREATE);
-    return req;
 }
 
 
@@ -623,7 +577,7 @@ int MPID_Request_complete(MPIR_Request *req)
             }
         }
 
-	MPID_Request_release(req);
+	MPIR_Request_free(req);
 	MPIDI_CH3_Progress_signal_completion();
     }
 
@@ -634,64 +588,21 @@ int MPID_Request_complete(MPIR_Request *req)
     goto fn_exit;
 }
 
-void MPID_Request_release(MPIR_Request *req)
+void MPID_Request_finalize(MPIR_Request *req)
 {
-    int inuse;
-
-    MPIR_Request_release_ref(req, &inuse);
-    if (inuse == 0) {
-        MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-                       "freeing request, handle=0x%08x", req->handle);
-
-#ifdef MPICH_DBG_OUTPUT
-        /*MPIU_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);*/
-        if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST)
-        {
-            int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,
-                                                 FCNAME, __LINE__, MPI_ERR_OTHER,
-                                                 "**invalid_handle", "**invalid_handle %d", req->handle);
-            MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
-        }
-        /* XXX DJG FIXME should we be checking this? */
-        /*MPIU_Assert(req->ref_count == 0);*/
-        if (req->ref_count != 0)
-        {
-            int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL,
-                                                 FCNAME, __LINE__, MPI_ERR_OTHER,
-                                                 "**invalid_refcount", "**invalid_refcount %d", req->ref_count);
-            MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL);
-        }
-#endif
-
-        /* FIXME: We need a better way to handle these so that we do
-           not always need to initialize these fields and check them
-           when we destroy a request */
-        /* FIXME: We need a way to call these routines ONLY when the
-           related ref count has become zero. */
-        if (req->comm != NULL) {
-            MPIR_Comm_release(req->comm);
-        }
-
-        if (req->greq_fns != NULL) {
-            MPL_free(req->greq_fns);
-        }
-
-        if (req->dev.datatype_ptr != NULL) {
-            MPIDU_Datatype_release(req->dev.datatype_ptr);
-        }
-
-        if (req->dev.segment_ptr != NULL) {
-            MPIDU_Segment_free(req->dev.segment_ptr);
-        }
+    if (req->dev.datatype_ptr != NULL) {
+        MPIDU_Datatype_release(req->dev.datatype_ptr);
+    }
 
-        if (MPIDI_Request_get_srbuf_flag(req)) {
-            MPIDI_CH3U_SRBuf_free(req);
-        }
+    if (req->dev.segment_ptr != NULL) {
+        MPIDU_Segment_free(req->dev.segment_ptr);
+    }
 
-        if (req->dev.ext_hdr_ptr != NULL) {
-            MPL_free(req->dev.ext_hdr_ptr);
-        }
+    if (MPIDI_Request_get_srbuf_flag(req)) {
+        MPIDI_CH3U_SRBuf_free(req);
+    }
 
-        MPIU_Handle_obj_free(&MPIR_Request_mem, req);
+    if (req->dev.ext_hdr_ptr != NULL) {
+        MPL_free(req->dev.ext_hdr_ptr);
     }
 }
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 26341aa..310a6d8 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -315,7 +315,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
         data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 1);
 
         req->dev.user_buf = put_pkt->addr;
@@ -464,7 +464,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         goto fn_exit;
     }
 
-    req = MPID_Request_create();
+    req = MPIR_Request_create();
     req->dev.target_win_handle = get_pkt->target_win_handle;
     req->dev.flags = get_pkt->flags;
 
@@ -530,7 +530,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
             /* --BEGIN ERROR HANDLING-- */
             if (mpi_errno != MPI_SUCCESS) {
-                MPID_Request_release(req);
+                MPIR_Request_free(req);
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
             }
             /* --END ERROR HANDLING-- */
@@ -547,7 +547,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
             /* --BEGIN ERROR HANDLING-- */
             if (mpi_errno != MPI_SUCCESS) {
-                MPID_Request_release(req);
+                MPIR_Request_free(req);
                 MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
             }
             /* --END ERROR HANDLING-- */
@@ -705,7 +705,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
     else {
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_ACCUMULATE);
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -905,7 +905,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         /* Immed packet type is used when target datatype is predefined datatype. */
         MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype));
 
-        resp_req = MPID_Request_create();
+        resp_req = MPIR_Request_create();
         resp_req->dev.target_win_handle = get_accum_pkt->target_win_handle;
         resp_req->dev.flags = get_accum_pkt->flags;
 
@@ -968,7 +968,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
         /* --BEGIN ERROR HANDLING-- */
         if (mpi_errno != MPI_SUCCESS) {
-            MPID_Request_release(resp_req);
+            MPIR_Request_free(resp_req);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
         /* --END ERROR HANDLING-- */
@@ -978,7 +978,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
         MPIU_Assert(pkt->type == MPIDI_CH3_PKT_GET_ACCUM);
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 1);
         *rreqp = req;
 
@@ -1230,11 +1230,11 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
              * operation are completed when counter reaches zero. */
             win_ptr->at_completion_counter++;
 
-            MPID_Request_release(req);
+            MPIR_Request_free(req);
             goto fn_exit;
         }
         else
-            MPID_Request_release(req);
+            MPIR_Request_free(req);
     }
 
     mpi_errno = finish_op_on_target(win_ptr, vc, TRUE /* has response data */ ,
@@ -1409,11 +1409,11 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                  * operation are completed when counter reaches zero. */
                 win_ptr->at_completion_counter++;
 
-                MPID_Request_release(resp_req);
+                MPIR_Request_free(resp_req);
                 goto fn_exit;
             }
             else {
-                MPID_Request_release(resp_req);
+                MPIR_Request_free(resp_req);
             }
         }
 
@@ -1436,7 +1436,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         if (fop_pkt->op == MPI_NO_OP)
             is_empty_origin = TRUE;
 
-        req = MPID_Request_create();
+        req = MPIR_Request_create();
         MPIU_Object_set_ref(req, 1);
         MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_FOP_RECV);
         *rreqp = req;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 4393c52..70401ca 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -37,7 +37,7 @@ int MPID_Rput(const void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPID_Request_create();
+    ureq = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -100,7 +100,7 @@ int MPID_Rget(void *origin_addr, int origin_count,
     MPIDI_Datatype_get_info(origin_count, origin_datatype, dt_contig, data_sz, dtp, dt_true_lb);
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPID_Request_create();
+    ureq = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -161,7 +161,7 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPID_Request_create();
+    ureq = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
@@ -225,7 +225,7 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
     /* Create user request, initially cc=1, ref=1 */
-    ureq = MPID_Request_create();
+    ureq = MPIR_Request_create();
     MPIR_ERR_CHKANDJUMP(ureq == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
     ureq->kind = MPIR_WIN_REQUEST;
 
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 93d16c5..10a5248 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -548,7 +548,7 @@ int MPID_Win_fence(int assert, MPIR_Win * win_ptr)
                     win_ptr->states.access_state = MPIDI_RMA_FENCE_GRANTED;
                 }
 
-                MPID_Request_release(req_ptr);
+                MPIR_Request_free(req_ptr);
             }
 
             goto finish_fence;
@@ -672,7 +672,7 @@ int MPID_Win_fence(int assert, MPIR_Win * win_ptr)
                     win_ptr->states.access_state = MPIDI_RMA_FENCE_GRANTED;
                 }
 
-                MPID_Request_release(req_ptr);
+                MPIR_Request_free(req_ptr);
             }
 
             if (win_ptr->shm_allocated == TRUE) {
@@ -909,7 +909,7 @@ int MPID_Win_start(MPIR_Group * group_ptr, int assert, MPIR_Win * win_ptr)
                         win_ptr->sync_request_cnt++;
                     }
 
-                    MPID_Request_release(req_ptr);
+                    MPIR_Request_free(req_ptr);
                 }
             }
         }
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index a044460..a684b04 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -56,7 +56,7 @@ int MPIDI_CH3_RndvSend( MPIR_Request **sreq_p, const void * buf, MPI_Aint count,
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno != MPI_SUCCESS)
     {
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
 	*sreq_p = NULL;
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rtspkt");
     }
@@ -65,13 +65,13 @@ int MPIDI_CH3_RndvSend( MPIR_Request **sreq_p, const void * buf, MPI_Aint count,
     {
 	if (rts_sreq->status.MPI_ERROR != MPI_SUCCESS)
 	{
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
 	    *sreq_p = NULL;
             mpi_errno = rts_sreq->status.MPI_ERROR;
-            MPID_Request_release(rts_sreq);
+            MPIR_Request_free(rts_sreq);
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rtspkt");
 	}
-	MPID_Request_release(rts_sreq);
+	MPIR_Request_free(rts_sreq);
     }
 
     /* FIXME: fill temporary IOV or pack temporary buffer after send to hide 
@@ -165,7 +165,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 				"**ch3|ctspkt");
 	}
 	if (cts_req != NULL) {
-	    MPID_Request_release(cts_req);
+	    MPIR_Request_free(cts_req);
 	}
     }
     else
@@ -227,7 +227,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     MPIDI_Request_fetch_and_clear_rts_sreq(sreq, &rts_sreq);
     if (rts_sreq != NULL)
     {
-	MPID_Request_release(rts_sreq);
+	MPIR_Request_free(rts_sreq);
     }
 
     *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -369,7 +369,7 @@ int MPIDI_CH3_RecvRndv( MPIDI_VC_t * vc, MPIR_Request *rreq )
 	/* FIXME: Ideally we could specify that a req not be returned.  
 	   This would avoid our having to decrement the
 	   reference count on a req we don't want/need. */
-	MPID_Request_release(cts_req);
+	MPIR_Request_free(cts_req);
     }
 
  fn_fail:    
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index a0e2eae..3583b0c 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -72,8 +72,8 @@ int MPID_Cancel_send(MPIR_Request * sreq)
              * reference.  We explicitly drop a second reference,
              * because the receive request will never be visible to
              * the user. */
-            MPID_Request_release(rreq);
-            MPID_Request_release(rreq);
+            MPIR_Request_free(rreq);
+            MPIR_Request_free(rreq);
 
 	    MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
             mpi_errno = MPID_Request_complete(sreq);
@@ -126,7 +126,7 @@ int MPID_Cancel_send(MPIR_Request * sreq)
 		
 		/* since we attempted to cancel a RTS request, then we are 
 		   responsible for releasing that request */
-		MPID_Request_release(rts_sreq);
+		MPIR_Request_free(rts_sreq);
 
 		/* --BEGIN ERROR HANDLING-- */
 		if (mpi_errno != MPI_SUCCESS)
@@ -204,7 +204,7 @@ int MPID_Cancel_send(MPIR_Request * sreq)
 	}
 	if (csr_sreq != NULL)
 	{
-	    MPID_Request_release(csr_sreq);
+	    MPIR_Request_free(csr_sreq);
 	}
     }
     
@@ -256,9 +256,9 @@ int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	}
 	if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_RNDV_MSG)
 	{
-	    MPID_Request_release(rreq);
+	    MPIR_Request_free(rreq);
 	}
-	MPID_Request_release(rreq);
+	MPIR_Request_free(rreq);
 	ack = TRUE;
     }
     else
@@ -280,7 +280,7 @@ int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     }
     if (resp_sreq != NULL)
     {
-	MPID_Request_release(resp_sreq);
+	MPIR_Request_free(resp_sreq);
     }
     
     *rreqp = NULL;
diff --git a/src/mpid/ch3/src/mpid_comm_revoke.c b/src/mpid/ch3/src/mpid_comm_revoke.c
index 5c1cc3e..56e6abd 100644
--- a/src/mpid/ch3/src/mpid_comm_revoke.c
+++ b/src/mpid/ch3/src/mpid_comm_revoke.c
@@ -70,7 +70,7 @@ int MPID_Comm_revoke(MPIR_Comm *comm_ptr, int is_remote)
                 /* We don't need to keep a reference to this request. The
                  * progress engine will keep a reference until it completes
                  * later */
-                MPID_Request_release(request);
+                MPIR_Request_free(request);
         }
 
         /* Check to see if we are done revoking */
diff --git a/src/mpid/ch3/src/mpid_imrecv.c b/src/mpid/ch3/src/mpid_imrecv.c
index 99292b5..4dde4eb 100644
--- a/src/mpid/ch3/src/mpid_imrecv.c
+++ b/src/mpid/ch3/src/mpid_imrecv.c
@@ -128,7 +128,7 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
 #ifdef HAVE_ERROR_CHECKING
         int msg_type = MPIDI_Request_get_msg_type(rreq);
 #endif
-        MPID_Request_release(rreq);
+        MPIR_Request_free(rreq);
         rreq = NULL;
         MPIR_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_INTERN, "**ch3|badmsgtype",
                              "**ch3|badmsgtype %d", msg_type);
diff --git a/src/mpid/ch3/src/mpid_irecv.c b/src/mpid/ch3/src/mpid_irecv.c
index bc56710..55b7bc3 100644
--- a/src/mpid/ch3/src/mpid_irecv.c
+++ b/src/mpid/ch3/src/mpid_irecv.c
@@ -135,7 +135,7 @@ int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int
 #ifdef HAVE_ERROR_CHECKING
             int msg_type = MPIDI_Request_get_msg_type(rreq);
 #endif
-            MPID_Request_release(rreq);
+            MPIR_Request_free(rreq);
 	    rreq = NULL;
 	    MPIR_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_INTERN, "**ch3|badmsgtype",
                                  "**ch3|badmsgtype %d", msg_type);
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index def0046..5b651e0 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -100,7 +100,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
 	/* --BEGIN ERROR HANDLING-- */
 	if (mpi_errno != MPI_SUCCESS)
 	{
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
 	    sreq = NULL;
             MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
 	    goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index 3b98f39..f1ebd05 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -117,7 +117,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
 	/* --BEGIN ERROR HANDLING-- */
 	if (mpi_errno != MPI_SUCCESS)
 	{
-            MPID_Request_release(sreq);
+            MPIR_Request_free(sreq);
 	    sreq = NULL;
             MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**ch3|eagermsg");
 	    goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_recv.c b/src/mpid/ch3/src/mpid_recv.c
index c738b9b..88f3311 100644
--- a/src/mpid/ch3/src/mpid_recv.c
+++ b/src/mpid/ch3/src/mpid_recv.c
@@ -103,7 +103,7 @@ int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int t
                     *status = rreq->status;
                 }
 
-                MPID_Request_release(rreq);
+                MPIR_Request_free(rreq);
                 rreq = NULL;
 
                 goto fn_exit;
@@ -151,7 +151,7 @@ int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int t
 #ifdef HAVE_ERROR_CHECKING
             int msg_type = MPIDI_Request_get_msg_type(rreq);
 #endif
-            MPID_Request_release(rreq);
+            MPIR_Request_free(rreq);
 	    rreq = NULL;
 	    MPIR_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_INTERN, "**ch3|badmsgtype",
                                  "**ch3|badmsgtype %d", msg_type);
diff --git a/src/mpid/ch3/src/mpid_startall.c b/src/mpid/ch3/src/mpid_startall.c
index 0adec4b..fc103a8 100644
--- a/src/mpid/ch3/src/mpid_startall.c
+++ b/src/mpid/ch3/src/mpid_startall.c
@@ -22,7 +22,7 @@
 /* This macro initializes all of the fields in a persistent request */
 #define MPIDI_Request_create_psreq(sreq_, mpi_errno_, FAIL_)		\
 {									\
-    (sreq_) = MPID_Request_create();				\
+    (sreq_) = MPIR_Request_create();				\
     if ((sreq_) == NULL)						\
     {									\
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"send request allocation failed");\
@@ -299,7 +299,7 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_RECV_INIT);
     
-    rreq = MPID_Request_create();
+    rreq = MPIR_Request_create();
     if (rreq == NULL)
     {
 	/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index f9dc247..b5808a3 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -49,8 +49,8 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
          * progress engine reference and the second to release the
          * user reference since the user will never have a chance to
          * release their reference. */
-        MPID_Request_release(sreq);
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
+        MPIR_Request_free(sreq);
 	sreq = NULL;
         MPIR_ERR_SET1(mpi_errno, MPI_ERR_OTHER, "**nomem", 
 		      "**nomemuereq %d", MPIDI_CH3U_Recvq_count_unexp());
@@ -66,8 +66,8 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
          * progress engine reference and the second to release the
          * user reference since the user will never have a chance to
          * release their reference. */
-        MPID_Request_release(sreq);
-        MPID_Request_release(sreq);
+        MPIR_Request_free(sreq);
+        MPIR_Request_free(sreq);
         sreq = NULL;
         goto fn_exit;
     }
diff --git a/src/mpid/common/hcoll/hcoll_rte.c b/src/mpid/common/hcoll/hcoll_rte.c
index bf86405..68d479a 100644
--- a/src/mpid/common/hcoll/hcoll_rte.c
+++ b/src/mpid/common/hcoll/hcoll_rte.c
@@ -263,7 +263,7 @@ static int test(rte_request_handle_t * request, int *completed)
 
     *completed = (int) MPIR_Request_is_complete(req);
     if (*completed) {
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
         request->status = HCOLRTE_REQUEST_DONE;
     }
 
@@ -386,7 +386,7 @@ static int group_id(rte_grp_handle_t group)
 static void *get_coll_handle(void)
 {
     MPIR_Request *req;
-    req = MPID_Request_create();
+    req = MPIR_Request_create();
     req->kind = MPIR_COLL_REQUEST;
     return (void *) req;
 }
@@ -413,7 +413,7 @@ static void coll_handle_free(void *handle)
     MPIR_Request *req;
     if (NULL != handle) {
         req = (MPIR_Request *) handle;
-        MPID_Request_release(req);
+        MPIR_Request_free(req);
     }
 }
 
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 42a4ab4..3c95f20 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -407,7 +407,7 @@ int MPIDU_Sched_start(MPID_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request
     MPIU_Assert(s->entries != NULL);
 
     /* now create and populate the request */
-    r = MPID_Request_create();
+    r = MPIR_Request_create();
     if (!r)
         MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**nomem");
     r->kind = MPIR_COLL_REQUEST;
@@ -450,8 +450,8 @@ int MPIDU_Sched_start(MPID_Sched_t * sp, MPIR_Comm * comm, int tag, MPIR_Request
     if (*req)
         *req = NULL;
     if (r) {
-        MPID_Request_release(r);        /* the schedule's ref */
-        MPID_Request_release(r);        /* the user's ref */
+        MPIR_Request_free(r);        /* the schedule's ref */
+        MPIR_Request_free(r);        /* the user's ref */
     }
 
     goto fn_exit;
@@ -895,7 +895,7 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made
                         e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
                     else
                         e->status = MPIDU_SCHED_ENTRY_STATUS_COMPLETE;
-                    MPID_Request_release(e->u.send.sreq);
+                    MPIR_Request_free(e->u.send.sreq);
                     e->u.send.sreq = NULL;
                     MPIR_Comm_release(e->u.send.comm);
                     dtype_release_if_not_builtin(e->u.send.datatype);
@@ -917,7 +917,7 @@ static int MPIDU_Sched_progress_state(struct MPIDU_Sched_state *state, int *made
                         e->status = MPIDU_SCHED_ENTRY_STATUS_FAILED;
                     else
                         e->status = MPIDU_SCHED_ENTRY_STATUS_COMPLETE;
-                    MPID_Request_release(e->u.recv.rreq);
+                    MPIR_Request_free(e->u.recv.rreq);
                     e->u.recv.rreq = NULL;
                     MPIR_Comm_release(e->u.recv.comm);
                     dtype_release_if_not_builtin(e->u.recv.datatype);
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index 04bafa4..5f74269 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -30,8 +30,8 @@
  * \{
  */
 
-#define MPID_Request_create    MPID_Request_create_inline
-#define MPID_Request_release   MPID_Request_release_inline
+#define MPIR_Request_create    MPID_Request_create_inline
+#define MPIR_Request_free   MPID_Request_free_inline
 #define MPIDI_Request_complete MPIDI_Request_complete_inline
 #define MPIDI_Request_complete_norelease MPIDI_Request_complete_norelease_inline
 #define MPID_Request_discard   MPID_Request_discard_inline
@@ -238,7 +238,7 @@ static inline MPIR_Request *
 MPIDI_Request_create2()
 {
   MPIR_Request * req;
-  req = MPID_Request_create();
+  req = MPIR_Request_create();
   MPIU_Object_set_ref(req, 2);
 
   return req;
@@ -248,7 +248,7 @@ static inline MPIR_Request *
 MPIDI_Request_create1()
 {
   MPIR_Request * req;
-  req = MPID_Request_create();
+  req = MPIR_Request_create();
   MPIU_Object_set_ref(req, 1);
 
   return req;
@@ -268,7 +268,7 @@ MPIDI_Request_create1()
 
 
 static inline void
-MPID_Request_release_inline(MPIR_Request *req)
+MPID_Request_free_inline(MPIR_Request *req)
 {
   int count;
   MPID_assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);
@@ -326,7 +326,7 @@ MPIDI_Request_complete_inline(MPIR_Request *req)
     MPIR_cc_decr(req->cc_ptr, &count);
     MPID_assert(count >= 0);
 
-    MPID_Request_release(req);
+    MPIR_Request_free(req);
     if (count == 0) /* decrement completion count; if 0, signal progress engine */
     {
       MPIDI_Progress_signal();
diff --git a/src/mpid/pamid/src/onesided/mpid_1s.c b/src/mpid/pamid/src/onesided/mpid_1s.c
index c7e11f8..e9a49b0 100644
--- a/src/mpid/pamid/src/onesided/mpid_1s.c
+++ b/src/mpid/pamid/src/onesided/mpid_1s.c
@@ -77,7 +77,7 @@ MPIDI_Win_DoneCB(pami_context_t  context,
            * portion of the request structure after decrementing the completion
            * counter.
            *
-           * See MPID_Request_release_inline()
+           * See MPID_Request_free_inline()
            */
           MPIR_cc_set(req_handle->cc_ptr, 0);
       }
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index 8252d3f..f9cd4b3 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -316,7 +316,7 @@ MPID_Get(void         *origin_addr,
        * portion of the request structure after decrementing the completion
        * counter.
        *
-       * See MPID_Request_release_inline()
+       * See MPID_Request_free_inline()
        */
       if(req->req_handle)
         MPIR_cc_set(req->req_handle->cc_ptr, 0);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
index bd5cbf3..54b90da 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
@@ -199,7 +199,7 @@ MPIDI_Win_GetAccDoneCB(pami_context_t  context,
        * portion of the request structure after decrementing the completion
        * counter.
        *
-       * See MPID_Request_release_inline()
+       * See MPID_Request_free_inline()
        */
       if(req_handle)
           MPIR_cc_set(req_handle->cc_ptr, 0);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 5ce9f20..9e70f56 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -319,7 +319,7 @@ MPID_Put(const void   *origin_addr,
        * portion of the request structure after decrementing the completion
        * counter.
        *
-       * See MPID_Request_release_inline()
+       * See MPID_Request_free_inline()
        */
        if(req->req_handle)
          MPIR_cc_set(req->req_handle->cc_ptr, 0);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
index 147d58c..51b876e 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
@@ -162,7 +162,7 @@ MPIDI_RecvCB(pami_context_t    context,
             #endif
           }
         MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
-        if (completed) MPID_Request_release(newreq);
+        if (completed) MPIR_Request_free(newreq);
         goto fn_exit_eager;
       }
       else
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
index 65feda1..8ecbef2 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
@@ -124,7 +124,7 @@ MPIDI_RecvShortCB(pami_context_t    context,
             #endif
           }
         MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
-        MPID_Request_release(newreq);
+        MPIR_Request_free(newreq);
         goto fn_exit_short;
       }
       else
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
index 8e43697..ca34ec5 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
@@ -131,7 +131,7 @@ MPIDI_Callback_process_trunc(pami_context_t  context,
       rreq->mpid.uebuflen = MPIR_STATUS_GET_COUNT(rreq->status);
       rreq->mpid.uebuf    = (void*)sndbuf;
       MPIDI_RecvDoneCB(context, rreq, PAMI_SUCCESS);
-      MPID_Request_release(rreq);
+      MPIR_Request_free(rreq);
     }
 }
 
@@ -191,5 +191,5 @@ MPIDI_Callback_process_userdefined_dt(pami_context_t      context,
   rreq->mpid.uebuflen = sndlen;
   rreq->mpid.uebuf    = (void*)sndbuf;
   MPIDI_RecvDoneCB(context, rreq, PAMI_SUCCESS);
-  MPID_Request_release(rreq);
+  MPIR_Request_free(rreq);
 }
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_control.c b/src/mpid/pamid/src/pt2pt/mpidi_control.c
index c4d48f6..d2e2b87 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_control.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_control.c
@@ -104,7 +104,7 @@ MPIDI_RecvRzvDoneCB(pami_context_t  context,
 #endif
 
   MPIDI_RecvDoneCB(context, rreq, PAMI_SUCCESS);
-  MPID_Request_release(rreq);
+  MPIR_Request_free(rreq);
 }
 
 /**
@@ -135,7 +135,7 @@ MPIDI_RecvRzvDoneCB_zerobyte(pami_context_t  context,
   TRACE_SET_R_BIT(MPIDI_Request_getPeerRank_pami(rreq),(rreq->mpid.idx),fl.f.sync_com_in_HH);
   TRACE_SET_R_BIT(MPIDI_Request_getPeerRank_pami(rreq),(rreq->mpid.idx),fl.f.matchedInHH);
   TRACE_SET_R_VAL(MPIDI_Request_getPeerRank_pami(rreq),(rreq->mpid.idx),bufadd,rreq->mpid.userbuf);
-  MPID_Request_release(rreq);
+  MPIR_Request_free(rreq);
 }
 
 /**
@@ -273,7 +273,7 @@ MPIDI_CancelReq_proc(pami_context_t        context,
                         info->MPIctxt);
   if(sreq)
     {
-      MPID_Request_release(sreq);
+      MPIR_Request_free(sreq);
       type = MPIDI_CONTROL_CANCEL_ACKNOWLEDGE;
     }
   else
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_done.c b/src/mpid/pamid/src/pt2pt/mpidi_done.c
index 0e767d4..8034b43 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_done.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_done.c
@@ -128,7 +128,7 @@ MPIDI_RecvDoneCB_mutexed(pami_context_t   context,
   MPIDI_RecvDoneCB(context, clientdata, result);
 
   MPIU_THREAD_CS_EXIT(MSGQUEUE, 0);
-  MPID_Request_release(rreq);
+  MPIR_Request_free(rreq);
 }
 
 
@@ -226,7 +226,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
           rreq->mpid.envelope.msginfo.MPIseqno = ooreq->mpid.envelope.msginfo.MPIseqno;
 	  MPIDI_Request_complete(rreq);
         }
-        MPID_Request_release(ooreq);
+        MPIR_Request_free(ooreq);
 
       } else {
         if (MPIDI_Request_getMatchSeq(ooreq) == (in_cntr->nMsgs+ 1))

http://git.mpich.org/mpich.git/commitdiff/19e8742ad7662dfe1f715b172461b0bfd4db5947

commit 19e8742ad7662dfe1f715b172461b0bfd4db5947
Author: Wesley Bland <wesley.bland at intel.com>
Date:   Tue Apr 19 10:45:37 2016 -0500

    Rename object types to MPIR
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/maint/decode_handle b/maint/decode_handle
index 71652fa..6ac7cb3 100755
--- a/maint/decode_handle
+++ b/maint/decode_handle
@@ -59,24 +59,24 @@ while (scalar @ARGV) {
 
 ## code from src/include/mpihandlemem.h from which this script was derived
 ## ----8<----
-##  
+##
 ## typedef enum MPIR_Object_kind {
-##   MPID_COMM       = 0x1,
-##   MPID_GROUP      = 0x2,
+##   MPIR_COMM       = 0x1,
+##   MPIR_GROUP      = 0x2,
 ##   MPIR_DATATYPE   = 0x3,
-##   MPID_FILE       = 0x4,               /* This is not used */
-##   MPID_ERRHANDLER = 0x5,
-##   MPID_OP         = 0x6,
+##   MPIR_FILE       = 0x4,               /* This is not used */
+##   MPIR_ERRHANDLER = 0x5,
+##   MPIR_OP         = 0x6,
 ##   MPIR_INFO       = 0x7,
-##   MPID_WIN        = 0x8,
+##   MPIR_WIN        = 0x8,
 ##   MPID_KEYVAL     = 0x9,
-##   MPID_ATTR       = 0xa,
+##   MPIR_ATTR       = 0xa,
 ##   MPIR_REQUEST    = 0xb,
-##   MPID_PROCGROUP  = 0xc,               /* These are internal device objects */
-##   MPID_VCONN      = 0xd,
-##   MPID_GREQ_CLASS = 0xf
+##   MPIR_PROCGROUP  = 0xc,               /* These are internal device objects */
+##   MPIR_VCONN      = 0xd,
+##   MPIR_GREQ_CLASS = 0xf
 ##   } MPIR_Object_kind;
-## 
+##
 ## #define HANDLE_MPI_KIND_SHIFT 26
 ## #define HANDLE_GET_MPI_KIND(a) ( ((a)&0x3c000000) >> HANDLE_MPI_KIND_SHIFT )
 ## #define HANDLE_SET_MPI_KIND(a,kind) ((a) | ((kind) << HANDLE_MPI_KIND_SHIFT))
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 506d063..0d0cb18 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -360,7 +360,7 @@ cvars:
             MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotallowed");  \
         }                                                                       \
         else {                                                                  \
-            MPIR_ERRTEST_VALID_HANDLE(op,MPID_OP,err,MPI_ERR_OP,"**op");        \
+            MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op");        \
         }                                                                       \
     } while (0)
 
@@ -373,7 +373,7 @@ cvars:
             MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotallowed");  \
         }                                                                       \
         else {                                                                  \
-            MPIR_ERRTEST_VALID_HANDLE(op,MPID_OP,err,MPI_ERR_OP,"**op");        \
+            MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op");        \
         }                                                                       \
         if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) {                       \
             MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotpredefined"); \
@@ -386,7 +386,7 @@ cvars:
             MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnull");        \
         }                                                                       \
         else {                                                                  \
-            MPIR_ERRTEST_VALID_HANDLE(op,MPID_OP,err,MPI_ERR_OP,"**op");        \
+            MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op");        \
         }                                                                       \
         if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) {                       \
             MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotpredefined"); \
@@ -398,7 +398,7 @@ cvars:
         MPIR_ERR_SETANDSTMT(err,MPI_ERR_GROUP,goto fn_fail,"**groupnull"); \
     }                                                                   \
     else {                                                              \
-        MPIR_ERRTEST_VALID_HANDLE(group,MPID_GROUP,err,MPI_ERR_GROUP,"**group"); \
+        MPIR_ERRTEST_VALID_HANDLE(group,MPIR_GROUP,err,MPI_ERR_GROUP,"**group"); \
     }
 
 #define MPIR_ERRTEST_COMM(comm_, err_)					\
@@ -409,7 +409,7 @@ cvars:
         }                                                               \
         else								\
         {                                                               \
-            MPIR_ERRTEST_VALID_HANDLE((comm_), MPID_COMM, (err_), MPI_ERR_COMM, "**comm"); \
+            MPIR_ERRTEST_VALID_HANDLE((comm_), MPIR_COMM, (err_), MPI_ERR_COMM, "**comm"); \
         }                                                               \
     }
 
@@ -467,7 +467,7 @@ cvars:
         MPIR_ERR_SETANDSTMT(err_,MPI_ERR_ARG,goto fn_fail,"**errhandlernull"); \
     }									\
     else {								\
-        MPIR_ERRTEST_VALID_HANDLE(errhandler_,MPID_ERRHANDLER,		\
+        MPIR_ERRTEST_VALID_HANDLE(errhandler_,MPIR_ERRHANDLER,		\
 				  err_,MPI_ERR_ARG,"**errhandler");	\
     }
 
@@ -497,7 +497,7 @@ cvars:
         {                                                               \
             MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**keyvalinvalid"); \
         }                                                               \
-        else if (HANDLE_GET_MPI_KIND(keyval_) != MPID_KEYVAL)		\
+        else if (HANDLE_GET_MPI_KIND(keyval_) != MPIR_KEYVAL)		\
         {                                                               \
             MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**keyval"); \
         }                                                               \
@@ -510,7 +510,7 @@ cvars:
 
 #define MPIR_ERRTEST_KEYVAL_PERM(keyval_, err_)				\
     {									\
-        if (HANDLE_GET_MPI_KIND(keyval_) == MPID_KEYVAL &&              \
+        if (HANDLE_GET_MPI_KIND(keyval_) == MPIR_KEYVAL &&              \
             HANDLE_GET_KIND(keyval_) == HANDLE_KIND_BUILTIN)		\
         {                                                               \
             MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**permattr"); \
diff --git a/src/include/mpihandlemem.h b/src/include/mpihandlemem.h
index cb1ee58..91f993f 100644
--- a/src/include/mpihandlemem.h
+++ b/src/include/mpihandlemem.h
@@ -45,33 +45,33 @@
   MPI handle represents.  It is an enum because only this applies only the
   the MPI and internal MPICH objects.
 
-  The 'MPID_PROCGROUP' kind is used to manage process groups (different
+  The 'MPIR_PROCGROUP' kind is used to manage process groups (different
   from MPI Groups) that are used to keep track of collections of
-  processes (each 'MPID_PROCGROUP' corresponds to a group of processes
-  that define an 'MPI_COMM_WORLD'.  This becomes important only 
-  when MPI-2 dynamic process features are supported.  'MPID_VCONN' is
+  processes (each 'MPIR_PROCGROUP' corresponds to a group of processes
+  that define an 'MPI_COMM_WORLD'.  This becomes important only
+  when MPI-2 dynamic process features are supported.  'MPIR_VCONN' is
   a virtual connection; while this is not part of the overall ADI3
   design, an object that manages connections to other processes is
-  a common need, and 'MPID_VCONN' may be used for that.
+  a common need, and 'MPIR_VCONN' may be used for that.
 
   Module:
   Attribute-DS
   E*/
 typedef enum MPIR_Object_kind {
-  MPID_COMM       = 0x1,
-  MPID_GROUP      = 0x2,
+  MPIR_COMM       = 0x1,
+  MPIR_GROUP      = 0x2,
   MPIR_DATATYPE   = 0x3,
-  MPID_FILE       = 0x4, /* only used obliquely inside MPIR_Errhandler objs */
-  MPID_ERRHANDLER = 0x5,
-  MPID_OP         = 0x6,
+  MPIR_FILE       = 0x4, /* only used obliquely inside MPIR_Errhandler objs */
+  MPIR_ERRHANDLER = 0x5,
+  MPIR_OP         = 0x6,
   MPIR_INFO       = 0x7,
-  MPID_WIN        = 0x8,
-  MPID_KEYVAL     = 0x9,
-  MPID_ATTR       = 0xa,
+  MPIR_WIN        = 0x8,
+  MPIR_KEYVAL     = 0x9,
+  MPIR_ATTR       = 0xa,
   MPIR_REQUEST    = 0xb,
-  MPID_PROCGROUP  = 0xc,               /* These are internal device objects */
-  MPID_VCONN      = 0xd,
-  MPID_GREQ_CLASS = 0xf
+  MPIR_PROCGROUP  = 0xc,               /* These are internal device objects */
+  MPIR_VCONN      = 0xd,
+  MPIR_GREQ_CLASS = 0xf
   } MPIR_Object_kind;
 
 #define HANDLE_MPI_KIND_SHIFT 26
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index eae4e84..c2df158 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -458,6 +458,7 @@ void MPIR_DatatypeAttrFinalize( void );
      }                                                \
 }
 #define MPIR_Win_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Win,ptr,MPI_ERR_WIN,err)
+#define MPIR_Group_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Win,ptr,MPI_ERR_GROUP,err)
 #define MPIR_Op_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Op,ptr,MPI_ERR_OP,err)
 #define MPIR_Errhandler_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Errhandler,ptr,MPI_ERR_ARG,err)
 #define MPIR_Request_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Request,ptr,MPI_ERR_REQUEST,err)
diff --git a/src/mpi/attr/attr_put.c b/src/mpi/attr/attr_put.c
index e9541d7..b8d8870 100644
--- a/src/mpi/attr/attr_put.c
+++ b/src/mpi/attr/attr_put.c
@@ -88,7 +88,7 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_COMM(comm, mpi_errno);
-            MPIR_ERRTEST_KEYVAL(keyval, MPID_COMM, "communicator", mpi_errno);
+            MPIR_ERRTEST_KEYVAL(keyval, MPIR_COMM, "communicator", mpi_errno);
             MPIR_ERRTEST_KEYVAL_PERM(keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/attr/attrutil.c b/src/mpi/attr/attrutil.c
index 4daa2de..e84274a 100644
--- a/src/mpi/attr/attrutil.c
+++ b/src/mpi/attr/attrutil.c
@@ -28,21 +28,21 @@
 
 /* Preallocated keyval objects */
 MPIR_Keyval MPIR_Keyval_direct[MPID_KEYVAL_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPIR_Keyval_mem = { 0, 0, 0, 0, MPID_KEYVAL,
+MPIU_Object_alloc_t MPIR_Keyval_mem = { 0, 0, 0, 0, MPIR_KEYVAL,
 					    sizeof(MPIR_Keyval),
 					    MPIR_Keyval_direct,
 					    MPID_KEYVAL_PREALLOC, };
 
-#ifndef MPID_ATTR_PREALLOC 
-#define MPID_ATTR_PREALLOC 32
+#ifndef MPIR_ATTR_PREALLOC
+#define MPIR_ATTR_PREALLOC 32
 #endif
 
 /* Preallocated keyval objects */
-MPIR_Attribute MPID_Attr_direct[MPID_ATTR_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPID_Attr_mem = { 0, 0, 0, 0, MPID_ATTR, 
+MPIR_Attribute MPID_Attr_direct[MPIR_ATTR_PREALLOC] = { {0} };
+MPIU_Object_alloc_t MPID_Attr_mem = { 0, 0, 0, 0, MPIR_ATTR,
 					    sizeof(MPIR_Attribute),
 					    MPID_Attr_direct,
-					    MPID_ATTR_PREALLOC, };
+					    MPIR_ATTR_PREALLOC, };
 
 /* Provides a way to trap all attribute allocations when debugging leaks. */
 MPIR_Attribute *MPID_Attr_alloc(void)
diff --git a/src/mpi/attr/comm_create_keyval.c b/src/mpi/attr/comm_create_keyval.c
index cb0cea9..251052b 100644
--- a/src/mpi/attr/comm_create_keyval.c
+++ b/src/mpi/attr/comm_create_keyval.c
@@ -60,10 +60,10 @@ int MPIR_Comm_create_keyval_impl(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
     /* The handle encodes the keyval kind.  Modify it to have the correct
        field */
     keyval_ptr->handle           = (keyval_ptr->handle & ~(0x03c00000)) |
-	                           (MPID_COMM << 22);
+	                           (MPIR_COMM << 22);
     MPIU_Object_set_ref(keyval_ptr,1);
     keyval_ptr->was_freed        = 0;
-    keyval_ptr->kind	         = MPID_COMM;
+    keyval_ptr->kind	         = MPIR_COMM;
     keyval_ptr->extra_state      = extra_state;
     keyval_ptr->copyfn.user_function = comm_copy_attr_fn;
     keyval_ptr->copyfn.proxy = MPIR_Attr_copy_c_proxy;
diff --git a/src/mpi/attr/comm_delete_attr.c b/src/mpi/attr/comm_delete_attr.c
index 096178b..f35c18d 100644
--- a/src/mpi/attr/comm_delete_attr.c
+++ b/src/mpi/attr/comm_delete_attr.c
@@ -123,7 +123,7 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_COMM(comm, mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPID_COMM, "communicator", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPIR_COMM, "communicator", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(comm_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/attr/comm_free_keyval.c b/src/mpi/attr/comm_free_keyval.c
index 9b0eaa7..6fa4922 100644
--- a/src/mpi/attr/comm_free_keyval.c
+++ b/src/mpi/attr/comm_free_keyval.c
@@ -87,7 +87,7 @@ int MPI_Comm_free_keyval(int *comm_keyval)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_ARGNULL(comm_keyval, "comm_keyval", mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(*comm_keyval, MPID_COMM, "communicator", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(*comm_keyval, MPIR_COMM, "communicator", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(*comm_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/attr/comm_get_attr.c b/src/mpi/attr/comm_get_attr.c
index 8809278..8fd2d5d 100644
--- a/src/mpi/attr/comm_get_attr.c
+++ b/src/mpi/attr/comm_get_attr.c
@@ -56,7 +56,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_COMM(comm, mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPID_COMM, "communicator", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPIR_COMM, "communicator", mpi_errno);
 #           ifdef NEEDS_POINTER_ALIGNMENT_ADJUST
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index edd3e6e..ae7ff50 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -124,7 +124,7 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_COMM(comm, mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPID_COMM, "communicator", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPIR_COMM, "communicator", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(comm_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
@@ -231,7 +231,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_COMM(comm, mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPID_COMM, "communicator", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(comm_keyval, MPIR_COMM, "communicator", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(comm_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/attr/win_create_keyval.c b/src/mpi/attr/win_create_keyval.c
index cbb5c09..d945cb2 100644
--- a/src/mpi/attr/win_create_keyval.c
+++ b/src/mpi/attr/win_create_keyval.c
@@ -109,10 +109,10 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
     /* The handle encodes the keyval kind.  Modify it to have the correct
        field */
     keyval_ptr->handle           = (keyval_ptr->handle & ~(0x03c00000)) |
-	(MPID_WIN << 22);
+	(MPIR_WIN << 22);
     MPIU_Object_set_ref(keyval_ptr,1);
     keyval_ptr->was_freed        = 0;
-    keyval_ptr->kind	         = MPID_WIN;
+    keyval_ptr->kind	         = MPIR_WIN;
     keyval_ptr->extra_state      = extra_state;
     keyval_ptr->copyfn.user_function = win_copy_attr_fn;
     keyval_ptr->copyfn.proxy = MPIR_Attr_copy_c_proxy;
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index d9cc324..dddb47a 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -32,7 +32,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op) __attribu
 /* Preallocated op objects */
 MPIR_Op MPIR_Op_builtin[MPIR_OP_N_BUILTIN] = { {0} };
 MPIR_Op MPIR_Op_direct[MPIR_OP_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPIR_Op_mem = { 0, 0, 0, 0, MPID_OP,
+MPIU_Object_alloc_t MPIR_Op_mem = { 0, 0, 0, 0, MPIR_OP,
 					    sizeof(MPIR_Op),
 					    MPIR_Op_direct,
 					    MPIR_OP_PREALLOC, };
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 0aa40a4..0584284 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -27,7 +27,7 @@ MPIU_Object_alloc_t MPIR_Comm_mem = {
     0,
     0,
     0,
-    MPID_COMM,
+    MPIR_COMM,
     sizeof(MPIR_Comm),
     MPIR_Comm_direct,
     MPID_COMM_PREALLOC
diff --git a/src/mpi/debugger/dbgstub.c b/src/mpi/debugger/dbgstub.c
index bf624ee..de4d801 100644
--- a/src/mpi/debugger/dbgstub.c
+++ b/src/mpi/debugger/dbgstub.c
@@ -42,7 +42,7 @@ extern MPIR_Comm_list MPIR_All_communicators;
    These routines (more precisely, the field_offset routine) need to 
    known the layout of the internal data structures */
 enum { TYPE_UNKNOWN = 0, 
-       TYPE_MPID_COMM = 1, 
+       TYPE_MPIR_COMM = 1,
        TYPE_MPIR_COMM_LIST = 2, 
        TYPE_MPIDI_REQUEST = 3, 
        TYPE_MPIDI_MESSAGE_MATCH = 4,
@@ -55,10 +55,10 @@ enum { TYPE_UNKNOWN = 0,
    recent type, so a static current type will not work.  Instead, we
    have an example of each type, and return that value. */
 
-static int knownTypesArray[] = { TYPE_UNKNOWN, TYPE_MPID_COMM, 
-				 TYPE_MPIR_COMM_LIST, TYPE_MPIDI_REQUEST, 
+static int knownTypesArray[] = { TYPE_UNKNOWN, TYPE_MPIR_COMM,
+				 TYPE_MPIR_COMM_LIST, TYPE_MPIDI_REQUEST,
 				 TYPE_MPIDI_MESSAGE_MATCH, TYPE_MPIR_REQUEST,
-				 TYPE_MPIR_SENDQ, 
+				 TYPE_MPIR_SENDQ,
 				 TYPE_MPIDI_MESSAGE_MATCH_PARTS };
 
 mqs_type * dbgrI_find_type(mqs_image *image, char *name, 
@@ -67,7 +67,7 @@ mqs_type * dbgrI_find_type(mqs_image *image, char *name,
     int curType = TYPE_UNKNOWN;
 
     if (strcmp(name,"MPID_Comm") == 0) {
-	curType = TYPE_MPID_COMM;
+	curType = TYPE_MPIR_COMM;
     }
     else if (strcmp( name, "MPIR_Comm_list" ) == 0) {
 	curType = TYPE_MPIR_COMM_LIST;
diff --git a/src/mpi/errhan/comm_create_errhandler.c b/src/mpi/errhan/comm_create_errhandler.c
index 012f5d1..dbc1137 100644
--- a/src/mpi/errhan/comm_create_errhandler.c
+++ b/src/mpi/errhan/comm_create_errhandler.c
@@ -40,7 +40,7 @@ int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function *comm_errhandl
     MPIR_ERR_CHKANDJUMP(!errhan_ptr, mpi_errno, MPI_ERR_OTHER, "**nomem");
 
     errhan_ptr->language = MPIR_LANG_C;
-    errhan_ptr->kind	 = MPID_COMM;
+    errhan_ptr->kind	 = MPIR_COMM;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Comm_Handler_function = comm_errhandler_fn;
 
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index f2deb45..93c94ee 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -138,18 +138,18 @@ static int checkForUserErrcode( int );
  * in MPICH
  */
 
-#ifndef MPID_ERRHANDLER_PREALLOC 
-#define MPID_ERRHANDLER_PREALLOC 8
+#ifndef MPIR_ERRHANDLER_PREALLOC
+#define MPIR_ERRHANDLER_PREALLOC 8
 #endif
 
 /* Preallocated errorhandler objects */
 MPIR_Errhandler MPIR_Errhandler_builtin[3] = { {0} };
-MPIR_Errhandler MPIR_Errhandler_direct[MPID_ERRHANDLER_PREALLOC] =
+MPIR_Errhandler MPIR_Errhandler_direct[MPIR_ERRHANDLER_PREALLOC] =
     { {0} };
-MPIU_Object_alloc_t MPIR_Errhandler_mem = { 0, 0, 0, 0, MPID_ERRHANDLER,
+MPIU_Object_alloc_t MPIR_Errhandler_mem = { 0, 0, 0, 0, MPIR_ERRHANDLER,
 					    sizeof(MPIR_Errhandler),
 					    MPIR_Errhandler_direct,
-					    MPID_ERRHANDLER_PREALLOC, };
+					    MPIR_ERRHANDLER_PREALLOC, };
 
 void MPIR_Errhandler_free(MPIR_Errhandler *errhan_ptr)
 {
diff --git a/src/mpi/errhan/file_create_errhandler.c b/src/mpi/errhan/file_create_errhandler.c
index 2a85f62..c8419cb 100644
--- a/src/mpi/errhan/file_create_errhandler.c
+++ b/src/mpi/errhan/file_create_errhandler.c
@@ -77,7 +77,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn,
     errhan_ptr = (MPIR_Errhandler *)MPIU_Handle_obj_alloc( &MPIR_Errhandler_mem );
     MPIR_ERR_CHKANDJUMP(!errhan_ptr,mpi_errno,MPI_ERR_OTHER,"**nomem");
     errhan_ptr->language = MPIR_LANG_C;
-    errhan_ptr->kind	 = MPID_FILE;
+    errhan_ptr->kind	 = MPIR_FILE;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_File_Handler_function = file_errhandler_fn;
 
diff --git a/src/mpi/errhan/file_set_errhandler.c b/src/mpi/errhan/file_set_errhandler.c
index 8755ee0..6cd6411 100644
--- a/src/mpi/errhan/file_set_errhandler.c
+++ b/src/mpi/errhan/file_set_errhandler.c
@@ -91,7 +91,7 @@ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler)
 		MPIR_Errhandler_valid_ptr( errhan_ptr,mpi_errno );
 		/* Also check for a valid errhandler kind */
 		if (!mpi_errno) {
-		    if (errhan_ptr->kind != MPID_FILE) {
+		    if (errhan_ptr->kind != MPIR_FILE) {
 			mpi_errno = MPIR_Err_create_code(
 			    MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_ARG, "**errhandnotfile", NULL );
 		    }
diff --git a/src/mpi/errhan/win_create_errhandler.c b/src/mpi/errhan/win_create_errhandler.c
index 65845c6..638f632 100644
--- a/src/mpi/errhan/win_create_errhandler.c
+++ b/src/mpi/errhan/win_create_errhandler.c
@@ -80,7 +80,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn,
     MPIR_ERR_CHKANDJUMP1(!errhan_ptr,mpi_errno,MPI_ERR_OTHER,"**nomem",
 			 "**nomem %s", "MPI_Errhandler");
     errhan_ptr->language = MPIR_LANG_C;
-    errhan_ptr->kind	 = MPID_WIN;
+    errhan_ptr->kind	 = MPIR_WIN;
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Win_Handler_function = win_errhandler_fn;
 
diff --git a/src/mpi/errhan/win_set_errhandler.c b/src/mpi/errhan/win_set_errhandler.c
index 6caa1c5..5c5a4c4 100644
--- a/src/mpi/errhan/win_set_errhandler.c
+++ b/src/mpi/errhan/win_set_errhandler.c
@@ -89,7 +89,7 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler)
 		MPIR_Errhandler_valid_ptr( errhan_ptr,mpi_errno );
 		/* Also check for a valid errhandler kind */
 		if (!mpi_errno) {
-		    if (errhan_ptr->kind != MPID_WIN) {
+		    if (errhan_ptr->kind != MPIR_WIN) {
 			mpi_errno = MPIR_Err_create_code(
 			    MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME,
 			    __LINE__, MPI_ERR_ARG, "**errhandnotwin", NULL );
diff --git a/src/mpi/group/grouputil.c b/src/mpi/group/grouputil.c
index 23f01c2..749f0f5 100644
--- a/src/mpi/group/grouputil.c
+++ b/src/mpi/group/grouputil.c
@@ -14,7 +14,7 @@
 /* Preallocated group objects */
 MPIR_Group MPIR_Group_builtin[MPIR_GROUP_N_BUILTIN] = { {0} };
 MPIR_Group MPIR_Group_direct[MPID_GROUP_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPIR_Group_mem = { 0, 0, 0, 0, MPID_GROUP,
+MPIU_Object_alloc_t MPIR_Group_mem = { 0, 0, 0, 0, MPIR_GROUP,
 				      sizeof(MPIR_Group), MPIR_Group_direct,
 				       MPID_GROUP_PREALLOC};
 
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index d8876cb..39faae4 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -30,16 +30,16 @@ PMPI_LOCAL int MPIR_Grequest_free_classes_on_finalize(void *extra_data);
 #define MPI_Grequest_start PMPI_Grequest_start
 
 /* preallocated grequest classes */
-#ifndef MPID_GREQ_CLASS_PREALLOC
-#define MPID_GREQ_CLASS_PREALLOC 2
+#ifndef MPIR_GREQ_CLASS_PREALLOC
+#define MPIR_GREQ_CLASS_PREALLOC 2
 #endif
 
-MPIR_Grequest_class MPIR_Grequest_class_direct[MPID_GREQ_CLASS_PREALLOC] =
+MPIR_Grequest_class MPIR_Grequest_class_direct[MPIR_GREQ_CLASS_PREALLOC] =
                                               { {0} };
-MPIU_Object_alloc_t MPIR_Grequest_class_mem = {0, 0, 0, 0, MPID_GREQ_CLASS,
+MPIU_Object_alloc_t MPIR_Grequest_class_mem = {0, 0, 0, 0, MPIR_GREQ_CLASS,
 	                                       sizeof(MPIR_Grequest_class),
 					       MPIR_Grequest_class_direct,
-					       MPID_GREQ_CLASS_PREALLOC, };
+					       MPIR_GREQ_CLASS_PREALLOC, };
 
 /* We jump through some minor hoops to manage the list of classes ourselves and
  * only register a single finalizer to avoid hitting limitations in the current
diff --git a/src/mpi/rma/winutil.c b/src/mpi/rma/winutil.c
index 508442f..9b8ae90 100644
--- a/src/mpi/rma/winutil.c
+++ b/src/mpi/rma/winutil.c
@@ -14,6 +14,6 @@
 
 /* Preallocated window objects */
 MPIR_Win MPIR_Win_direct[MPIR_WIN_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPIR_Win_mem = { 0, 0, 0, 0, MPID_WIN,
+MPIU_Object_alloc_t MPIR_Win_mem = { 0, 0, 0, 0, MPIR_WIN,
 				      sizeof(MPIR_Win), MPIR_Win_direct,
-                                      MPID_WIN_PREALLOC};
+                                      MPIR_WIN_PREALLOC};
diff --git a/src/mpid/ch3/src/mpid_port.c b/src/mpid/ch3/src/mpid_port.c
index 135f342..e206634 100644
--- a/src/mpid/ch3/src/mpid_port.c
+++ b/src/mpid/ch3/src/mpid_port.c
@@ -44,9 +44,9 @@ static MPIDI_PortFns portFns = { 0, 0, 0, 0 };
 int MPIR_Open_port(MPIR_Info *info_ptr, char *port_name)
 {
     int mpi_errno=MPI_SUCCESS;
-    MPIDI_STATE_DECL(MPID_STATE_MPID_OPEN_PORT);
+    MPIDI_STATE_DECL(MPID_STATE_MPIR_OPEN_PORT);
 
-    MPIDI_FUNC_ENTER(MPID_STATE_MPID_OPEN_PORT);
+    MPIDI_FUNC_ENTER(MPID_STATE_MPIR_OPEN_PORT);
 
     /* Check to see if we need to setup channel-specific functions
        for handling the port operations */
@@ -71,7 +71,7 @@ int MPIR_Open_port(MPIR_Info *info_ptr, char *port_name)
     }
 
  fn_fail:
-    MPIDI_FUNC_EXIT(MPID_STATE_MPID_OPEN_PORT);
+    MPIDI_FUNC_EXIT(MPID_STATE_MPIR_OPEN_PORT);
     return mpi_errno;
 }
 
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index d11305e..8d59de7 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -620,7 +620,7 @@ static int lpid_counter = 0;
 int MPIDI_VC_Init( MPIDI_VC_t *vc, MPIDI_PG_t *pg, int rank )
 {
     vc->state = MPIDI_VC_STATE_INACTIVE;
-    vc->handle  = HANDLE_SET_MPI_KIND(0, MPID_VCONN);
+    vc->handle  = HANDLE_SET_MPI_KIND(0, MPIR_VCONN);
     MPIU_Object_set_ref(vc, 0);
     vc->pg      = pg;
     vc->pg_rank = rank;
diff --git a/src/mpid/pamid/include/mpidi_constants.h b/src/mpid/pamid/include/mpidi_constants.h
index 3fcb3b2..25c7c5a 100644
--- a/src/mpid/pamid/include/mpidi_constants.h
+++ b/src/mpid/pamid/include/mpidi_constants.h
@@ -122,7 +122,7 @@ enum
 enum /* PAMID_COLLECTIVES_MEMORY_OPTIMIZED levels */
  
 {
-  MPID_OPT_LVL_IRREG     = 1,       /**< Do not optimize irregular communicators */
-  MPID_OPT_LVL_NONCONTIG = 2,       /**< Disable some non-contig collectives     */
+  MPIR_OPT_LVL_IRREG     = 1,       /**< Do not optimize irregular communicators */
+  MPIR_OPT_LVL_NONCONTIG = 2,       /**< Disable some non-contig collectives     */
 };
 #endif
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index fbff89a..b716fc9 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -125,7 +125,7 @@ typedef struct
     unsigned subcomms;          /**< Enable hardware optimized subcomm's */
     unsigned select_colls;      /**< Enable collective selection */
     unsigned auto_select_colls; /**< Enable automatic collective selection */
-    unsigned memory;            /**< Enable memory optimized subcomm's - See MPID_OPT_LVL_xxxx */
+    unsigned memory;            /**< Enable memory optimized subcomm's - See MPIR_OPT_LVL_xxxx */
     unsigned num_requests;      /**< Number of requests between flow control barriers */
   }
   optimized;
diff --git a/src/mpid/pamid/src/comm/mpid_comm.c b/src/mpid/pamid/src/comm/mpid_comm.c
index de5a7e8..30fbefa 100644
--- a/src/mpid/pamid/src/comm/mpid_comm.c
+++ b/src/mpid/pamid/src/comm/mpid_comm.c
@@ -266,7 +266,7 @@ void MPIDI_Coll_comm_create(MPIR_Comm *comm)
       size_t numconfigs = 0;
 #ifdef HAVE_PAMI_GEOMETRY_NONCONTIG
       config[0].name = PAMI_GEOMETRY_NONCONTIG;
-      if(MPIDI_Process.optimized.memory & MPID_OPT_LVL_NONCONTIG) 
+      if(MPIDI_Process.optimized.memory & MPIR_OPT_LVL_NONCONTIG)
          config[0].value.intval = 0; // Disable non-contig, pamid doesn't use pami for non-contig data collectives
       else
          config[0].value.intval = 1; // Enable non-contig even though pamid doesn't use pami for non-contig data collectives, 
@@ -288,7 +288,7 @@ void MPIDI_Coll_comm_create(MPIR_Comm *comm)
       }
 #endif
 
-      if((MPIDI_Process.optimized.memory  & MPID_OPT_LVL_IRREG) && (comm->local_size & (comm->local_size-1)))
+      if((MPIDI_Process.optimized.memory  & MPIR_OPT_LVL_IRREG) && (comm->local_size & (comm->local_size-1)))
       {
          /* Don't create irregular geometries.  Fallback to MPICH only collectives */
          geom_init = 0;
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index 30685bd..bfc2cf5 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -392,7 +392,7 @@ MPIDI_PAMI_client_init(int* rank, int* size, int* mpidi_dynamic_tasking, char **
 
 #ifdef HAVE_PAMI_CLIENT_NONCONTIG
   config[0].name = PAMI_CLIENT_NONCONTIG;
-  if(MPIDI_Process.optimized.memory & MPID_OPT_LVL_NONCONTIG) 
+  if(MPIDI_Process.optimized.memory & MPIR_OPT_LVL_NONCONTIG)
     config[0].value.intval = 0; // Disable non-contig, pamid doesn't use pami for non-contig data collectives so save memory
   else
     config[0].value.intval = 1; // Enable non-contig even though pamid doesn't use pami for non-contig data collectives, 
diff --git a/src/mpid/pamid/src/mpidi_env.c b/src/mpid/pamid/src/mpidi_env.c
index 3198723..e00282a 100644
--- a/src/mpid/pamid/src/mpidi_env.c
+++ b/src/mpid/pamid/src/mpidi_env.c
@@ -113,8 +113,8 @@
  *   Possible values:
  *   - 0 - Collectives are not memory optimized.
  *   - n - Collectives are memory optimized. Levels are bitwise values :
- *        MPID_OPT_LVL_IRREG     = 1,   Do not optimize irregular communicators 
- *        MPID_OPT_LVL_NONCONTIG = 2,   Disable some non-contig collectives 
+ *        MPIR_OPT_LVL_IRREG     = 1,   Do not optimize irregular communicators
+ *        MPIR_OPT_LVL_NONCONTIG = 2,   Disable some non-contig collectives
  *
  *   PAMID_OPTIMIZED_SUBCOMMS - Use PAMI 'optimized' collectives. Defaullt is 1.
  *   - 0 - Some optimized protocols may be disabled.
diff --git a/src/util/mem/handlemem.c b/src/util/mem/handlemem.c
index 8abcb3c..e12a91d 100644
--- a/src/util/mem/handlemem.c
+++ b/src/util/mem/handlemem.c
@@ -491,7 +491,7 @@ void *MPIU_Handle_get_ptr_indirect( int handle, MPIU_Object_alloc_t *objmem )
 /* returns the name of the handle kind for debugging/logging purposes */
 const char *MPIU_Handle_get_kind_str(int kind)
 {
-#define mpiu_name_case_(name_) case MPID_##name_: return (#name_)
+#define mpiu_name_case_(name_) case MPIR_##name_: return (#name_)
     switch (kind) {
         mpiu_name_case_(COMM);
         mpiu_name_case_(GROUP);

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

commit b01017cb2a613d1a58742ebae169db5713195ef4
Author: Wesley Bland <wesley.bland at intel.com>
Date:   Tue Apr 19 10:00:57 2016 -0500

    Rename MPID_Datatype to MPIR_Datatype
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/maint/decode_handle b/maint/decode_handle
index 934b61f..71652fa 100755
--- a/maint/decode_handle
+++ b/maint/decode_handle
@@ -61,9 +61,9 @@ while (scalar @ARGV) {
 ## ----8<----
 ##  
 ## typedef enum MPIR_Object_kind {
-##   MPID_COMM       = 0x1, 
+##   MPID_COMM       = 0x1,
 ##   MPID_GROUP      = 0x2,
-##   MPID_DATATYPE   = 0x3,
+##   MPIR_DATATYPE   = 0x3,
 ##   MPID_FILE       = 0x4,               /* This is not used */
 ##   MPID_ERRHANDLER = 0x5,
 ##   MPID_OP         = 0x6,
diff --git a/src/binding/fortran/use_mpi/create_f90_util.c b/src/binding/fortran/use_mpi/create_f90_util.c
index 0749891..13fdd4e 100644
--- a/src/binding/fortran/use_mpi/create_f90_util.c
+++ b/src/binding/fortran/use_mpi/create_f90_util.c
@@ -80,7 +80,7 @@ int MPIR_Create_unnamed_predefined( MPI_Datatype old, int combiner,
 
     /* Initialize the contents data */
     {
-	MPID_Datatype *new_dtp = NULL;
+	MPIR_Datatype *new_dtp = NULL;
 	int vals[2];
 	int nvals=0;
 
@@ -191,7 +191,7 @@ static int MPIR_Create_unnamed_predefined( MPI_Datatype old, int combiner,
 
     /* Initialize the contents data */
     if (mpi_errno == MPI_SUCCESS) {
-	MPID_Datatype *new_dtp;
+	MPIR_Datatype *new_dtp;
 	int vals[2];
 	int nvals=0;
 
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index 4f421c7..7eaa9c3 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -83,10 +83,10 @@ int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype)
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-        MPID_Datatype *datatype_ptr = NULL;
+        MPIR_Datatype *datatype_ptr = NULL;
         MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
-        MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+        MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
         MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 2ac5e11..506d063 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -224,7 +224,7 @@ cvars:
  */
 #define MPIR_ERRTEST_DATATYPE(datatype, name_, err_)                    \
     {                                                                   \
-        if (HANDLE_GET_MPI_KIND(datatype) != MPID_DATATYPE ||           \
+        if (HANDLE_GET_MPI_KIND(datatype) != MPIR_DATATYPE ||           \
             (HANDLE_GET_KIND(datatype) == HANDLE_KIND_INVALID &&        \
              datatype != MPI_DATATYPE_NULL))                            \
         {                                                               \
@@ -316,7 +316,7 @@ cvars:
         if (HANDLE_GET_KIND(dtype) == HANDLE_KIND_BUILTIN) { ferr=1; }	\
         else {								\
             MPI_Aint errsize;                                           \
-            MPID_Datatype *errdtypeptr;					\
+            MPIR_Datatype *errdtypeptr;					\
             MPID_Datatype_get_ptr(dtype,errdtypeptr);			\
             MPID_Datatype_get_size_macro(dtype,errsize);                \
             if (errdtypeptr && errdtypeptr->true_lb == 0 &&             \
diff --git a/src/include/mpihandlemem.h b/src/include/mpihandlemem.h
index 9a245af..cb1ee58 100644
--- a/src/include/mpihandlemem.h
+++ b/src/include/mpihandlemem.h
@@ -58,9 +58,9 @@
   Attribute-DS
   E*/
 typedef enum MPIR_Object_kind {
-  MPID_COMM       = 0x1, 
+  MPID_COMM       = 0x1,
   MPID_GROUP      = 0x2,
-  MPID_DATATYPE   = 0x3,
+  MPIR_DATATYPE   = 0x3,
   MPID_FILE       = 0x4, /* only used obliquely inside MPIR_Errhandler objs */
   MPID_ERRHANDLER = 0x5,
   MPID_OP         = 0x6,
diff --git a/src/mpi/attr/type_create_keyval.c b/src/mpi/attr/type_create_keyval.c
index 5de6c29..0d53c54 100644
--- a/src/mpi/attr/type_create_keyval.c
+++ b/src/mpi/attr/type_create_keyval.c
@@ -109,10 +109,10 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
     /* The handle encodes the keyval kind.  Modify it to have the correct
        field */
     keyval_ptr->handle           = (keyval_ptr->handle & ~(0x03c00000)) |
-	(MPID_DATATYPE << 22);
+	(MPIR_DATATYPE << 22);
     MPIU_Object_set_ref(keyval_ptr,1);
     keyval_ptr->was_freed        = 0;
-    keyval_ptr->kind	         = MPID_DATATYPE;
+    keyval_ptr->kind	         = MPIR_DATATYPE;
     keyval_ptr->extra_state      = extra_state;
     keyval_ptr->copyfn.user_function = type_copy_attr_fn;
     keyval_ptr->copyfn.proxy = MPIR_Attr_copy_c_proxy;
diff --git a/src/mpi/attr/type_delete_attr.c b/src/mpi/attr/type_delete_attr.c
index 88d05c7..6a174b8 100644
--- a/src/mpi/attr/type_delete_attr.c
+++ b/src/mpi/attr/type_delete_attr.c
@@ -52,7 +52,7 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval)
 {
     static const char FCNAME[] = "MPI_Type_delete_attr";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *type_ptr = NULL;
+    MPIR_Datatype *type_ptr = NULL;
     MPIR_Attribute *p, **old_p;
     MPIR_Keyval *keyval_ptr = 0;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_DELETE_ATTR);
@@ -70,7 +70,7 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(type_keyval, MPID_DATATYPE, "datatype", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(type_keyval, MPIR_DATATYPE, "datatype", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(type_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
@@ -87,7 +87,7 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval)
         MPID_BEGIN_ERROR_CHECKS;
         {
             /* Validate type_ptr */
-            MPID_Datatype_valid_ptr( type_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( type_ptr, mpi_errno );
 	    /* If type_ptr is not valid, it will be reset to null */
 	    /* Validate keyval_ptr */
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/attr/type_free_keyval.c b/src/mpi/attr/type_free_keyval.c
index 8768fb8..1fdbc86 100644
--- a/src/mpi/attr/type_free_keyval.c
+++ b/src/mpi/attr/type_free_keyval.c
@@ -67,7 +67,7 @@ int MPI_Type_free_keyval(int *type_keyval)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_ARGNULL(type_keyval, "type_keyval", mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(*type_keyval, MPID_DATATYPE, "datatype", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(*type_keyval, MPIR_DATATYPE, "datatype", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(*type_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/attr/type_get_attr.c b/src/mpi/attr/type_get_attr.c
index c439c9d..2da9d25 100644
--- a/src/mpi/attr/type_get_attr.c
+++ b/src/mpi/attr/type_get_attr.c
@@ -36,7 +36,7 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
     static const char FCNAME[] = "MPI_Type_get_attr";
 #endif
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *type_ptr = NULL;
+    MPIR_Datatype *type_ptr = NULL;
     MPIR_Attribute *p;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_TYPE_GET_ATTR);
 
@@ -51,7 +51,7 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(type_keyval, MPID_DATATYPE, "datatype", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(type_keyval, MPIR_DATATYPE, "datatype", mpi_errno);
 #           ifdef NEEDS_POINTER_ALIGNMENT_ADJUST
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
@@ -76,7 +76,7 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    /* Validate datatype pointer */
-	    MPID_Datatype_valid_ptr( type_ptr, mpi_errno );
+	    MPIR_Datatype_valid_ptr( type_ptr, mpi_errno );
 	    /* If type_ptr is not valid, it will be reset to null */
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index 2c0e38d..571fc46 100644
--- a/src/mpi/attr/type_set_attr.c
+++ b/src/mpi/attr/type_set_attr.c
@@ -33,7 +33,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
 {
     static const char FCNAME[] = "MPIR_TypeSetAttr";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *type_ptr = NULL;
+    MPIR_Datatype *type_ptr = NULL;
     MPIR_Keyval *keyval_ptr = NULL;
     MPIR_Attribute *p, **old_p;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_TYPE_SET_ATTR);
@@ -51,7 +51,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
-	    MPIR_ERRTEST_KEYVAL(type_keyval, MPID_DATATYPE, "datatype", mpi_errno);
+	    MPIR_ERRTEST_KEYVAL(type_keyval, MPIR_DATATYPE, "datatype", mpi_errno);
 	    MPIR_ERRTEST_KEYVAL_PERM(type_keyval, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
@@ -68,7 +68,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
         MPID_BEGIN_ERROR_CHECKS;
         {
             /* Validate type_ptr */
-            MPID_Datatype_valid_ptr( type_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( type_ptr, mpi_errno );
 	    /* If type_ptr is not valid, it will be reset to null */
 	    /* Validate keyval_ptr */
 		MPIR_Keyval_valid_ptr( keyval_ptr, mpi_errno );
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index f4ff7d4..ecff424 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -929,7 +929,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *recvtype_ptr=NULL, *sendtype_ptr=NULL;
+            MPIR_Datatype *recvtype_ptr=NULL, *sendtype_ptr=NULL;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -953,7 +953,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN)
 		{
                     MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                    MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                    MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -967,7 +967,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN)
 	    {
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 53a0ac7..02db271 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -1040,7 +1040,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *recvtype_ptr=NULL, *sendtype_ptr=NULL;
+            MPIR_Datatype *recvtype_ptr=NULL, *sendtype_ptr=NULL;
             int i, comm_size;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -1053,7 +1053,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                 if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                     MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                    MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                    MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -1083,7 +1083,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 413b816..caddf6b 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -843,7 +843,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -854,7 +854,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
 	    
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 330d5a8..60edb28 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -672,7 +672,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -682,7 +682,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                 if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                     MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                    MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                    MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -700,7 +700,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 	    MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index f70182d..19d5942 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -463,7 +463,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, comm_size;
             int check_send = (comm_ptr->comm_kind == MPIR_INTRACOMM && sendbuf != MPI_IN_PLACE);
 
@@ -492,14 +492,14 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
             }
             if (check_send && HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 81d64ea..68216ff 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -458,7 +458,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, comm_size;
             int check_send;
 
@@ -487,7 +487,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
                     }
                     if ((sendcounts[i] > 0) && (HANDLE_GET_KIND(sendtypes[i]) != HANDLE_KIND_BUILTIN)) {
                         MPID_Datatype_get_ptr(sendtypes[i], sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -500,7 +500,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
                 }
                 if ((recvcounts[i] > 0) && (HANDLE_GET_KIND(recvtypes[i]) != HANDLE_KIND_BUILTIN)) {
                     MPID_Datatype_get_ptr(recvtypes[i], recvtype_ptr);
-                    MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                    MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 29bb9a4..43bcf59 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -140,7 +140,7 @@ static int MPIR_Bcast_binomial(
     MPI_Aint type_size;
     MPI_Aint position;
     void *tmp_buf=NULL;
-    MPID_Datatype *dtp;
+    MPIR_Datatype *dtp;
     MPIU_CHKLMEM_DECL(1);
 
     comm_size = comm_ptr->local_size;
@@ -494,7 +494,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
     int recv_offset, tree_root, nprocs_completed, offset;
     MPI_Aint position;
     MPIU_CHKLMEM_DECL(1);
-    MPID_Datatype *dtp;
+    MPIR_Datatype *dtp;
     MPI_Aint true_extent, true_lb;
     void *tmp_buf;
 
@@ -801,7 +801,7 @@ static int MPIR_Bcast_scatter_ring_allgather(
     void *tmp_buf;
     int recvd_size;
     MPI_Status status;
-    MPID_Datatype *dtp;
+    MPIR_Datatype *dtp;
     MPI_Aint true_extent, true_lb;
     MPIU_CHKLMEM_DECL(1);
 
@@ -1552,7 +1552,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -1567,7 +1567,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
 	    
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 1c13fe5..89a12b7 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -346,7 +346,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
             int rank;
 	    
@@ -360,7 +360,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
 	    
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index b67ea4e..870099c 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -801,7 +801,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
 	    int rank;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -815,7 +815,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -829,7 +829,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -856,7 +856,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -870,7 +870,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 3deffb8..1f481c1 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -314,7 +314,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, rank, comm_size;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -328,7 +328,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -345,7 +345,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     }
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -381,7 +381,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     }
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -399,7 +399,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iallgather.c b/src/mpi/coll/iallgather.c
index b13e82b..aa7f5dc 100644
--- a/src/mpi/coll/iallgather.c
+++ b/src/mpi/coll/iallgather.c
@@ -46,7 +46,7 @@ static int get_count(MPIR_Comm *comm, int tag, void *state)
 }
 static int dtp_release_ref(MPIR_Comm *comm, int tag, void *state)
 {
-    MPID_Datatype *recv_dtp = state;
+    MPIR_Datatype *recv_dtp = state;
     MPID_Datatype_release(recv_dtp);
     return MPI_SUCCESS;
 }
@@ -67,7 +67,7 @@ int MPIR_Iallgather_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype sen
     int dst_tree_root, my_tree_root, tree_root;
     int offset, send_offset, recv_offset;
     MPI_Aint recvtype_extent;
-    MPID_Datatype *recv_dtp;
+    MPIR_Datatype *recv_dtp;
     MPIR_SCHED_CHKPMEM_DECL(1);
 
     comm_size = comm_ptr->local_size;
@@ -688,18 +688,18 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
         {
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (sendbuf != MPI_IN_PLACE && HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index a7461b4..e9f23e1 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -793,9 +793,9 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v
 
             if (sendbuf != MPI_IN_PLACE) {
                 if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                    MPID_Datatype *sendtype_ptr = NULL;
+                    MPIR_Datatype *sendtype_ptr = NULL;
                     MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                    MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                    MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -815,9 +815,9 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v
             MPIR_ERRTEST_ARGNULL(recvcounts,"recvcounts", mpi_errno);
             MPIR_ERRTEST_ARGNULL(displs,"displs", mpi_errno);
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index 2ab9353..2839fcc 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -740,9 +740,9 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
         {
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ialltoall.c b/src/mpi/coll/ialltoall.c
index 637ca0c..77c0595 100644
--- a/src/mpi/coll/ialltoall.c
+++ b/src/mpi/coll/ialltoall.c
@@ -618,18 +618,18 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
             if (sendbuf != MPI_IN_PLACE && HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ialltoallv.c b/src/mpi/coll/ialltoallv.c
index 8c61eed..e6b4c14 100644
--- a/src/mpi/coll/ialltoallv.c
+++ b/src/mpi/coll/ialltoallv.c
@@ -351,9 +351,9 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
                 MPIR_ERRTEST_ARGNULL(sendcounts,"sendcounts", mpi_errno);
                 MPIR_ERRTEST_ARGNULL(sdispls,"sdispls", mpi_errno);
                 if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                    MPID_Datatype *sendtype_ptr = NULL;
+                    MPIR_Datatype *sendtype_ptr = NULL;
                     MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                    MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                    MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -363,9 +363,9 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
             MPIR_ERRTEST_ARGNULL(recvcounts,"recvcounts", mpi_errno);
             MPIR_ERRTEST_ARGNULL(rdispls,"rdispls", mpi_errno);
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 3789356..8144a74 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -395,7 +395,7 @@ int MPIR_Ibcast_scatter_rec_dbl_allgather(void *buffer, int count, MPI_Datatype
     int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous ATTRIBUTE((unused));
     int relative_dst, dst_tree_root, my_tree_root, send_offset;
     int recv_offset, tree_root, nprocs_completed, offset;
-    MPID_Datatype *dtp;
+    MPIR_Datatype *dtp;
     MPI_Aint true_extent, true_lb;
     void *tmp_buf;
     struct MPIR_Ibcast_status *status;
@@ -650,7 +650,7 @@ int MPIR_Ibcast_scatter_ring_allgather(void *buffer, int count, MPI_Datatype dat
     int i, j, jnext, left, right;
     MPI_Aint true_extent, true_lb;
     void *tmp_buf = NULL;
-    MPID_Datatype *dtp = NULL;
+    MPIR_Datatype *dtp = NULL;
 
     struct MPIR_Ibcast_status *status;
     MPIR_SCHED_CHKPMEM_DECL(4);
@@ -1056,9 +1056,9 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iexscan.c b/src/mpi/coll/iexscan.c
index 4da6888..c1a9e20 100644
--- a/src/mpi/coll/iexscan.c
+++ b/src/mpi/coll/iexscan.c
@@ -278,9 +278,9 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             MPIR_ERRTEST_COMM_INTRA(comm_ptr, mpi_errno);
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index ea00d30..a5dd321 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -619,7 +619,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS
         {
-            MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+            MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int rank;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -633,7 +633,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -647,7 +647,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -674,7 +674,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -688,7 +688,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/igatherv.c b/src/mpi/coll/igatherv.c
index 5a8e463..88baf00 100644
--- a/src/mpi/coll/igatherv.c
+++ b/src/mpi/coll/igatherv.c
@@ -203,7 +203,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
     {
         MPID_BEGIN_ERROR_CHECKS
         {
-            MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+            MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, rank, comm_size;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -217,7 +217,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -234,7 +234,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
                     }
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -270,7 +270,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
                     }
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -288,7 +288,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index 0fc9217..b6fd8e0 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -1106,9 +1106,9 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
 
             MPIR_ERRTEST_ARGNULL(recvcounts,"recvcounts", mpi_errno);
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index d5981f1..322ce29 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -1005,9 +1005,9 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
         {
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index f9802c7..f483c26 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -863,9 +863,9 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iscan.c b/src/mpi/coll/iscan.c
index e70dbd6..8727274 100644
--- a/src/mpi/coll/iscan.c
+++ b/src/mpi/coll/iscan.c
@@ -413,9 +413,9 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
 
             MPIR_ERRTEST_COMM_INTRA(comm_ptr, mpi_errno);
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 464be10..a1451b5 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -637,7 +637,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS
         {
-            MPID_Datatype *sendtype_ptr, *recvtype_ptr;
+            MPIR_Datatype *sendtype_ptr, *recvtype_ptr;
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
             if (comm_ptr->comm_kind == MPIR_INTRACOMM) {
                 MPIR_ERRTEST_INTRA_ROOT(comm_ptr, root, mpi_errno);
@@ -647,7 +647,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                        MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -670,7 +670,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                        MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -687,7 +687,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                        MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -700,7 +700,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                        MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/iscatterv.c b/src/mpi/coll/iscatterv.c
index 550266e..00c26b5 100644
--- a/src/mpi/coll/iscatterv.c
+++ b/src/mpi/coll/iscatterv.c
@@ -212,7 +212,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
     {
         MPID_BEGIN_ERROR_CHECKS
         {
-            MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+            MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, comm_size, rank;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -230,7 +230,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
                     }
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -263,7 +263,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -282,7 +282,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
                     }
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -300,7 +300,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 4b212dc..b052f30 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -1167,7 +1167,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
             int i, size, sum;
 	    
@@ -1186,7 +1186,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 0599e18..f0bef42 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -1140,7 +1140,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -1151,7 +1151,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 3e69b70..8ce9d0e 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -1168,7 +1168,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
             int rank;
 	    
@@ -1182,7 +1182,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
                 MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
                 if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                     MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                    MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                    MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                     MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -1211,7 +1211,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
                     MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
                     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                        MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -1225,7 +1225,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
                     MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
                     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                        MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 4c3f964..e4ebda1 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -528,7 +528,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
             MPIR_Op *op_ptr = NULL;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -541,7 +541,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
 	    
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr( datatype_ptr, mpi_errno );
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 1aac657..42dc7ee 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -700,7 +700,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
 	    int rank;
 
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -715,7 +715,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -738,7 +738,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -755,7 +755,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -768,7 +768,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 56df240..94a66dd 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -261,7 +261,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
+	    MPIR_Datatype *sendtype_ptr=NULL, *recvtype_ptr=NULL;
             int i, comm_size, rank;
 	    
             MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE );
@@ -279,7 +279,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                     }
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -311,7 +311,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -330,7 +330,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                     }
                     if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                        MPID_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( sendtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -348,7 +348,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                     MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
                     if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
                         MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                        MPID_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
+                        MPIR_Datatype_valid_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                         MPID_Datatype_committed_ptr( recvtype_ptr, mpi_errno );
                         if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/datatype/get_count.c b/src/mpi/datatype/get_count.c
index a96f7a3..8170db3 100644
--- a/src/mpi/datatype/get_count.c
+++ b/src/mpi/datatype/get_count.c
@@ -101,7 +101,7 @@ int MPI_Get_count( const MPI_Status *status, MPI_Datatype datatype, int *count )
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_ARGNULL(status, "status", mpi_errno);
 	    MPIR_ERRTEST_ARGNULL(count, "count", mpi_errno);
@@ -110,7 +110,7 @@ int MPI_Get_count( const MPI_Status *status, MPI_Datatype datatype, int *count )
             /* Validate datatype_ptr */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno) goto fn_fail;
 		/* Q: Must the type be committed to be used with this function? */
 	    }
diff --git a/src/mpi/datatype/get_elements.c b/src/mpi/datatype/get_elements.c
index 38c9bf7..64c7d07 100644
--- a/src/mpi/datatype/get_elements.c
+++ b/src/mpi/datatype/get_elements.c
@@ -82,7 +82,7 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_ARGNULL(status, "status", mpi_errno);
 	    MPIR_ERRTEST_ARGNULL(count, "count", mpi_errno);
@@ -91,7 +91,7 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
             /* Validate datatype_ptr */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
diff --git a/src/mpi/datatype/get_elements_x.c b/src/mpi/datatype/get_elements_x.c
index 7a1a2c6..682a299 100644
--- a/src/mpi/datatype/get_elements_x.c
+++ b/src/mpi/datatype/get_elements_x.c
@@ -159,7 +159,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count *bytes_p,
                                             MPI_Count count,
                                             MPI_Datatype datatype)
 {
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
 
     MPID_Datatype_get_ptr(datatype, datatype_ptr); /* invalid if builtin */
 
@@ -282,7 +282,7 @@ PMPI_LOCAL MPI_Count MPIR_Type_get_elements(MPI_Count *bytes_p,
 int MPIR_Get_elements_x_impl(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *elements)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     MPI_Count byte_count;
 
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
@@ -411,9 +411,9 @@ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Coun
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
             }
 
diff --git a/src/mpi/datatype/pack.c b/src/mpi/datatype/pack.c
index b28fd1f..545e593 100644
--- a/src/mpi/datatype/pack.c
+++ b/src/mpi/datatype/pack.c
@@ -54,7 +54,7 @@ int MPIR_Pack_impl(const void *inbuf,
         dt_true_lb = 0;
         data_sz    = incount * MPID_Datatype_get_basic_size(datatype);
     } else {
-        MPID_Datatype *dt_ptr;
+        MPIR_Datatype *dt_ptr;
         MPID_Datatype_get_ptr(datatype, dt_ptr);
 	contig     = dt_ptr->is_contig;
         dt_true_lb = dt_ptr->true_lb;
@@ -197,10 +197,10 @@ int MPI_Pack(const void *inbuf,
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
 
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
 
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/datatype/pack_external.c b/src/mpi/datatype/pack_external.c
index 2972fa3..0ac8e56 100644
--- a/src/mpi/datatype/pack_external.c
+++ b/src/mpi/datatype/pack_external.c
@@ -94,10 +94,10 @@ int MPI_Pack_external(const char datarep[],
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
 
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
 
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
diff --git a/src/mpi/datatype/pack_external_size.c b/src/mpi/datatype/pack_external_size.c
index 7f5284d..6962306 100644
--- a/src/mpi/datatype/pack_external_size.c
+++ b/src/mpi/datatype/pack_external_size.c
@@ -83,13 +83,13 @@ int MPI_Pack_external_size(const char datarep[],
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/datatype/pack_size.c b/src/mpi/datatype/pack_size.c
index c896085..9bdab7c 100644
--- a/src/mpi/datatype/pack_size.c
+++ b/src/mpi/datatype/pack_size.c
@@ -105,7 +105,7 @@ int MPI_Pack_size(int incount,
 
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(incount, mpi_errno);
 	    MPIR_ERRTEST_ARGNULL(size, "size", mpi_errno);
@@ -118,7 +118,7 @@ int MPI_Pack_size(int incount,
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno) goto fn_fail;
 	    }
diff --git a/src/mpi/datatype/status_set_elements.c b/src/mpi/datatype/status_set_elements.c
index 0d0753c..534e3f7 100644
--- a/src/mpi/datatype/status_set_elements.c
+++ b/src/mpi/datatype/status_set_elements.c
@@ -64,7 +64,7 @@ int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count,mpi_errno);
 	    MPIR_ERRTEST_ARGNULL(status,"status",mpi_errno);
@@ -72,7 +72,7 @@ int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype,
 
             /* Validate datatype_ptr */
 	    MPID_Datatype_get_ptr( datatype, datatype_ptr );
-            MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
 	    /* If datatype_ptr is not valid, it will be reset to null */
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/datatype/status_set_elements_x.c b/src/mpi/datatype/status_set_elements_x.c
index a0229a5..b429f73 100644
--- a/src/mpi/datatype/status_set_elements_x.c
+++ b/src/mpi/datatype/status_set_elements_x.c
@@ -103,9 +103,9 @@ int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Cou
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
             }
 
diff --git a/src/mpi/datatype/type_commit.c b/src/mpi/datatype/type_commit.c
index 0ad46ea..be63e27 100644
--- a/src/mpi/datatype/type_commit.c
+++ b/src/mpi/datatype/type_commit.c
@@ -98,13 +98,13 @@ int MPI_Type_commit(MPI_Datatype *datatype)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr( *datatype, datatype_ptr );
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_contiguous.c b/src/mpi/datatype/type_contiguous.c
index d99c80a..bd682af 100644
--- a/src/mpi/datatype/type_contiguous.c
+++ b/src/mpi/datatype/type_contiguous.c
@@ -34,7 +34,7 @@ int MPIR_Type_contiguous_impl(int count,
                               MPI_Datatype *newtype)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     MPI_Datatype new_handle;
     
     mpi_errno = MPID_Type_contiguous(count,
@@ -153,14 +153,14 @@ int MPI_Type_contiguous(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
             MPIR_ERRTEST_DATATYPE(oldtype, "datatype", mpi_errno);
 	    
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 	    }
         }
diff --git a/src/mpi/datatype/type_create_darray.c b/src/mpi/datatype/type_create_darray.c
index 925ec5a..5760aff 100644
--- a/src/mpi/datatype/type_create_darray.c
+++ b/src/mpi/datatype/type_create_darray.c
@@ -386,7 +386,7 @@ int MPI_Type_create_darray(int size,
 #   endif
 
     int *ints;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     MPIU_CHKLMEM_DECL(3);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_DARRAY);
 
@@ -513,7 +513,7 @@ int MPI_Type_create_darray(int size,
 	    }
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
 	    /* --BEGIN ERROR HANDLING-- */
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_create_hindexed.c b/src/mpi/datatype/type_create_hindexed.c
index 5db81a8..228b9f6 100644
--- a/src/mpi/datatype/type_create_hindexed.c
+++ b/src/mpi/datatype/type_create_hindexed.c
@@ -64,7 +64,7 @@ int MPI_Type_create_hindexed(int count,
     static const char FCNAME[] = "MPI_Type_create_hindexed";
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int i, *ints;
     MPIU_CHKLMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_HINDEXED);
@@ -79,7 +79,7 @@ int MPI_Type_create_hindexed(int count,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int j;
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    if (count > 0) {
@@ -91,7 +91,7 @@ int MPI_Type_create_hindexed(int count,
 
 	    if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 	    }
 	    for (j=0; j < count; j++) {
diff --git a/src/mpi/datatype/type_create_hindexed_block.c b/src/mpi/datatype/type_create_hindexed_block.c
index 9714d82..3cb7ce2 100644
--- a/src/mpi/datatype/type_create_hindexed_block.c
+++ b/src/mpi/datatype/type_create_hindexed_block.c
@@ -37,7 +37,7 @@ int MPIR_Type_create_hindexed_block_impl(int count, int blocklength,
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int ints[2];
 
     mpi_errno = MPID_Type_blockindexed(count, blocklength, array_of_displacements, 1,
@@ -114,7 +114,7 @@ int MPI_Type_create_hindexed_block(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             MPIR_ERRTEST_COUNT(count, mpi_errno);
             MPIR_ERRTEST_ARGNEG(blocklength, "blocklen", mpi_errno);
@@ -125,7 +125,7 @@ int MPI_Type_create_hindexed_block(int count,
 
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             }
 
             if (mpi_errno)
diff --git a/src/mpi/datatype/type_create_hvector.c b/src/mpi/datatype/type_create_hvector.c
index f7b95ed..81b6261 100644
--- a/src/mpi/datatype/type_create_hvector.c
+++ b/src/mpi/datatype/type_create_hvector.c
@@ -62,7 +62,7 @@ int MPI_Type_create_hvector(int count,
     static const char FCNAME[] = "MPI_Type_create_hvector";
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int ints[2];
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_HVECTOR);
 
@@ -75,7 +75,7 @@ int MPI_Type_create_hvector(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_ARGNEG(blocklength, "blocklen", mpi_errno);
@@ -83,7 +83,7 @@ int MPI_Type_create_hvector(int count,
 
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
             MPIR_ERRTEST_ARGNULL(newtype, "newtype", mpi_errno);
diff --git a/src/mpi/datatype/type_create_indexed_block.c b/src/mpi/datatype/type_create_indexed_block.c
index 2fafcac..eae6ea1 100644
--- a/src/mpi/datatype/type_create_indexed_block.c
+++ b/src/mpi/datatype/type_create_indexed_block.c
@@ -39,7 +39,7 @@ int MPIR_Type_create_indexed_block_impl(int count,
     int mpi_errno = MPI_SUCCESS;
     MPIU_CHKLMEM_DECL(1);
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int i, *ints;
 
     mpi_errno = MPID_Type_blockindexed(count,
@@ -148,7 +148,7 @@ int MPI_Type_create_indexed_block(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_ARGNEG(blocklength, "blocklen", mpi_errno);
@@ -161,7 +161,7 @@ int MPI_Type_create_indexed_block(int count,
 	    
 	    if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    }
 
             if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_create_resized.c b/src/mpi/datatype/type_create_resized.c
index 894a87e..afe91c9 100644
--- a/src/mpi/datatype/type_create_resized.c
+++ b/src/mpi/datatype/type_create_resized.c
@@ -59,7 +59,7 @@ int MPI_Type_create_resized(MPI_Datatype oldtype,
     static const char FCNAME[] = "MPI_Type_create_resized";
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     MPI_Aint aints[2];
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_RESIZED);
 
@@ -73,13 +73,13 @@ int MPI_Type_create_resized(MPI_Datatype oldtype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_DATATYPE(oldtype, "datatype", mpi_errno);
 
             /* Validate datatype_ptr */
 	    MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/datatype/type_create_struct.c b/src/mpi/datatype/type_create_struct.c
index 5557ce1..fad34ab 100644
--- a/src/mpi/datatype/type_create_struct.c
+++ b/src/mpi/datatype/type_create_struct.c
@@ -40,7 +40,7 @@ int MPIR_Type_create_struct_impl(int count,
     int mpi_errno = MPI_SUCCESS;
     int i, *ints;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     MPIU_CHKLMEM_DECL(1);
 
     mpi_errno = MPID_Type_struct(count,
@@ -127,7 +127,7 @@ int MPI_Type_create_struct(int count,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int j;
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count,mpi_errno);
 
@@ -143,7 +143,7 @@ int MPI_Type_create_struct(int count,
 
 		if (array_of_types[j] != MPI_DATATYPE_NULL && HANDLE_GET_KIND(array_of_types[j]) != HANDLE_KIND_BUILTIN) {
 		    MPID_Datatype_get_ptr(array_of_types[j], datatype_ptr);
-		    MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		    MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		    if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 		}
 	    }
diff --git a/src/mpi/datatype/type_create_subarray.c b/src/mpi/datatype/type_create_subarray.c
index 84419cf..2c249fd 100644
--- a/src/mpi/datatype/type_create_subarray.c
+++ b/src/mpi/datatype/type_create_subarray.c
@@ -81,7 +81,7 @@ int MPI_Type_create_subarray(int ndims,
 
     /* for saving contents */
     int *ints;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
 
     MPIU_CHKLMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
@@ -95,7 +95,7 @@ int MPI_Type_create_subarray(int ndims,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    /* Check parameters */
 	    MPIR_ERRTEST_ARGNONPOS(ndims, "ndims", mpi_errno, MPI_ERR_DIMS);
@@ -172,7 +172,7 @@ int MPI_Type_create_subarray(int ndims,
             MPID_Datatype_get_ptr(oldtype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If datatype_ptr is not valid, it will be reset to null */
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
         }
diff --git a/src/mpi/datatype/type_dup.c b/src/mpi/datatype/type_dup.c
index 25f5394..83cf8bb 100644
--- a/src/mpi/datatype/type_dup.c
+++ b/src/mpi/datatype/type_dup.c
@@ -52,8 +52,8 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)
     static const char FCNAME[] = "MPI_Type_dup";
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *datatype_ptr = NULL;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *new_dtp;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_DUP);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -81,7 +81,7 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)
         MPID_BEGIN_ERROR_CHECKS;
         {
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
 	    /* If comm_ptr is not valid, it will be reset to null */
 	    MPIR_ERRTEST_ARGNULL(newtype, "newtype", mpi_errno);
         }
diff --git a/src/mpi/datatype/type_extent.c b/src/mpi/datatype/type_extent.c
index 7f8db44..92d79f0 100644
--- a/src/mpi/datatype/type_extent.c
+++ b/src/mpi/datatype/type_extent.c
@@ -76,13 +76,13 @@ int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_free.c b/src/mpi/datatype/type_free.c
index dc68238..c3544bf 100644
--- a/src/mpi/datatype/type_free.c
+++ b/src/mpi/datatype/type_free.c
@@ -31,7 +31,7 @@ int MPI_Type_free(MPI_Datatype *datatype) __attribute__((weak,alias("PMPI_Type_f
 #define FCNAME MPL_QUOTE(FUNCNAME)
 void MPIR_Type_free_impl(MPI_Datatype *datatype)
 {
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
 
     MPID_Datatype_get_ptr( *datatype, datatype_ptr );
     MPID_Datatype_release(datatype_ptr);
@@ -97,7 +97,7 @@ int MPI_Type_free(MPI_Datatype *datatype)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    /* Check for built-in type */
 	    if (HANDLE_GET_KIND(*datatype) == HANDLE_KIND_BUILTIN) {
@@ -129,7 +129,7 @@ int MPI_Type_free(MPI_Datatype *datatype)
             MPID_Datatype_get_ptr( *datatype, datatype_ptr );
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_get_contents.c b/src/mpi/datatype/type_get_contents.c
index e3a37e7..776d199 100644
--- a/src/mpi/datatype/type_get_contents.c
+++ b/src/mpi/datatype/type_get_contents.c
@@ -86,7 +86,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
 	    /* Check for built-in type */
 	    if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) {
@@ -119,7 +119,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If comm_ptr is not value, it will be reset to null */
             if (mpi_errno) goto fn_fail;
         }
diff --git a/src/mpi/datatype/type_get_envelope.c b/src/mpi/datatype/type_get_envelope.c
index aa033ef..3594733 100644
--- a/src/mpi/datatype/type_get_envelope.c
+++ b/src/mpi/datatype/type_get_envelope.c
@@ -49,7 +49,7 @@ void MPIR_Type_get_envelope_impl(MPI_Datatype datatype,
 	*num_datatypes = 0;
     }
     else {
-	MPID_Datatype *dtp;
+	MPIR_Datatype *dtp;
 
 	MPID_Datatype_get_ptr(datatype, dtp);
 
@@ -115,13 +115,13 @@ int MPI_Type_get_envelope(MPI_Datatype datatype,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr( datatype, datatype_ptr );
 
 	    /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 	    /* If comm_ptr is not value, it will be reset to null */
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
         }
diff --git a/src/mpi/datatype/type_get_extent.c b/src/mpi/datatype/type_get_extent.c
index f2a7149..2ec1ba9 100644
--- a/src/mpi/datatype/type_get_extent.c
+++ b/src/mpi/datatype/type_get_extent.c
@@ -88,13 +88,13 @@ int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_get_extent_x.c b/src/mpi/datatype/type_get_extent_x.c
index 0221f06..561c958 100644
--- a/src/mpi/datatype/type_get_extent_x.c
+++ b/src/mpi/datatype/type_get_extent_x.c
@@ -32,7 +32,7 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *exten
 #define FCNAME MPL_QUOTE(FUNCNAME)
 void MPIR_Type_get_extent_x_impl(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent)
 {
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
 
     MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
@@ -98,9 +98,9 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *exten
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             }
 
             /* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
diff --git a/src/mpi/datatype/type_get_name.c b/src/mpi/datatype/type_get_name.c
index 507ab14..e4a4d0d 100644
--- a/src/mpi/datatype/type_get_name.c
+++ b/src/mpi/datatype/type_get_name.c
@@ -143,7 +143,7 @@ int MPIR_Datatype_init_names(void)
 #endif
     int mpi_errno = MPI_SUCCESS;
     int i;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     static volatile int needsInit = 1;
 
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
@@ -167,8 +167,8 @@ int MPIR_Datatype_init_names(void)
 
 	    MPID_Datatype_get_ptr(mpi_names[i].dtype, datatype_ptr);
 
-	    if (datatype_ptr < MPID_Datatype_builtin ||
-		datatype_ptr > MPID_Datatype_builtin + MPID_DATATYPE_N_BUILTIN)
+	    if (datatype_ptr < MPIR_Datatype_builtin ||
+		datatype_ptr > MPIR_Datatype_builtin + MPIR_DATATYPE_N_BUILTIN)
 		{
 		    MPIR_ERR_SETFATALANDJUMP1(mpi_errno,MPI_ERR_INTERN,
 			      "**typeinitbadmem","**typeinitbadmem %d", i);
@@ -238,7 +238,7 @@ int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen)
 {
     static const char FCNAME[] = "MPI_Type_get_name";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     static int setup = 0;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_NAME);
 
@@ -270,7 +270,7 @@ int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen)
         MPID_BEGIN_ERROR_CHECKS;
         {
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
 	    /* If datatype_ptr is not valid, it will be reset to null */
 	    MPIR_ERRTEST_ARGNULL(type_name,"type_name", mpi_errno);
diff --git a/src/mpi/datatype/type_get_true_extent.c b/src/mpi/datatype/type_get_true_extent.c
index e5e064b..090f757 100644
--- a/src/mpi/datatype/type_get_true_extent.c
+++ b/src/mpi/datatype/type_get_true_extent.c
@@ -90,13 +90,13 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_get_true_extent_x.c b/src/mpi/datatype/type_get_true_extent_x.c
index b16ab01..119a72c 100644
--- a/src/mpi/datatype/type_get_true_extent_x.c
+++ b/src/mpi/datatype/type_get_true_extent_x.c
@@ -32,7 +32,7 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *
 #define FCNAME MPL_QUOTE(FUNCNAME)
 void MPIR_Type_get_true_extent_x_impl(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Count *true_extent)
 {
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
 
     MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
@@ -98,9 +98,9 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Co
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             }
 
             /* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
diff --git a/src/mpi/datatype/type_hindexed.c b/src/mpi/datatype/type_hindexed.c
index b48bed7..913c072 100644
--- a/src/mpi/datatype/type_hindexed.c
+++ b/src/mpi/datatype/type_hindexed.c
@@ -89,7 +89,7 @@ int MPI_Type_hindexed(int count,
     static const char FCNAME[] = "MPI_Type_hindexed";
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int i, *ints;
     MPIU_CHKLMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_HINDEXED);
@@ -104,7 +104,7 @@ int MPI_Type_hindexed(int count,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int j;
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_DATATYPE(oldtype, "datatype", mpi_errno);
@@ -115,7 +115,7 @@ int MPI_Type_hindexed(int count,
 
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr( oldtype, datatype_ptr );
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
             /* verify that all blocklengths are >= 0 */
diff --git a/src/mpi/datatype/type_hvector.c b/src/mpi/datatype/type_hvector.c
index 4174cf0..b5b959d 100644
--- a/src/mpi/datatype/type_hvector.c
+++ b/src/mpi/datatype/type_hvector.c
@@ -34,7 +34,7 @@ int MPIR_Type_hvector_impl(int count, int blocklength, MPI_Aint stride, MPI_Data
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int ints[2];
     
     mpi_errno = MPID_Type_vector(count,
@@ -111,7 +111,7 @@ int MPI_Type_hvector(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_ARGNEG(blocklength,"blocklength",mpi_errno);
@@ -119,7 +119,7 @@ int MPI_Type_hvector(int count,
 
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr(oldtype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno) goto fn_fail;
             }
 
diff --git a/src/mpi/datatype/type_indexed.c b/src/mpi/datatype/type_indexed.c
index f02de6d..425a8b8 100644
--- a/src/mpi/datatype/type_indexed.c
+++ b/src/mpi/datatype/type_indexed.c
@@ -37,7 +37,7 @@ int MPIR_Type_indexed_impl(int count, const int *array_of_blocklengths,
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int i, *ints;
     MPIU_CHKLMEM_DECL(1);
 
@@ -154,7 +154,7 @@ int MPI_Type_indexed(int count,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int j;
-	    MPID_Datatype *datatype_ptr = NULL;
+	    MPIR_Datatype *datatype_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count,mpi_errno);
 	    if (count > 0) {
@@ -165,7 +165,7 @@ int MPI_Type_indexed(int count,
 
             if (HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
                 MPID_Datatype_get_ptr( oldtype, datatype_ptr );
-                MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+                MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
             }
             /* verify that all blocklengths are >= 0 */
             for (j=0; j < count; j++) {
diff --git a/src/mpi/datatype/type_lb.c b/src/mpi/datatype/type_lb.c
index 2f0778f..9ec1107 100644
--- a/src/mpi/datatype/type_lb.c
+++ b/src/mpi/datatype/type_lb.c
@@ -34,7 +34,7 @@ void MPIR_Type_lb_impl(MPI_Datatype datatype, MPI_Aint *displacement)
     if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) {
 	*displacement = 0;
     } else {
-        MPID_Datatype *datatype_ptr = NULL;
+        MPIR_Datatype *datatype_ptr = NULL;
         MPID_Datatype_get_ptr(datatype, datatype_ptr);
 	*displacement = datatype_ptr->lb;
     }
@@ -93,13 +93,13 @@ int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr(datatype, datatype_ptr);
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_set_name.c b/src/mpi/datatype/type_set_name.c
index 08ce1fb..b71c7a7 100644
--- a/src/mpi/datatype/type_set_name.c
+++ b/src/mpi/datatype/type_set_name.c
@@ -51,7 +51,7 @@ Input Parameters:
 int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     static int setup = 0;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_SET_NAME);
 
@@ -81,7 +81,7 @@ int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name)
 	    int slen;
 	    
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
 	    /* If datatype_ptr is not valid, it will be reset to null */
 	    MPIR_ERRTEST_ARGNULL(type_name,"type_name", mpi_errno);
 
diff --git a/src/mpi/datatype/type_size.c b/src/mpi/datatype/type_size.c
index cc9a3f4..a1e3db0 100644
--- a/src/mpi/datatype/type_size.c
+++ b/src/mpi/datatype/type_size.c
@@ -84,13 +84,13 @@ int MPI_Type_size(MPI_Datatype datatype, int *size)
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Datatype *datatype_ptr = NULL;
+            MPIR_Datatype *datatype_ptr = NULL;
 
             /* Convert MPI object handles to object pointers */
             MPID_Datatype_get_ptr( datatype, datatype_ptr );
 
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
+            MPIR_Datatype_valid_ptr( datatype_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_size_x.c b/src/mpi/datatype/type_size_x.c
index 1a5a555..81bf558 100644
--- a/src/mpi/datatype/type_size_x.c
+++ b/src/mpi/datatype/type_size_x.c
@@ -94,9 +94,9 @@ int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size)
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             }
 
             /* TODO more checks may be appropriate (counts, in_place, buffer aliasing, etc) */
diff --git a/src/mpi/datatype/type_struct.c b/src/mpi/datatype/type_struct.c
index 0a9f9dc..cb2d62c 100644
--- a/src/mpi/datatype/type_struct.c
+++ b/src/mpi/datatype/type_struct.c
@@ -37,7 +37,7 @@ int MPIR_Type_struct_impl(int count, const int *array_of_blocklengths,
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
     int i, *ints;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     MPIU_CHKLMEM_DECL(1);
 
     mpi_errno = MPID_Type_struct(count,
@@ -168,7 +168,7 @@ int MPI_Type_struct(int count,
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int i;
-	    MPID_Datatype *datatype_ptr;
+	    MPIR_Datatype *datatype_ptr;
 
 	    MPIR_ERRTEST_COUNT(count,mpi_errno);
 	    if (count > 0) {
@@ -184,7 +184,7 @@ int MPI_Type_struct(int count,
                 if (array_of_types[i] != MPI_DATATYPE_NULL &&
                     HANDLE_GET_KIND(array_of_types[i]) != HANDLE_KIND_BUILTIN) {
                     MPID_Datatype_get_ptr(array_of_types[i], datatype_ptr);
-                    MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                    MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 }
 	    }
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/datatype/type_ub.c b/src/mpi/datatype/type_ub.c
index afc6a45..96e97ee 100644
--- a/src/mpi/datatype/type_ub.c
+++ b/src/mpi/datatype/type_ub.c
@@ -57,7 +57,7 @@ The replacement for this routine is 'MPI_Type_get_extent'
 int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr = NULL;
+    MPIR_Datatype *datatype_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_UB);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -84,7 +84,7 @@ int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement)
         MPID_BEGIN_ERROR_CHECKS;
         {
             /* Validate datatype_ptr */
-            MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+            MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/datatype/type_vector.c b/src/mpi/datatype/type_vector.c
index ded9339..cedc8e7 100644
--- a/src/mpi/datatype/type_vector.c
+++ b/src/mpi/datatype/type_vector.c
@@ -34,7 +34,7 @@ int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype o
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Datatype new_handle;
-    MPID_Datatype *new_dtp;
+    MPIR_Datatype *new_dtp;
     int ints[3];
 
     mpi_errno = MPID_Type_vector(count,
@@ -115,7 +115,7 @@ int MPI_Type_vector(int count,
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Datatype *old_ptr = NULL;
+	    MPIR_Datatype *old_ptr = NULL;
 
 	    MPIR_ERRTEST_COUNT(count, mpi_errno);
 	    MPIR_ERRTEST_ARGNEG(blocklength, "blocklen", mpi_errno);
@@ -123,7 +123,7 @@ int MPI_Type_vector(int count,
 	    
 	    if (oldtype != MPI_DATATYPE_NULL && HANDLE_GET_KIND(oldtype) != HANDLE_KIND_BUILTIN) {
 		MPID_Datatype_get_ptr(oldtype, old_ptr);
-		MPID_Datatype_valid_ptr(old_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(old_ptr, mpi_errno);
                 if (mpi_errno) goto fn_fail;
 	    }
         }
diff --git a/src/mpi/datatype/typeutil.c b/src/mpi/datatype/typeutil.c
index b3c58b4..33949cd 100644
--- a/src/mpi/datatype/typeutil.c
+++ b/src/mpi/datatype/typeutil.c
@@ -11,21 +11,21 @@
 /* This is the utility file for datatypes that contains the basic datatype 
    items and storage management.  It also contains a temporary routine
    that is used by ROMIO to test to see if datatypes are contiguous */
-#ifndef MPID_DATATYPE_PREALLOC 
-#define MPID_DATATYPE_PREALLOC 8
+#ifndef MPIR_DATATYPE_PREALLOC
+#define MPIR_DATATYPE_PREALLOC 8
 #endif
 
 /* Preallocated datatype objects */
-MPID_Datatype MPID_Datatype_builtin[MPID_DATATYPE_N_BUILTIN + 1] = { {0} };
-MPID_Datatype MPID_Datatype_direct[MPID_DATATYPE_PREALLOC] = { {0} };
-MPIU_Object_alloc_t MPID_Datatype_mem = { 0, 0, 0, 0, MPID_DATATYPE, 
-			      sizeof(MPID_Datatype), MPID_Datatype_direct,
-					  MPID_DATATYPE_PREALLOC};
+MPIR_Datatype MPIR_Datatype_builtin[MPIR_DATATYPE_N_BUILTIN + 1] = { {0} };
+MPIR_Datatype MPIR_Datatype_direct[MPIR_DATATYPE_PREALLOC] = { {0} };
+MPIU_Object_alloc_t MPIR_Datatype_mem = { 0, 0, 0, 0, MPIR_DATATYPE,
+			      sizeof(MPIR_Datatype), MPIR_Datatype_direct,
+					  MPIR_DATATYPE_PREALLOC};
 
 static int MPIR_Datatype_finalize(void *dummy );
 static int MPIR_DatatypeAttrFinalizeCallback(void *dummy );
 
-/* Call this routine to associate a MPID_Datatype with each predefined 
+/* Call this routine to associate a MPIR_Datatype with each predefined
    datatype.  We do this with lazy initialization because many MPI 
    programs do not require anything except the predefined datatypes, and
    all of the necessary information about those is stored within the
@@ -147,10 +147,10 @@ int MPIR_Datatype_init(void)
 {
     int i;
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *ptr;
+    MPIR_Datatype *ptr;
 
-    MPIU_Assert(MPID_Datatype_mem.initialized == 0);
-    MPIU_Assert(MPID_DATATYPE_PREALLOC >= 5);
+    MPIU_Assert(MPIR_Datatype_mem.initialized == 0);
+    MPIU_Assert(MPIR_DATATYPE_PREALLOC >= 5);
 
     for (i=0; mpi_pairtypes[i] != (MPI_Datatype) -1; ++i) {
         /* types based on 'long long' and 'long double', may be disabled at
@@ -168,14 +168,14 @@ int MPIR_Datatype_init(void)
         /* we use the _unsafe version because we are still in MPI_Init, before
          * multiple threads are permitted and possibly before support for
          * critical sections is entirely setup */
-        ptr = (MPID_Datatype *)MPIU_Handle_obj_alloc_unsafe( &MPID_Datatype_mem );
+        ptr = (MPIR_Datatype *)MPIU_Handle_obj_alloc_unsafe( &MPIR_Datatype_mem );
 
         MPIU_Assert(ptr);
         MPIU_Assert(ptr->handle == mpi_pairtypes[i]);
         /* this is a redundant alternative to the previous statement */
-        MPIU_Assert((void *) ptr == (void *) (MPID_Datatype_direct + HANDLE_INDEX(mpi_pairtypes[i])));
+        MPIU_Assert((void *) ptr == (void *) (MPIR_Datatype_direct + HANDLE_INDEX(mpi_pairtypes[i])));
 
-        mpi_errno = MPID_Type_create_pairtype(mpi_pairtypes[i], (MPID_Datatype *) ptr);
+        mpi_errno = MPID_Type_create_pairtype(mpi_pairtypes[i], (MPIR_Datatype *) ptr);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
 
@@ -193,7 +193,7 @@ fn_fail:
 static int MPIR_Datatype_finalize(void *dummy ATTRIBUTE((unused)) )
 {
     int i;
-    MPID_Datatype *dptr;
+    MPIR_Datatype *dptr;
 
     for (i=0; mpi_pairtypes[i] != (MPI_Datatype) -1; i++) {
 	if (mpi_pairtypes[i] != MPI_DATATYPE_NULL) {
@@ -217,7 +217,7 @@ int MPIR_Datatype_builtin_fillin(void)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
-    MPID_Datatype *dptr;
+    MPIR_Datatype *dptr;
     MPI_Datatype  d = MPI_DATATYPE_NULL;
     static int is_init = 0;
 
@@ -229,7 +229,7 @@ int MPIR_Datatype_builtin_fillin(void)
     }
 
     if (!is_init) { 
-	for (i=0; i<MPID_DATATYPE_N_BUILTIN; i++) {
+	for (i=0; i<MPIR_DATATYPE_N_BUILTIN; i++) {
 	    /* Compute the index from the value of the handle */
 	    d = mpi_dtypes[i];
 	    if (d == -1) {
@@ -243,8 +243,8 @@ int MPIR_Datatype_builtin_fillin(void)
 	    
 	    MPID_Datatype_get_ptr(d,dptr);
 	    /* --BEGIN ERROR HANDLING-- */
-	    if (dptr < MPID_Datatype_builtin || 
-		dptr > MPID_Datatype_builtin + MPID_DATATYPE_N_BUILTIN)
+	    if (dptr < MPIR_Datatype_builtin ||
+		dptr > MPIR_Datatype_builtin + MPIR_DATATYPE_N_BUILTIN)
 		{
 		    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 						     MPIR_ERR_FATAL, FCNAME,
@@ -255,7 +255,7 @@ int MPIR_Datatype_builtin_fillin(void)
 		}
 	    /* --END ERROR HANDLING-- */
 	    
-	    /* dptr will point into MPID_Datatype_builtin */
+	    /* dptr will point into MPIR_Datatype_builtin */
 	    dptr->handle	   = d;
 	    dptr->is_permanent = 1;
 	    dptr->is_contig	   = 1;
@@ -284,7 +284,7 @@ int MPIR_Datatype_builtin_fillin(void)
 /* This will eventually be removed once ROMIO knows more about MPICH */
 void MPIR_Datatype_iscontig(MPI_Datatype datatype, int *flag)
 {
-    MPID_Datatype *datatype_ptr;
+    MPIR_Datatype *datatype_ptr;
     if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN)
         *flag = 1;
     else  {
@@ -297,11 +297,11 @@ void MPIR_Datatype_iscontig(MPI_Datatype datatype, int *flag)
    in Finalize */
 static int MPIR_DatatypeAttrFinalizeCallback(void *dummy ATTRIBUTE((unused)) )
 {
-    MPID_Datatype *dtype;
+    MPIR_Datatype *dtype;
     int i, mpi_errno=MPI_SUCCESS;
 
-    for (i=0; i<MPID_DATATYPE_N_BUILTIN; i++) {
-	dtype = &MPID_Datatype_builtin[i];
+    for (i=0; i<MPIR_DATATYPE_N_BUILTIN; i++) {
+	dtype = &MPIR_Datatype_builtin[i];
 	if (dtype && MPIR_Process.attr_free && dtype->attributes) {
 	    mpi_errno = MPIR_Process.attr_free( dtype->handle, 
 						&dtype->attributes );
diff --git a/src/mpi/datatype/unpack.c b/src/mpi/datatype/unpack.c
index eb58b5c..cf1acb3 100644
--- a/src/mpi/datatype/unpack.c
+++ b/src/mpi/datatype/unpack.c
@@ -49,7 +49,7 @@ int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position,
         dt_true_lb = 0;
         data_sz    = outcount * MPID_Datatype_get_basic_size(datatype);
     } else {
-        MPID_Datatype *dt_ptr;
+        MPIR_Datatype *dt_ptr;
         MPID_Datatype_get_ptr(datatype, dt_ptr);
 	contig     = dt_ptr->is_contig;
         dt_true_lb = dt_ptr->true_lb;
@@ -183,10 +183,10 @@ int MPI_Unpack(const void *inbuf, int insize, int *position,
 
 	    if (datatype != MPI_DATATYPE_NULL &&
 		HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 	    }
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/datatype/unpack_external.c b/src/mpi/datatype/unpack_external.c
index d9e6d95..25ee12b 100644
--- a/src/mpi/datatype/unpack_external.c
+++ b/src/mpi/datatype/unpack_external.c
@@ -91,10 +91,10 @@ int MPI_Unpack_external(const char datarep[],
 	    MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
 
 	    if (datatype != MPI_DATATYPE_NULL && HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 	    }
 		
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index df7038d..f2deb45 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -1453,7 +1453,7 @@ static const char * GetDTypeString(MPI_Datatype d)
     int num_integers, num_addresses, num_datatypes, combiner = 0;
     char *str;
 
-    if (HANDLE_GET_MPI_KIND(d) != MPID_DATATYPE ||      \
+    if (HANDLE_GET_MPI_KIND(d) != MPIR_DATATYPE ||      \
 	(HANDLE_GET_KIND(d) == HANDLE_KIND_INVALID &&   \
 	d != MPI_DATATYPE_NULL))
         return "INVALID DATATYPE";
diff --git a/src/mpi/pt2pt/bsend.c b/src/mpi/pt2pt/bsend.c
index f8b07c5..d0327fb 100644
--- a/src/mpi/pt2pt/bsend.c
+++ b/src/mpi/pt2pt/bsend.c
@@ -134,10 +134,10 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/bsend_init.c b/src/mpi/pt2pt/bsend_init.c
index a0869d2..781d88b 100644
--- a/src/mpi/pt2pt/bsend_init.c
+++ b/src/mpi/pt2pt/bsend_init.c
@@ -104,10 +104,10 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index 680aa33..77cbfde 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -207,10 +207,10 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/imrecv.c b/src/mpi/pt2pt/imrecv.c
index f82f62e..4b7a2e4 100644
--- a/src/mpi/pt2pt/imrecv.c
+++ b/src/mpi/pt2pt/imrecv.c
@@ -85,9 +85,9 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/pt2pt/irecv.c b/src/mpi/pt2pt/irecv.c
index 8f89f4c..72d9a6f 100644
--- a/src/mpi/pt2pt/irecv.c
+++ b/src/mpi/pt2pt/irecv.c
@@ -105,10 +105,10 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/irsend.c b/src/mpi/pt2pt/irsend.c
index 14291ed..ce19356 100644
--- a/src/mpi/pt2pt/irsend.c
+++ b/src/mpi/pt2pt/irsend.c
@@ -106,10 +106,10 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/isend.c b/src/mpi/pt2pt/isend.c
index 6622e11..e41adca 100644
--- a/src/mpi/pt2pt/isend.c
+++ b/src/mpi/pt2pt/isend.c
@@ -104,10 +104,10 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/issend.c b/src/mpi/pt2pt/issend.c
index 4206cf4..f22b216 100644
--- a/src/mpi/pt2pt/issend.c
+++ b/src/mpi/pt2pt/issend.c
@@ -105,10 +105,10 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/mrecv.c b/src/mpi/pt2pt/mrecv.c
index a1d7b8c..d946005 100644
--- a/src/mpi/pt2pt/mrecv.c
+++ b/src/mpi/pt2pt/mrecv.c
@@ -84,9 +84,9 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 MPID_Datatype_get_ptr(datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/pt2pt/recv.c b/src/mpi/pt2pt/recv.c
index 04d50d7..132db58 100644
--- a/src/mpi/pt2pt/recv.c
+++ b/src/mpi/pt2pt/recv.c
@@ -113,10 +113,10 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/recv_init.c b/src/mpi/pt2pt/recv_init.c
index 0981c29..14ac702 100644
--- a/src/mpi/pt2pt/recv_init.c
+++ b/src/mpi/pt2pt/recv_init.c
@@ -107,10 +107,10 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/rsend.c b/src/mpi/pt2pt/rsend.c
index 4ac0800..8c697c1 100644
--- a/src/mpi/pt2pt/rsend.c
+++ b/src/mpi/pt2pt/rsend.c
@@ -101,10 +101,10 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/rsend_init.c b/src/mpi/pt2pt/rsend_init.c
index f05aba4..9ca7bcf 100644
--- a/src/mpi/pt2pt/rsend_init.c
+++ b/src/mpi/pt2pt/rsend_init.c
@@ -107,10 +107,10 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/send.c b/src/mpi/pt2pt/send.c
index cecc6dc..537a9f5 100644
--- a/src/mpi/pt2pt/send.c
+++ b/src/mpi/pt2pt/send.c
@@ -106,10 +106,10 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/send_init.c b/src/mpi/pt2pt/send_init.c
index d186ca2..a718f14 100644
--- a/src/mpi/pt2pt/send_init.c
+++ b/src/mpi/pt2pt/send_init.c
@@ -107,10 +107,10 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/sendrecv.c b/src/mpi/pt2pt/sendrecv.c
index f5005d3..4f34c55 100644
--- a/src/mpi/pt2pt/sendrecv.c
+++ b/src/mpi/pt2pt/sendrecv.c
@@ -131,20 +131,20 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 	    /* Validate datatype objects */
 	    if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(sendtype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 	    }
 	    if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(recvtype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/sendrecv_rep.c b/src/mpi/pt2pt/sendrecv_rep.c
index aaa521b..0092f62 100644
--- a/src/mpi/pt2pt/sendrecv_rep.c
+++ b/src/mpi/pt2pt/sendrecv_rep.c
@@ -115,10 +115,10 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/ssend.c b/src/mpi/pt2pt/ssend.c
index 486614f..80ed009 100644
--- a/src/mpi/pt2pt/ssend.c
+++ b/src/mpi/pt2pt/ssend.c
@@ -100,10 +100,10 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/pt2pt/ssend_init.c b/src/mpi/pt2pt/ssend_init.c
index bc5a584..4478117 100644
--- a/src/mpi/pt2pt/ssend_init.c
+++ b/src/mpi/pt2pt/ssend_init.c
@@ -104,10 +104,10 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
 	    /* Validate datatype object */
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype *datatype_ptr = NULL;
+		MPIR_Datatype *datatype_ptr = NULL;
 
 		MPID_Datatype_get_ptr(datatype, datatype_ptr);
-		MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+		MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
 		MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
 		if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/rma/accumulate.c b/src/mpi/rma/accumulate.c
index 8e9235c..01b684c 100644
--- a/src/mpi/rma/accumulate.c
+++ b/src/mpi/rma/accumulate.c
@@ -115,10 +115,10 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -126,10 +126,10 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/get.c b/src/mpi/rma/get.c
index 4ba86b5..bf5788f 100644
--- a/src/mpi/rma/get.c
+++ b/src/mpi/rma/get.c
@@ -110,10 +110,10 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -121,10 +121,10 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/get_accumulate.c b/src/mpi/rma/get_accumulate.c
index 259323a..afb78b1 100644
--- a/src/mpi/rma/get_accumulate.c
+++ b/src/mpi/rma/get_accumulate.c
@@ -156,10 +156,10 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
             if (op != MPI_NO_OP &&
                 HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -167,10 +167,10 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
 
             if (HANDLE_GET_KIND(result_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(result_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -178,10 +178,10 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/put.c b/src/mpi/rma/put.c
index 306adb3..e7ecf7e 100644
--- a/src/mpi/rma/put.c
+++ b/src/mpi/rma/put.c
@@ -110,10 +110,10 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -121,10 +121,10 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/raccumulate.c b/src/mpi/rma/raccumulate.c
index 9033db4..fbeca51 100644
--- a/src/mpi/rma/raccumulate.c
+++ b/src/mpi/rma/raccumulate.c
@@ -129,10 +129,10 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -140,10 +140,10 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/rget.c b/src/mpi/rma/rget.c
index cada257..b1a8879 100644
--- a/src/mpi/rma/rget.c
+++ b/src/mpi/rma/rget.c
@@ -124,10 +124,10 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -135,10 +135,10 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/rget_accumulate.c b/src/mpi/rma/rget_accumulate.c
index 61294ca..23f5500 100644
--- a/src/mpi/rma/rget_accumulate.c
+++ b/src/mpi/rma/rget_accumulate.c
@@ -145,10 +145,10 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
             if (op != MPI_NO_OP &&
                 HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -156,10 +156,10 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
 
             if (HANDLE_GET_KIND(result_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -167,10 +167,10 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/rma/rput.c b/src/mpi/rma/rput.c
index aeae461..f99d0dc 100644
--- a/src/mpi/rma/rput.c
+++ b/src/mpi/rma/rput.c
@@ -126,10 +126,10 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(origin_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(origin_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
@@ -137,10 +137,10 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
 
             if (HANDLE_GET_KIND(target_datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype *datatype_ptr = NULL;
+                MPIR_Datatype *datatype_ptr = NULL;
                 
                 MPID_Datatype_get_ptr(target_datatype, datatype_ptr);
-                MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(datatype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index 1914779..c14e4eb 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -173,18 +173,18 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/topo/inhb_allgatherv.c b/src/mpi/topo/inhb_allgatherv.c
index 5a361e4..7429d7f 100644
--- a/src/mpi/topo/inhb_allgatherv.c
+++ b/src/mpi/topo/inhb_allgatherv.c
@@ -178,18 +178,18 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index 8b6b220..275b237 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -179,18 +179,18 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/topo/inhb_alltoallv.c b/src/mpi/topo/inhb_alltoallv.c
index 13841a1..5880a6d 100644
--- a/src/mpi/topo/inhb_alltoallv.c
+++ b/src/mpi/topo/inhb_alltoallv.c
@@ -184,18 +184,18 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
                 if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/topo/nhb_allgather.c b/src/mpi/topo/nhb_allgather.c
index 6b16711..f27dd37 100644
--- a/src/mpi/topo/nhb_allgather.c
+++ b/src/mpi/topo/nhb_allgather.c
@@ -133,16 +133,16 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
             }
 
diff --git a/src/mpi/topo/nhb_allgatherv.c b/src/mpi/topo/nhb_allgatherv.c
index d3ae882..cbba644 100644
--- a/src/mpi/topo/nhb_allgatherv.c
+++ b/src/mpi/topo/nhb_allgatherv.c
@@ -134,16 +134,16 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
             }
 
diff --git a/src/mpi/topo/nhb_alltoall.c b/src/mpi/topo/nhb_alltoall.c
index 47ecd3b..64d90c7 100644
--- a/src/mpi/topo/nhb_alltoall.c
+++ b/src/mpi/topo/nhb_alltoall.c
@@ -137,16 +137,16 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
             }
 
diff --git a/src/mpi/topo/nhb_alltoallv.c b/src/mpi/topo/nhb_alltoallv.c
index b30cf8d..9c17650 100644
--- a/src/mpi/topo/nhb_alltoallv.c
+++ b/src/mpi/topo/nhb_alltoallv.c
@@ -132,16 +132,16 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
         MPID_BEGIN_ERROR_CHECKS
         {
             if (HANDLE_GET_KIND(sendtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *sendtype_ptr = NULL;
+                MPIR_Datatype *sendtype_ptr = NULL;
                 MPID_Datatype_get_ptr(sendtype, sendtype_ptr);
-                MPID_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(sendtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(sendtype_ptr, mpi_errno);
             }
 
             if (HANDLE_GET_KIND(recvtype) != HANDLE_KIND_BUILTIN) {
-                MPID_Datatype *recvtype_ptr = NULL;
+                MPIR_Datatype *recvtype_ptr = NULL;
                 MPID_Datatype_get_ptr(recvtype, recvtype_ptr);
-                MPID_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
+                MPIR_Datatype_valid_ptr(recvtype_ptr, mpi_errno);
                 MPID_Datatype_committed_ptr(recvtype_ptr, mpi_errno);
             }
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index ea2fe3e..12bf495 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -112,7 +112,7 @@ static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc,
                               int context_offset, MPIR_Request **request,
                               int dt_contig,
                               intptr_t data_sz,
-                              MPID_Datatype *dt_ptr,
+                              MPIR_Datatype *dt_ptr,
                               MPI_Aint dt_true_lb,
                               uint64_t send_type)
 {
@@ -276,7 +276,7 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc,
     int dt_contig, mpi_errno = MPI_SUCCESS;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIR_Datatype *dt_ptr;
     BEGIN_FUNC(FCNAME);
 
     VC_READY_CHECK(vc);
diff --git a/src/mpid/common/datatype/mpid_datatype_fallback.h b/src/mpid/common/datatype/mpid_datatype_fallback.h
index 7731b49..0ac6da7 100644
--- a/src/mpid/common/datatype/mpid_datatype_fallback.h
+++ b/src/mpid/common/datatype/mpid_datatype_fallback.h
@@ -3,23 +3,23 @@
  *  (C) 2016 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
-#ifndef MPID_DATATYPE_FALLBACK_H_INCLUDED
-#define MPID_DATATYPE_FALLBACK_H_INCLUDED
+#ifndef MPIR_DATATYPE_FALLBACK_H_INCLUDED
+#define MPIR_DATATYPE_FALLBACK_H_INCLUDED
 
 #include "mpidu_datatype.h"
 
 /* Variables */
-#define MPID_Datatype_direct MPIDU_Datatype_direct
-#define MPID_Datatype_builtin MPIDU_Datatype_builtin
-#define MPID_Datatype_mem MPIDU_Datatype_mem
+#define MPIR_Datatype_direct MPIDU_Datatype_direct
+#define MPIR_Datatype_builtin MPIDU_Datatype_builtin
+#define MPIR_Datatype_mem MPIDU_Datatype_mem
 
 /* Macros */
-#define MPID_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN
+#define MPIR_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN
 #define MPID_DTYPE_BEGINNING MPIDU_DTYPE_BEGINNING
 #define MPID_DTYPE_END MPIDU_DTYPE_END
 
-typedef MPIDU_Datatype MPID_Datatype;
-typedef MPIDU_Datatype_contents MPID_Datatype_contents;
+typedef MPIDU_Datatype MPIR_Datatype;
+typedef MPIDU_Datatype_contents MPIR_Datatype_contents;
 
 #define MPID_Datatype_add_ref MPIDU_Datatype_add_ref
 #define MPID_Datatype_committed_ptr MPIDU_Datatype_committed_ptr
@@ -31,7 +31,7 @@ typedef MPIDU_Datatype_contents MPID_Datatype_contents;
 #define MPID_Datatype_get_extent_macro MPIDU_Datatype_get_extent_macro
 #define MPID_Datatype_is_contig MPIDU_Datatype_is_contig
 #define MPID_Datatype_release MPIDU_Datatype_release
-#define MPID_Datatype_valid_ptr MPIDU_Datatype_valid_ptr
+#define MPIR_Datatype_valid_ptr MPIDU_Datatype_valid_ptr
 
 #define MPID_Datatype_get_loopdepth_macro MPIDU_Datatype_get_loopdepth_macro
 #define MPID_Datatype_get_loopptr_macro MPIDU_Datatype_get_loopptr_macro
diff --git a/src/mpid/common/datatype/mpidu_datatype.h b/src/mpid/common/datatype/mpidu_datatype.h
index 69f4e58..dcd6e5a 100644
--- a/src/mpid/common/datatype/mpidu_datatype.h
+++ b/src/mpid/common/datatype/mpidu_datatype.h
@@ -53,7 +53,7 @@
         basic_type_ = MPI_DATATYPE_NULL;                                    \
  } while(0)
 
-/* MPIDU_Datatype_release decrements the reference count on the MPID_Datatype
+/* MPIDU_Datatype_release decrements the reference count on the MPIR_Datatype
  * and, if the refct is then zero, frees the MPIDU_Datatype and associated
  * structures.
  */
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 56e7ec3..42a4ab4 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -26,7 +26,7 @@
         if ((datatype_) != MPI_DATATYPE_NULL &&                    \
             HANDLE_GET_KIND((datatype_)) != HANDLE_KIND_BUILTIN)   \
         {                                                          \
-            MPID_Datatype *dtp_ = NULL;                            \
+            MPIR_Datatype *dtp_ = NULL;                            \
             MPID_Datatype_get_ptr((datatype_), dtp_);              \
             MPID_Datatype_add_ref(dtp_);                           \
         }                                                          \
@@ -36,7 +36,7 @@
         if ((datatype_) != MPI_DATATYPE_NULL &&                    \
             HANDLE_GET_KIND((datatype_)) != HANDLE_KIND_BUILTIN)   \
         {                                                          \
-            MPID_Datatype *dtp_ = NULL;                            \
+            MPIR_Datatype *dtp_ = NULL;                            \
             MPID_Datatype_get_ptr((datatype_), dtp_);              \
             MPID_Datatype_release(dtp_);                           \
         }                                                          \
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index 0845b36..8252d3f 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -409,7 +409,7 @@ MPID_Get(void         *origin_addr,
   if ((MPIDI_Process.typed_onesided == 1) && (!req->target.dt.contig || !req->origin.dt.contig)) {
     /* We will use the PAMI_Rget_typed call so we need to make sure any MPI_Type_free before the context
      * executes the get does not free the MPIDU_Datatype, which would also free the associated PAMI datatype which
-     * is still needed for communication -- decrement the ref in the callback to allow the MPID_Datatype
+     * is still needed for communication -- decrement the ref in the callback to allow the MPIR_Datatype
      * to be freed once the PAMI communication has completed.
      */
     MPIDU_Datatype_add_ref(req->origin.dt.pointer);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 1964fd9..5ce9f20 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -409,7 +409,7 @@ MPID_Put(const void   *origin_addr,
   if ((MPIDI_Process.typed_onesided == 1) && (!req->target.dt.contig || !req->origin.dt.contig)) {
     /* We will use the PAMI_Rput_typed call so we need to make sure any MPI_Type_free before the context
      * executes the put does not free the MPIDU_Datatype, which would also free the associated PAMI datatype which
-     * is still needed for communication -- decrement the ref in the callback to allow the MPID_Datatype
+     * is still needed for communication -- decrement the ref in the callback to allow the MPIR_Datatype
      * to be freed once the PAMI communication has completed.
      */
     MPIDU_Datatype_add_ref(req->origin.dt.pointer);

http://git.mpich.org/mpich.git/commitdiff/78f7074624c37834587b8fb9940a8d52137e01c2

commit 78f7074624c37834587b8fb9940a8d52137e01c2
Author: Wesley Bland <wesley.bland at intel.com>
Date:   Tue Apr 19 09:09:46 2016 -0500

    Rename MPID_Request to MPIR_Request
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/doc/notes/coll/collective.txt b/doc/notes/coll/collective.txt
index fc21466..6a516c5 100644
--- a/doc/notes/coll/collective.txt
+++ b/doc/notes/coll/collective.txt
@@ -96,12 +96,12 @@ a transfer block defines 0 or 1 envelope/payloads for sources and 0 to N envelop
   account that there might be incoming active message or error conditions, so
   we should poll all methods (and all vcs) periodically.
 
-- We believe that a MPID_Request might simply contain enough information for
+- We believe that a MPIR_Request might simply contain enough information for
   signalling that one or more CARs have completed.  This implies that a
-  MPID_Request might consist of a integer counter of outstanding CARs.  When
+  MPIR_Request might consist of a integer counter of outstanding CARs.  When
   the counter reached zero, the request is complete.  David suggests making
-  CARs and MPID_Requests reside in the same physical structure so that in the
-  MPI_Send/Recv() case, two logical allocations (one for MPID_Request and CAR)
+  CARs and MPIR_Requests reside in the same physical structure so that in the
+  MPI_Send/Recv() case, two logical allocations (one for MPIR_Request and CAR)
   are combined into one.
 
 - operations within a block are prioritized by the order in which they are
diff --git a/doc/notes/pt2pt/pt2pt.txt b/doc/notes/pt2pt/pt2pt.txt
index b73dd75..459b922 100644
--- a/doc/notes/pt2pt/pt2pt.txt
+++ b/doc/notes/pt2pt/pt2pt.txt
@@ -204,12 +204,12 @@ a transfer block defines 0 or 1 envelope/payloads for sources and 0 to N envelop
   account that there might be incoming active message or error conditions, so
   we should poll all methods (and all vcs) periodically.
 
-- We believe that a MPID_Request might simply contain enough information for
+- We believe that a MPIR_Request might simply contain enough information for
   signalling that one or more CARs have completed.  This implies that a
-  MPID_Request might consist of a integer counter of outstanding CARs.  When
+  MPIR_Request might consist of a integer counter of outstanding CARs.  When
   the counter reached zero, the request is complete.  David suggests making
-  CARs and MPID_Requests reside in the same physical structure so that in the
-  MPI_Send/Recv() case, two logical allocations (one for MPID_Request and CAR)
+  CARs and MPIR_Requests reside in the same physical structure so that in the
+  MPI_Send/Recv() case, two logical allocations (one for MPIR_Request and CAR)
   are combined into one.
 
 - operations within a block are prioritized by the order in which they are
@@ -259,4 +259,4 @@ MPID_Issend(buf, count, datatype, dest, tag, comm, request, error)
 
 Items which make life more difficult:
 
-- 
\ No newline at end of file
+-
diff --git a/src/include/mpibsend.h b/src/include/mpibsend.h
index 539ef20..8a3bf5d 100644
--- a/src/include/mpibsend.h
+++ b/src/include/mpibsend.h
@@ -46,7 +46,7 @@ typedef enum {
     BSEND_INIT = 2
 } MPIR_Bsend_kind_t;
 
-struct MPID_Request;
+struct MPIR_Request;
 struct MPIR_Comm;
 
 /* BsendMsg is used to hold all of the message particulars in case a
@@ -67,7 +67,7 @@ typedef struct MPIR_Bsend_data {
                                           including all headers */
     struct MPIR_Bsend_data *next, *prev;
     MPIR_Bsend_kind_t kind;
-    struct MPID_Request  *request;
+    struct MPIR_Request  *request;
     MPIR_Bsend_msg_t  msg;
     double            alignpad;        /* make sure that the struct
                                           shares double alignment */
diff --git a/src/include/mpichconfconst.h b/src/include/mpichconfconst.h
index 43370ef..de3cbfb 100644
--- a/src/include/mpichconfconst.h
+++ b/src/include/mpichconfconst.h
@@ -36,7 +36,7 @@
 /* _SINGLE is the "null" granularity, where all processes are single-threaded */
 #define MPICH_THREAD_GRANULARITY_SINGLE 4
 
-/* controls the allocation mechanism for MPID_Request handles, which can greatly
+/* controls the allocation mechanism for MPIR_Request handles, which can greatly
  * affect concurrency on the critical path */
 #define MPIU_HANDLE_ALLOCATION_MUTEX         0
 #define MPIU_HANDLE_ALLOCATION_THREAD_LOCAL  1
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 87aaf04..2ac5e11 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -191,15 +191,15 @@ cvars:
     }
 
 #define MPIR_ERRTEST_PERSISTENT(reqp,err)                               \
-    if ((reqp)->kind != MPID_PREQUEST_SEND && reqp->kind != MPID_PREQUEST_RECV) { \
+    if ((reqp)->kind != MPIR_PREQUEST_SEND && reqp->kind != MPIR_PREQUEST_RECV) { \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_REQUEST, "**requestnotpersist", 0 ); \
         goto fn_fail;                                                   \
     }
 
 #define MPIR_ERRTEST_PERSISTENT_ACTIVE(reqp,err)                        \
-    if (((reqp)->kind == MPID_PREQUEST_SEND ||                          \
-         reqp->kind == MPID_PREQUEST_RECV) && reqp->partner_request != NULL) { \
+    if (((reqp)->kind == MPIR_PREQUEST_SEND ||                          \
+         reqp->kind == MPIR_PREQUEST_RECV) && reqp->partner_request != NULL) { \
         err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
                                    MPI_ERR_REQUEST, "**requestpersistactive", 0 ); \
         goto fn_fail;                                                   \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 21e3095..eae4e84 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -404,7 +404,7 @@ void MPIR_DatatypeAttrFinalize( void );
 #define MPIR_Op_get_ptr(a,ptr)         MPIR_Getb_ptr(Op,a,0x000000ff,ptr)
 #define MPIR_Info_get_ptr(a,ptr)       MPIR_Getb_ptr(Info,a,0x03ffffff,ptr)
 #define MPIR_Win_get_ptr(a,ptr)        MPIR_Get_ptr(Win,a,ptr)
-#define MPID_Request_get_ptr(a,ptr)    MPIR_Get_ptr(Request,a,ptr)
+#define MPIR_Request_get_ptr(a,ptr)    MPIR_Get_ptr(Request,a,ptr)
 #define MPIR_Grequest_class_get_ptr(a,ptr) MPIR_Get_ptr(Grequest_class,a,ptr)
 /* Keyvals have a special format. This is roughly MPID_Get_ptrb, but
    the handle index is in a smaller bit field.  In addition, 
@@ -460,7 +460,7 @@ void MPIR_DatatypeAttrFinalize( void );
 #define MPIR_Win_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Win,ptr,MPI_ERR_WIN,err)
 #define MPIR_Op_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Op,ptr,MPI_ERR_OP,err)
 #define MPIR_Errhandler_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Errhandler,ptr,MPI_ERR_ARG,err)
-#define MPID_Request_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Request,ptr,MPI_ERR_REQUEST,err)
+#define MPIR_Request_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Request,ptr,MPI_ERR_REQUEST,err)
 #define MPIR_Keyval_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Keyval,ptr,MPI_ERR_KEYVAL,err)
 
 #define MPIR_DATATYPE_IS_PREDEFINED(type) \
@@ -1440,27 +1440,27 @@ void MPIR_Free_contextid( MPIU_Context_id_t );
  * request by calling MPI_Mrecv/MPI_Imrecv, we actually modify the kind to be
  * MPIR_REQUEST_RECV in order to keep completion logic as simple as possible. */
 /*E
-  MPID_Request_kind - Kinds of MPI Requests
+  MPIR_Request_kind - Kinds of MPI Requests
 
   Module:
   Request-DS
 
   E*/
-typedef enum MPID_Request_kind_t {
+typedef enum MPIR_Request_kind_t {
     MPIR_REQUEST_UNDEFINED,
     MPIR_REQUEST_SEND,
     MPIR_REQUEST_RECV,
-    MPID_PREQUEST_SEND,
-    MPID_PREQUEST_RECV,
-    MPID_UREQUEST,
-    MPID_COLL_REQUEST,
+    MPIR_PREQUEST_SEND,
+    MPIR_PREQUEST_RECV,
+    MPIR_UREQUEST,
+    MPIR_COLL_REQUEST,
     MPIR_REQUEST_MPROBE, /* see NOTE-R1 */
-    MPID_WIN_REQUEST,
-    MPID_LAST_REQUEST_KIND
+    MPIR_WIN_REQUEST,
+    MPIR_LAST_REQUEST_KIND
 #ifdef MPID_DEV_REQUEST_KIND_DECL
     , MPID_DEV_REQUEST_KIND_DECL
 #endif
-} MPID_Request_kind_t;
+} MPIR_Request_kind_t;
 
 /* Typedefs for Fortran generalized requests */
 typedef void (MPIR_Grequest_f77_cancel_function)(void *, MPI_Fint*, MPI_Fint *); 
@@ -1481,10 +1481,10 @@ struct MPIR_Grequest_fns {
                                                        the generalize req */
 };
 
-#define MPID_Request_is_complete(req_) (MPIR_cc_is_complete((req_)->cc_ptr))
+#define MPIR_Request_is_complete(req_) (MPIR_cc_is_complete((req_)->cc_ptr))
 
 /*S
-  MPID_Request - Description of the Request data structure
+  MPIR_Request - Description of the Request data structure
 
   Module:
   Request-DS
@@ -1495,12 +1495,12 @@ struct MPIR_Grequest_fns {
 
   Requests come in many flavors, as stored in the 'kind' field.  It is 
   expected that each kind of request will have its own structure type 
-  (e.g., 'MPID_Request_send_t') that extends the 'MPID_Request'.
+  (e.g., 'MPIR_Request_send_t') that extends the 'MPIR_Request'.
   
   S*/
-typedef struct MPID_Request {
+typedef struct MPIR_Request {
     MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
-    MPID_Request_kind_t kind;
+    MPIR_Request_kind_t kind;
     /* pointer to the completion counter */
     /* This is necessary for the case when an operation is described by a 
        list of requests */
@@ -1515,7 +1515,7 @@ typedef struct MPID_Request {
     MPI_Status status;
     /* Persistent requests have their own "real" requests.  Receive requests
        have partnering send requests when src=dest. etc. */
-    struct MPID_Request *partner_request;
+    struct MPIR_Request *partner_request;
 
     /* User-defined request support via a "vtable".  Saves space in the already
      * bloated request for regular pt2pt and NBC requests. */
@@ -1548,17 +1548,19 @@ typedef struct MPID_Request {
      *      never yield the lock to other threads.  So the recursion
      *      should be multithreading-safe.
      */
-    int (*request_completed_cb)(struct MPID_Request *);
+    int (*request_completed_cb)(struct MPIR_Request *);
 
     /* Other, device-specific information */
 #ifdef MPID_DEV_REQUEST_DECL
     MPID_DEV_REQUEST_DECL
 #endif
-} MPID_Request ATTRIBUTE((__aligned__(32)));
+} MPIR_Request ATTRIBUTE((__aligned__(32)));
 
-extern MPIU_Object_alloc_t MPID_Request_mem;
+#define MPIR_REQUEST_PREALLOC 8
+
+extern MPIU_Object_alloc_t MPIR_Request_mem;
 /* Preallocated request objects */
-extern MPID_Request MPID_Request_direct[];
+extern MPIR_Request MPIR_Request_direct[];
 
 #define MPIR_Request_add_ref( _req ) \
     do { MPIU_Object_add_ref( _req ); } while (0)
@@ -1573,8 +1575,8 @@ extern MPID_Request MPID_Request_direct[];
 #ifdef HAVE_DEBUGGER_SUPPORT
 void MPIR_WaitForDebugger( void );
 void MPIR_DebuggerSetAborting( const char * );
-void MPIR_Sendq_remember(MPID_Request *, int, int, int );
-void MPIR_Sendq_forget(MPID_Request *);
+void MPIR_Sendq_remember(MPIR_Request *, int, int, int );
+void MPIR_Sendq_forget(MPIR_Request *);
 void MPIR_CommL_remember( MPIR_Comm * );
 void MPIR_CommL_forget( MPIR_Comm * );
 
@@ -1590,8 +1592,8 @@ void MPIR_CommL_forget( MPIR_Comm * );
 #endif
 
 /* must come after MPIR_Comm is declared/defined */
-int MPIR_Get_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPID_Request **req);
-int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPID_Request **req);
+int MPIR_Get_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPIR_Request **req);
+int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPIR_Request **req);
 
 /* ------------------------------------------------------------------------- */
 /* Prototypes and definitions for the node ID code.  This is used to support
@@ -1637,7 +1639,7 @@ int MPID_Get_max_node_id(MPIR_Comm *comm, MPID_Node_id_t *max_id_p);
   Should a 'MPID_Win' be defined after 'MPID_Segment' in case the device 
   wants to 
   store a queue of pending put/get operations, described with 'MPID_Segment'
-  (or 'MPID_Request')s?
+  (or 'MPIR_Request')s?
 
   S*/
 typedef struct MPIR_Win {
@@ -2330,25 +2332,25 @@ int MPIR_Group_release(MPIR_Group *group_ptr);
 
 int MPIR_dup_fn ( MPI_Comm, int, void *, void *, void *, int * );
 /* marks a request as complete, extracting the status */
-int MPIR_Request_complete(MPI_Request *, MPID_Request *, MPI_Status *, int *);
+int MPIR_Request_complete(MPI_Request *, MPIR_Request *, MPI_Status *, int *);
 
-int MPIR_Request_get_error(MPID_Request *);
+int MPIR_Request_get_error(MPIR_Request *);
 /* run the progress engine until the given request is complete */
-int MPIR_Progress_wait_request(MPID_Request *req);
+int MPIR_Progress_wait_request(MPIR_Request *req);
 
 /* The following routines perform the callouts to the user routines registered
    as part of a generalized request.  They handle any language binding issues
    that are necessary. They are used when completing, freeing, cancelling or
    extracting the status from a generalized request. */
-int MPIR_Grequest_cancel(MPID_Request * request_ptr, int complete);
-int MPIR_Grequest_query(MPID_Request * request_ptr);
-int MPIR_Grequest_free(MPID_Request * request_ptr);
+int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete);
+int MPIR_Grequest_query(MPIR_Request * request_ptr);
+int MPIR_Grequest_free(MPIR_Request * request_ptr);
 
 /* this routine was added to support our extension relaxing the progress rules
  * for generalized requests */
-int MPIR_Grequest_progress_poke(int count, MPID_Request **request_ptrs, 
+int MPIR_Grequest_progress_poke(int count, MPIR_Request **request_ptrs,
 		MPI_Status array_of_statuses[] );
-int MPIR_Grequest_waitall(int count, MPID_Request * const *  request_ptrs);
+int MPIR_Grequest_waitall(int count, MPIR_Request * const *  request_ptrs);
 
 /* ------------------------------------------------------------------------- */
 /* Prototypes for language-specific routines, such as routines to set
@@ -2391,7 +2393,7 @@ int MPIR_Grequest_waitall(int count, MPID_Request * const *  request_ptrs);
   `depend` on using command-line arguments).
 
   This call also initializes all MPID data needed by the device.  This
-  includes the 'MPID_Request's and any other data structures used by 
+  includes the 'MPIR_Request's and any other data structures used by
   the device.
 
   The arguments 'has_args' and 'has_env' indicate whether the process was
@@ -2736,7 +2738,7 @@ int MPID_Comm_revoke(MPIR_Comm *comm, int is_remote);
   @*/
 int MPID_Send( const void *buf, MPI_Aint count, MPI_Datatype datatype,
 	       int dest, int tag, MPIR_Comm *comm, int context_offset,
-	       MPID_Request **request );
+	       MPIR_Request **request );
 
 /*@
   MPID_Rsend - MPID entry point for MPI_Rsend
@@ -2761,7 +2763,7 @@ int MPID_Send( const void *buf, MPI_Aint count, MPI_Datatype datatype,
   @*/
 int MPID_Rsend( const void *buf, int count, MPI_Datatype datatype,
 		int dest, int tag, MPIR_Comm *comm, int context_offset,
-		MPID_Request **request );
+		MPIR_Request **request );
 
 /*@
   MPID_Ssend - MPID entry point for MPI_Ssend
@@ -2786,7 +2788,7 @@ int MPID_Rsend( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Ssend( const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		int dest, int tag, MPIR_Comm *comm, int context_offset,
-		MPID_Request **request );
+		MPIR_Request **request );
 
 /*@
   MPID_tBsend - Attempt a send and return if it would block
@@ -2841,7 +2843,7 @@ int MPID_tBsend( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Isend( const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		int dest, int tag, MPIR_Comm *comm, int context_offset,
-		MPID_Request **request );
+		MPIR_Request **request );
 
 /*@
   MPID_Irsend - MPID entry point for MPI_Irsend
@@ -2860,7 +2862,7 @@ int MPID_Isend( const void *buf, MPI_Aint count, MPI_Datatype datatype,
   @*/
 int MPID_Irsend( const void *buf, int count, MPI_Datatype datatype,
 		 int dest, int tag, MPIR_Comm *comm, int context_offset,
-		 MPID_Request **request );
+		 MPIR_Request **request );
 
 /*@
   MPID_Issend - MPID entry point for MPI_Issend
@@ -2879,7 +2881,7 @@ int MPID_Irsend( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Issend( const void *buf, int count, MPI_Datatype datatype,
 		 int dest, int tag, MPIR_Comm *comm, int context_offset,
-		 MPID_Request **request );
+		 MPIR_Request **request );
 
 /*@
   MPID_Recv - MPID entry point for MPI_Recv
@@ -2901,7 +2903,7 @@ int MPID_Issend( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Recv( void *buf, MPI_Aint count, MPI_Datatype datatype,
 	       int source, int tag, MPIR_Comm *comm, int context_offset,
-	       MPI_Status *status, MPID_Request **request );
+	       MPI_Status *status, MPIR_Request **request );
 
 
 /*@
@@ -2921,7 +2923,7 @@ int MPID_Recv( void *buf, MPI_Aint count, MPI_Datatype datatype,
   @*/
 int MPID_Irecv( void *buf, MPI_Aint count, MPI_Datatype datatype,
 		int source, int tag, MPIR_Comm *comm, int context_offset,
-		MPID_Request **request );
+		MPIR_Request **request );
 
 /*@
   MPID_Send_init - MPID entry point for MPI_Send_init
@@ -2940,10 +2942,10 @@ int MPID_Irecv( void *buf, MPI_Aint count, MPI_Datatype datatype,
   @*/
 int MPID_Send_init( const void *buf, int count, MPI_Datatype datatype,
 		    int dest, int tag, MPIR_Comm *comm, int context_offset,
-		    MPID_Request **request );
+		    MPIR_Request **request );
 
 int MPID_Bsend_init(const void *, int, MPI_Datatype, int, int, MPIR_Comm *,
-		   int, MPID_Request **);
+		   int, MPIR_Request **);
 /*@
   MPID_Rsend_init - MPID entry point for MPI_Rsend_init
 
@@ -2961,7 +2963,7 @@ int MPID_Bsend_init(const void *, int, MPI_Datatype, int, int, MPIR_Comm *,
   @*/
 int MPID_Rsend_init( const void *buf, int count, MPI_Datatype datatype,
 		     int dest, int tag, MPIR_Comm *comm, int context_offset,
-		     MPID_Request **request );
+		     MPIR_Request **request );
 /*@
   MPID_Ssend_init - MPID entry point for MPI_Ssend_init
 
@@ -2979,7 +2981,7 @@ int MPID_Rsend_init( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Ssend_init( const void *buf, int count, MPI_Datatype datatype,
 		     int dest, int tag, MPIR_Comm *comm, int context_offset,
-		     MPID_Request **request );
+		     MPIR_Request **request );
 
 /*@
   MPID_Recv_init - MPID entry point for MPI_Recv_init
@@ -2998,7 +3000,7 @@ int MPID_Ssend_init( const void *buf, int count, MPI_Datatype datatype,
   @*/
 int MPID_Recv_init( void *buf, int count, MPI_Datatype datatype,
 		    int source, int tag, MPIR_Comm *comm, int context_offset,
-		    MPID_Request **request );
+		    MPIR_Request **request );
 
 /*@
   MPID_Startall - MPID entry point for MPI_Startall
@@ -3013,7 +3015,7 @@ int MPID_Recv_init( void *buf, int count, MPI_Datatype datatype,
   whereas an implementation built on just 'MPID_Start' would force the
   ADI to initiate the communication in the order encountered.
   @*/
-int MPID_Startall(int count, MPID_Request *requests[]);
+int MPID_Startall(int count, MPIR_Request *requests[]);
 
 /*@
    MPID_Probe - Block until a matching request is found and return information 
@@ -3104,7 +3106,7 @@ int MPID_Iprobe(int, int, MPIR_Comm *, int, int *, MPI_Status *);
 - context_offset - context id offset of communicator to match
 
   Output Parameter:
-+ message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
++ message - 'MPIR_Request' (logically a message) set as defined by 'MPI_Mprobe'
 - status - 'MPI_Status' set as defined by 'MPI_Mprobe'
 
   Return Value:
@@ -3121,7 +3123,7 @@ int MPID_Iprobe(int, int, MPIR_Comm *, int, int *, MPI_Status *);
 
   @*/
 int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset,
-                MPID_Request **message, MPI_Status *status);
+                MPIR_Request **message, MPI_Status *status);
 
 /*@
    MPID_Improbe - Look for a matching request in the receive queue and return
@@ -3135,7 +3137,7 @@ int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset,
 
   Output Parameter:
 + flag - 'flag' set as defined by 'MPI_Improbe'
-. message - 'MPID_Request' (logically a message) set as defined by 'MPI_Improbe'
+. message - 'MPIR_Request' (logically a message) set as defined by 'MPI_Improbe'
 - status - 'MPI_Status' set as defined by 'MPI_Improbe'
 
   Return Value:
@@ -3152,7 +3154,7 @@ int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset,
 
   @*/
 int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset,
-                 int *flag, MPID_Request **message, MPI_Status *status);
+                 int *flag, MPIR_Request **message, MPI_Status *status);
 
 /*@
    MPID_Imrecv - Begin receiving the message indicated by the given message
@@ -3161,7 +3163,7 @@ int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset,
   Input Parameters:
 + count - number of elements to receive
 . datatype - datatype of each recv buffer element
-- message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
+- message - 'MPIR_Request' (logically a message) set as defined by 'MPI_Mprobe'
 
   Output Parameter:
 + buf - receive buffer
@@ -3178,7 +3180,7 @@ int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset,
 
   @*/
 int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
-                MPID_Request *message, MPID_Request **rreqp);
+                MPIR_Request *message, MPIR_Request **rreqp);
 
 /*@
    MPID_Mrecv - Receive the message indicated by the given message handle.
@@ -3186,7 +3188,7 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
   Input Parameters:
 + count - number of elements to receive
 . datatype - datatype of each recv buffer element
-- message - 'MPID_Request' (logically a message) set as defined by 'MPI_Mprobe'
+- message - 'MPIR_Request' (logically a message) set as defined by 'MPI_Mprobe'
 
   Output Parameter:
 + buf - receive buffer
@@ -3203,7 +3205,7 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
 
   @*/
 int MPID_Mrecv(void *buf, int count, MPI_Datatype datatype,
-               MPID_Request *message, MPI_Status *status);
+               MPIR_Request *message, MPI_Status *status);
 
 /*@
   MPID_Cancel_send - Cancel the indicated send request
@@ -3225,7 +3227,7 @@ int MPID_Mrecv(void *buf, int count, MPI_Datatype datatype,
   Request
 
   @*/
-int MPID_Cancel_send(MPID_Request *);
+int MPID_Cancel_send(MPIR_Request *);
 /*@
   MPID_Cancel_recv - Cancel the indicated recv request
 
@@ -3248,7 +3250,7 @@ int MPID_Cancel_send(MPID_Request *);
   Request
 
   @*/
-int MPID_Cancel_recv(MPID_Request *);
+int MPID_Cancel_recv(MPIR_Request *);
 
 /*@
   MPID_Comm_AS_enabled - Query whether anysource operations are enabled for a communicator
@@ -3273,7 +3275,7 @@ int MPID_Comm_AS_enabled(MPIR_Comm *);
   1 - The request is anysource
 
   @*/
-int MPID_Request_is_anysource(MPID_Request *);
+int MPID_Request_is_anysource(MPIR_Request *);
 
 /*@
   MPID_Aint_add - Returns the sum of base and disp
@@ -3349,20 +3351,20 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
 int MPID_Rput(const void *origin_addr, int origin_count,
               MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
               int target_count, MPI_Datatype target_datatype, MPIR_Win *win,
-              MPID_Request **request);
+              MPIR_Request **request);
 int MPID_Rget(void *origin_addr, int origin_count,
               MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
               int target_count, MPI_Datatype target_datatype, MPIR_Win *win,
-              MPID_Request **request);
+              MPIR_Request **request);
 int MPID_Raccumulate(const void *origin_addr, int origin_count,
                      MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
                      int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win *win,
-                     MPID_Request **request);
+                     MPIR_Request **request);
 int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
                          MPI_Datatype origin_datatype, void *result_addr, int result_count,
                          MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
                          int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win *win,
-                         MPID_Request **request);
+                         MPIR_Request **request);
 
 int MPID_Win_lock_all(int assert, MPIR_Win *win);
 int MPID_Win_unlock_all(MPIR_Win *win);
@@ -3382,7 +3384,7 @@ int MPID_Win_sync(MPIR_Win *win);
     
   Notes:
   This routine is informs the progress engine that a block of code follows that
-  will examine the completion counter of some 'MPID_Request' objects and then
+  will examine the completion counter of some 'MPIR_Request' objects and then
   call 'MPID_Progress_wait' zero or more times followed by a call to
   'MPID_Progress_end'.
   
@@ -3485,7 +3487,7 @@ int MPID_Progress_poke(void);
   The request object returned by this routine should be initialized such that
   ref_count is one and handle contains a valid handle referring to the object.
   @*/
-MPID_Request * MPID_Request_create(void);
+MPIR_Request * MPID_Request_create(void);
 
 /*@
   MPID_Request_release - Release a request 
@@ -3501,7 +3503,7 @@ MPID_Request * MPID_Request_create(void);
   Module:
   Request
 @*/
-void MPID_Request_release(MPID_Request *);
+void MPID_Request_release(MPIR_Request *);
 
 /*@
   MPID_Request_complete - Complete a request
@@ -3518,7 +3520,7 @@ void MPID_Request_release(MPID_Request *);
   Module:
   Request
 @*/
-int MPID_Request_complete(MPID_Request *);
+int MPID_Request_complete(MPIR_Request *);
 
 typedef struct MPIR_Grequest_class {
      MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
@@ -3766,7 +3768,7 @@ int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, MPIU_BOOL i
    MPIR_CONTEXT_INTRA(INTER)_COLL. */
 int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
                    void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype);
-int MPIC_Wait(MPID_Request * request_ptr, MPIR_Errflag_t *errflag);
+int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t *errflag);
 int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
 
 /* FT versions of te MPIC_ functions */
@@ -3785,12 +3787,12 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int source, int recvtag,
                              MPIR_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag);
 int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPIR_Comm *comm_ptr, MPID_Request **request, MPIR_Errflag_t *errflag);
+                  MPIR_Comm *comm_ptr, MPIR_Request **request, MPIR_Errflag_t *errflag);
 int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPIR_Comm *comm_ptr, MPID_Request **request, MPIR_Errflag_t *errflag);
+                  MPIR_Comm *comm_ptr, MPIR_Request **request, MPIR_Errflag_t *errflag);
 int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source,
-                  int tag, MPIR_Comm *comm_ptr, MPID_Request **request);
-int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag);
+                  int tag, MPIR_Comm *comm_ptr, MPIR_Request **request);
+int MPIC_Waitall(int numreq, MPIR_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag);
 
 
 void MPIR_MAXF  ( void *, void *, int *, MPI_Datatype * ) ;
@@ -4032,7 +4034,7 @@ int MPIR_Comm_is_node_consecutive( MPIR_Comm *);
 
 void MPIR_Free_err_dyncodes( void );
 
-int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm, MPID_Request **reqp);
+int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm, MPIR_Request **reqp);
 
 int MPIR_Comm_shrink(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm_ptr);
 int MPIR_Comm_agree(MPIR_Comm *comm_ptr, int *flag);
@@ -4233,7 +4235,7 @@ int MPIU_Get_intranode_rank(MPIR_Comm *comm_ptr, int r);
 #define MPIR_Test_cancelled_impl(status, flag) *(flag) = MPIR_STATUS_GET_CANCEL_BIT(*(status))
 
 /* MPIR_ functions.  These are versions of MPI_ functions appropriate for calling within MPI */
-int MPIR_Cancel_impl(MPID_Request *request_ptr);
+int MPIR_Cancel_impl(MPIR_Request *request_ptr);
 struct MPIR_Topology;
 void MPIR_Cart_rank_impl(struct MPIR_Topology *cart_ptr, const int *coords, int *rank);
 int MPIR_Cart_create_impl(MPIR_Comm *comm_ptr, int ndims, const int dims[],
@@ -4290,17 +4292,17 @@ int MPIR_Group_translate_ranks_impl(MPIR_Group *group_ptr1, int n, const int *ra
                                      MPIR_Group *group_ptr2, int *ranks2);
 int MPIR_Group_union_impl(MPIR_Group *group_ptr1, MPIR_Group *group_ptr2, MPIR_Group **new_group_ptr);
 void MPIR_Get_count_impl(const MPI_Status *status, MPI_Datatype datatype, int *count);
-void MPIR_Grequest_complete_impl(MPID_Request *request_ptr);
+void MPIR_Grequest_complete_impl(MPIR_Request *request_ptr);
 int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
                              MPI_Grequest_free_function *free_fn,
                              MPI_Grequest_cancel_function *cancel_fn,
-                             void *extra_state, MPID_Request **request_ptr);
+                             void *extra_state, MPIR_Request **request_ptr);
 int MPIX_Grequest_start_impl(MPI_Grequest_query_function *,
                              MPI_Grequest_free_function *,
                              MPI_Grequest_cancel_function *,
                              MPIX_Grequest_poll_function *,
                              MPIX_Grequest_wait_function *, void *,
-                             MPID_Request **);
+                             MPIR_Request **);
 int MPIR_Graph_map_impl(const MPIR_Comm *comm_ptr, int nnodes,
                         const int indx[], const int edges[], int *newrank);
 int MPIR_Type_commit_impl(MPI_Datatype *datatype);
diff --git a/src/include/mpir_nbc.h b/src/include/mpir_nbc.h
index c0bad0c..588172b 100644
--- a/src/include/mpir_nbc.h
+++ b/src/include/mpir_nbc.h
@@ -60,7 +60,7 @@ int MPID_Sched_clone(MPID_Sched_t orig, MPID_Sched_t *cloned);
  * comm should be the primary (user) communicator with which this collective is
  * associated, even if other hidden communicators are used for a subset of the
  * operations.  It will be used for error handling and similar operations. */
-int MPID_Sched_start(MPID_Sched_t *sp, MPIR_Comm *comm, int tag, MPID_Request **req);
+int MPID_Sched_start(MPID_Sched_t *sp, MPIR_Comm *comm, int tag, MPIR_Request **req);
 
 /* send and recv take a comm ptr to enable hierarchical collectives */
 int MPID_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, MPIR_Comm *comm, MPID_Sched_t s);
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index bc371b9..330d5a8 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -147,7 +147,7 @@ int MPIR_Alltoall_intra(
     MPI_Aint pack_size, position;
     MPI_Datatype newtype = MPI_DATATYPE_NULL;
     void *tmp_buf;
-    MPID_Request **reqarray;
+    MPIR_Request **reqarray;
     MPI_Status *starray;
     MPIU_CHKLMEM_DECL(6);
 
@@ -338,7 +338,7 @@ int MPIR_Alltoall_intra(
         bblock = MPIR_CVAR_ALLTOALL_THROTTLE;
         if (bblock == 0) bblock = comm_size;
 
-        MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request **, 2*bblock*sizeof(MPID_Request*), mpi_errno, "reqarray");
+        MPIU_CHKLMEM_MALLOC(reqarray, MPIR_Request **, 2*bblock*sizeof(MPIR_Request*), mpi_errno, "reqarray");
 
         MPIU_CHKLMEM_MALLOC(starray, MPI_Status *, 2*bblock*sizeof(MPI_Status), mpi_errno, "starray");
 
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 2c0b9af..f70182d 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -71,7 +71,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
     int mpi_errno_ret = MPI_SUCCESS;
     MPI_Status *starray;
     MPI_Status status;
-    MPID_Request **reqarray;
+    MPIR_Request **reqarray;
     int dst, rank, req_cnt;
     int ii, ss, bblock;
     int type_size;
@@ -139,7 +139,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
         MPID_Datatype_get_extent_macro(sendtype, send_extent);
 
         MPIU_CHKLMEM_MALLOC(starray,  MPI_Status*,  2*bblock*sizeof(MPI_Status),  mpi_errno, "starray");
-        MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request**, 2*bblock*sizeof(MPID_Request *), mpi_errno, "reqarray");
+        MPIU_CHKLMEM_MALLOC(reqarray, MPIR_Request**, 2*bblock*sizeof(MPIR_Request *), mpi_errno, "reqarray");
 
         /* post only bblock isends/irecvs at a time as suggested by Tony Ladd */
         for (ii=0; ii<comm_size; ii+=bblock) {
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index d106baf..81d64ea 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -64,7 +64,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
     int mpi_errno_ret = MPI_SUCCESS;
     MPI_Status status;
     MPI_Status *starray;
-    MPID_Request **reqarray;
+    MPIR_Request **reqarray;
     int dst, rank;
     int outstanding_requests;
     int ii, ss, bblock;
@@ -126,7 +126,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
         if (bblock == 0) bblock = comm_size;
 
         MPIU_CHKLMEM_MALLOC(starray,  MPI_Status*,  2*bblock*sizeof(MPI_Status),  mpi_errno, "starray");
-        MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request**, 2*bblock*sizeof(MPID_Request *), mpi_errno, "reqarray");
+        MPIU_CHKLMEM_MALLOC(reqarray, MPIR_Request**, 2*bblock*sizeof(MPIR_Request *), mpi_errno, "reqarray");
 
         /* post only bblock isends/irecvs at a time as suggested by Tony Ladd */
         for (ii=0; ii<comm_size; ii+=bblock) {
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 43a4e7c..3deffb8 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -91,7 +91,7 @@ int MPIR_Gatherv (
     MPI_Aint       extent;
     int            i, reqs;
     int min_procs;
-    MPID_Request **reqarray;
+    MPIR_Request **reqarray;
     MPI_Status *starray;
     MPIU_CHKLMEM_DECL(2);
 
@@ -113,7 +113,7 @@ int MPIR_Gatherv (
         MPIU_Ensure_Aint_fits_in_pointer(MPIU_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 					 displs[rank] * extent);
 
-        MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request **, comm_size * sizeof(MPID_Request *), mpi_errno, "reqarray");
+        MPIU_CHKLMEM_MALLOC(reqarray, MPIR_Request **, comm_size * sizeof(MPIR_Request *), mpi_errno, "reqarray");
         MPIU_CHKLMEM_MALLOC(starray, MPI_Status *, comm_size * sizeof(MPI_Status), mpi_errno, "starray");
 
         reqs = 0;
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index c4c08b2..1df8e15 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -203,7 +203,7 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp
 #define FUNCNAME MPIC_Wait
 #undef FCNAME
 #define FCNAME "MPIC_Wait"
-int MPIC_Wait(MPID_Request * request_ptr, MPIR_Errflag_t *errflag)
+int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_WAIT);
@@ -215,12 +215,12 @@ int MPIC_Wait(MPID_Request * request_ptr, MPIR_Errflag_t *errflag)
     if (request_ptr->kind == MPIR_REQUEST_SEND)
         request_ptr->status.MPI_TAG = 0;
 
-    if (!MPID_Request_is_complete(request_ptr))
+    if (!MPIR_Request_is_complete(request_ptr))
     {
 	MPID_Progress_state progress_state;
 	
 	MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(request_ptr))
+        while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    mpi_errno = MPID_Progress_wait(&progress_state);
 	    if (mpi_errno) { MPIR_ERR_POP(mpi_errno); }
@@ -273,7 +273,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SEND);
@@ -332,7 +332,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int
     int mpi_errno = MPI_SUCCESS;
     int context_id;
     MPI_Status mystatus;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_RECV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_RECV);
@@ -389,7 +389,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SSEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SSEND);
@@ -450,7 +450,7 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype
     int mpi_errno = MPI_SUCCESS;
     int context_id;
     MPI_Status mystatus;
-    MPID_Request *recv_req_ptr = NULL, *send_req_ptr = NULL;
+    MPIR_Request *recv_req_ptr = NULL, *send_req_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_SENDRECV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SENDRECV);
@@ -528,8 +528,8 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
     int mpi_errno = MPI_SUCCESS;
     MPI_Status mystatus;
     MPIU_Context_id_t context_id_offset;
-    MPID_Request *sreq = NULL;
-    MPID_Request *rreq = NULL;
+    MPIR_Request *sreq = NULL;
+    MPIR_Request *rreq = NULL;
     void *tmpbuf = NULL;
     MPI_Aint tmpbuf_size = 0;
     MPI_Aint tmpbuf_count = 0;
@@ -619,7 +619,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPIR_Comm *comm_ptr, MPID_Request **request_ptr, MPIR_Errflag_t *errflag)
+                  MPIR_Comm *comm_ptr, MPIR_Request **request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -660,7 +660,7 @@ int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPIR_Comm *comm_ptr, MPID_Request **request_ptr, MPIR_Errflag_t *errflag)
+                  MPIR_Comm *comm_ptr, MPIR_Request **request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -701,7 +701,7 @@ int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source,
-                  int tag, MPIR_Comm *comm_ptr, MPID_Request **request_ptr)
+                  int tag, MPIR_Comm *comm_ptr, MPIR_Request **request_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -731,7 +731,7 @@ int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source,
 #define FUNCNAME MPIC_Waitall
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag)
+int MPIC_Waitall(int numreq, MPIR_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
@@ -762,7 +762,7 @@ int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], MP
         status_array[i].MPI_TAG = 0;
         status_array[i].MPI_SOURCE = MPI_PROC_NULL;
 
-        /* Convert the MPID_Request objects to MPI_Request objects */
+        /* Convert the MPIR_Request objects to MPI_Request objects */
         request_ptrs[i] = requests[i]->handle;
     }
 
diff --git a/src/mpi/coll/iallgather.c b/src/mpi/coll/iallgather.c
index 0f50655..b13e82b 100644
--- a/src/mpi/coll/iallgather.c
+++ b/src/mpi/coll/iallgather.c
@@ -594,7 +594,7 @@ fn_fail:
 int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index c440134..a7461b4 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -695,7 +695,7 @@ int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendt
                           MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index c5bebf2..2ab9353 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -649,7 +649,7 @@ fn_fail:
 int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ialltoall.c b/src/mpi/coll/ialltoall.c
index 7da0b26..637ca0c 100644
--- a/src/mpi/coll/ialltoall.c
+++ b/src/mpi/coll/ialltoall.c
@@ -522,7 +522,7 @@ fn_fail:
 int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ialltoallv.c b/src/mpi/coll/ialltoallv.c
index ec4484a..8c61eed 100644
--- a/src/mpi/coll/ialltoallv.c
+++ b/src/mpi/coll/ialltoallv.c
@@ -251,7 +251,7 @@ int MPIR_Ialltoallv_impl(const void *sendbuf, const int sendcounts[], const int
                          MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ialltoallw.c b/src/mpi/coll/ialltoallw.c
index 2dc71af..8174038 100644
--- a/src/mpi/coll/ialltoallw.c
+++ b/src/mpi/coll/ialltoallw.c
@@ -256,7 +256,7 @@ int MPIR_Ialltoallw_impl(const void *sendbuf, const int sendcounts[], const int
                          MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ibarrier.c b/src/mpi/coll/ibarrier.c
index dd8bf78..fcd5184 100644
--- a/src/mpi/coll/ibarrier.c
+++ b/src/mpi/coll/ibarrier.c
@@ -172,7 +172,7 @@ fn_fail:
 int MPIR_Ibarrier_impl(MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 482c915..3789356 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -966,7 +966,7 @@ fn_fail:
 int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iexscan.c b/src/mpi/coll/iexscan.c
index ffa798c..4da6888 100644
--- a/src/mpi/coll/iexscan.c
+++ b/src/mpi/coll/iexscan.c
@@ -187,7 +187,7 @@ fn_fail:
 int MPIR_Iexscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index fa20b6c..ea00d30 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -525,7 +525,7 @@ fn_fail:
 int MPIR_Igather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/igatherv.c b/src/mpi/coll/igatherv.c
index 36df4f6..5a8e463 100644
--- a/src/mpi/coll/igatherv.c
+++ b/src/mpi/coll/igatherv.c
@@ -114,7 +114,7 @@ int MPIR_Igatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                        int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index 29c1ad8..0fc9217 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -1012,7 +1012,7 @@ int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recv
                               MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 0a0d243..d5981f1 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -914,7 +914,7 @@ fn_fail:
 int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index 43eaabc..f9802c7 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -770,7 +770,7 @@ fn_fail:
 int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iscan.c b/src/mpi/coll/iscan.c
index 94fa5f8..e70dbd6 100644
--- a/src/mpi/coll/iscan.c
+++ b/src/mpi/coll/iscan.c
@@ -321,7 +321,7 @@ fn_fail:
 int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 69dc81d..464be10 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -550,7 +550,7 @@ fn_fail:
 int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/iscatterv.c b/src/mpi/coll/iscatterv.c
index 8a34f0b..550266e 100644
--- a/src/mpi/coll/iscatterv.c
+++ b/src/mpi/coll/iscatterv.c
@@ -121,7 +121,7 @@ int MPIR_Iscatterv_impl(const void *sendbuf, const int sendcounts[], const int d
                         MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     int tag = -1;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index f29eebb..56df240 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -61,7 +61,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
     int mpi_errno_ret = MPI_SUCCESS;
     MPI_Aint extent;
     int      i, reqs;
-    MPID_Request **reqarray;
+    MPIR_Request **reqarray;
     MPI_Status *starray;
     MPIU_CHKLMEM_DECL(2);
 
@@ -87,7 +87,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
          * this? */
         MPIU_Ensure_Aint_fits_in_pointer(MPIU_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent);
 
-        MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request **, comm_size * sizeof(MPID_Request *), mpi_errno, "reqarray");
+        MPIU_CHKLMEM_MALLOC(reqarray, MPIR_Request **, comm_size * sizeof(MPIR_Request *), mpi_errno, "reqarray");
         MPIU_CHKLMEM_MALLOC(starray, MPI_Status *, comm_size * sizeof(MPI_Status), mpi_errno, "starray");
 
         reqs = 0;
diff --git a/src/mpi/comm/comm_idup.c b/src/mpi/comm/comm_idup.c
index c80d3e5..1d766e2 100644
--- a/src/mpi/comm/comm_idup.c
+++ b/src/mpi/comm/comm_idup.c
@@ -30,7 +30,7 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request) __attr
 #define FUNCNAME MPIR_Comm_idup_impl
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcommp, MPID_Request **reqp)
+int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcommp, MPIR_Request **reqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Attribute *new_attributes = 0;
@@ -97,7 +97,7 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request)
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
     MPIR_Comm *newcomm_ptr = NULL;
-    MPID_Request *dreq = NULL;
+    MPIR_Request *dreq = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_IDUP);
 
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index f622e50..7946c04 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -1007,7 +1007,7 @@ static int sched_get_cid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcomm,
 #define FUNCNAME MPIR_Get_contextid_nonblock
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPID_Request ** req)
+int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPIR_Request ** req)
 {
     int mpi_errno = MPI_SUCCESS;
     int tag;
@@ -1051,7 +1051,7 @@ int MPIR_Get_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp, MPID
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm * comm_ptr, MPIR_Comm * newcommp,
-                                          MPID_Request ** req)
+                                          MPIR_Request ** req)
 {
     int mpi_errno = MPI_SUCCESS;
     int tag;
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 6d15931..74cdca1 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -334,7 +334,7 @@ void MPIR_DebuggerSetAborting( const char *msg )
    be included in the request.  Saving the context_id also simplifies
    matching these entries with a communicator */
 typedef struct MPIR_Sendq {
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     int tag, rank, context_id;
     struct MPIR_Sendq *next;
     struct MPIR_Sendq *prev;
@@ -348,7 +348,7 @@ static MPIR_Sendq *pool = 0;
 /* This routine is used to establish a queue of send requests to allow the
    debugger easier access to the active requests.  Some devices may be able
    to provide this information without requiring this separate queue. */
-void MPIR_Sendq_remember( MPID_Request *req, 
+void MPIR_Sendq_remember( MPIR_Request *req,
 			  int rank, int tag, int context_id )
 {
     MPIR_Sendq *p;
@@ -379,7 +379,7 @@ fn_exit:
     MPID_THREAD_CS_EXIT(POBJ, req->pobj_mutex);
 }
 
-void MPIR_Sendq_forget( MPID_Request *req )
+void MPIR_Sendq_forget( MPIR_Request *req )
 {
     MPIR_Sendq *p, *prev;
 
diff --git a/src/mpi/debugger/dbgstub.c b/src/mpi/debugger/dbgstub.c
index 4dc7c8c..bf624ee 100644
--- a/src/mpi/debugger/dbgstub.c
+++ b/src/mpi/debugger/dbgstub.c
@@ -10,14 +10,14 @@
 /* These are pointers to the static variables in src/mpid/ch3/src/ch3u_recvq.c
    that contains the *addresses* of the posted and unexpected queue head 
    pointers */
-extern MPID_Request ** const MPID_Recvq_posted_head_ptr, 
+extern MPIR_Request ** const MPID_Recvq_posted_head_ptr,
     ** const MPID_Recvq_unexpected_head_ptr;
 
 #include "mpi_interface.h"
 
 /* This is from dbginit.c; it is not exported to other files */
 typedef struct MPIR_Sendq {
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     int tag, rank, context_id;
     struct MPIR_Sendq *next;
 } MPIR_Sendq;
@@ -81,7 +81,7 @@ mqs_type * dbgrI_find_type(mqs_image *image, char *name,
     else if (strcmp( name, "MPIDI_Message_match_parts_t" ) == 0) {
 	curType = TYPE_MPIDI_MESSAGE_MATCH_PARTS;
     }
-    else if (strcmp( name, "MPID_Request" ) == 0) {
+    else if (strcmp( name, "MPIR_Request" ) == 0) {
 	curType = TYPE_MPIR_REQUEST;
     }
     else if (strcmp( name, "MPIR_Sendq" ) == 0) {
@@ -194,7 +194,7 @@ int dbgrI_field_offset(mqs_type *type, char *name)
 	break;
     case TYPE_MPIR_REQUEST:
 	{
-	    MPID_Request c;
+	    MPIR_Request c;
 	    if (strcmp( name, "dev" ) == 0) {
 		off = ((char *)&c.dev - (char *)&c);
 	    }
diff --git a/src/mpi/debugger/dll_mpich.c b/src/mpi/debugger/dll_mpich.c
index abd55ca..b0af7f3 100644
--- a/src/mpi/debugger/dll_mpich.c
+++ b/src/mpi/debugger/dll_mpich.c
@@ -298,13 +298,13 @@ int mqs_image_has_queues (mqs_image *image, char **message)
 	}
     }
 
-    /* Now the receive queues.  The receive queues contain MPID_Request
+    /* Now the receive queues.  The receive queues contain MPIR_Request
        objects, and the various fields are within types in that object.
        To simplify the eventual access, we compute all offsets relative to the
        request.  This means diving into the types that make of the 
        request definition */
     {
-	mqs_type *req_type = dbgr_find_type( image, (char *)"MPID_Request", mqs_lang_c );
+	mqs_type *req_type = dbgr_find_type( image, (char *)"MPIR_Request", mqs_lang_c );
 	if (req_type) {
 	    int dev_offs;
 	    dev_offs = dbgr_field_offset( req_type, (char *)"dev" );
diff --git a/src/mpi/debugger/mpich_dll_defs.h b/src/mpi/debugger/mpich_dll_defs.h
index 749644e..a6a0be8 100644
--- a/src/mpi/debugger/mpich_dll_defs.h
+++ b/src/mpi/debugger/mpich_dll_defs.h
@@ -29,7 +29,7 @@ typedef struct
     int comm_next_offs;
     int comm_name_offs;
     
-    /* Fields in MPID_Request (including structures within the request) */
+    /* Fields in MPIR_Request (including structures within the request) */
     int req_status_offs;
     int req_cc_offs;
     int req_dev_offs;
diff --git a/src/mpi/init/async.c b/src/mpi/init/async.c
index 6f88f90..40dee1c 100644
--- a/src/mpi/init/async.c
+++ b/src/mpi/init/async.c
@@ -27,7 +27,7 @@ static volatile int progress_thread_done = 0;
 static void progress_fn(void * data)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPI_Request request;
     MPI_Status status;
 
@@ -119,7 +119,7 @@ int MPIR_Finalize_async_thread(void)
 {
     int mpi_errno = MPI_SUCCESS;
 #if MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPI_Request request;
     MPI_Status status;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_FINALIZE_ASYNC_THREAD);
diff --git a/src/mpi/pt2pt/bsend.c b/src/mpi/pt2pt/bsend.c
index bba508d..f8b07c5 100644
--- a/src/mpi/pt2pt/bsend.c
+++ b/src/mpi/pt2pt/bsend.c
@@ -92,7 +92,7 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
     static const char FCNAME[] = "MPI_Bsend";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_BSEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/bsend_init.c b/src/mpi/pt2pt/bsend_init.c
index 78b97d0..a0869d2 100644
--- a/src/mpi/pt2pt/bsend_init.c
+++ b/src/mpi/pt2pt/bsend_init.c
@@ -64,7 +64,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
 {
     static const char FCNAME[] = "MPI_Bsend_init";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPIR_Comm *comm_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_BSEND_INIT);
 
diff --git a/src/mpi/pt2pt/bsendutil.c b/src/mpi/pt2pt/bsendutil.c
index 7585d8e..a02d0f5 100644
--- a/src/mpi/pt2pt/bsendutil.c
+++ b/src/mpi/pt2pt/bsendutil.c
@@ -20,7 +20,7 @@
  *   MPIR_Bsend_attach - Performs the work of MPI_Buffer_attach
  *   MPIR_Bsend_detach - Performs the work of MPI_Buffer_detach
  *   MPIR_Bsend_isend  - Essentially performs an MPI_Ibsend.  Returns
- *                an MPID_Request that is also stored internally in the
+ *                an MPIR_Request that is also stored internally in the
  *                corresponding MPIR_Bsend_data_t entry
  *   MPIR_Bsend_free_segment - Free a buffer that is no longer needed,
  *                merging with adjacent segments
@@ -209,7 +209,7 @@ int MPIR_Bsend_detach( void *bufferp, int *size )
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIR_Bsend_isend(const void *buf, int count, MPI_Datatype dtype,
                      int dest, int tag, MPIR_Comm *comm_ptr,
-                     MPIR_Bsend_kind_t kind, MPID_Request **request )
+                     MPIR_Bsend_kind_t kind, MPIR_Request **request )
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Bsend_data_t *p;
@@ -326,7 +326,7 @@ int MPIR_Bsend_isend(const void *buf, int count, MPI_Datatype dtype,
 #define FUNCNAME MPIR_Bsend_free_seg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Bsend_free_req_seg( MPID_Request* req )
+int MPIR_Bsend_free_req_seg( MPIR_Request* req )
 {
     int mpi_errno = MPI_ERR_INTERN;
     MPIR_Bsend_data_t *active = BsendBuffer.active;
diff --git a/src/mpi/pt2pt/bsendutil.h b/src/mpi/pt2pt/bsendutil.h
index 997cf7e..065b34e 100644
--- a/src/mpi/pt2pt/bsendutil.h
+++ b/src/mpi/pt2pt/bsendutil.h
@@ -11,6 +11,6 @@
 int MPIR_Bsend_attach( void *, int );
 int MPIR_Bsend_detach( void *, int * );
 int MPIR_Bsend_isend(const void *, int, MPI_Datatype, int, int, MPIR_Comm *,
-                     MPIR_Bsend_kind_t, MPID_Request ** );
-int MPIR_Bsend_free_req_seg(MPID_Request * );
+                     MPIR_Bsend_kind_t, MPIR_Request ** );
+int MPIR_Bsend_free_req_seg(MPIR_Request * );
 
diff --git a/src/mpi/pt2pt/cancel.c b/src/mpi/pt2pt/cancel.c
index 4384c92..929c1a7 100644
--- a/src/mpi/pt2pt/cancel.c
+++ b/src/mpi/pt2pt/cancel.c
@@ -30,7 +30,7 @@ int MPI_Cancel(MPI_Request *request) __attribute__((weak,alias("PMPI_Cancel")));
 #define FUNCNAME MPIR_Cancel_impl
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Cancel_impl(MPID_Request *request_ptr)
+int MPIR_Cancel_impl(MPIR_Request *request_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -50,10 +50,10 @@ int MPIR_Cancel_impl(MPID_Request *request_ptr)
 	    break;
 	}
 
-	case MPID_PREQUEST_SEND:
+	case MPIR_PREQUEST_SEND:
 	{
 	    if (request_ptr->partner_request != NULL) {
-		if (request_ptr->partner_request->kind != MPID_UREQUEST) {
+		if (request_ptr->partner_request->kind != MPIR_UREQUEST) {
                     /* jratt at us.ibm.com: I don't know about the bsend
                      * comment below, but the CC stuff on the next
                      * line is *really* needed for persistent Bsend
@@ -86,7 +86,7 @@ int MPIR_Cancel_impl(MPID_Request *request_ptr)
 	    break;
 	}
 
-	case MPID_PREQUEST_RECV:
+	case MPIR_PREQUEST_RECV:
 	{
 	    if (request_ptr->partner_request != NULL) {
 		mpi_errno = MPID_Cancel_recv(request_ptr->partner_request);
@@ -97,7 +97,7 @@ int MPIR_Cancel_impl(MPID_Request *request_ptr)
 	    break;
 	}
 
-	case MPID_UREQUEST:
+	case MPIR_UREQUEST:
 	{
             mpi_errno = MPIR_Grequest_cancel(request_ptr, MPIR_cc_is_complete(&request_ptr->cc));
             if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -159,7 +159,7 @@ messages).
 int MPI_Cancel(MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request * request_ptr;
+    MPIR_Request * request_ptr;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_CANCEL);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -168,7 +168,7 @@ int MPI_Cancel(MPI_Request *request)
     MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_CANCEL);
     
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr( *request, request_ptr );
+    MPIR_Request_get_ptr( *request, request_ptr );
     
     /* Validate parameters if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
@@ -176,7 +176,7 @@ int MPI_Cancel(MPI_Request *request)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    /* Validate request_ptr */
-            MPID_Request_valid_ptr( request_ptr, mpi_errno );
+            MPIR_Request_valid_ptr( request_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/pt2pt/greq_complete.c b/src/mpi/pt2pt/greq_complete.c
index 78382f8..7ab42ee 100644
--- a/src/mpi/pt2pt/greq_complete.c
+++ b/src/mpi/pt2pt/greq_complete.c
@@ -33,7 +33,7 @@ int MPI_Grequest_complete(MPI_Request request) __attribute__((weak,alias("PMPI_G
 #define FUNCNAME MPIR_Grequest_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPIR_Grequest_complete_impl(MPID_Request *request_ptr)
+void MPIR_Grequest_complete_impl(MPIR_Request *request_ptr)
 {
     /* Set the request as completed.  This does not change the
        reference count on the generalized request */
@@ -67,7 +67,7 @@ Input Parameters:
 int MPI_Grequest_complete( MPI_Request request )
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr;
+    MPIR_Request *request_ptr;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_GREQUEST_COMPLETE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -87,15 +87,15 @@ int MPI_Grequest_complete( MPI_Request request )
 #   endif /* HAVE_ERROR_CHECKING */
 
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr( request, request_ptr );
+    MPIR_Request_get_ptr( request, request_ptr );
 
     /* Validate parameters if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-	    MPID_Request_valid_ptr(request_ptr,mpi_errno);
-	    if (request_ptr && request_ptr->kind != MPID_UREQUEST) {
+	    MPIR_Request_valid_ptr(request_ptr,mpi_errno);
+	    if (request_ptr && request_ptr->kind != MPIR_UREQUEST) {
  	        mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_ARG, 
 						  "**notgenreq", 0 );
 	    }
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 551e0a9..d8876cb 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -77,7 +77,7 @@ PMPI_LOCAL int MPIR_Grequest_free_classes_on_finalize(void *extra_data ATTRIBUTE
 int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
                              MPI_Grequest_free_function *free_fn,
                              MPI_Grequest_cancel_function *cancel_fn,
-                             void *extra_state, MPID_Request **request_ptr)
+                             void *extra_state, MPIR_Request **request_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIU_CHKPMEM_DECL(1);
@@ -87,7 +87,7 @@ int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn,
     *request_ptr = MPID_Request_create();
     MPIR_ERR_CHKANDJUMP1(request_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "generalized request");
     
-    (*request_ptr)->kind                 = MPID_UREQUEST;
+    (*request_ptr)->kind                 = MPIR_UREQUEST;
     MPIU_Object_set_ref( *request_ptr, 1 );
     (*request_ptr)->cc_ptr               = &(*request_ptr)->cc;
     MPIR_cc_set((*request_ptr)->cc_ptr, 1);
@@ -179,7 +179,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
 			void *extra_state, MPI_Request *request )
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr;
+    MPIR_Request *request_ptr;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_GREQUEST_START);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -352,7 +352,7 @@ int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class,
 				MPI_Request *request)
 {
 	int mpi_errno;
-	MPID_Request *lrequest_ptr;
+	MPIR_Request *lrequest_ptr;
 	MPIR_Grequest_class *class_ptr;
 
         *request = MPI_REQUEST_NULL;
@@ -406,7 +406,7 @@ int MPIX_Grequest_start( MPI_Grequest_query_function *query_fn,
 			void *extra_state, MPI_Request *request )
 {
     int mpi_errno;
-    MPID_Request *lrequest_ptr;
+    MPIR_Request *lrequest_ptr;
 
     *request = MPI_REQUEST_NULL;
     mpi_errno = MPIX_Grequest_start_impl(query_fn, free_fn, cancel_fn, poll_fn, wait_fn, extra_state, &lrequest_ptr);
@@ -430,7 +430,7 @@ int MPIX_Grequest_start_impl( MPI_Grequest_query_function *query_fn,
                               MPI_Grequest_cancel_function *cancel_fn,
                               MPIX_Grequest_poll_function *poll_fn,
                               MPIX_Grequest_wait_function *wait_fn,
-                              void *extra_state, MPID_Request **request )
+                              void *extra_state, MPIR_Request **request )
 {
     int mpi_errno;
 
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index d9bc9e7..680aa33 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -22,7 +22,7 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 /* -- End Profiling Symbol Block */
 
 typedef struct {
-    MPID_Request *req;
+    MPIR_Request *req;
     int           cancelled;
 } ibsend_req_info;
 
@@ -59,7 +59,7 @@ PMPI_LOCAL int MPIR_Ibsend_cancel( void *extra, int complete )
     int mpi_errno = MPI_SUCCESS;
     ibsend_req_info *ibsend_info = (ibsend_req_info *)extra;
     MPI_Status status;
-    MPID_Request *req = ibsend_info->req;
+    MPIR_Request *req = ibsend_info->req;
     MPI_Request req_hdl = req->handle;
 
     /* FIXME: There should be no unreferenced args! */
@@ -96,7 +96,7 @@ int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest
                      MPIR_Comm *comm_ptr, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr, *new_request_ptr;
+    MPIR_Request *request_ptr, *new_request_ptr;
     ibsend_req_info *ibinfo=0;
         
     /* We don't try tbsend in for MPI_Ibsend because we must create a
diff --git a/src/mpi/pt2pt/improbe.c b/src/mpi/pt2pt/improbe.c
index dd4a307..5d0320d 100644
--- a/src/mpi/pt2pt/improbe.c
+++ b/src/mpi/pt2pt/improbe.c
@@ -55,7 +55,7 @@ Output Parameters:
 int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *msgp = NULL;
+    MPIR_Request *msgp = NULL;
     MPIR_Comm *comm_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_IMPROBE);
 
diff --git a/src/mpi/pt2pt/imrecv.c b/src/mpi/pt2pt/imrecv.c
index c208e14..f82f62e 100644
--- a/src/mpi/pt2pt/imrecv.c
+++ b/src/mpi/pt2pt/imrecv.c
@@ -56,8 +56,8 @@ Output Parameters:
 int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *rreq = NULL;
-    MPID_Request *msgp = NULL;
+    MPIR_Request *rreq = NULL;
+    MPIR_Request *msgp = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_IMRECV);
 
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
@@ -77,7 +77,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
 #   endif /* HAVE_ERROR_CHECKING */
 
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr(*message, msgp);
+    MPIR_Request_get_ptr(*message, msgp);
 
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
@@ -95,7 +95,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
 
             /* MPI_MESSAGE_NO_PROC should yield a "proc null" status */
             if (*message != MPI_MESSAGE_NO_PROC) {
-                MPID_Request_valid_ptr(msgp, mpi_errno);
+                MPIR_Request_valid_ptr(msgp, mpi_errno);
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
                 MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_MPROBE),
                                      mpi_errno, MPI_ERR_ARG, "**reqnotmsg");
diff --git a/src/mpi/pt2pt/irecv.c b/src/mpi/pt2pt/irecv.c
index 3bea42f..8f89f4c 100644
--- a/src/mpi/pt2pt/irecv.c
+++ b/src/mpi/pt2pt/irecv.c
@@ -64,7 +64,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
     static const char FCNAME[] = "MPI_Irecv";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_IRECV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/irsend.c b/src/mpi/pt2pt/irsend.c
index 74a7e48..14291ed 100644
--- a/src/mpi/pt2pt/irsend.c
+++ b/src/mpi/pt2pt/irsend.c
@@ -65,7 +65,7 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
     static const char FCNAME[] = "MPI_Irsend";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_IRSEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/isend.c b/src/mpi/pt2pt/isend.c
index c4e8eb4..6622e11 100644
--- a/src/mpi/pt2pt/isend.c
+++ b/src/mpi/pt2pt/isend.c
@@ -63,7 +63,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/issend.c b/src/mpi/pt2pt/issend.c
index 48b2192..4206cf4 100644
--- a/src/mpi/pt2pt/issend.c
+++ b/src/mpi/pt2pt/issend.c
@@ -64,7 +64,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int
     static const char FCNAME[] = "MPI_Issend";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISSEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 2e83ce6..97f066a 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -9,6 +9,11 @@
 
 /* style:PMPIuse:PMPI_Status_f2c:2 sig:0 */
 
+MPIR_Request MPIR_Request_direct[MPIR_REQUEST_PREALLOC] = {{0}};
+MPIU_Object_alloc_t MPIR_Request_mem = {
+    0, 0, 0, 0, MPIR_REQUEST, sizeof(MPIR_Request), MPIR_Request_direct,
+    MPIR_REQUEST_PREALLOC };
+
 #undef FUNCNAME
 #define FUNCNAME MPIR_Progress_wait_request
 #undef FCNAME
@@ -19,16 +24,16 @@
   A helper routine that implements the very common case of running the progress
   engine until the given request is complete.
   @*/
-int MPIR_Progress_wait_request(MPID_Request *req)
+int MPIR_Progress_wait_request(MPIR_Request *req)
 {
     int mpi_errno = MPI_SUCCESS;
 
-    if (!MPID_Request_is_complete(req))
+    if (!MPIR_Request_is_complete(req))
     {
         MPID_Progress_state progress_state;
 
         MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(req))
+        while (!MPIR_Request_is_complete(req))
         {
             mpi_errno = MPID_Progress_wait(&progress_state);
             if (mpi_errno != MPI_SUCCESS)
@@ -60,7 +65,7 @@ fn_exit:
    call the routine MPIR_Sendq_forget; otherwise that macro will be a no-op.
    The implementation of the MPIR_Sendq_xxx is in src/mpi/debugger/dbginit.c .
 */
-int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr, 
+int MPIR_Request_complete(MPI_Request * request, MPIR_Request * request_ptr,
 			  MPI_Status * status, int * active)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -89,18 +94,18 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
 	    break;
 	}
 			
-	case MPID_PREQUEST_SEND:
+	case MPIR_PREQUEST_SEND:
 	{
 	    if (request_ptr->partner_request != NULL)
 	    {
-		MPID_Request * prequest_ptr = request_ptr->partner_request;
+		MPIR_Request * prequest_ptr = request_ptr->partner_request;
 
 		/* reset persistent request to inactive state */
                 MPIR_cc_set(&request_ptr->cc, 0);
 		request_ptr->cc_ptr = &request_ptr->cc;
 		request_ptr->partner_request = NULL;
 		
-		if (prequest_ptr->kind != MPID_UREQUEST)
+		if (prequest_ptr->kind != MPIR_UREQUEST)
 		{
 		    if (status != MPI_STATUS_IGNORE)
 		    {
@@ -157,11 +162,11 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
 	    break;
 	}
 	
-	case MPID_PREQUEST_RECV:
+	case MPIR_PREQUEST_RECV:
 	{
 	    if (request_ptr->partner_request != NULL)
 	    {
-		MPID_Request * prequest_ptr = request_ptr->partner_request;
+		MPIR_Request * prequest_ptr = request_ptr->partner_request;
 
 		/* reset persistent request to inactive state */
                 MPIR_cc_set(&request_ptr->cc, 0);
@@ -193,7 +198,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
 	    break;
 	}
 
-	case MPID_UREQUEST:
+	case MPIR_UREQUEST:
 	{
             int rc;
             
@@ -215,8 +220,8 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
 	    break;
 	}
 
-        case MPID_COLL_REQUEST:
-        case MPID_WIN_REQUEST:
+        case MPIR_COLL_REQUEST:
+        case MPIR_WIN_REQUEST:
         {
             mpi_errno = request_ptr->status.MPI_ERROR;
             MPIR_Request_extract_status(request_ptr, status);
@@ -249,7 +254,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
  * [BRT] it is used by testall, although looking at testall now, I think the
  * algorithm can be change slightly and eliminate the need for this routine
  */
-int MPIR_Request_get_error(MPID_Request * request_ptr)
+int MPIR_Request_get_error(MPIR_Request * request_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -257,17 +262,17 @@ int MPIR_Request_get_error(MPID_Request * request_ptr)
     {
 	case MPIR_REQUEST_SEND:
 	case MPIR_REQUEST_RECV:
-        case MPID_COLL_REQUEST:
+        case MPIR_COLL_REQUEST:
 	{
 	    mpi_errno = request_ptr->status.MPI_ERROR;
 	    break;
 	}
 
-	case MPID_PREQUEST_SEND:
+	case MPIR_PREQUEST_SEND:
 	{
 	    if (request_ptr->partner_request != NULL)
 	    {
-		if (request_ptr->partner_request->kind == MPID_UREQUEST)
+		if (request_ptr->partner_request->kind == MPIR_UREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_query(
@@ -286,7 +291,7 @@ int MPIR_Request_get_error(MPID_Request * request_ptr)
 	    break;
 	}
 
-	case MPID_PREQUEST_RECV:
+	case MPIR_PREQUEST_RECV:
 	{
 	    if (request_ptr->partner_request != NULL)
 	    {
@@ -300,7 +305,7 @@ int MPIR_Request_get_error(MPID_Request * request_ptr)
 	    break;
 	}
 
-	case MPID_UREQUEST:
+	case MPIR_UREQUEST:
 	{
 	    int rc;
 	    
@@ -369,9 +374,9 @@ int MPIR_Request_get_error(MPID_Request * request_ptr)
 /* Set the language type to Fortran for this (generalized) request */
 void MPIR_Grequest_set_lang_f77( MPI_Request greq )
 {
-    MPID_Request *greq_ptr;
+    MPIR_Request *greq_ptr;
 
-    MPID_Request_get_ptr( greq, greq_ptr );
+    MPIR_Request_get_ptr( greq, greq_ptr );
 
     greq_ptr->greq_fns->greq_lang = MPIR_LANG_FORTRAN;
 }
@@ -382,7 +387,7 @@ void MPIR_Grequest_set_lang_f77( MPI_Request greq )
 #define FUNCNAME MPIR_Grequest_cancel
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Grequest_cancel(MPID_Request * request_ptr, int complete)
+int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete)
 {
     int rc;
     int mpi_errno = MPI_SUCCESS;
@@ -433,7 +438,7 @@ int MPIR_Grequest_cancel(MPID_Request * request_ptr, int complete)
 #define FUNCNAME MPIR_Grequest_query
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Grequest_query(MPID_Request * request_ptr)
+int MPIR_Grequest_query(MPIR_Request * request_ptr)
 {
     int rc;
     int mpi_errno = MPI_SUCCESS;
@@ -484,7 +489,7 @@ int MPIR_Grequest_query(MPID_Request * request_ptr)
 #define FUNCNAME MPIR_Grequest_free
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Grequest_free(MPID_Request * request_ptr)
+int MPIR_Grequest_free(MPIR_Request * request_ptr)
 {
     int rc;
     int mpi_errno = MPI_SUCCESS;
@@ -537,7 +542,7 @@ int MPIR_Grequest_free(MPID_Request * request_ptr)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIR_Grequest_progress_poke(int count, 
-		MPID_Request **request_ptrs, 
+		MPIR_Request **request_ptrs,
 		MPI_Status array_of_statuses[] )
 {
     MPIX_Grequest_wait_function *wait_fn = NULL;
@@ -553,8 +558,8 @@ int MPIR_Grequest_progress_poke(int count,
      * request classes those grequests are members of */
     for (i=0, j=0, n_classes=1, n_native=0, n_greq=0; i< count; i++)
     {
-	if (request_ptrs[i] == NULL || MPID_Request_is_complete(request_ptrs[i])) continue;
-	if (request_ptrs[i]->kind == MPID_UREQUEST)
+	if (request_ptrs[i] == NULL || MPIR_Request_is_complete(request_ptrs[i])) continue;
+	if (request_ptrs[i]->kind == MPIR_UREQUEST)
 	{
 	    n_greq += 1;
 	    wait_fn = request_ptrs[i]->greq_fns->wait_fn;
@@ -577,8 +582,8 @@ int MPIR_Grequest_progress_poke(int count,
 	for (i = 0; i< count; i++ )
 	{
 	    if (request_ptrs[i] != NULL && 
-                request_ptrs[i]->kind == MPID_UREQUEST && 
-                !MPID_Request_is_complete(request_ptrs[i]) &&
+                request_ptrs[i]->kind == MPIR_UREQUEST &&
+                !MPIR_Request_is_complete(request_ptrs[i]) &&
                 request_ptrs[i]->greq_fns->poll_fn != NULL)
             {
 		mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state, &(array_of_statuses[i]));
@@ -600,7 +605,7 @@ fn_fail:
 #define FUNCNAME MPIR_Grequest_waitall
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
+int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs)
 {
     void ** state_ptrs;
     int i;
@@ -630,7 +635,7 @@ int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
     for (i = 0; i < count; ++i)
     {
         /* skip over requests we're not interested in */
-        if (request_ptrs[i] == NULL || *request_ptrs[i]->cc_ptr == 0 ||  request_ptrs[i]->kind != MPID_UREQUEST)
+        if (request_ptrs[i] == NULL || *request_ptrs[i]->cc_ptr == 0 ||  request_ptrs[i]->kind != MPIR_UREQUEST)
             continue;
         
         if (n_greq == 0 || request_ptrs[i]->greq_fns->greq_class == curr_class)
@@ -668,8 +673,8 @@ int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
     {
         /* skip over requests we're not interested in */
         if (request_ptrs[i] == NULL ||
-            MPID_Request_is_complete(request_ptrs[i]) ||
-            request_ptrs[i]->kind != MPID_UREQUEST ||
+            MPIR_Request_is_complete(request_ptrs[i]) ||
+            request_ptrs[i]->kind != MPIR_UREQUEST ||
             request_ptrs[i]->greq_fns->wait_fn == NULL)
         {
             continue;
@@ -677,15 +682,15 @@ int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
 
         mpi_error = (request_ptrs[i]->greq_fns->wait_fn)(1, &request_ptrs[i]->greq_fns->grequest_extra_state, 0, NULL);
         if (mpi_error) MPIR_ERR_POP(mpi_error);
-        MPIU_Assert(MPID_Request_is_complete(request_ptrs[i]));
+        MPIU_Assert(MPIR_Request_is_complete(request_ptrs[i]));
     }
 
     MPID_Progress_start(&progress_state);
     for (i = 0; i < count; ++i)
     {
         if (request_ptrs[i] == NULL ||
-            MPID_Request_is_complete(request_ptrs[i]) ||
-            request_ptrs[i]->kind != MPID_UREQUEST)
+            MPIR_Request_is_complete(request_ptrs[i]) ||
+            request_ptrs[i]->kind != MPIR_UREQUEST)
         {
             continue;
         }
@@ -695,7 +700,7 @@ int MPIR_Grequest_waitall(int count, MPID_Request * const * request_ptrs)
            other thread, we'll make progress on regular requests too.  The
            progress engine should permit the other thread to run at some
            point. */
-        while (!MPID_Request_is_complete(request_ptrs[i]))
+        while (!MPIR_Request_is_complete(request_ptrs[i]))
         {
             mpi_error = MPID_Progress_wait(&progress_state);
             if (mpi_error != MPI_SUCCESS)
diff --git a/src/mpi/pt2pt/mprobe.c b/src/mpi/pt2pt/mprobe.c
index 9395f76..6765dc5 100644
--- a/src/mpi/pt2pt/mprobe.c
+++ b/src/mpi/pt2pt/mprobe.c
@@ -53,7 +53,7 @@ Output Parameters:
 int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *msgp = NULL;
+    MPIR_Request *msgp = NULL;
     MPIR_Comm *comm_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_MPROBE);
 
diff --git a/src/mpi/pt2pt/mrecv.c b/src/mpi/pt2pt/mrecv.c
index cc8ff49..a1d7b8c 100644
--- a/src/mpi/pt2pt/mrecv.c
+++ b/src/mpi/pt2pt/mrecv.c
@@ -56,7 +56,7 @@ Output Parameters:
 int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *msgp = NULL;
+    MPIR_Request *msgp = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_MRECV);
 
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
@@ -76,7 +76,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
 #   endif /* HAVE_ERROR_CHECKING */
 
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr(*message, msgp);
+    MPIR_Request_get_ptr(*message, msgp);
 
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
@@ -94,7 +94,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
 
             /* MPI_MESSAGE_NO_PROC should yield a "proc null" status */
             if (*message != MPI_MESSAGE_NO_PROC) {
-                MPID_Request_valid_ptr(msgp, mpi_errno);
+                MPIR_Request_valid_ptr(msgp, mpi_errno);
                 if (mpi_errno) MPIR_ERR_POP(mpi_errno);
                 MPIR_ERR_CHKANDJUMP((msgp->kind != MPIR_REQUEST_MPROBE),
                                     mpi_errno, MPI_ERR_ARG, "**reqnotmsg");
diff --git a/src/mpi/pt2pt/recv.c b/src/mpi/pt2pt/recv.c
index 074b3f1..04d50d7 100644
--- a/src/mpi/pt2pt/recv.c
+++ b/src/mpi/pt2pt/recv.c
@@ -70,7 +70,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
     static const char FCNAME[] = "MPI_Recv";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RECV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -145,12 +145,12 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
     
     /* If a request was returned, then we need to block until the request is 
        complete */
-    if (!MPID_Request_is_complete(request_ptr))
+    if (!MPIR_Request_is_complete(request_ptr))
     {
 	MPID_Progress_state progress_state;
 	    
 	MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(request_ptr))
+        while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    /* MT: Progress_wait may release the SINGLE_CS while it
 	       waits */
@@ -164,7 +164,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
 	    }
 
             if (unlikely(MPIR_CVAR_ENABLE_FT &&
-                        !MPID_Request_is_complete(request_ptr) &&
+                        !MPIR_Request_is_complete(request_ptr) &&
                         MPID_Request_is_anysource(request_ptr) &&
                         !MPID_Comm_AS_enabled(request_ptr->comm))) {
                 /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/pt2pt/recv_init.c b/src/mpi/pt2pt/recv_init.c
index a82475a..0981c29 100644
--- a/src/mpi/pt2pt/recv_init.c
+++ b/src/mpi/pt2pt/recv_init.c
@@ -66,7 +66,7 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
     static const char FCNAME[] = "MPI_Recv_init";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RECV_INIT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/request_free.c b/src/mpi/pt2pt/request_free.c
index 5d7682c..8f91575 100644
--- a/src/mpi/pt2pt/request_free.c
+++ b/src/mpi/pt2pt/request_free.c
@@ -67,7 +67,7 @@ int MPI_Request_free(MPI_Request *request)
 {
     static const char FCNAME[] = "MPI_Request_free";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REQUEST_FREE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -88,7 +88,7 @@ int MPI_Request_free(MPI_Request *request)
 #   endif /* HAVE_ERROR_CHECKING */
     
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr( *request, request_ptr );
+    MPIR_Request_get_ptr( *request, request_ptr );
 
     /* Validate object pointers if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
@@ -96,7 +96,7 @@ int MPI_Request_free(MPI_Request *request)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    /* Validate request_ptr */
-            MPID_Request_valid_ptr( request_ptr, mpi_errno );
+            MPIR_Request_valid_ptr( request_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
@@ -119,13 +119,13 @@ int MPI_Request_free(MPI_Request *request)
 	    break;
 	}
 	
-	case MPID_PREQUEST_SEND:
+	case MPIR_PREQUEST_SEND:
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
 	    if (request_ptr->partner_request != NULL)
 	    {
-		if (request_ptr->partner_request->kind == MPID_UREQUEST)
+		if (request_ptr->partner_request->kind == MPIR_UREQUEST)
 		{
 		    /* This is needed for persistent Bsend requests */
 		    mpi_errno = MPIR_Grequest_free(
@@ -137,7 +137,7 @@ int MPI_Request_free(MPI_Request *request)
 	}
 
 	    
-	case MPID_PREQUEST_RECV:
+	case MPIR_PREQUEST_RECV:
 	{
 	    /* If this is an active persistent request, we must also 
 	       release the partner request. */
@@ -148,7 +148,7 @@ int MPI_Request_free(MPI_Request *request)
 	    break;
 	}
 	
-	case MPID_UREQUEST:
+	case MPIR_UREQUEST:
 	{
 	    mpi_errno = MPIR_Grequest_free(request_ptr);
 	    break;
diff --git a/src/mpi/pt2pt/request_get_status.c b/src/mpi/pt2pt/request_get_status.c
index b647abf..7af680a 100644
--- a/src/mpi/pt2pt/request_get_status.c
+++ b/src/mpi/pt2pt/request_get_status.c
@@ -57,7 +57,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
 {
     static const char FCNAME[] = "MPI_Request_get_status";
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REQUEST_GET_STATUS);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -90,7 +90,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
     }
 
     /* Convert MPI object handles to object pointers */
-    MPID_Request_get_ptr( request, request_ptr );
+    MPIR_Request_get_ptr( request, request_ptr );
 
     /* Validate parameters if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
@@ -98,7 +98,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    /* Validate request_ptr */
-            MPID_Request_valid_ptr( request_ptr, mpi_errno );
+            MPIR_Request_valid_ptr( request_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
@@ -107,13 +107,13 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
 
     /* ... body of routine ...  */
 
-    if (!MPID_Request_is_complete(request_ptr)) {
+    if (!MPIR_Request_is_complete(request_ptr)) {
 	/* request not complete. poke the progress engine. Req #3130 */
 	mpi_errno = MPID_Progress_test();
 	if (mpi_errno != MPI_SUCCESS) goto fn_fail;
     }
     
-    if (MPID_Request_is_complete(request_ptr))
+    if (MPIR_Request_is_complete(request_ptr))
     {
 	switch(request_ptr->kind)
 	{
@@ -134,13 +134,13 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
         
-        case MPID_PREQUEST_SEND:
+        case MPIR_PREQUEST_SEND:
         {
-            MPID_Request * prequest_ptr = request_ptr->partner_request;
+            MPIR_Request * prequest_ptr = request_ptr->partner_request;
             
             if (prequest_ptr != NULL)
             {
-		if (prequest_ptr->kind != MPID_UREQUEST)
+		if (prequest_ptr->kind != MPIR_UREQUEST)
 		{
 		    if (status != MPI_STATUS_IGNORE)
 		    {
@@ -189,9 +189,9 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
         
-        case MPID_PREQUEST_RECV:
+        case MPIR_PREQUEST_RECV:
         {
-            MPID_Request * prequest_ptr = request_ptr->partner_request;
+            MPIR_Request * prequest_ptr = request_ptr->partner_request;
             
             if (prequest_ptr != NULL)
             {
@@ -209,7 +209,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
             break;
         }
 
-        case MPID_UREQUEST:
+        case MPIR_UREQUEST:
         {
             int rc;
             
diff --git a/src/mpi/pt2pt/rsend.c b/src/mpi/pt2pt/rsend.c
index 59341c3..4ac0800 100644
--- a/src/mpi/pt2pt/rsend.c
+++ b/src/mpi/pt2pt/rsend.c
@@ -61,7 +61,7 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
     static const char FCNAME[] = "MPI_Rsend";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RSEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -130,12 +130,12 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
 
     /* If a request was returned, then we need to block until the request 
        is complete */
-    if (!MPID_Request_is_complete(request_ptr))
+    if (!MPIR_Request_is_complete(request_ptr))
     {
 	MPID_Progress_state progress_state;
 	    
 	MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(request_ptr))
+        while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    mpi_errno = MPID_Progress_wait(&progress_state);
 	    if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpi/pt2pt/rsend_init.c b/src/mpi/pt2pt/rsend_init.c
index faca25b..f05aba4 100644
--- a/src/mpi/pt2pt/rsend_init.c
+++ b/src/mpi/pt2pt/rsend_init.c
@@ -66,7 +66,7 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     static const char FCNAME[] = "MPI_Rsend_init";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RSEND_INIT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/send.c b/src/mpi/pt2pt/send.c
index ffad786..cecc6dc 100644
--- a/src/mpi/pt2pt/send.c
+++ b/src/mpi/pt2pt/send.c
@@ -66,7 +66,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
     static const char FCNAME[] = "MPI_Send";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -135,12 +135,12 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
 
     /* If a request was returned, then we need to block until the request 
        is complete */
-    if (!MPID_Request_is_complete(request_ptr))
+    if (!MPIR_Request_is_complete(request_ptr))
     {
 	MPID_Progress_state progress_state;
 	    
 	MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(request_ptr))
+        while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    mpi_errno = MPID_Progress_wait(&progress_state);
 	    if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpi/pt2pt/send_init.c b/src/mpi/pt2pt/send_init.c
index 0b16f3e..d186ca2 100644
--- a/src/mpi/pt2pt/send_init.c
+++ b/src/mpi/pt2pt/send_init.c
@@ -66,7 +66,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     static const char FCNAME[] = "MPI_Send_init";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SEND_INIT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/sendrecv.c b/src/mpi/pt2pt/sendrecv.c
index 7f938d3..f5005d3 100644
--- a/src/mpi/pt2pt/sendrecv.c
+++ b/src/mpi/pt2pt/sendrecv.c
@@ -76,8 +76,8 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     static const char FCNAME[] = "MPI_Sendrecv";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request * sreq;
-    MPID_Request * rreq;
+    MPIR_Request * sreq;
+    MPIR_Request * rreq;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SENDRECV);
     
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -174,12 +174,12 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 	/* --END ERROR HANDLING-- */
     }
 
-    if (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq))
+    if (!MPIR_Request_is_complete(sreq) || !MPIR_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))
+        while (!MPIR_Request_is_complete(sreq) || !MPIR_Request_is_complete(rreq))
 	{
 	    mpi_errno = MPID_Progress_wait(&progress_state);
 	    if (mpi_errno != MPI_SUCCESS)
@@ -191,7 +191,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 	    }
 
             if (unlikely(MPIR_CVAR_ENABLE_FT &&
-                        !MPID_Request_is_complete(rreq) &&
+                        !MPIR_Request_is_complete(rreq) &&
                         MPID_Request_is_anysource(rreq) &&
                         !MPID_Comm_AS_enabled(rreq->comm))) {
                 /* --BEGIN ERROR HANDLING-- */
@@ -199,7 +199,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 MPIR_STATUS_SET_CANCEL_BIT(rreq->status, FALSE);
                 MPIR_ERR_SET(rreq->status.MPI_ERROR, MPIX_ERR_PROC_FAILED, "**proc_failed");
                 mpi_errno = rreq->status.MPI_ERROR;
-                if (!MPID_Request_is_complete(sreq)) {
+                if (!MPIR_Request_is_complete(sreq)) {
                     MPID_Cancel_send(sreq);
                     MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
                 }
diff --git a/src/mpi/pt2pt/sendrecv_rep.c b/src/mpi/pt2pt/sendrecv_rep.c
index ba013ec..aaa521b 100644
--- a/src/mpi/pt2pt/sendrecv_rep.c
+++ b/src/mpi/pt2pt/sendrecv_rep.c
@@ -141,8 +141,8 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
     }
 #   else
     {
-	MPID_Request * sreq;
-	MPID_Request * rreq;
+	MPIR_Request * sreq;
+	MPIR_Request * rreq;
 	void * tmpbuf = NULL;
 	MPI_Aint tmpbuf_size = 0;
 	MPI_Aint tmpbuf_count = 0;
@@ -173,12 +173,12 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 	    /* --END ERROR HANDLING-- */
 	}
 	
-        if (!MPID_Request_is_complete(sreq) || !MPID_Request_is_complete(rreq))
+        if (!MPIR_Request_is_complete(sreq) || !MPIR_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))
+            while (!MPIR_Request_is_complete(sreq) || !MPIR_Request_is_complete(rreq))
 	    {
 		mpi_errno = MPID_Progress_wait(&progress_state);
 		if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpi/pt2pt/ssend.c b/src/mpi/pt2pt/ssend.c
index 115f9a2..486614f 100644
--- a/src/mpi/pt2pt/ssend.c
+++ b/src/mpi/pt2pt/ssend.c
@@ -60,7 +60,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
     static const char FCNAME[] = "MPI_Ssend";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SSEND);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/ssend_init.c b/src/mpi/pt2pt/ssend_init.c
index 0b1fab0..bc5a584 100644
--- a/src/mpi/pt2pt/ssend_init.c
+++ b/src/mpi/pt2pt/ssend_init.c
@@ -63,7 +63,7 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     static const char FCNAME[] = "MPI_Ssend_init";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SSEND_INIT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/pt2pt/start.c b/src/mpi/pt2pt/start.c
index 975fff2..0ffb5c8 100644
--- a/src/mpi/pt2pt/start.c
+++ b/src/mpi/pt2pt/start.c
@@ -48,7 +48,7 @@ Input Parameters:
 int MPI_Start(MPI_Request *request)
 {
     static const char FCNAME[] = "MPI_Start";
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     int mpi_errno = MPI_SUCCESS;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_START);
 
@@ -70,14 +70,14 @@ int MPI_Start(MPI_Request *request)
 #   endif /* HAVE_ERROR_CHECKING */
     
     /* Convert MPI request handle to a request object pointer */
-    MPID_Request_get_ptr( *request, request_ptr );
+    MPIR_Request_get_ptr( *request, request_ptr );
     
     /* Validate object pointers if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Request_valid_ptr( request_ptr, mpi_errno );
+            MPIR_Request_valid_ptr( request_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
 	    MPIR_ERRTEST_PERSISTENT(request_ptr, mpi_errno);
 	    MPIR_ERRTEST_PERSISTENT_ACTIVE(request_ptr, mpi_errno);
diff --git a/src/mpi/pt2pt/startall.c b/src/mpi/pt2pt/startall.c
index fcf08ec..f970885 100644
--- a/src/mpi/pt2pt/startall.c
+++ b/src/mpi/pt2pt/startall.c
@@ -61,8 +61,8 @@ Input Parameters:
 int MPI_Startall(int count, MPI_Request array_of_requests[])
 {
     static const char FCNAME[] = "MPI_Startall";
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     int i;
     int mpi_errno = MPI_SUCCESS;
     MPIU_CHKLMEM_DECL(1);
@@ -92,12 +92,12 @@ int MPI_Startall(int count, MPI_Request array_of_requests[])
     /* Convert MPI request handles to a request object pointers */
     if (count > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **, count * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **, count * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     for (i = 0; i < count; i++)
     {
-	MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+	MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
     }
     
     /* Validate object pointers if error checking is enabled */
@@ -106,7 +106,7 @@ int MPI_Startall(int count, MPI_Request array_of_requests[])
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    for (i = 0; i < count; i++) {
-		MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+		MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
                 if (mpi_errno) goto fn_fail;
 	    }
 	    for (i = 0; i < count; i++) {
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index 9a3a9ed..cbca7e9 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -33,7 +33,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
     int active_flag;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
 
     /* If this is a null request handle, then return an empty status */
     if (*request == MPI_REQUEST_NULL) {
@@ -44,7 +44,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
     
     *flag = FALSE;
 
-    MPID_Request_get_ptr( *request, request_ptr );
+    MPIR_Request_get_ptr( *request, request_ptr );
 
     /* If the request is already completed AND we want to avoid calling
      the progress engine, we could make the call to MPID_Progress_test
@@ -52,7 +52,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
     mpi_errno = MPID_Progress_test();
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    if (request_ptr->kind == MPID_UREQUEST &&
+    if (request_ptr->kind == MPIR_UREQUEST &&
         request_ptr->greq_fns != NULL &&
         request_ptr->greq_fns->poll_fn != NULL)
     {
@@ -60,7 +60,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
 
-    if (MPID_Request_is_complete(request_ptr)) {
+    if (MPIR_Request_is_complete(request_ptr)) {
 	mpi_errno = MPIR_Request_complete(request, request_ptr, status,
 					  &active_flag);
 	*flag = TRUE;
@@ -112,7 +112,7 @@ Output Parameters:
 int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
    MPID_MPI_STATE_DECL(MPID_STATE_MPI_TEST);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -132,7 +132,7 @@ int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
     }
 #   endif /* HAVE_ERROR_CHECKING */
     
-    MPID_Request_get_ptr( *request, request_ptr );
+    MPIR_Request_get_ptr( *request, request_ptr );
     
    /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
@@ -142,7 +142,7 @@ int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
 	    if (*request != MPI_REQUEST_NULL)
 	    {
 		/* Validate request_ptr */
-		MPID_Request_valid_ptr( request_ptr, mpi_errno );
+		MPIR_Request_valid_ptr( request_ptr, mpi_errno );
                 if (mpi_errno) goto fn_fail;
 	    }
 	    
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index 0200666..65ab270 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -38,8 +38,8 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
 int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
                       MPI_Status array_of_statuses[])
 {
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     MPI_Status * status_ptr;
     int i;
     int n_completed;
@@ -52,8 +52,8 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
     /* Convert MPI request handles to a request object pointers */
     if (count > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-        MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **,
-                count * sizeof(MPID_Request *), mpi_errno, "request pointers");
+        MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **,
+                count * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     n_completed = 0;
@@ -61,13 +61,13 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
     {
         if (array_of_requests[i] != MPI_REQUEST_NULL)
         {
-            MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+            MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
             /* Validate object pointers if error checking is enabled */
 #           ifdef HAVE_ERROR_CHECKING
             {
                 MPID_BEGIN_ERROR_CHECKS;
                 {
-                    MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+                    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
                     if (mpi_errno) goto fn_fail;
                 }
                 MPID_END_ERROR_CHECKS;
@@ -87,7 +87,7 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
     for (i = 0; i < count; i++)
     {
         if (request_ptrs[i] != NULL &&
-                request_ptrs[i]->kind == MPID_UREQUEST &&
+                request_ptrs[i]->kind == MPIR_UREQUEST &&
                 request_ptrs[i]->greq_fns->poll_fn != NULL)
         {
             mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
@@ -96,7 +96,7 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
         }
         if (request_ptrs[i] != NULL)
         {
-            if (MPID_Request_is_complete(request_ptrs[i]))
+            if (MPIR_Request_is_complete(request_ptrs[i]))
             {
                 n_completed++;
                 rc = MPIR_Request_get_error(request_ptrs[i]);
@@ -126,7 +126,7 @@ int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag,
         {
             if (request_ptrs[i] != NULL)
             {
-                if (MPID_Request_is_complete(request_ptrs[i]))
+                if (MPIR_Request_is_complete(request_ptrs[i]))
                 {
                     n_completed ++;
                     status_ptr = (array_of_statuses != MPI_STATUSES_IGNORE) ? &array_of_statuses[i] : MPI_STATUS_IGNORE;
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index 430ea1e..9f5a7e8 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -68,8 +68,8 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
 		int *flag, MPI_Status *status)
 {
     static const char FCNAME[] = "MPI_Testany";
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     int i;
     int n_inactive;
     int active_flag;
@@ -111,7 +111,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
     /* Convert MPI request handles to a request object pointers */
     if (count > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **, count * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **, count * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     n_inactive = 0;
@@ -119,13 +119,13 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
     {
 	if (array_of_requests[i] != MPI_REQUEST_NULL)
 	{
-	    MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+	    MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
 	    /* Validate object pointers if error checking is enabled */
 #           ifdef HAVE_ERROR_CHECKING
 	    {
 		MPID_BEGIN_ERROR_CHECKS;
 		{
-		    MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+		    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
 		    if (mpi_errno) goto fn_fail;
 		}
 		MPID_END_ERROR_CHECKS;
@@ -162,7 +162,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
     for (i = 0; i < count; i++)
     {
 	if (request_ptrs[i] != NULL && 
-            request_ptrs[i]->kind == MPID_UREQUEST &&
+            request_ptrs[i]->kind == MPIR_UREQUEST &&
             request_ptrs[i]->greq_fns->poll_fn != NULL)
 	{
             mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
@@ -171,7 +171,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
 	}
         if (request_ptrs[i] != NULL)
         {
-            if (MPID_Request_is_complete(request_ptrs[i]))
+            if (MPIR_Request_is_complete(request_ptrs[i]))
             {
                 mpi_errno = MPIR_Request_complete(&array_of_requests[i],
                         request_ptrs[i],
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 85c4bee..4412abf 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -70,8 +70,8 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
 		 int array_of_indices[], MPI_Status array_of_statuses[])
 {
     static const char FCNAME[] = "MPI_Testsome";
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     MPI_Status * status_ptr;
     int i;
     int n_active;
@@ -117,7 +117,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
     /* Convert MPI request handles to a request object pointers */
     if (incount > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **, incount * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **, incount * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     n_inactive = 0;
@@ -125,13 +125,13 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
     {
 	if (array_of_requests[i] != MPI_REQUEST_NULL)
 	{
-	    MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+	    MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
 	    /* Validate object pointers if error checking is enabled */
 #           ifdef HAVE_ERROR_CHECKING
 	    {
 		MPID_BEGIN_ERROR_CHECKS;
 		{
-		    MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+		    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
 		    if (mpi_errno) goto fn_fail;
 		}
 		MPID_END_ERROR_CHECKS;
@@ -162,7 +162,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
     for (i = 0; i < incount; i++)
     {
 	if (request_ptrs[i] != NULL && 
-            request_ptrs[i]->kind == MPID_UREQUEST &&
+            request_ptrs[i]->kind == MPIR_UREQUEST &&
             request_ptrs[i]->greq_fns->poll_fn != NULL)
 	{
             mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state,
@@ -172,7 +172,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
         status_ptr = (array_of_statuses != MPI_STATUSES_IGNORE) ? &array_of_statuses[n_active] : MPI_STATUS_IGNORE;
         if (request_ptrs[i] != NULL)
         {
-            if (MPID_Request_is_complete(request_ptrs[i]))
+            if (MPIR_Request_is_complete(request_ptrs[i]))
             {
                 rc = MPIR_Request_complete(&array_of_requests[i], request_ptrs[i], status_ptr, &active_flag);
                 if (active_flag)
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index 8408864..5b289c9 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -32,7 +32,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
     int active_flag;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
 
     /* If this is a null request handle, then return an empty status */
     if (*request == MPI_REQUEST_NULL)
@@ -41,9 +41,9 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
 	goto fn_exit;
     }
 
-    MPID_Request_get_ptr(*request, request_ptr);
+    MPIR_Request_get_ptr(*request, request_ptr);
 
-    if (!MPID_Request_is_complete(request_ptr))
+    if (!MPIR_Request_is_complete(request_ptr))
     {
 	MPID_Progress_state progress_state;
 
@@ -58,10 +58,10 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
         }
 
 	MPID_Progress_start(&progress_state);
-        while (!MPID_Request_is_complete(request_ptr))
+        while (!MPIR_Request_is_complete(request_ptr))
 	{
 	    mpi_errno = MPIR_Grequest_progress_poke(1, &request_ptr, status);
-	    if (request_ptr->kind == MPID_UREQUEST &&
+	    if (request_ptr->kind == MPIR_UREQUEST &&
                 request_ptr->greq_fns->wait_fn != NULL)
 	    {
 		if (mpi_errno) {
@@ -85,7 +85,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
             if (unlikely(
                         MPIR_CVAR_ENABLE_FT &&
                         MPID_Request_is_anysource(request_ptr) &&
-                        !MPID_Request_is_complete(request_ptr) &&
+                        !MPIR_Request_is_complete(request_ptr) &&
                         !MPID_Comm_AS_enabled(request_ptr->comm))) {
                 MPID_Progress_end(&progress_state);
                 MPIR_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED_PENDING, "**failure_pending");
@@ -135,7 +135,7 @@ Output Parameters:
 @*/
 int MPI_Wait(MPI_Request *request, MPI_Status *status)
 {
-    MPID_Request * request_ptr = NULL;
+    MPIR_Request * request_ptr = NULL;
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm * comm_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_WAIT);
@@ -167,14 +167,14 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)
     }
     
     /* Convert MPI request handle to a request object pointer */
-    MPID_Request_get_ptr(*request, request_ptr);
+    MPIR_Request_get_ptr(*request, request_ptr);
     
     /* Validate object pointers if error checking is enabled */
 #   ifdef HAVE_ERROR_CHECKING
     {
         MPID_BEGIN_ERROR_CHECKS;
         {
-            MPID_Request_valid_ptr( request_ptr, mpi_errno );
+            MPIR_Request_valid_ptr( request_ptr, mpi_errno );
             if (mpi_errno) goto fn_fail;
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index d25137a..273753c 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -42,7 +42,7 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_
 #define FUNCNAME request_complete_fastpath
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int request_complete_fastpath(MPI_Request *request, MPID_Request *request_ptr)
+static inline int request_complete_fastpath(MPI_Request *request, MPIR_Request *request_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -71,8 +71,8 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
                       MPI_Status array_of_statuses[])
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     MPI_Status * status_ptr;
     MPID_Progress_state progress_state;
     int i, j;
@@ -89,7 +89,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
     /* Convert MPI request handles to a request object pointers */
     if (count > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC(request_ptrs, MPID_Request **, count * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC(request_ptrs, MPIR_Request **, count * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     n_greqs = 0;
@@ -98,13 +98,13 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
     {
 	if (array_of_requests[i] != MPI_REQUEST_NULL)
 	{
-	    MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+	    MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
 	    /* Validate object pointers if error checking is enabled */
 #           ifdef HAVE_ERROR_CHECKING
 	    {
 		MPID_BEGIN_ERROR_CHECKS;
 		{
-		    MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+		    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
                     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
                     MPIR_ERR_CHKANDJUMP1((request_ptrs[i]->kind == MPIR_REQUEST_MPROBE),
                                          mpi_errno, MPI_ERR_ARG, "**msgnotreq", "**msgnotreq %d", i);
@@ -118,7 +118,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
                 optimize = FALSE;
             }
 
-            if (request_ptrs[i]->kind == MPID_UREQUEST)
+            if (request_ptrs[i]->kind == MPIR_UREQUEST)
                 ++n_greqs;
 
             /* If one of the requests is an anysource on a communicator that's
@@ -126,7 +126,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
              * instead to prevent getting stuck in the progress engine. */
             if (unlikely(MPIR_CVAR_ENABLE_FT &&
                         MPID_Request_is_anysource(request_ptrs[i]) &&
-                        !MPID_Request_is_complete(request_ptrs[i]) &&
+                        !MPIR_Request_is_complete(request_ptrs[i]) &&
                         !MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
                 disabled_anysource = TRUE;
             }
@@ -160,7 +160,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
     if (optimize) {
         MPID_Progress_start(&progress_state);
         for (i = 0; i < count; ++i) {
-            while (!MPID_Request_is_complete(request_ptrs[i])) {
+            while (!MPIR_Request_is_complete(request_ptrs[i])) {
                 mpi_errno = MPID_Progress_wait(&progress_state);
                 /* must check and handle the error, can't guard with HAVE_ERROR_CHECKING, but it's
                  * OK for the error case to be slower */
@@ -168,7 +168,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
                     /* --BEGIN ERROR HANDLING-- */
                     if (unlikely(MPIR_CVAR_ENABLE_FT &&
                                 MPID_Request_is_anysource(request_ptrs[i]) &&
-                                !MPID_Request_is_complete(request_ptrs[i]) &&
+                                !MPIR_Request_is_complete(request_ptrs[i]) &&
                                 !MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
                         MPIR_ERR_SET(mpi_errno, MPI_ERR_IN_STATUS, "**instatus");
                     }
@@ -209,10 +209,10 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
         }
         
         /* wait for ith request to complete */
-        while (!MPID_Request_is_complete(request_ptrs[i]))
+        while (!MPIR_Request_is_complete(request_ptrs[i]))
         {
             /* generalized requests should already be finished */
-            MPIU_Assert(request_ptrs[i]->kind != MPID_UREQUEST);
+            MPIU_Assert(request_ptrs[i]->kind != MPIR_UREQUEST);
             
             mpi_errno = MPID_Progress_wait(&progress_state);
             if (mpi_errno != MPI_SUCCESS) {
@@ -222,7 +222,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
                 /* --END ERROR HANDLING-- */
             } else if (unlikely(MPIR_CVAR_ENABLE_FT &&
                         MPID_Request_is_anysource(request_ptrs[i]) &&
-                        !MPID_Request_is_complete(request_ptrs[i]) &&
+                        !MPIR_Request_is_complete(request_ptrs[i]) &&
                         !MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
                 /* Check for pending failures */
                 MPID_Progress_end(&progress_state);
@@ -234,7 +234,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
             }
         }
 
-        if (MPID_Request_is_complete(request_ptrs[i])) {
+        if (MPIR_Request_is_complete(request_ptrs[i])) {
             /* complete the request and check the status */
             status_ptr = (ignoring_statuses) ? MPI_STATUS_IGNORE : &array_of_statuses[i];
             rc = MPIR_Request_complete(&array_of_requests[i], request_ptrs[i], status_ptr, &active_flag);
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index 0b8e75c..eb3b677 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -69,8 +69,8 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
 		MPI_Status *status)
 {
     static const char FCNAME[] = "MPI_Waitany";
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     MPID_Progress_state progress_state;
     int i;
     int n_inactive;
@@ -110,7 +110,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
     /* Convert MPI request handles to a request object pointers */
     if (count > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **, count * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **, count * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
 
     n_inactive = 0;
@@ -133,13 +133,13 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
 #endif /* HAVE_ERROR_CHECKING */
                 if (array_of_requests[i] != MPI_REQUEST_NULL)
                 {
-                    MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+                    MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
                     /* Validate object pointers if error checking is enabled */
 #ifdef HAVE_ERROR_CHECKING
                     {
                         MPID_BEGIN_ERROR_CHECKS;
                         {
-                            MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+                            MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
                             if (mpi_errno != MPI_SUCCESS) goto fn_progress_end_fail;
                         }
                         MPID_END_ERROR_CHECKS;
@@ -157,13 +157,13 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
             /* we found at least one non-null request */
             found_nonnull_req = TRUE;
 
-            if (request_ptrs[i]->kind == MPID_UREQUEST && request_ptrs[i]->greq_fns->poll_fn != NULL)
+            if (request_ptrs[i]->kind == MPIR_UREQUEST && request_ptrs[i]->greq_fns->poll_fn != NULL)
 	    {
                 /* this is a generalized request; make progress on it */
                 mpi_errno = (request_ptrs[i]->greq_fns->poll_fn)(request_ptrs[i]->greq_fns->grequest_extra_state, status);
 		if (mpi_errno != MPI_SUCCESS) goto fn_progress_end_fail;
 	    }
-            if (MPID_Request_is_complete(request_ptrs[i]))
+            if (MPIR_Request_is_complete(request_ptrs[i]))
 	    {
 		mpi_errno = MPIR_Request_complete(&array_of_requests[i], 
 						  request_ptrs[i], status, 
diff --git a/src/mpi/pt2pt/waitsome.c b/src/mpi/pt2pt/waitsome.c
index 7662c4d..01d58bf 100644
--- a/src/mpi/pt2pt/waitsome.c
+++ b/src/mpi/pt2pt/waitsome.c
@@ -87,8 +87,8 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
 		 MPI_Status array_of_statuses[])
 {
     static const char FCNAME[] = "MPI_Waitsome";
-    MPID_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
-    MPID_Request ** request_ptrs = request_ptr_array;
+    MPIR_Request * request_ptr_array[MPIR_REQUEST_PTR_ARRAY_SIZE];
+    MPIR_Request ** request_ptrs = request_ptr_array;
     MPI_Status * status_ptr;
     MPID_Progress_state progress_state;
     int i;
@@ -136,7 +136,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
     /* Convert MPI request handles to a request object pointers */
     if (incount > MPIR_REQUEST_PTR_ARRAY_SIZE)
     {
-	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPID_Request **, incount * sizeof(MPID_Request *), mpi_errno, "request pointers");
+	MPIU_CHKLMEM_MALLOC_ORJUMP(request_ptrs, MPIR_Request **, incount * sizeof(MPIR_Request *), mpi_errno, "request pointers");
     }
     
     n_inactive = 0;
@@ -144,13 +144,13 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
     {
 	if (array_of_requests[i] != MPI_REQUEST_NULL)
 	{
-	    MPID_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
+	    MPIR_Request_get_ptr(array_of_requests[i], request_ptrs[i]);
 	    /* Validate object pointers if error checking is enabled */
 #           ifdef HAVE_ERROR_CHECKING
 	    {
 		MPID_BEGIN_ERROR_CHECKS;
 		{
-		    MPID_Request_valid_ptr( request_ptrs[i], mpi_errno );
+		    MPIR_Request_valid_ptr( request_ptrs[i], mpi_errno );
 		    if (mpi_errno != MPI_SUCCESS)
 		    {
 			goto fn_fail;
@@ -166,7 +166,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
              * instead to prevent getting stuck in the progress engine. */
             if (unlikely(MPIR_CVAR_ENABLE_FT &&
                         MPID_Request_is_anysource(request_ptrs[i]) &&
-                        !MPID_Request_is_complete(request_ptrs[i]) &&
+                        !MPIR_Request_is_complete(request_ptrs[i]) &&
                         !MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
                 disabled_anysource = TRUE;
             }
@@ -212,7 +212,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
 	{
             if (request_ptrs[i] != NULL)
 	    {
-                if (MPID_Request_is_complete(request_ptrs[i]))
+                if (MPIR_Request_is_complete(request_ptrs[i]))
                 {
                     status_ptr = (array_of_statuses != MPI_STATUSES_IGNORE) ? &array_of_statuses[n_active] : MPI_STATUS_IGNORE;
                     rc = MPIR_Request_complete(&array_of_requests[i], request_ptrs[i], status_ptr, &active_flag);
diff --git a/src/mpi/rma/raccumulate.c b/src/mpi/rma/raccumulate.c
index 2448242..9033db4 100644
--- a/src/mpi/rma/raccumulate.c
+++ b/src/mpi/rma/raccumulate.c
@@ -86,7 +86,7 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
     static const char FCNAME[] = "MPI_Raccumulate";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Win *win_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RACCUMULATE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/rma/rget.c b/src/mpi/rma/rget.c
index ef14445..cada257 100644
--- a/src/mpi/rma/rget.c
+++ b/src/mpi/rma/rget.c
@@ -81,7 +81,7 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
     static const char FCNAME[] = "MPI_Rget";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Win *win_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RGET);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/rma/rget_accumulate.c b/src/mpi/rma/rget_accumulate.c
index 7300e49..61294ca 100644
--- a/src/mpi/rma/rget_accumulate.c
+++ b/src/mpi/rma/rget_accumulate.c
@@ -96,7 +96,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
     static const char FCNAME[] = "MPI_Rget_accumulate";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Win *win_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RGET_ACCUMULATE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/rma/rput.c b/src/mpi/rma/rput.c
index 69b7f51..aeae461 100644
--- a/src/mpi/rma/rput.c
+++ b/src/mpi/rma/rput.c
@@ -83,7 +83,7 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
     static const char FCNAME[] = "MPI_Rput";
     int mpi_errno = MPI_SUCCESS;
     MPIR_Win *win_ptr = NULL;
-    MPID_Request *request_ptr = NULL;
+    MPIR_Request *request_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_RPUT);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/rma/winutil.c b/src/mpi/rma/winutil.c
index 0882139..508442f 100644
--- a/src/mpi/rma/winutil.c
+++ b/src/mpi/rma/winutil.c
@@ -8,12 +8,12 @@
 
 /* FIXME: Move this into wincreate (having a separate file is unneccessary,
    and it leads to a false "missing coverage" report) */
-#ifndef MPID_WIN_PREALLOC 
-#define MPID_WIN_PREALLOC 8
+#ifndef MPIR_WIN_PREALLOC
+#define MPIR_WIN_PREALLOC 8
 #endif
 
 /* Preallocated window objects */
-MPIR_Win MPIR_Win_direct[MPID_WIN_PREALLOC] = { {0} };
+MPIR_Win MPIR_Win_direct[MPIR_WIN_PREALLOC] = { {0} };
 MPIU_Object_alloc_t MPIR_Win_mem = { 0, 0, 0, 0, MPID_WIN,
 				      sizeof(MPIR_Win), MPIR_Win_direct,
                                       MPID_WIN_PREALLOC};
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 914a305..b2f3b30 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -75,7 +75,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *comm_ptr = NULL;
     MPIR_Comm *comm_dist_graph_ptr = NULL;
-    MPID_Request **reqs = NULL;
+    MPIR_Request **reqs = NULL;
     MPIR_Topology *topo_ptr = NULL;
     MPIR_Dist_graph_topology *dist_graph_ptr = NULL;
     int i;
@@ -271,7 +271,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
     idx = 0;
     /* must be 2*comm_size requests because we will possibly send inbound and
      * outbound edges to everyone in our communicator */
-    MPIU_CHKLMEM_MALLOC(reqs, MPID_Request **, 2*comm_size*sizeof(MPID_Request *), mpi_errno, "temp request array");
+    MPIU_CHKLMEM_MALLOC(reqs, MPIR_Request **, 2*comm_size*sizeof(MPIR_Request *), mpi_errno, "temp request array");
     for (i = 0; i < comm_size; ++i) {
         if (rin_sizes[i]) {
             /* send edges where i is a destination to process i */
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index 8d2b30e..1914779 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -86,7 +86,7 @@ int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Dataty
 {
     int mpi_errno = MPI_SUCCESS;
     int tag = -1;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
     *request = MPI_REQUEST_NULL;
diff --git a/src/mpi/topo/inhb_allgatherv.c b/src/mpi/topo/inhb_allgatherv.c
index 8bb795f..5a361e4 100644
--- a/src/mpi/topo/inhb_allgatherv.c
+++ b/src/mpi/topo/inhb_allgatherv.c
@@ -90,7 +90,7 @@ int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datat
 {
     int mpi_errno = MPI_SUCCESS;
     int tag = -1;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
     *request = MPI_REQUEST_NULL;
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index 1a7e708..8b6b220 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -91,7 +91,7 @@ int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatyp
 {
     int mpi_errno = MPI_SUCCESS;
     int tag = -1;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
     *request = MPI_REQUEST_NULL;
diff --git a/src/mpi/topo/inhb_alltoallv.c b/src/mpi/topo/inhb_alltoallv.c
index 4ff4477..13841a1 100644
--- a/src/mpi/topo/inhb_alltoallv.c
+++ b/src/mpi/topo/inhb_alltoallv.c
@@ -95,7 +95,7 @@ int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], c
 {
     int mpi_errno = MPI_SUCCESS;
     int tag = -1;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
     *request = MPI_REQUEST_NULL;
diff --git a/src/mpi/topo/inhb_alltoallw.c b/src/mpi/topo/inhb_alltoallw.c
index c7be13d..d2d9f1f 100644
--- a/src/mpi/topo/inhb_alltoallw.c
+++ b/src/mpi/topo/inhb_alltoallw.c
@@ -86,7 +86,7 @@ int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], c
 {
     int mpi_errno = MPI_SUCCESS;
     int tag = -1;
-    MPID_Request *reqp = NULL;
+    MPIR_Request *reqp = NULL;
     MPID_Sched_t s = MPID_SCHED_NULL;
 
     *request = MPI_REQUEST_NULL;
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index b41720a..24d0f7d 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -25,7 +25,7 @@ int MPIDI_CH3I_Seg_destroy(void);
 int MPID_nem_check_alloc(int);
 int MPID_nem_mpich_init(void);
 int MPID_nem_coll_init (void);
-int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPL_IOV *iov, int n_iov);
+int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int n_iov);
 int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int arraySize);
 int MPID_nem_register_initcomp_cb(int (* callback)(void));
 int MPID_nem_choose_netmod(void);
@@ -33,9 +33,9 @@ int MPIDI_CH3I_comm_create(MPIR_Comm *comm, void *param);
 int MPIDI_CH3I_comm_destroy(MPIR_Comm *comm, void *param);
 
 /* rendezvous hooks */
-int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count, MPI_Datatype datatype, int dt_contig,
+int MPID_nem_lmt_RndvSend(MPIR_Request **sreq_p, const void * buf, MPI_Aint count, MPI_Datatype datatype, int dt_contig,
                           intptr_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPIR_Comm * comm, int context_offset);
-int MPID_nem_lmt_RndvRecv(struct MPIDI_VC *vc, MPID_Request *rreq);
+int MPID_nem_lmt_RndvRecv(struct MPIDI_VC *vc, MPIR_Request *rreq);
 
 #define MPID_nem_mpich_release_fbox(cell)                               \
     do {                                                                \
@@ -138,7 +138,7 @@ typedef union MPIDI_CH3_nem_pkt
 */
 
 #define MPID_nem_lmt_send_RTS(vc, rts_pkt, s_cookie_buf, s_cookie_len) do {                             \
-        MPID_Request *_rts_req;                                                                         \
+        MPIR_Request *_rts_req;                                                                         \
         MPL_IOV _iov[2];                                                                               \
                                                                                                         \
         MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"sending rndv RTS packet");                                      \
@@ -182,7 +182,7 @@ typedef union MPIDI_CH3_nem_pkt
 
 #define MPID_nem_lmt_send_CTS(vc, rreq, r_cookie_buf, r_cookie_len) do {                                \
         MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cts_t, _cts_pkt);                                    \
-        MPID_Request *_cts_req;                                                                         \
+        MPIR_Request *_cts_req;                                                                         \
         MPL_IOV _iov[2];                                                                               \
                                                                                                         \
         MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"sending rndv CTS packet");                                      \
@@ -210,12 +210,12 @@ typedef union MPIDI_CH3_nem_pkt
 #define FUNCNAME MPID_nem_lmt_send_COOKIE
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPID_Request *req,
+static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPIR_Request *req,
                                            void *cookie_buf, MPI_Aint cookie_len)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cookie_t, cookie_pkt);
-    MPID_Request *cookie_req;
+    MPIR_Request *cookie_req;
     MPL_IOV iov[2];
 
     MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"sending rndv COOKIE packet");
@@ -262,7 +262,7 @@ fn_fail:
         
 #define MPID_nem_lmt_send_DONE(vc, rreq) do {                                                                   \
         MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_done_t, _done_pkt);                                          \
-        MPID_Request *_done_req;                                                                                \
+        MPIR_Request *_done_req;                                                                                \
                                                                                                                 \
         MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"sending rndv DONE packet");                                             \
         MPIDI_Pkt_init(_done_pkt, MPIDI_NEM_PKT_LMT_DONE);                                                      \
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h
index 57b5448..4729e15 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h
@@ -24,7 +24,7 @@ typedef int (* MPID_nem_net_module_vc_terminate_t)(MPIDI_VC_t *vc);
 typedef int (* MPID_nem_net_module_anysource_iprobe_t)(int tag, MPIR_Comm *comm, int context_offset, int *flag,
                                                        MPI_Status *status);
 typedef int (* MPID_nem_net_module_anysource_improbe_t)(int tag, MPIR_Comm *comm, int context_offset, int *flag,
-                                                        MPID_Request **message, MPI_Status *status);
+                                                        MPIR_Request **message, MPI_Status *status);
 
 typedef void (* MPID_nem_net_module_vc_dbg_print_sendq_t)(FILE *stream, MPIDI_VC_t *vc);
 typedef int (* MPID_nem_net_module_get_ordering_t)(int *ordering);
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
index 926a242..cf77ca8 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
@@ -37,7 +37,7 @@ int MPIDI_nem_ckpt_finalize(void);
 int MPIDI_nem_ckpt_start(void);
 int MPIDI_nem_ckpt_finish(void);
 int MPIDI_nem_ckpt_pkthandler_init(int (*pktArray[])(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
-				     intptr_t *buflen, MPID_Request **req ), int arraySize);
+				     intptr_t *buflen, MPIR_Request **req ), int arraySize);
 #endif
 
 /* one-sided */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
index 3188530..54fd0ab 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
@@ -19,9 +19,9 @@
 extern void *MPIDI_CH3_packet_buffer;
 extern int MPIDI_CH3I_my_rank;
 
-typedef GENERIC_Q_DECL(struct MPID_Request) MPIDI_CH3I_shm_sendq_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) MPIDI_CH3I_shm_sendq_t;
 extern MPIDI_CH3I_shm_sendq_t MPIDI_CH3I_shm_sendq;
-extern struct MPID_Request *MPIDI_CH3I_shm_active_send;
+extern struct MPIR_Request *MPIDI_CH3I_shm_active_send;
 
 /* Send queue macros */
 /* MT - not thread safe! */
@@ -57,30 +57,30 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id);
 int MPIDI_CH3I_Shm_send_progress(void);
 int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc);
 
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz );
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz );
 
-int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
-int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
-int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
-int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPID_Request *req);
-int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
+int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req);
+int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie);
+int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPIR_Request *req);
+int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPIR_Request *req);
 int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc);
 
-int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
-int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
-int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
-int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPID_Request *req);
-int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
+int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req);
+int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie);
+int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPIR_Request *req);
+int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPIR_Request *req);
 int MPID_nem_lmt_dma_vc_terminated(MPIDI_VC_t *vc);
 
-int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
-int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
-int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
-int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *req);
-int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
+int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req);
+int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie);
+int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPIR_Request *req);
+int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPIR_Request *req);
 int MPID_nem_lmt_vmsplice_vc_terminated(MPIDI_VC_t *vc);
 
 int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen);
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h
index 2bf6009..d5cde76 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h
@@ -25,9 +25,9 @@ int MPIDI_CH3I_Progress(MPID_Progress_state *progress_state, int blocking);
 #define MPIDI_CH3_Progress_wait(progress_state) MPIDI_CH3I_Progress(progress_state, TRUE)
 #define MPIDI_CH3_Progress_poke() MPIDI_CH3I_Progress(NULL, FALSE)
 
-void MPIDI_CH3I_Posted_recv_enqueued(MPID_Request *rreq);
+void MPIDI_CH3I_Posted_recv_enqueued(MPIR_Request *rreq);
 /* returns non-zero when req has been matched by channel */
-int  MPIDI_CH3I_Posted_recv_dequeued(MPID_Request *rreq);
+int  MPIDI_CH3I_Posted_recv_dequeued(MPIR_Request *rreq);
 
 /*
  * Enable optional functionality
@@ -36,6 +36,6 @@ int  MPIDI_CH3I_Posted_recv_dequeued(MPID_Request *rreq);
 
 #include "mpid_nem_post.h"
 
-int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPID_Request *rreq), int (*dequeue_fn)(MPID_Request *rreq));
+int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPIR_Request *rreq), int (*dequeue_fn)(MPIR_Request *rreq));
 
 #endif /* !defined(MPICH_MPIDI_CH3_POST_H_INCLUDED) */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
index 3505ff3..3e80f7e 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -49,7 +49,7 @@ MPIDI_CH3I_VC_state_t;
 #define MPIDI_NEM_REQ_NETMOD_AREA_LEN 192
 
 /* define functions for access MPID_nem_lmt_rts_queue_t */
-typedef GENERIC_Q_DECL(struct MPID_Request) MPID_nem_lmt_rts_queue_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) MPID_nem_lmt_rts_queue_t;
 #define MPID_nem_lmt_rtsq_empty(q) GENERIC_Q_EMPTY (q)
 #define MPID_nem_lmt_rtsq_head(q) GENERIC_Q_HEAD (q)
 #define MPID_nem_lmt_rtsq_enqueue(qp, ep) do {                                          \
@@ -66,7 +66,7 @@ typedef GENERIC_Q_DECL(struct MPID_Request) MPID_nem_lmt_rts_queue_t;
     } while (0)
 #define MPID_nem_lmt_rtsq_search_remove(qp, req_id, epp) do {                           \
         GENERIC_Q_SEARCH_REMOVE(qp, _e->handle == (req_id), epp,                        \
-                struct MPID_Request, dev.next);                                         \
+                struct MPIR_Request, dev.next);                                         \
         MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST,                         \
                     "MPID_nem_lmt_rtsq_search_remove req=%p (handle=%#x), queue=%p",    \
                     *(epp), req_id, qp));                                               \
@@ -75,7 +75,7 @@ typedef GENERIC_Q_DECL(struct MPID_Request) MPID_nem_lmt_rts_queue_t;
 typedef struct MPIDI_CH3I_VC
 {
     int pg_rank;
-    struct MPID_Request *recv_active;
+    struct MPIR_Request *recv_active;
 
     int is_local;
     unsigned short send_seqno;
@@ -102,10 +102,10 @@ typedef struct MPIDI_CH3I_VC
        message cannot be sent immediately, the function should create a request and return a pointer in sreq_ptr.  The network
        module should complete the request once the message has been completely sent. */
     int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                            struct MPID_Request **sreq_ptr);
+                            struct MPIR_Request **sreq_ptr);
     /* iSentContig -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size.  The
        network module should complete the request once the message has been completely sent. */
-    int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+    int (* iSendContig)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *hdr, intptr_t hdr_sz,
                         void *data, intptr_t data_sz);
 
 #ifdef ENABLE_CHECKPOINTING
@@ -118,12 +118,12 @@ typedef struct MPIDI_CH3I_VC
 #endif
 
     /* LMT function pointers */
-    int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPID_Request *req);
-    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPID_Request *req, MPL_IOV s_cookie);
-    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPID_Request *sreq, MPL_IOV r_cookie);
-    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPID_Request *req, MPL_IOV cookie);
-    int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPID_Request *req);
-    int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPID_Request *req);
+    int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPIR_Request *req);
+    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPIR_Request *req, MPL_IOV s_cookie);
+    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, MPL_IOV r_cookie);
+    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPIR_Request *req, MPL_IOV cookie);
+    int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPIR_Request *req);
+    int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPIR_Request *req);
     int (* lmt_vc_terminated)(struct MPIDI_VC *vc);
 
     /* LMT shared memory copy-buffer ptr */
@@ -167,7 +167,7 @@ struct MPIDI_CH3I_Request
     intptr_t       header_sz;
 
     MPI_Request          lmt_req_id;     /* request id of remote side */
-    struct MPID_Request *lmt_req;        /* pointer to original send/recv request */
+    struct MPIR_Request *lmt_req;        /* pointer to original send/recv request */
     intptr_t       lmt_data_sz;    /* data size to be transferred, after checking for truncation */
     MPL_IOV             lmt_tmp_cookie; /* temporary storage for received cookie */
     void                *s_cookie;       /* temporary storage for the cookie data in case the packet can't be sent immediately */
@@ -184,7 +184,7 @@ struct MPIDI_CH3I_Request
 };
 
 /*
- * MPIDI_CH3_REQUEST_DECL (additions to MPID_Request)
+ * MPIDI_CH3_REQUEST_DECL (additions to MPIR_Request)
  */
 #define MPIDI_CH3_REQUEST_DECL struct MPIDI_CH3I_Request ch;
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c
index 797ea63..794ff03 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c
@@ -21,7 +21,7 @@
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 /* returns zero in case request is canceled */
-int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req)
+int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *req)
 {
     int canceled;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
index b391a3e..667e0a4 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
@@ -22,15 +22,15 @@ extern int MPID_nem_llc_my_llc_rank;
  * GENERIC_Q_*:
  *   src/mpid/ch3/channels/nemesis/include/mpid_nem_generic_queue.h
  */
-typedef GENERIC_Q_DECL(struct MPID_Request) rque_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) rque_t;
 /*
-typedef GENERIC_Q_DECL(struct MPID_Request) MPIDI_nem_llc_request_queue_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) MPIDI_nem_llc_request_queue_t;
  */
 
 typedef struct {
     uint64_t remote_endpoint_addr;
     void *endpoint;
-    rque_t send_queue;          /* MPID_Request Queue */
+    rque_t send_queue;          /* MPIR_Request Queue */
     unsigned int unsolicited_count;
 } MPID_nem_llc_vc_area;
 
@@ -40,13 +40,13 @@ typedef struct {
 
 #define UNSOLICITED_NUM_INC(req) \
 { \
-    MPID_Request *sreq = req; \
+    MPIR_Request *sreq = req; \
     MPIDI_VC_t *vc = sreq->ch.vc; \
     VC_FIELD(vc, unsolicited_count)++; \
 }
 #define UNSOLICITED_NUM_DEC(req) \
 { \
-    MPID_Request *sreq = req; \
+    MPIR_Request *sreq = req; \
     MPIDI_VC_t *vc = sreq->ch.vc; \
     VC_FIELD(vc, unsolicited_count)--; \
 }
@@ -80,37 +80,37 @@ int MPID_nem_llc_vc_terminate(MPIDI_VC_t * vc);
 int MPID_nem_llc_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
                                   MPI_Status * status);
 int MPID_nem_llc_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
-                                   MPID_Request ** message, MPI_Status * status);
+                                   MPIR_Request ** message, MPI_Status * status);
 int MPID_nem_llc_get_ordering(int *ordering);
 
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz,
                              void *data, intptr_t data_sz);
 int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
-                                 intptr_t data_sz, MPID_Request ** sreq_ptr);
-int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
+                                 intptr_t data_sz, MPIR_Request ** sreq_ptr);
+int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr,
                                intptr_t hdr_sz);
 
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume);
+int MPIDI_nem_llc_Rqst_iov_update(MPIR_Request * mreq, intptr_t consume);
 int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue);
 
 int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
                        int dest, int tag, MPIR_Comm * comm, int context_offset,
-                       struct MPID_Request **request);
+                       struct MPIR_Request **request);
 int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
                         int dest, int tag, MPIR_Comm * comm, int context_offset,
-                        struct MPID_Request **request);
-int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
+                        struct MPIR_Request **request);
+int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req);
 int MPID_nem_llc_kvs_put_binary(int from, const char *postfix, const uint8_t * buf, int length);
 int MPID_nem_llc_kvs_get_binary(int from, const char *postfix, char *buf, int length);
-void MPID_nem_llc_anysource_posted(MPID_Request * req);
-int MPID_nem_llc_anysource_matched(MPID_Request * req);
+void MPID_nem_llc_anysource_posted(MPIR_Request * req);
+int MPID_nem_llc_anysource_matched(MPIR_Request * req);
 int MPID_nem_llc_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
                        MPI_Status * status);
 int MPID_nem_llc_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
                         int *flag, MPI_Status * status);
 int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
-                         int *flag, MPID_Request ** message, MPI_Status * status);
-int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req);
+                         int *flag, MPIR_Request ** message, MPI_Status * status);
+int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *req);
 
 /*
  * temporary llc api
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c
index c1265d0..4ca395e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c
@@ -217,7 +217,7 @@ int MPID_nem_llc_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
-                                   MPID_Request ** message, MPI_Status * status)
+                                   MPIR_Request ** message, MPI_Status * status)
 {
     return MPID_nem_llc_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message,
                                 status);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
index d8d988d..d6015f9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -55,8 +55,8 @@ int MPID_nem_llc_poll(int in_blocking_progress)
 static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
 {
     /* int mpi_errno = 0; */
-    MPID_Request *sreq = cba;   /* from llc_writev(,,,,cbarg,) */
-    MPID_Request_kind_t kind;
+    MPIR_Request *sreq = cba;   /* from llc_writev(,,,,cbarg,) */
+    MPIR_Request_kind_t kind;
     /* MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SEND_HANDLER); */
 
     /* MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_SEND_HANDLER); */
@@ -86,7 +86,7 @@ static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
     switch (kind) {
         unsigned int reqtype;
     case MPIR_REQUEST_SEND:
-    case MPID_PREQUEST_SEND:{
+    case MPIR_PREQUEST_SEND:{
             reqtype = MPIDI_Request_get_type(sreq);
 
             /* Free temporal buffer for non-contiguous data.
@@ -123,7 +123,7 @@ static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
             /* sreq: src/mpid/ch3/include/mpidpre.h */
             {
                 MPIDI_VC_t *vc;
-                int (*reqFn) (MPIDI_VC_t * vc, MPID_Request * sreq, int *complete);
+                int (*reqFn) (MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete);
                 int complete;
                 int r_mpi_errno;
 
@@ -231,7 +231,7 @@ static void MPID_nem_llc_recv_handler(void *vp_vc, uint64_t raddr, void *buf, si
 #define FUNCNAME MPID_nem_llc_recv_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
+int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req)
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
@@ -346,7 +346,7 @@ int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
 #define FUNCNAME MPID_nem_llc_anysource_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_nem_llc_anysource_posted(MPID_Request * req)
+void MPID_nem_llc_anysource_posted(MPIR_Request * req)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_AYSOURCE_POSTED);
@@ -362,7 +362,7 @@ void MPID_nem_llc_anysource_posted(MPID_Request * req)
 #define FUNCNAME MPID_nem_llc_anysource_matched
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_anysource_matched(MPID_Request * req)
+int MPID_nem_llc_anysource_matched(MPIR_Request * req)
 {
     int matched = FALSE;
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
index c6bc718..0e84902 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
@@ -113,7 +113,7 @@ int MPID_nem_llc_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
-                         int *flag, MPID_Request ** message, MPI_Status * status)
+                         int *flag, MPIR_Request ** message, MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
     int rank;
@@ -153,7 +153,7 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
     msg = LLC_mprobe(LLC_COMM_MPICH, rank, _tag, &mask, &probe);
     if (msg) {
-        MPID_Request *req;
+        MPIR_Request *req;
 
         *flag = 1;
 
@@ -211,7 +211,7 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
         /* Wait until the reception of data is completed */
         do {
             mpi_errno = MPID_nem_llc_poll(0);
-        } while (!MPID_Request_is_complete(req));
+        } while (!MPIR_Request_is_complete(req));
 
 //        MPID_Request_complete(req); // This operation is done in llc_poll.
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index eeb0666..37ebaa5 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -22,7 +22,7 @@
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
                        int dest, int tag, MPIR_Comm * comm, int context_offset,
-                       struct MPID_Request **req_out)
+                       struct MPIR_Request **req_out)
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
@@ -43,7 +43,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPID_Request *sreq = MPID_Request_create();
+    struct MPIR_Request *sreq = MPID_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
@@ -163,10 +163,10 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
-                                 intptr_t data_sz, MPID_Request ** sreq_ptr)
+                                 intptr_t data_sz, MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPID_nem_llc_vc_area *vc_llc = 0;
     int need_to_queue = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_ISTARTCONTIGMSG);
@@ -254,7 +254,7 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
 #define FUNCNAME MPID_nem_llc_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz,
                              void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -338,7 +338,7 @@ int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, in
 #define FUNCNAME MPID_nem_llc_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
+int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr,
                                intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -428,7 +428,7 @@ int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue)
 
     while (!MPIDI_CH3I_Sendq_empty(*send_queue)) {
         ssize_t ret = 0;
-        MPID_Request *sreq;
+        MPIR_Request *sreq;
         void *endpt = vc_llc->endpoint;
         MPL_IOV *iovs;
         int niov;
@@ -472,7 +472,7 @@ int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue)
 #define FUNCNAME MPIDI_nem_llc_Rqst_iov_update
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume)
+int MPIDI_nem_llc_Rqst_iov_update(MPIR_Request * mreq, intptr_t consume)
 {
     int ret = TRUE;
     /* intptr_t oconsume = consume; */
@@ -738,7 +738,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                     MPID_nem_llc_segv;
                 }
 
-                /* Call send_handler. First arg is a pointer to MPID_Request */
+                /* Call send_handler. First arg is a pointer to MPIR_Request */
                 (*sfnc) (((struct llc_cmd_area *) lcmd->usr_area)->cbarg, &reqid);
 
                 /* Don't free iov_local[0].addr */
@@ -812,7 +812,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
         case LLC_EVENT_RECV_MATCHED:{
                 dprintf("llc_poll,EVENT_RECV_MATCHED\n");
                 lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id;
-                MPID_Request *req = ((struct llc_cmd_area *) lcmd->usr_area)->cbarg;
+                MPIR_Request *req = ((struct llc_cmd_area *) lcmd->usr_area)->cbarg;
 
                 if (req->kind != MPIR_REQUEST_MPROBE) {
                     /* Unpack non-contiguous dt */
@@ -888,7 +888,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                 break;
             }
         case LLC_EVENT_TARGET_PROC_FAIL:{
-                MPID_Request *req;
+                MPIR_Request *req;
 
                 lcmd = (LLC_cmd_t *) events[0].side.initiator.req_id;
                 MPIU_Assert(lcmd != 0);
@@ -955,7 +955,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
                         int dest, int tag, MPIR_Comm * comm, int context_offset,
-                        struct MPID_Request **request)
+                        struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
@@ -976,7 +976,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     LLC_comm_rank(LLC_COMM_MPICH, &LLC_my_rank);
     dprintf("llc_isend,LLC_my_rank=%d\n", LLC_my_rank);
 
-    struct MPID_Request *sreq = MPID_Request_create();
+    struct MPIR_Request *sreq = MPID_Request_create();
     MPIU_Assert(sreq != NULL);
     MPIU_Object_set_ref(sreq, 2);
     sreq->kind = MPIR_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c
index e5ab577..74b7a9a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_cancel.c
@@ -17,7 +17,7 @@
 #define FUNCNAME MPID_nem_mxm_cancel_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPID_Request * req)
+int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPIR_Request * req)
 {
     int mpi_errno = MPI_SUCCESS;
     mxm_error_t ret = MXM_OK;
@@ -52,7 +52,7 @@ int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPID_Request * req)
 #define FUNCNAME MPID_nem_mxm_cancel_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPID_Request * req)
+int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPIR_Request * req)
 {
     int mpi_errno ATTRIBUTE((unused)) = MPI_SUCCESS;
     mxm_error_t ret = MXM_OK;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
index 4cc912b..661904b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -33,40 +33,40 @@ int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc);
 int MPID_nem_mxm_get_ordering(int *ordering);
 
 /* alternate interface */
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz,
                              void *data, intptr_t data_sz);
 int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
-                                 intptr_t data_sz, MPID_Request ** sreq_ptr);
-int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *header,
+                                 intptr_t data_sz, MPIR_Request ** sreq_ptr);
+int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *header,
                                intptr_t hdr_sz);
 
 /* direct interface */
-int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq);
+int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPIR_Request * rreq);
 int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                       int rank, int tag, MPIR_Comm * comm, int context_offset,
-                      MPID_Request ** sreq_p);
+                      MPIR_Request ** sreq_p);
 int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                        int rank, int tag, MPIR_Comm * comm, int context_offset,
-                       MPID_Request ** sreq_p);
+                       MPIR_Request ** sreq_p);
 int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                        int rank, int tag, MPIR_Comm * comm, int context_offset,
-                       MPID_Request ** sreq_p);
+                       MPIR_Request ** sreq_p);
 int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                         int rank, int tag, MPIR_Comm * comm, int context_offset,
-                        MPID_Request ** sreq_p);
-int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPID_Request * sreq);
-int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPID_Request * rreq);
+                        MPIR_Request ** sreq_p);
+int MPID_nem_mxm_cancel_send(MPIDI_VC_t * vc, MPIR_Request * sreq);
+int MPID_nem_mxm_cancel_recv(MPIDI_VC_t * vc, MPIR_Request * rreq);
 int MPID_nem_mxm_probe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
                        MPI_Status * status);
 int MPID_nem_mxm_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
                         int *flag, MPI_Status * status);
 int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
-                         int *flag, MPID_Request ** message, MPI_Status * status);
+                         int *flag, MPIR_Request ** message, MPI_Status * status);
 
 int MPID_nem_mxm_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
                                   MPI_Status * status);
 int MPID_nem_mxm_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
-                                   MPID_Request ** message, MPI_Status * status);
+                                   MPIR_Request ** message, MPI_Status * status);
 
 /* active message callback */
 #define MXM_MPICH_HID_ADI_MSG         1
@@ -74,10 +74,10 @@ void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data,
                               size_t length, size_t offset, int last);
 
 /* any source management */
-void MPID_nem_mxm_anysource_posted(MPID_Request * req);
-int MPID_nem_mxm_anysource_matched(MPID_Request * req);
+void MPID_nem_mxm_anysource_posted(MPIR_Request * req);
+int MPID_nem_mxm_anysource_matched(MPIR_Request * req);
 
-int _mxm_handle_sreq(MPID_Request * req);
+int _mxm_handle_sreq(MPIR_Request * req);
 
 /* List type as queue
  * Operations, initialization etc
@@ -174,7 +174,7 @@ typedef struct {
 } MPID_nem_mxm_req_t;
 
 typedef struct {
-    MPID_Request *ctx;
+    MPIR_Request *ctx;
     MPID_nem_mxm_req_t *mxm_req;
     mxm_req_buffer_t *iov_buf;
     int iov_count;
@@ -184,7 +184,7 @@ typedef struct {
 /* macro for mxm private in REQ */
 #define REQ_BASE(reqp) ((reqp) ? (MPID_nem_mxm_req_area *)((reqp)->ch.netmod_area.padding) : NULL)
 
-typedef GENERIC_Q_DECL(struct MPID_Request) MPID_nem_mxm_reqq_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) MPID_nem_mxm_reqq_t;
 #define MPID_nem_mxm_queue_empty(q) GENERIC_Q_EMPTY (q)
 #define MPID_nem_mxm_queue_head(q) GENERIC_Q_HEAD (q)
 #define MPID_nem_mxm_queue_enqueue(qp, ep) do {                                           \
@@ -417,7 +417,7 @@ static inline char *_rank_val_to_str(int rank, char *out, int max)
     return out;
 }
 
-static inline void _dbg_mxm_req(MPID_Request * req)
+static inline void _dbg_mxm_req(MPIR_Request * req)
 {
     char tag_buf[128];
     char rank_buf[128];
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
index 35b6391..3c922b1 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -13,11 +13,11 @@
 #include "mxm_impl.h"
 
 static int _mxm_poll(void);
-static int _mxm_handle_rreq(MPID_Request * req);
+static int _mxm_handle_rreq(MPIR_Request * req);
 static void _mxm_recv_completion_cb(void *context);
 static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq,
                       mxm_tag_t mxm_tag);
-static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
+static int _mxm_process_rdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype,
                                MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 
@@ -28,7 +28,7 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
 int MPID_nem_mxm_poll(int in_blocking_progress)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
 
     MPIDI_STATE_DECL(MPID_STATE_MXM_POLL);
     MPIDI_FUNC_ENTER(MPID_STATE_MXM_POLL);
@@ -92,7 +92,7 @@ void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data,
 #define FUNCNAME MPID_nem_mxm_anysource_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_nem_mxm_anysource_posted(MPID_Request * req)
+void MPID_nem_mxm_anysource_posted(MPIR_Request * req)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -114,7 +114,7 @@ void MPID_nem_mxm_anysource_posted(MPID_Request * req)
 #define FUNCNAME MPID_nem_mxm_anysource_matched
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_anysource_matched(MPID_Request * req)
+int MPID_nem_mxm_anysource_matched(MPIR_Request * req)
 {
     mxm_error_t ret = MXM_OK;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -152,7 +152,7 @@ int MPID_nem_mxm_anysource_matched(MPID_Request * req)
 #define FUNCNAME MPID_nem_mxm_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
+int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     intptr_t data_sz;
@@ -228,7 +228,7 @@ int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
 }
 
 
-static int _mxm_handle_rreq(MPID_Request * req)
+static int _mxm_handle_rreq(MPIR_Request * req)
 {
     int complete = FALSE, found = FALSE;
     int dt_contig;
@@ -345,7 +345,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
 
 static void _mxm_recv_completion_cb(void *context)
 {
-    MPID_Request *req = (MPID_Request *) context;
+    MPIR_Request *req = (MPIR_Request *) context;
     mxm_recv_req_t *mxm_rreq;
     MPID_nem_mxm_req_area *req_area = NULL;
 
@@ -436,12 +436,12 @@ static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int i
 }
 
 
-static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
+static int _mxm_process_rdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype,
                                MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *rreq = *rreq_p;
+    MPIR_Request *rreq = *rreq_p;
     intptr_t last;
     MPL_IOV *iov;
     int n_iov = 0;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
index 21ec5a9..020ca84 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_probe.c
@@ -110,7 +110,7 @@ int MPID_nem_mxm_iprobe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm, int context_offset,
-                         int *flag, MPID_Request ** message, MPI_Status * status)
+                         int *flag, MPIR_Request ** message, MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
     mxm_error_t err;
@@ -131,7 +131,7 @@ int MPID_nem_mxm_improbe(MPIDI_VC_t * vc, int source, int tag, MPIR_Comm * comm,
 
     err = mxm_req_mprobe(&mxm_req, &mxm_msg);
     if (MXM_OK == err) {
-        MPID_Request *req;
+        MPIR_Request *req;
 
         *flag = 1;
 
@@ -213,7 +213,7 @@ int MPID_nem_mxm_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag,
-                                   MPID_Request ** message, MPI_Status * status)
+                                   MPIR_Request ** message, MPI_Status * status)
 {
     return MPID_nem_mxm_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message,
                                 status);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index 1af8e6b..49c489c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -23,7 +23,7 @@ static void _mxm_send_completion_cb(void *context);
 static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
                       int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t tag, int block);
 #if 0   /* Consider using this function in case non contiguous data */
-static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
+static int _mxm_process_sdtype(MPIR_Request ** rreq_p, MPI_Datatype datatype,
                                MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 #endif
@@ -32,7 +32,7 @@ static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
 #define FUNCNAME MPID_nem_mxm_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr, intptr_t hdr_sz,
                              void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -98,10 +98,10 @@ int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, in
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
-                                 intptr_t data_sz, MPID_Request ** sreq_ptr)
+                                 intptr_t data_sz, MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
 
@@ -162,7 +162,7 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, vo
 #define FUNCNAME MPID_nem_mxm_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
+int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr,
                                intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -242,10 +242,10 @@ int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                       int rank, int tag, MPIR_Comm * comm, int context_offset,
-                      MPID_Request ** sreq_ptr)
+                      MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
@@ -345,10 +345,10 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                        int rank, int tag, MPIR_Comm * comm, int context_offset,
-                       MPID_Request ** sreq_ptr)
+                       MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
@@ -448,10 +448,10 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                        int rank, int tag, MPIR_Comm * comm, int context_offset,
-                       MPID_Request ** sreq_ptr)
+                       MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
@@ -551,10 +551,10 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
                         int rank, int tag, MPIR_Comm * comm, int context_offset,
-                        MPID_Request ** sreq_ptr)
+                        MPIR_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
@@ -648,7 +648,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
 }
 
 
-int _mxm_handle_sreq(MPID_Request * req)
+int _mxm_handle_sreq(MPIR_Request * req)
 {
     int complete = FALSE;
     MPID_nem_mxm_vc_area *vc_area = NULL;
@@ -682,7 +682,7 @@ int _mxm_handle_sreq(MPID_Request * req)
 
 static void _mxm_send_completion_cb(void *context)
 {
-    MPID_Request *req = (MPID_Request *) context;
+    MPIR_Request *req = (MPIR_Request *) context;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
 
@@ -786,12 +786,12 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
 }
 
 #if 0   /* Consider using this function in case non contiguous data */
-static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
+static int _mxm_process_sdtype(MPIR_Request ** sreq_p, MPI_Datatype datatype,
                                MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq = *sreq_p;
+    MPIR_Request *sreq = *sreq_p;
     intptr_t last;
     MPL_IOV *iov;
     int n_iov = 0;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
index ebdad1c..b935292 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
@@ -94,7 +94,7 @@ static inline MPIDI_VC_t *ofi_wc_to_vc(cq_tagged_entry_t * wc)
 /* ------------------------------------------------------------------------ */
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_conn_req_callback)
-static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq)
 {
     int ret, len, mpi_errno = MPI_SUCCESS;
     char bc[OFI_KVSAPPSTRLEN];
@@ -159,7 +159,7 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Re
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_handle_packet)
 static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                                             MPID_Request * rreq)
+                                             MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_VC_t *vc;
@@ -182,7 +182,7 @@ static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((u
 /* ------------------------------------------------------------------------ */
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_cts_send_callback)
-static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
+static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -202,13 +202,13 @@ static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPID_Re
 /* ------------------------------------------------------------------------ */
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_preposted_callback)
-static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq)
 {
     int c, mpi_errno = MPI_SUCCESS;
     size_t pkt_len;
     char *pack_buffer = NULL;
     MPIDI_VC_t *vc;
-    MPID_Request *new_rreq, *sreq;
+    MPIR_Request *new_rreq, *sreq;
     BEGIN_FUNC(FCNAME);
 
     vc = ofi_wc_to_vc(wc);
@@ -272,7 +272,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_connect_to_root_callback)
 int MPID_nem_ofi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                                          MPID_Request * sreq)
+                                          MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -296,7 +296,7 @@ int MPID_nem_ofi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unus
 int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *persistent_req, *conn_req;
+    MPIR_Request *persistent_req, *conn_req;
     BEGIN_FUNC(FCNAME);
 
     /* ------------------------------------- */
@@ -524,7 +524,7 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc)
     int len, ret, mpi_errno = MPI_SUCCESS, str_errno = MPI_SUCCESS;
     int my_bc_len = OFI_KVSAPPSTRLEN;
     char *addr = NULL, *bc = NULL, *my_bc = NULL;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     uint64_t conn_req_send_bits;
 
     BEGIN_FUNC(FCNAME);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 3dc4ccf..6c389f6 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -63,8 +63,8 @@ typedef struct fi_cq_tagged_entry cq_tagged_entry_t;
 typedef struct fi_cq_err_entry cq_err_entry_t;
 typedef struct fi_context context_t;
 typedef struct fi_msg_tagged msg_tagged_t;
-typedef int (*event_callback_fn) (cq_tagged_entry_t * wc, MPID_Request *);
-typedef int (*req_fn) (MPIDI_VC_t *, MPID_Request *, int *);
+typedef int (*event_callback_fn) (cq_tagged_entry_t * wc, MPIR_Request *);
+typedef int (*req_fn) (MPIDI_VC_t *, MPIR_Request *, int *);
 
 /* ******************************** */
 /* Global Object for state tracking */
@@ -84,8 +84,8 @@ typedef struct {
                                        /*   RTS-CTS-DATA exchanges    */
     int api_set;                       /* Used OFI API for send       */
                                        /*   operations                */
-    MPID_Request *persistent_req;      /* Unexpected request queue    */
-    MPID_Request *conn_req;            /* Connection request          */
+    MPIR_Request *persistent_req;      /* Unexpected request queue    */
+    MPIR_Request *conn_req;            /* Connection request          */
     MPIDI_PG_t *pg_p;                  /* MPI Process group           */
     MPIDI_VC_t *cm_vcs;                /* temporary VC's              */
 } MPID_nem_ofi_global_t __attribute__ ((aligned (MPID_NEM_CACHE_LINE_LEN)));
@@ -120,7 +120,7 @@ typedef struct {
     MPIDI_VC_t *vc;             /* VC paired with this request */
     uint64_t tag;               /* 64 bit tag request          */
     struct iovec iov[3];        /* scatter gather list         */
-    MPID_Request *parent;       /* Parent request              */
+    MPIR_Request *parent;       /* Parent request              */
 } MPID_nem_ofi_req_t;
 #define REQ_OFI(req) ((MPID_nem_ofi_req_t *)((req)->ch.netmod_area.padding))
 
@@ -240,15 +240,15 @@ fn_fail:                      \
 /* ******************************** */
 /* Request manipulation inlines     */
 /* ******************************** */
-static inline void MPID_nem_ofi_init_req(MPID_Request * req)
+static inline void MPID_nem_ofi_init_req(MPIR_Request * req)
 {
     memset(REQ_OFI(req), 0, sizeof(MPID_nem_ofi_req_t));
 }
 
-static inline int MPID_nem_ofi_create_req(MPID_Request ** request, int refcnt)
+static inline int MPID_nem_ofi_create_req(MPIR_Request ** request, int refcnt)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *req;
+    MPIR_Request *req;
     req = MPID_Request_create();
     MPIU_Assert(req);
     MPIDI_Request_clear_dbg(req);
@@ -258,12 +258,12 @@ static inline int MPID_nem_ofi_create_req(MPID_Request ** request, int refcnt)
     return mpi_errno;
 }
 
-static inline int MPID_nem_ofi_create_req_lw(MPID_Request ** request, int refcnt)
+static inline int MPID_nem_ofi_create_req_lw(MPIR_Request ** request, int refcnt)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *req;
+    MPIR_Request *req;
 
-    req = (MPID_Request *) MPIU_Handle_obj_alloc(&MPID_Request_mem);
+    req = (MPIR_Request *) MPIU_Handle_obj_alloc(&MPIR_Request_mem);
     if (req == NULL)
         MPID_Abort(NULL, MPI_ERR_NO_SPACE, -1, "Cannot allocate Request");
 
@@ -301,41 +301,41 @@ static inline int MPID_nem_ofi_create_req_lw(MPID_Request ** request, int refcnt
     _ret _fc_name(__VA_ARGS__);                   \
     _ret _fc_name##_2(__VA_ARGS__);
 
-DECLARE_TWO_API_SETS(int, MPID_nem_ofi_recv_posted, struct MPIDI_VC *vc, struct MPID_Request *req);
+DECLARE_TWO_API_SETS(int, MPID_nem_ofi_recv_posted, struct MPIDI_VC *vc, struct MPIR_Request *req);
 
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_send, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\
                      MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\
-                     int context_offset, struct MPID_Request **request);
+                     int context_offset, struct MPIR_Request **request);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_isend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\
                      MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\
-                     int context_offset, struct MPID_Request **request);
+                     int context_offset, struct MPIR_Request **request);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_ssend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\
                      MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,
-                     int context_offset, struct MPID_Request **request);
+                     int context_offset, struct MPIR_Request **request);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_issend, struct MPIDI_VC *vc, const void *buf, MPI_Aint count,\
                      MPI_Datatype datatype, int dest, int tag, MPIR_Comm * comm,\
-                     int context_offset, struct MPID_Request **request);
-int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq);
-int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *rreq);
+                     int context_offset, struct MPIR_Request **request);
+int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc, struct MPIR_Request *sreq);
+int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc, struct MPIR_Request *rreq);
 
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_iprobe, struct MPIDI_VC *vc, int source, int tag, MPIR_Comm * comm,
                      int context_offset, int *flag, MPI_Status * status);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_improbe,struct MPIDI_VC *vc, int source, int tag, MPIR_Comm * comm,
-                     int context_offset, int *flag, MPID_Request ** message,
+                     int context_offset, int *flag, MPIR_Request ** message,
                      MPI_Status * status);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_iprobe,int tag, MPIR_Comm * comm, int context_offset,
                      int *flag, MPI_Status * status);
 DECLARE_TWO_API_SETS(int, MPID_nem_ofi_anysource_improbe,int tag, MPIR_Comm * comm, int context_offset,
-                     int *flag, MPID_Request ** message, MPI_Status * status);
-DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPID_Request * rreq);
+                     int *flag, MPIR_Request ** message, MPI_Status * status);
+DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPIR_Request * rreq);
 
-int MPID_nem_ofi_anysource_matched(MPID_Request * rreq);
-int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
-int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
+int MPID_nem_ofi_anysource_matched(MPIR_Request * rreq);
+int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPIR_Request * sreq);
+int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPIR_Request * sreq,
                                void *hdr, intptr_t hdr_sz);
 int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz,
-                                 void *data, intptr_t data_sz, MPID_Request ** sreq_ptr);
-int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
+                                 void *data, intptr_t data_sz, MPIR_Request ** sreq_ptr);
+int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPIR_Request * sreq, void *hdr,
                              intptr_t hdr_sz, void *data, intptr_t data_sz);
 
 /* ************************************************************************** */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index 19c1746..e6f88fe 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -117,7 +117,7 @@
 /* ------------------------------------------------------------------------ */
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_data_callback)
-static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
+static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPIR_Request * sreq)
 {
     int complete = 0, mpi_errno = MPI_SUCCESS;
     MPIDI_VC_t *vc;
@@ -166,10 +166,10 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
 /* ------------------------------------------------------------------------ */
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_cts_recv_callback)
-static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
+static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *preq;
+    MPIR_Request *preq;
     MPIDI_VC_t *vc;
     BEGIN_FUNC(FCNAME);
     preq = REQ_OFI(rreq)->parent;
@@ -214,13 +214,13 @@ static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request *
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_iSendContig)
 int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
-                             MPID_Request * sreq,
+                             MPIR_Request * sreq,
                              void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz)
 {
     int pgid, c, mpi_errno = MPI_SUCCESS;
     char *pack_buffer = NULL;
     uint64_t match_bits;
-    MPID_Request *cts_req;
+    MPIR_Request *cts_req;
     intptr_t buf_offset = 0;
     size_t         pkt_len;
     BEGIN_FUNC(FCNAME);
@@ -272,13 +272,13 @@ int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_SendNoncontig)
 int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
-                               MPID_Request * sreq, void *hdr, intptr_t hdr_sz)
+                               MPIR_Request * sreq, void *hdr, intptr_t hdr_sz)
 {
     int c, pgid, mpi_errno = MPI_SUCCESS;
     char *pack_buffer;
     MPI_Aint data_sz;
     uint64_t match_bits;
-    MPID_Request *cts_req;
+    MPIR_Request *cts_req;
     intptr_t first, last;
     intptr_t buf_offset = 0;
     void          *data       = NULL;
@@ -310,11 +310,11 @@ int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
 int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
                                  void *hdr,
                                  intptr_t hdr_sz,
-                                 void *data, intptr_t data_sz, MPID_Request ** sreq_ptr)
+                                 void *data, intptr_t data_sz, MPIR_Request ** sreq_ptr)
 {
     int c, pgid, mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq;
-    MPID_Request *cts_req;
+    MPIR_Request *sreq;
+    MPIR_Request *cts_req;
     char    *pack_buffer = NULL;
     uint64_t match_bits;
     size_t   pkt_len;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
index 45440c9..5f46527 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
@@ -17,7 +17,7 @@
 #undef FCNAME
 #define FCNAME DECL_FUNC(peek_callback)
 static int
-ADD_SUFFIX(peek_callback)(cq_tagged_entry_t * wc, MPID_Request * rreq)
+ADD_SUFFIX(peek_callback)(cq_tagged_entry_t * wc, MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -41,13 +41,13 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
                              int tag,
                              MPIR_Comm * comm,
                              int context_offset,
-                             int *flag, MPI_Status * status, MPID_Request ** rreq_ptr)
+                             int *flag, MPI_Status * status, MPIR_Request ** rreq_ptr)
 {
     int ret, mpi_errno = MPI_SUCCESS;
     fi_addr_t remote_proc = 0;
     uint64_t match_bits, mask_bits;
     size_t len;
-    MPID_Request rreq_s, *rreq;
+    MPIR_Request rreq_s, *rreq;
 
     BEGIN_FUNC(FCNAME);
     if (rreq_ptr) {
@@ -155,7 +155,7 @@ int ADD_SUFFIX(MPID_nem_ofi_improbe)(struct MPIDI_VC *vc,
                          int tag,
                          MPIR_Comm * comm,
                          int context_offset,
-                         int *flag, MPID_Request ** message, MPI_Status * status)
+                         int *flag, MPIR_Request ** message, MPI_Status * status)
 {
     int old_error = status->MPI_ERROR;
     int s;
@@ -191,7 +191,7 @@ int ADD_SUFFIX(MPID_nem_ofi_anysource_iprobe)(int tag,
 int ADD_SUFFIX(MPID_nem_ofi_anysource_improbe)(int tag,
                                    MPIR_Comm * comm,
                                    int context_offset,
-                                   int *flag, MPID_Request ** message, MPI_Status * status)
+                                   int *flag, MPIR_Request ** message, MPI_Status * status)
 {
     int rc;
     BEGIN_FUNC(FCNAME);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
index 6bf5a01..d53e734 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
@@ -15,9 +15,9 @@
 /* ------------------------------------------------------------------------ */
 /* This routine looks up the request that contains a context object         */
 /* ------------------------------------------------------------------------ */
-static inline MPID_Request *context_to_req(void *ofi_context)
+static inline MPIR_Request *context_to_req(void *ofi_context)
 {
-    return (MPID_Request *) MPL_container_of(ofi_context, MPID_Request, ch.netmod_area.padding);
+    return (MPIR_Request *) MPL_container_of(ofi_context, MPIR_Request, ch.netmod_area.padding);
 }
 
 #define ADD_SUFFIX(name) name
@@ -40,7 +40,7 @@ int MPID_nem_ofi_poll(int in_blocking_poll)
     cq_tagged_entry_t wc;
     cq_err_entry_t error;
     MPIDI_VC_t *vc;
-    MPID_Request *req;
+    MPIR_Request *req;
     req_fn reqFn;
     BEGIN_FUNC(FCNAME);
     do {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
index e616586..3d0d99d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
@@ -16,11 +16,11 @@
 
 static inline int
 MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                                MPID_Request * rreq);
+                                MPIR_Request * rreq);
 
 static inline int
 MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                           MPID_Request * sreq);
+                           MPIR_Request * sreq);
 
 #define ADD_SUFFIX(name) name
 #undef API_SET
@@ -38,7 +38,7 @@ MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_sync_recv_callback)
 static inline int MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                                                  MPID_Request * rreq)
+                                                  MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -58,7 +58,7 @@ static inline int MPID_nem_ofi_sync_recv_callback(cq_tagged_entry_t * wc ATTRIBU
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_send_callback)
 static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((unused)),
-                                             MPID_Request * sreq)
+                                             MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -94,14 +94,14 @@ static inline int MPID_nem_ofi_send_callback(cq_tagged_entry_t * wc ATTRIBUTE((u
 
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_cancel_send)
-int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *sreq)
+int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPIR_Request *sreq)
 {
     DO_CANCEL(sreq);
 }
 
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_cancel_recv)
-int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPID_Request *rreq)
+int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPIR_Request *rreq)
 {
     DO_CANCEL(rreq);
 }
@@ -109,7 +109,7 @@ int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPI
 
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_matched)
-int MPID_nem_ofi_anysource_matched(MPID_Request * rreq)
+int MPID_nem_ofi_anysource_matched(MPIR_Request * rreq)
 {
     int matched = FALSE;
     int ret;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index f9e9ffe..ea2fe3e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -19,13 +19,13 @@
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_recv_callback)
 static inline
-int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request * rreq)
+int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPIR_Request * rreq)
 {
     int err0, err1, src, mpi_errno = MPI_SUCCESS;
     uint64_t ssend_bits;
     intptr_t sz;
     MPIDI_VC_t *vc;
-    MPID_Request *sync_req;
+    MPIR_Request *sync_req;
     BEGIN_FUNC(FCNAME);
     /* ---------------------------------------------------- */
     /* Populate the MPI Status and unpack noncontig buffer  */
@@ -109,7 +109,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request
 static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc,
                               const void *buf, int count, MPI_Datatype datatype,
                               int dest, int tag, MPIR_Comm *comm,
-                              int context_offset, MPID_Request **request,
+                              int context_offset, MPIR_Request **request,
                               int dt_contig,
                               intptr_t data_sz,
                               MPID_Datatype *dt_ptr,
@@ -119,7 +119,7 @@ static inline int ADD_SUFFIX(send_normal)(struct MPIDI_VC *vc,
     int err0, err1, mpi_errno = MPI_SUCCESS;
     char *send_buffer;
     uint64_t match_bits, ssend_match, ssend_mask;
-    MPID_Request *sreq = NULL, *sync_req = NULL;
+    MPIR_Request *sreq = NULL, *sync_req = NULL;
     /* ---------------------------------------------------- */
     /* Create the MPI request                               */
     /* ---------------------------------------------------- */
@@ -269,7 +269,7 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc,
          int tag,
          MPIR_Comm * comm,
          int context_offset,
-         struct MPID_Request **request,
+         struct MPIR_Request **request,
          int should_create_req,
          uint64_t send_type)
 {
@@ -309,7 +309,7 @@ int ADD_SUFFIX(MPID_nem_ofi_send)(struct MPIDI_VC *vc,
                       MPI_Aint count,
                       MPI_Datatype datatype,
                       int dest,
-                      int tag, MPIR_Comm * comm, int context_offset, struct MPID_Request **request)
+                      int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -327,7 +327,7 @@ int ADD_SUFFIX(MPID_nem_ofi_isend)(struct MPIDI_VC *vc,
                        MPI_Aint count,
                        MPI_Datatype datatype,
                        int dest,
-                       int tag, MPIR_Comm * comm, int context_offset, struct MPID_Request **request)
+                       int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -344,7 +344,7 @@ int ADD_SUFFIX(MPID_nem_ofi_ssend)(struct MPIDI_VC *vc,
                        MPI_Aint count,
                        MPI_Datatype datatype,
                        int dest,
-                       int tag, MPIR_Comm * comm, int context_offset, struct MPID_Request **request)
+                       int tag, MPIR_Comm * comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -362,7 +362,7 @@ int ADD_SUFFIX(MPID_nem_ofi_issend)(struct MPIDI_VC *vc,
                         MPI_Datatype datatype,
                         int dest,
                         int tag,
-                        MPIR_Comm * comm, int context_offset, struct MPID_Request **request)
+                        MPIR_Comm * comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
@@ -375,7 +375,7 @@ int ADD_SUFFIX(MPID_nem_ofi_issend)(struct MPIDI_VC *vc,
 
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_recv_posted)
-int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Request *rreq)
+int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPIR_Request *rreq)
 {
     int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
     uint64_t match_bits = 0, mask_bits = 0;
@@ -451,7 +451,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
 
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_posted)
-void ADD_SUFFIX(MPID_nem_ofi_anysource_posted)(MPID_Request * rreq)
+void ADD_SUFFIX(MPID_nem_ofi_anysource_posted)(MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     BEGIN_FUNC(FCNAME);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index 4bf4377..8f0d725 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -50,7 +50,7 @@ typedef struct {
 } MPID_nem_ptl_req_area;
 
 /* macro for ptl private in req */
-static inline MPID_nem_ptl_req_area * REQ_PTL(MPID_Request *req) {
+static inline MPID_nem_ptl_req_area * REQ_PTL(MPIR_Request *req) {
     return (MPID_nem_ptl_req_area *)req->ch.netmod_area.padding;
 }
 
@@ -141,10 +141,10 @@ int MPID_nem_ptl_nm_init(void);
 int MPID_nem_ptl_nm_finalize(void);
 int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e);
 int MPID_nem_ptl_sendq_complete_with_error(MPIDI_VC_t *vc, int req_errno);
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz);
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz);
 int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                                   MPID_Request **sreq_ptr);
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+                                   MPIR_Request **sreq_ptr);
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz,
                                void *data, intptr_t data_sz);
 int MPID_nem_ptl_poll_init(void);
 int MPID_nem_ptl_poll_finalize(void);
@@ -154,41 +154,41 @@ int MPID_nem_ptl_get_id_from_bc(const char *business_card, ptl_process_t *id, pt
                                 ptl_pt_index_t *ptc, ptl_pt_index_t *ptr, ptl_pt_index_t *ptrg, ptl_pt_index_t *ptrc);
 
 /* comm override functions */
-int MPID_nem_ptl_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
+int MPID_nem_ptl_recv_posted(struct MPIDI_VC *vc, struct MPIR_Request *req);
 /* isend is also used to implement send, rsend and irsend */
 int MPID_nem_ptl_isend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                       MPIR_Comm *comm, int context_offset, struct MPID_Request **request);
+                       MPIR_Comm *comm, int context_offset, struct MPIR_Request **request);
 /* issend is also used to implement ssend */
 int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                        MPIR_Comm *comm, int context_offset, struct MPID_Request **request);
-int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc,  struct MPID_Request *sreq);
-int MPID_nem_ptl_cancel_recv(struct MPIDI_VC *vc,  struct MPID_Request *rreq);
+                        MPIR_Comm *comm, int context_offset, struct MPIR_Request **request);
+int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc,  struct MPIR_Request *sreq);
+int MPID_nem_ptl_cancel_recv(struct MPIDI_VC *vc,  struct MPIR_Request *rreq);
 int MPID_nem_ptl_probe(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset, MPI_Status *status);
 int MPID_nem_ptl_iprobe(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset, int *flag,
                         MPI_Status *status);
 int MPID_nem_ptl_improbe(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset, int *flag,
-                         MPID_Request **message, MPI_Status *status);
+                         MPIR_Request **message, MPI_Status *status);
 int MPID_nem_ptl_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status);
-int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPID_Request **message,
+int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request **message,
                                    MPI_Status * status);
-void MPID_nem_ptl_anysource_posted(MPID_Request *rreq);
-int MPID_nem_ptl_anysource_matched(MPID_Request *rreq);
+void MPID_nem_ptl_anysource_posted(MPIR_Request *rreq);
+int MPID_nem_ptl_anysource_matched(MPIR_Request *rreq);
 int MPID_nem_ptl_init_id(MPIDI_VC_t *vc);
 int MPID_nem_ptl_get_ordering(int *ordering);
 
-int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie);
-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie);
-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
-int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPID_Request *req);
-int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
+int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req);
+int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPIR_Request *rreq, MPL_IOV s_cookie);
+int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie);
+int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie);
+int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPIR_Request *req);
+int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPIR_Request *req);
 
 /* packet handlers */
 
 int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                             intptr_t *buflen, MPID_Request **rreqp);
+                                             intptr_t *buflen, MPIR_Request **rreqp);
 int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                              intptr_t *buflen, MPID_Request **rreqp);
+                                              intptr_t *buflen, MPIR_Request **rreqp);
 
 /* local packet types */
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
index a6f08ed..f6cdc06 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
@@ -12,7 +12,7 @@
 #define FUNCNAME MPID_nem_ptl_lmt_initiate_lmt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req)
+int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPIR_Request *req)
 {
     /* Nothing to do here, but has to be defined for CH3 to follow the right path to
        MPID_nem_ptl_lmt_start_recv */
@@ -22,7 +22,7 @@ int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID
 
 
 /* The following function is implemented in ptl_recv.c to make use of the handlers defined there */
-/* int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie) */
+/* int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPIR_Request *rreq, MPL_IOV s_cookie) */
 
 
 
@@ -30,7 +30,7 @@ int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID
 #define FUNCNAME MPID_nem_ptl_lmt_start_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie)
+int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
@@ -41,7 +41,7 @@ int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_co
 #define FUNCNAME MPID_nem_ptl_lmt_handle_cookie
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie)
+int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
@@ -52,7 +52,7 @@ int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_
 #define FUNCNAME MPID_nem_ptl_lmt_done_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPID_Request *req)
+int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPIR_Request *req)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
@@ -63,7 +63,7 @@ int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPID_Request *req)
 #define FUNCNAME MPID_nem_ptl_lmt_done_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req)
+int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPIR_Request *req)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index bd385dc..2b59c89 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -25,7 +25,7 @@ static ptl_handle_me_t get_me_handle;
 
 
 /* AUX STUFF FOR REORDERING LOGIC */
-static GENERIC_Q_DECL(struct MPID_Request) reorder_queue;
+static GENERIC_Q_DECL(struct MPIR_Request) reorder_queue;
 static char *expected_recv_ptr, *max_recv_ptr[NUM_RECV_BUFS];
 static int expected_recv_idx;
 
@@ -48,7 +48,7 @@ static inline void incr_expected_recv_ptr(size_t size)
 #define FUNCNAME handle_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int handle_request(MPID_Request *req)
+static inline int handle_request(MPIR_Request *req)
 {
     int mpi_errno = MPID_nem_handle_pkt(req->ch.vc, TMPBUF(req), REQ_PTL(req)->bytes_put);
     incr_expected_recv_ptr(REQ_PTL(req)->bytes_put);
@@ -64,19 +64,19 @@ static inline int handle_request(MPID_Request *req)
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int progress_reorder(void)
 {
-    MPID_Request *req;
+    MPIR_Request *req;
     int mpi_errno = MPI_SUCCESS;
 
     GENERIC_Q_SEARCH_REMOVE(&reorder_queue,
                             REQ_PTL(_e)->recv_ptr == expected_recv_ptr,
-                            &req, MPID_Request, dev.next);
+                            &req, MPIR_Request, dev.next);
     while (req) {
         mpi_errno = handle_request(req);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         GENERIC_Q_SEARCH_REMOVE(&reorder_queue,
                                 REQ_PTL(_e)->recv_ptr == expected_recv_ptr,
-                                &req, MPID_Request, dev.next);
+                                &req, MPIR_Request, dev.next);
     }
  fn_exit:
     return mpi_errno;
@@ -192,7 +192,7 @@ int MPID_nem_ptl_nm_finalize(void)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, intptr_t data_sz,
-                           MPID_Request *sreq)
+                           MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
@@ -258,7 +258,7 @@ static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, intptr_t d
 #define FUNCNAME send_noncontig_pkt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
+static int send_noncontig_pkt(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr_p)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
@@ -333,7 +333,7 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
 #define FUNCNAME MPID_nem_ptl_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz)
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG);
@@ -356,7 +356,7 @@ int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, in
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data,
-                                 intptr_t data_sz, MPID_Request **sreq_ptr)
+                                 intptr_t data_sz, MPIR_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG);
@@ -386,7 +386,7 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, voi
 #define FUNCNAME MPID_nem_ptl_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz,
                                void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -409,9 +409,9 @@ int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intp
 #define FUNCNAME on_data_avail
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int on_data_avail(MPID_Request * req)
+static inline int on_data_avail(MPIR_Request * req)
 {
-    int (*reqFn) (MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn) (MPIDI_VC_t *, MPIR_Request *, int *);
     MPIDI_VC_t *vc = req->ch.vc;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
     int mpi_errno = MPI_SUCCESS;
@@ -484,7 +484,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                         MPIR_ERR_POP(mpi_errno);
                 }
                 else {
-                    MPID_Request *req = MPID_Request_create();
+                    MPIR_Request *req = MPID_Request_create();
                     /* This request is actually complete; just needs to wait to enforce ordering */
                     TMPBUF(req) = MPL_malloc(packet_sz);
                     MPIU_Assert(TMPBUF(req));
@@ -501,7 +501,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
                 char *buf_ptr;
                 ptl_size_t target_offset;
 
-                MPID_Request *req = MPID_Request_create();
+                MPIR_Request *req = MPID_Request_create();
                 MPIU_Assert(req != NULL);
                 MPIDI_CH3U_Request_decrement_cc(req, &incomplete);  /* We'll increment it below */
                 REQ_PTL(req)->event_handler = MPID_nem_ptl_nm_ctl_event_handler;
@@ -544,9 +544,9 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
     case PTL_EVENT_GET:
         {
             MPI_Request handle = NPTL_MATCH_GET_TAG(e->match_bits);
-            MPID_Request *req = NULL;
+            MPIR_Request *req = NULL;
 
-            MPID_Request_get_ptr(handle, req);
+            MPIR_Request_get_ptr(handle, req);
             if (--REQ_PTL(req)->num_gets == 0) {
                 MPL_free(TMPBUF(req));
                 if (REQ_PTL(req)->put_done) {
@@ -561,7 +561,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
 
     case PTL_EVENT_SEND:
         {
-            MPID_Request *const req = e->user_ptr;
+            MPIR_Request *const req = e->user_ptr;
 
             MPL_free(SENDBUF(req));
             REQ_PTL(req)->put_done = 1;
@@ -577,7 +577,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
     case PTL_EVENT_REPLY:
         {
             int incomplete;
-            MPID_Request *const req = e->user_ptr;
+            MPIR_Request *const req = e->user_ptr;
 
             MPIDI_CH3U_Request_decrement_cc(req, &incomplete);
             if (!incomplete) {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
index 8365552..b580671 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
@@ -183,7 +183,7 @@ int MPID_nem_ptl_poll(int is_blocking_poll)
         case PTL_EVENT_SEND:
         case PTL_EVENT_REPLY:
         case PTL_EVENT_SEARCH: {
-            MPID_Request * const req = event.user_ptr;
+            MPIR_Request * const req = event.user_ptr;
             MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "req = %p", req);
             MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "REQ_PTL(req)->event_handler = %p", REQ_PTL(req)->event_handler);
             if (REQ_PTL(req)->event_handler) {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index 331d888..8c3d342 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -13,7 +13,7 @@
 static int handle_probe(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const req = e->user_ptr;
+    MPIR_Request *const req = e->user_ptr;
     MPIDI_STATE_DECL(MPID_STATE_HANDLE_PROBE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_HANDLE_PROBE);
@@ -44,7 +44,7 @@ static int handle_probe(const ptl_event_t *e)
 static int handle_mprobe(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const req = e->user_ptr;
+    MPIR_Request *const req = e->user_ptr;
     MPIU_CHKPMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_HANDLE_PROBE);
 
@@ -118,7 +118,7 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     int ret;
     ptl_process_t id_any;
     ptl_me_t me;
-    MPID_Request *req;
+    MPIR_Request *req;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_IPROBE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_PTL_IPROBE);
@@ -165,7 +165,7 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
     do {
         mpi_errno = MPID_nem_ptl_poll(FALSE);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-    } while (!MPID_Request_is_complete(req));
+    } while (!MPIR_Request_is_complete(req));
 
     *flag = REQ_PTL(req)->found;
     if (status != MPI_STATUS_IGNORE)
@@ -185,14 +185,14 @@ int MPID_nem_ptl_iprobe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, in
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag,
-                         MPID_Request **message, MPI_Status *status)
+                         MPIR_Request **message, MPI_Status *status)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
     int ret;
     ptl_process_t id_any;
     ptl_me_t me;
-    MPID_Request *req;
+    MPIR_Request *req;
 
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_IMPROBE);
 
@@ -241,7 +241,7 @@ int MPID_nem_ptl_improbe(MPIDI_VC_t *vc, int source, int tag, MPIR_Comm *comm, i
     do {
         mpi_errno = MPID_nem_ptl_poll(FALSE);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-    } while (!MPID_Request_is_complete(req));
+    } while (!MPIR_Request_is_complete(req));
 
     *flag = REQ_PTL(req)->found;
     if (*flag) {
@@ -285,7 +285,7 @@ int MPID_nem_ptl_anysource_iprobe(int tag, MPIR_Comm * comm, int context_offset,
 #define FUNCNAME MPID_nem_ptl_anysource_improbe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPID_Request **message,
+int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request **message,
                                    MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -307,12 +307,12 @@ int MPID_nem_ptl_anysource_improbe(int tag, MPIR_Comm * comm, int context_offset
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                                    intptr_t *buflen, MPID_Request **rreqp)
+                                                    intptr_t *buflen, MPIR_Request **rreqp)
 {
     int ret, mpi_errno = MPI_SUCCESS;
     MPIDI_nem_ptl_pkt_cancel_send_req_t *req_pkt = (MPIDI_nem_ptl_pkt_cancel_send_req_t *)pkt;
     MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_resp_t, resp_pkt);
-    MPID_Request *search_req, *resp_req;
+    MPIR_Request *search_req, *resp_req;
     ptl_me_t me;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
 
@@ -353,7 +353,7 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
     do {
         mpi_errno = MPID_nem_ptl_poll(FALSE);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
-    } while (!MPID_Request_is_complete(search_req));
+    } while (!MPIR_Request_is_complete(search_req));
 
     /* send response */
     resp_pkt->type = MPIDI_NEM_PKT_NETMOD;
@@ -383,14 +383,14 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                              intptr_t *buflen, MPID_Request **rreqp)
+                                              intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     MPIDI_nem_ptl_pkt_cancel_send_resp_t *resp_pkt = (MPIDI_nem_ptl_pkt_cancel_send_resp_t *)pkt;
     int i, ret;
 
-    MPID_Request_get_ptr(resp_pkt->sender_req_id, sreq);
+    MPIR_Request_get_ptr(resp_pkt->sender_req_id, sreq);
 
     if (resp_pkt->ack) {
         MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index aa3ea1b..4f5953e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -14,7 +14,7 @@
 static void dequeue_req(const ptl_event_t *e)
 {
     int found;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     MPI_Aint s_len, r_len;
 
     /* At this point we know the ME is unlinked. Invalidate the handle to
@@ -52,7 +52,7 @@ static void dequeue_req(const ptl_event_t *e)
 static int handler_recv_complete(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     int ret;
     int i;
     MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_COMPLETE);
@@ -89,7 +89,7 @@ static int handler_recv_complete(const ptl_event_t *e)
 static int handler_recv_dequeue_complete(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     int is_contig;
     MPI_Aint last;
     MPI_Aint dt_true_lb;
@@ -145,7 +145,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
 static int handler_recv_big_get(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     MPI_Aint last;
 
     MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_UNPACK);
@@ -179,7 +179,7 @@ static int handler_recv_big_get(const ptl_event_t *e)
 #define FUNCNAME big_get
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static void big_get(void *buf, ptl_size_t left_to_get, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPID_Request *rreq)
+static void big_get(void *buf, ptl_size_t left_to_get, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPIR_Request *rreq)
 {
     int ret;
     MPID_nem_ptl_vc_area *vc_ptl;
@@ -214,7 +214,7 @@ static void big_get(void *buf, ptl_size_t left_to_get, MPIDI_VC_t *vc, ptl_match
 static int handler_recv_unpack_complete(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     void *buf;
     MPI_Aint last;
 
@@ -273,7 +273,7 @@ static int handler_recv_dequeue_unpack_complete(const ptl_event_t *e)
 static int handler_recv_dequeue_large(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     MPIDI_VC_t *vc;
     MPID_nem_ptl_vc_area *vc_ptl;
     int ret;
@@ -373,7 +373,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
 static int handler_recv_dequeue_unpack_large(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const rreq = e->user_ptr;
+    MPIR_Request *const rreq = e->user_ptr;
     MPIDI_VC_t *vc;
     MPI_Aint last;
     void *buf;
@@ -424,7 +424,7 @@ static int handler_recv_dequeue_unpack_large(const ptl_event_t *e)
 #define FUNCNAME MPID_nem_ptl_recv_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
+int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPIR_Request *rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
@@ -577,7 +577,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
 #define FUNCNAME MPID_nem_ptl_anysource_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_nem_ptl_anysource_posted(MPID_Request *rreq)
+void MPID_nem_ptl_anysource_posted(MPIR_Request *rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ANYSOURCE_POSTED);
@@ -598,7 +598,7 @@ void MPID_nem_ptl_anysource_posted(MPID_Request *rreq)
 #define FUNCNAME cancel_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int cancel_recv(MPID_Request *rreq, int *cancelled)
+static int cancel_recv(MPIR_Request *rreq, int *cancelled)
 {
     int mpi_errno = MPI_SUCCESS;
     int ptl_err   = PTL_OK;
@@ -630,7 +630,7 @@ static int cancel_recv(MPID_Request *rreq, int *cancelled)
 #define FUNCNAME MPID_nem_ptl_anysource_matched
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_anysource_matched(MPID_Request *rreq)
+int MPID_nem_ptl_anysource_matched(MPIR_Request *rreq)
 {
     int mpi_errno, cancelled;
 
@@ -657,7 +657,7 @@ int MPID_nem_ptl_anysource_matched(MPID_Request *rreq)
 #define FUNCNAME MPID_nem_ptl_cancel_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_cancel_recv(MPIDI_VC_t *vc,  MPID_Request *rreq)
+int MPID_nem_ptl_cancel_recv(MPIDI_VC_t *vc,  MPIR_Request *rreq)
 {
     int mpi_errno, cancelled;
 
@@ -684,7 +684,7 @@ int MPID_nem_ptl_cancel_recv(MPIDI_VC_t *vc,  MPID_Request *rreq)
 #define FUNCNAME MPID_nem_ptl_lmt_start_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie)
+int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPIR_Request *rreq, MPL_IOV s_cookie)
 {
     /* This function should only be called as a result of an Mrecv because of the CH3 protocol for
        Rendezvous Mrecvs. The regular CH3 protocol is not optimal for portals, since we don't need
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index fb9a517..c7da822 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -11,7 +11,7 @@
 #define FUNCNAME big_meappend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static void big_meappend(void *buf, ptl_size_t left_to_send, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPID_Request *sreq)
+static void big_meappend(void *buf, ptl_size_t left_to_send, MPIDI_VC_t *vc, ptl_match_bits_t match_bits, MPIR_Request *sreq)
 {
     int i, ret, was_incomplete;
     MPID_nem_ptl_vc_area *vc_ptl;
@@ -59,7 +59,7 @@ static void big_meappend(void *buf, ptl_size_t left_to_send, MPIDI_VC_t *vc, ptl
 static int handler_send(const ptl_event_t *e)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *const sreq = e->user_ptr;
+    MPIR_Request *const sreq = e->user_ptr;
 
     int i, ret;
 
@@ -101,7 +101,7 @@ static int handler_send(const ptl_event_t *e)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
-                    int tag, MPIR_Comm *comm, int context_offset, struct MPID_Request **request)
+                    int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
@@ -110,7 +110,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPIDU_Datatype*dt_ptr;
-    MPID_Request *sreq = NULL;
+    MPIR_Request *sreq = NULL;
     ptl_me_t me;
     int initial_iov_count, remaining_iov_count;
     ptl_md_t md;
@@ -336,7 +336,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_isend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                       MPIR_Comm *comm, int context_offset, struct MPID_Request **request)
+                       MPIR_Comm *comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISEND);
@@ -355,7 +355,7 @@ int MPID_nem_ptl_isend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                        MPIR_Comm *comm, int context_offset, struct MPID_Request **request)
+                        MPIR_Comm *comm, int context_offset, struct MPIR_Request **request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISSEND);
@@ -372,11 +372,11 @@ int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MP
 #define FUNCNAME MPID_nem_ptl_cancel_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc,  struct MPID_Request *sreq)
+int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc,  struct MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_req_t, csr_pkt);
-    MPID_Request *csr_sreq;
+    MPIR_Request *csr_sreq;
     int was_incomplete;
 
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index ee592cf..bad6432 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -1580,9 +1580,9 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc)
     {
         /* there is a pending receive, receive it directly into the user buffer */
         MPIDI_CH3I_VC *const sc_vc_ch = &sc_vc->ch;
-        MPID_Request *const rreq = sc_vc_ch->recv_active;
+        MPIR_Request *const rreq = sc_vc_ch->recv_active;
         MPL_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset];
-        int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+        int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
         MPIU_Assert(rreq->dev.iov_count > 0);
         MPIU_Assert(rreq->dev.iov_count + rreq->dev.iov_offset <= MPL_IOV_LIMIT);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
index 0e7af16..1bded15 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
@@ -37,7 +37,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_ckpt_unpause_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
@@ -76,7 +76,7 @@ int MPID_nem_tcp_ckpt_continue_vc(MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_PKT_DECL_CAST(upkt, MPIDI_nem_tcp_pkt_unpause_t, unpause_pkt);
-    MPID_Request *unpause_req;
+    MPIR_Request *unpause_req;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_CKPT_CONTINUE_VC);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_CKPT_CONTINUE_VC);
@@ -111,7 +111,7 @@ int MPID_nem_tcp_ckpt_restart_vc(MPIDI_VC_t *vc)
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_nem_tcp_pkt_unpause_t * const pkt = (MPIDI_nem_tcp_pkt_unpause_t *)&upkt;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_CKPT_RESTART_VC);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_CKPT_RESTART_VC);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
index 1cf13af..8a69317 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
@@ -30,7 +30,7 @@ typedef enum{MPID_NEM_TCP_VC_STATE_DISCONNECTED,
 
 #define MPIDI_NEM_TCP_MAX_CONNECT_RETRIES 100
 
-typedef GENERIC_Q_DECL(struct MPID_Request) MPIDI_nem_tcp_request_queue_t;
+typedef GENERIC_Q_DECL(struct MPIR_Request) MPIDI_nem_tcp_request_queue_t;
 
 /* The vc provides a generic buffer in which network modules can store
    private fields This removes all dependencies from the VC struction
@@ -97,12 +97,12 @@ int MPID_nem_tcp_ckpt_cleanup(void);
 int MPID_nem_tcp_state_listening_handler(struct pollfd *const l_plfd, sockconn_t *const l_sc);
 int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue);
 
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz);
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz);
 int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                                    MPID_Request **sreq_ptr);
+                                    MPIR_Request **sreq_ptr);
 int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                                        MPID_Request **sreq_ptr);
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz);
+                                        MPIR_Request **sreq_ptr);
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz);
 int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, in_port_t *port);
 
 void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc);
@@ -113,7 +113,7 @@ int MPID_nem_tcp_vc_terminated(MPIDI_VC_t *vc);
 int MPID_nem_tcp_get_ordering(int *ordering);
 
 
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
 
 
 /* Macros */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index fd45a61..417fbd1 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -70,7 +70,7 @@ int MPID_nem_tcp_send_init(void)
 int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     intptr_t offset;
     MPL_IOV *iov;
     int complete;
@@ -143,7 +143,7 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
         else
         {
             /* sent whole message */
-            int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+            int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
             reqFn = sreq->dev.OnDataAvail;
             if (!reqFn)
@@ -232,10 +232,10 @@ int MPID_nem_tcp_conn_est (MPIDI_VC_t *vc)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                                 MPID_Request **sreq_ptr)
+                                 MPIR_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request * sreq = NULL;
+    MPIR_Request * sreq = NULL;
     intptr_t offset = 0;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     sockconn_t *sc = vc_tcp->sc;
@@ -372,10 +372,10 @@ fn_fail:
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
-                                        MPID_Request **sreq_ptr)
+                                        MPIR_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request * sreq = NULL;
+    MPIR_Request * sreq = NULL;
     intptr_t offset = 0;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     sockconn_t *sc = vc_tcp->sc;
@@ -505,7 +505,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *hdr, intptr_t hdr_sz,
                              void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -572,7 +572,7 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intp
                 if (offset == sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz)
                 {
                     /* sent whole message */
-                    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+                    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
                     
                     reqFn = sreq->dev.OnDataAvail;
                     if (!reqFn)
@@ -695,7 +695,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz)
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     int iov_n;
@@ -800,7 +800,7 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
     if (complete)
     {
         /* sent whole iov */
-        int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+        int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
         reqFn = sreq->dev.OnDataAvail;
         if (!reqFn)
@@ -865,7 +865,7 @@ fn_fail:
 int MPID_nem_tcp_error_out_send_queue(struct MPIDI_VC *const vc, int req_errno)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *req;
+    MPIR_Request *req;
     MPID_nem_tcp_vc_area *const vc_tcp = VC_TCP(vc);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ERROR_OUT_SEND_QUEUE);
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c
index 90f685a..b2f8573 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_utility.c
@@ -209,7 +209,7 @@ int MPID_nem_tcp_is_sock_connected(int fd)
 void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc)
 {
     int i;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
 
     fprintf(stream, "..   sc=%p fd=%d vc_tcp->state=%d\n", vc_tcp->sc, (vc_tcp->sc ? vc_tcp->sc->fd : -1), vc_tcp->state);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
index 6144cc1..5192ead 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
@@ -15,7 +15,7 @@
 #define FUNCNAME MPIDI_CH3_iSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, intptr_t hdr_sz)
+int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPIR_Request *sreq, void * hdr, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
@@ -61,7 +61,7 @@ int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, intptr_t hd
 	}
 	else
 	{
-            int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+            int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
             reqFn = sreq->dev.OnDataAvail;
             if (!reqFn)
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
index 432d2f5..3bc9762 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
@@ -17,7 +17,7 @@ extern void *MPIDI_CH3_packet_buffer;
 #define FUNCNAME MPIDI_CH3_iSendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV *iov, int n_iov)
+int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV *iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
@@ -120,7 +120,7 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV *iov, int n_io
 	}
 	else
 	{
-            int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+            int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
             reqFn = sreq->dev.OnDataAvail;
             if (!reqFn)
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index c0ce1ef..cb226e3 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -24,7 +24,7 @@
 #define FUNCNAME MPIDI_CH3_iStartMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPID_Request **sreq_ptr)
+int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPIR_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
@@ -84,7 +84,7 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPID_Reques
 
  enqueue_it:
     {
-	MPID_Request * sreq = NULL;
+	MPIR_Request * sreq = NULL;
 	
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER, TERSE, "enqueuing");
 
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index d3d77c0..2732eea 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -30,9 +30,9 @@
 #define FUNCNAME MPIDI_CH3_iStartMsgv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPID_Request **sreq_ptr)
+int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPIR_Request **sreq_ptr)
 {
-    MPID_Request * sreq = *sreq_ptr = NULL;
+    MPIR_Request * sreq = *sreq_ptr = NULL;
     int mpi_errno = MPI_SUCCESS;
     int in_cs = FALSE;
     int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index d02089b..d3b7a8f 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -19,7 +19,7 @@ typedef struct vc_term_element
 {
     struct vc_term_element *next;
     MPIDI_VC_t *vc;
-    MPID_Request *req;
+    MPIR_Request *req;
 } vc_term_element_t;
 
 static struct { vc_term_element_t *head, *tail; } vc_term_queue;
@@ -39,10 +39,10 @@ static MPIDI_CH3_PktHandler_Fcn *pktArray[PKTARRAY_SIZE];
 #endif
 
 #ifdef BY_PASS_PROGRESS
-extern MPID_Request ** const MPID_Recvq_posted_head_ptr;
-extern MPID_Request ** const MPID_Recvq_unexpected_head_ptr;
-extern MPID_Request ** const MPID_Recvq_posted_tail_ptr;
-extern MPID_Request ** const MPID_Recvq_unexpected_tail_ptr;
+extern MPIR_Request ** const MPID_Recvq_posted_head_ptr;
+extern MPIR_Request ** const MPID_Recvq_unexpected_head_ptr;
+extern MPIR_Request ** const MPID_Recvq_posted_tail_ptr;
+extern MPIR_Request ** const MPID_Recvq_unexpected_tail_ptr;
 #endif
 
 OPA_int_t MPIDI_CH3I_progress_completion_count = OPA_INT_T_INITIALIZER(0);
@@ -64,9 +64,9 @@ static volatile int sigusr1_count = 0;
 static int my_sigusr1_count = 0;
 
 MPIDI_CH3I_shm_sendq_t MPIDI_CH3I_shm_sendq = {NULL, NULL};
-struct MPID_Request *MPIDI_CH3I_shm_active_send = NULL;
+struct MPIR_Request *MPIDI_CH3I_shm_active_send = NULL;
 
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
 static int shm_connection_terminated(MPIDI_VC_t * vc);
 static int check_terminating_vcs(void);
 
@@ -78,8 +78,8 @@ int MPID_nem_local_lmt_pending = FALSE;
 typedef struct qn_ent
 {
     struct qn_ent *next;
-    void (*enqueue_fn)(MPID_Request *rreq);
-    int (*dequeue_fn)(MPID_Request *rreq);
+    void (*enqueue_fn)(MPIR_Request *rreq);
+    int (*dequeue_fn)(MPIR_Request *rreq);
 } qn_ent_t;
 
 static qn_ent_t *qn_head = NULL;
@@ -116,7 +116,7 @@ static int check_terminating_vcs(void)
 
     MPIDI_FUNC_ENTER(MPID_STATE_CHECK_TERMINATING_VCS);
 
-    while (!TERMQ_EMPTY() && MPID_Request_is_complete(TERMQ_HEAD()->req)) {
+    while (!TERMQ_EMPTY() && MPIR_Request_is_complete(TERMQ_HEAD()->req)) {
         vc_term_element_t *ep;
         TERMQ_DEQUEUE(&ep);
         MPID_Request_release(ep->req);
@@ -145,7 +145,7 @@ int MPIDI_CH3I_Shm_send_progress(void)
     int mpi_errno = MPI_SUCCESS;
     MPL_IOV *iov;
     int n_iov;
-    MPID_Request *sreq;
+    MPIR_Request *sreq;
     int again = 0;
 
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_SEND_PROGRESS);
@@ -487,7 +487,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
 
     do
     {
-	MPID_Request        *rreq;
+	MPIR_Request        *rreq;
 	MPID_nem_cell_ptr_t  cell;
 	int                  in_fbox = 0;
 	MPIDI_VC_t          *vc;
@@ -735,7 +735,7 @@ void MPIDI_CH3I_Progress_wakeup(void)
 int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *rreq = NULL;
+    MPIR_Request *rreq = NULL;
     int complete;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_HANDLE_PKT);
@@ -877,7 +877,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen)
             }
             else
             {
-                int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+                int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 
                 reqFn = rreq->dev.OnDataAvail;
                 if (!reqFn)
@@ -1146,7 +1146,7 @@ int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc)
 int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request *req, *prev;
+    MPIR_Request *req, *prev;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_COMPLETE_SENDQ_WITH_ERROR);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_COMPLETE_SENDQ_WITH_ERROR);
@@ -1155,7 +1155,7 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
     prev = NULL;
     while (req) {
         if (req->ch.vc == vc) {
-            MPID_Request *next = req->dev.next;
+            MPIR_Request *next = req->dev.next;
             if (prev)
                 prev->dev.next = next;
             else
@@ -1191,7 +1191,7 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
 #define FUNCNAME pkt_NETMOD_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_netmod_t * const netmod_pkt = (MPID_nem_pkt_netmod_t *)pkt;
@@ -1214,7 +1214,7 @@ fn_exit:
 #define FUNCNAME MPIDI_CH3I_Register_anysource_notification
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPID_Request *rreq), int (*dequeue_fn)(MPID_Request *rreq))
+int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPIR_Request *rreq), int (*dequeue_fn)(MPIR_Request *rreq))
 {
     int mpi_errno = MPI_SUCCESS;
     qn_ent_t *ent;
@@ -1239,7 +1239,7 @@ int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPID_Request *
 #define FUNCNAME MPIDI_CH3I_Anysource_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static void anysource_posted(MPID_Request *rreq)
+static void anysource_posted(MPIR_Request *rreq)
 {
     qn_ent_t *ent = qn_head;
 
@@ -1258,7 +1258,7 @@ static void anysource_posted(MPID_Request *rreq)
 #define FUNCNAME MPIDI_CH3I_Anysource_matched
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int anysource_matched(MPID_Request *rreq)
+static int anysource_matched(MPIR_Request *rreq)
 {
     int matched = FALSE;
     qn_ent_t *ent = qn_head;
@@ -1288,7 +1288,7 @@ static int anysource_matched(MPID_Request *rreq)
 #define FUNCNAME MPIDI_CH3I_Posted_recv_enqueued
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPIDI_CH3I_Posted_recv_enqueued(MPID_Request *rreq)
+void MPIDI_CH3I_Posted_recv_enqueued(MPIR_Request *rreq)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_POSTED_RECV_ENQUEUED);
 
@@ -1354,7 +1354,7 @@ void MPIDI_CH3I_Posted_recv_enqueued(MPID_Request *rreq)
 #define FUNCNAME MPIDI_CH3I_Posted_recv_dequeued
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3I_Posted_recv_dequeued(MPID_Request *rreq)
+int MPIDI_CH3I_Posted_recv_dequeued(MPIR_Request *rreq)
 {
     int local_rank = -1;
     MPIDI_VC_t *vc;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
index 5247d9e..fe31782 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
@@ -18,7 +18,7 @@
 /* MPIDI_CH3I_SendNoncontig - Sends a message by packing
    directly into cells.  The caller must initialize sreq->dev.segment
    as well as segment_first and segment_size. */
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz )
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPIR_Request *sreq, void *header, intptr_t hdr_sz )
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
index 5cfc9b2..3b9ac78 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
@@ -425,7 +425,7 @@ int MPIDI_nem_ckpt_start(void)
     /* send markers to all other processes */
     /* FIXME: we're only handling processes in our pg, so no dynamic connections */
     for (i = 0; i <  MPIDI_Process.my_pg->size; ++i) {
-        MPID_Request *req;
+        MPIR_Request *req;
         MPIDI_VC_t *vc;
         MPIDI_CH3I_VC *vc_ch;
         MPID_PKT_DECL_CAST(upkt, MPID_nem_pkt_ckpt_marker_t, ckpt_pkt);
@@ -528,7 +528,7 @@ fn_fail:
 #define FUNCNAME pkt_ckpt_marker_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **req)
+static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **req)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_ckpt_marker_t * const ckpt_pkt = (MPID_nem_pkt_ckpt_marker_t *)pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
index 318c6a2..7ff1d69 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
@@ -59,7 +59,7 @@ void MPID_nem_dbg_print_vc_sendq(FILE *stream, MPIDI_VC_t *vc);
 #define FCNAME MPL_QUOTE(FUNCNAME)
 void MPID_nem_dbg_print_vc_sendq(FILE *stream, MPIDI_VC_t *vc)
 {
-    MPID_Request * sreq;
+    MPIR_Request * sreq;
     int i;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index fc345d1..f0b016a 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -39,15 +39,15 @@ cvars:
 }
 
 /* request completion actions */
-static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
-static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
-static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
+static int do_cts(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete);
+static int do_send(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete);
+static int do_cookie(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete);
 
 /* packet handlers */
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp);
 
 #undef FUNCNAME
 #define FUNCNAME MPID_nem_lmt_pkthandler_init
@@ -82,7 +82,7 @@ int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int array
 #define FUNCNAME MPID_nem_lmt_RndvSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count,
+int MPID_nem_lmt_RndvSend(MPIR_Request **sreq_p, const void * buf, MPI_Aint count,
                           MPI_Datatype datatype, int dt_contig ATTRIBUTE((unused)),
                           intptr_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
                           int rank, int tag, MPIR_Comm * comm, int context_offset)
@@ -90,7 +90,7 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
     int mpi_errno = MPI_SUCCESS;
     MPID_PKT_DECL_CAST(upkt, MPID_nem_pkt_lmt_rts_t, rts_pkt);
     MPIDI_VC_t *vc;
-    MPID_Request *sreq =*sreq_p;
+    MPIR_Request *sreq =*sreq_p;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_RNDVSEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_RNDVSEND);
@@ -146,7 +146,7 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
 #define FUNCNAME MPID_nem_lmt_RndvRecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPID_Request *rreq)
+int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPIR_Request *rreq)
 {
     int mpi_errno = MPI_SUCCESS;
     int complete = 0;
@@ -180,10 +180,10 @@ int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPID_Request *rreq)
 #define FUNCNAME pkt_RTS_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Request * rreq;
+    MPIR_Request * rreq;
     int found;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
     char *data_buf;
@@ -301,11 +301,11 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
 #define FUNCNAME pkt_CTS_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     MPID_nem_pkt_lmt_cts_t * const cts_pkt = (MPID_nem_pkt_lmt_cts_t *)pkt;
-    MPID_Request *sreq;
-    MPID_Request *rts_sreq;
+    MPIR_Request *sreq;
+    MPIR_Request *rts_sreq;
     char *data_buf;
     intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
@@ -319,7 +319,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
     data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
     data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-    MPID_Request_get_ptr(cts_pkt->sender_req_id, sreq);
+    MPIR_Request_get_ptr(cts_pkt->sender_req_id, sreq);
 
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
     if (MPIR_CVAR_ENABLE_FT) {
@@ -332,9 +332,9 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
     sreq->ch.lmt_data_sz = cts_pkt->data_sz;
 
     /* Release the RTS request if one exists.
-       MPID_Request_fetch_and_clear_rts_sreq() needs to be atomic to
+       MPIR_Request_fetch_and_clear_rts_sreq() needs to be atomic to
        prevent cancel send from cancelling the wrong (future) request.
-       If MPID_Request_fetch_and_clear_rts_sreq() returns a NULL
+       If MPIR_Request_fetch_and_clear_rts_sreq() returns a NULL
        rts_sreq, then MPID_Cancel_send() is responsible for releasing
        the RTS request object. */
     MPIDI_Request_fetch_and_clear_rts_sreq(sreq, &rts_sreq);
@@ -359,7 +359,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
         else
         {
             /* create a recv req and set up to receive the cookie into the sreq's tmp_cookie */
-            MPID_Request *rreq;
+            MPIR_Request *rreq;
 
             MPIU_CHKPMEM_MALLOC(sreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, cts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
             sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = cts_pkt->cookie_len;
@@ -399,17 +399,17 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufle
 #define FUNCNAME pkt_DONE_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_done_t * const done_pkt = (MPID_nem_pkt_lmt_done_t *)pkt;
-    MPID_Request *req;
+    MPIR_Request *req;
     MPIDI_STATE_DECL(MPID_STATE_PKT_DONE_HANDLER);
 
     MPIDI_FUNC_ENTER(MPID_STATE_PKT_DONE_HANDLER);
 
     *buflen = sizeof(MPIDI_CH3_Pkt_t);
-    MPID_Request_get_ptr(done_pkt->req_id, req);
+    MPIR_Request_get_ptr(done_pkt->req_id, req);
 
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
 
@@ -445,11 +445,11 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bufl
 #define FUNCNAME pkt_COOKIE_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_cookie_t * const cookie_pkt = (MPID_nem_pkt_lmt_cookie_t *)pkt;
-    MPID_Request *req;
+    MPIR_Request *req;
     char *data_buf;
     intptr_t data_len;
     MPIU_CHKPMEM_DECL(1);
@@ -461,12 +461,12 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bu
     data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
 
     if (cookie_pkt->from_sender) {
-        MPID_Request_get_ptr(cookie_pkt->receiver_req_id, req);
+        MPIR_Request_get_ptr(cookie_pkt->receiver_req_id, req);
         MPIU_Assert(req != NULL);
         req->ch.lmt_req_id = cookie_pkt->sender_req_id;
     }
     else {
-        MPID_Request_get_ptr(cookie_pkt->sender_req_id, req);
+        MPIR_Request_get_ptr(cookie_pkt->sender_req_id, req);
         MPIU_Assert(req != NULL);
         req->ch.lmt_req_id = cookie_pkt->receiver_req_id;
     }
@@ -491,7 +491,7 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bu
         else
         {
             /* create a recv req and set up to receive the cookie into the rreq's tmp_cookie */
-            MPID_Request *rreq;
+            MPIR_Request *rreq;
 
             MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_fail);
             MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, cookie_pkt->cookie_len, mpi_errno, "tmp cookie buf");
@@ -532,7 +532,7 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *bu
 #define FUNCNAME do_cts
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
+static int do_cts(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
     intptr_t data_sz;
@@ -581,11 +581,11 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
 #define FUNCNAME do_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
+static int do_send(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
     MPL_IOV r_cookie;
-    MPID_Request * const sreq = rreq->ch.lmt_req;
+    MPIR_Request * const sreq = rreq->ch.lmt_req;
     MPIDI_STATE_DECL(MPID_STATE_DO_SEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_DO_SEND);
@@ -614,11 +614,11 @@ static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
 #define FUNCNAME do_cookie
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
+static int do_cookie(MPIDI_VC_t *vc, MPIR_Request *rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
     MPL_IOV cookie;
-    MPID_Request *req = rreq->ch.lmt_req;
+    MPIR_Request *req = rreq->ch.lmt_req;
     MPIDI_STATE_DECL(MPID_STATE_DO_COOKIE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_DO_COOKIE);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
index f0d39e2..4952eec 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
@@ -48,7 +48,7 @@ static volatile knem_status_t *knem_status = MAP_FAILED;
 struct lmt_dma_node {
     struct lmt_dma_node *next;
     MPIDI_VC_t *vc; /* seems like this should be in the request somewhere, but it's not */
-    MPID_Request *req; /* do we need to store type too? */
+    MPIR_Request *req; /* do we need to store type too? */
     volatile knem_status_t *status_p;
 };
 
@@ -113,7 +113,7 @@ fn_fail:
 #define FUNCNAME do_dma_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int do_dma_send(MPIDI_VC_t *vc,  MPID_Request *sreq, int send_iov_n,
+static int do_dma_send(MPIDI_VC_t *vc,  MPIR_Request *sreq, int send_iov_n,
                        MPL_IOV send_iov[], knem_cookie_t *s_cookiep)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -228,7 +228,7 @@ fn_fail:
 #define FUNCNAME send_sreq_data
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_cookiep)
+static int send_sreq_data(MPIDI_VC_t *vc, MPIR_Request *sreq, knem_cookie_t *s_cookiep)
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
@@ -293,10 +293,10 @@ fn_fail:
 #define FUNCNAME check_req_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int check_req_complete(MPIDI_VC_t *vc, MPID_Request *req, int *complete)
+static inline int check_req_complete(MPIDI_VC_t *vc, MPIR_Request *req, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     reqFn = req->dev.OnDataAvail;
     if (reqFn) {
         *complete = 0;
@@ -320,7 +320,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_initiate_lmt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Request *sreq)
+int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
@@ -351,7 +351,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_start_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_cookie)
+int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int nodma;
@@ -462,11 +462,11 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_done_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPID_Request *sreq)
+int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     int complete = 0;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_DONE_SEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_DONE_SEND);
@@ -515,7 +515,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_handle_cookie
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
+int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE);
@@ -689,7 +689,7 @@ int MPID_nem_lmt_dma_vc_terminated(MPIDI_VC_t *vc)
 #define FUNCNAME MPID_nem_lmt_dma_start_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie)
+int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_START_SEND);
@@ -705,7 +705,7 @@ int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_coo
 #define FUNCNAME MPID_nem_lmt_dma_done_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPID_Request *rreq)
+int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPIR_Request *rreq)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_DONE_RECV);
 
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
index 6661cce..47bd392 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
@@ -33,8 +33,8 @@ static struct {lmt_shm_prog_element_t *head;} lmt_shm_progress_q = {NULL};
 
 typedef struct MPID_nem_lmt_shm_wait_element
 {
-    int (* progress)(MPIDI_VC_t *vc, MPID_Request *req, int *done);
-    MPID_Request *req;
+    int (* progress)(MPIDI_VC_t *vc, MPIR_Request *req, int *done);
+    MPIR_Request *req;
     struct MPID_nem_lmt_shm_wait_element *next;
 } MPID_nem_lmt_shm_wait_element_t;
 
@@ -106,8 +106,8 @@ typedef struct MPID_nem_copy_buf
 
 
 static inline int lmt_shm_progress_vc(MPIDI_VC_t *vc, int *done);
-static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done);
-static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done);
+static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done);
+static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done);
 static int MPID_nem_allocate_shm_region(MPID_nem_copy_buf_t **buf_p, MPIU_SHMW_Hnd_t handle);
 static int MPID_nem_attach_shm_region(MPID_nem_copy_buf_t **buf_p, MPIU_SHMW_Hnd_t handle);
 static int MPID_nem_detach_shm_region(MPID_nem_copy_buf_t **buf, MPIU_SHMW_Hnd_t handle);
@@ -120,7 +120,7 @@ static int MPID_nem_delete_shm_region(MPID_nem_copy_buf_t **buf, MPIU_SHMW_Hnd_t
 #define FUNCNAME MPID_nem_lmt_shm_initiate_lmt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Request *req)
+int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *req)
 {
     int mpi_errno = MPI_SUCCESS;
     intptr_t data_sz;
@@ -161,7 +161,7 @@ int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Req
 #define FUNCNAME MPID_nem_lmt_shm_start_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie)
+int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int done = FALSE;
@@ -241,7 +241,7 @@ int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_coo
 #define FUNCNAME MPID_nem_lmt_shm_start_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie)
+int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int done = FALSE;
@@ -338,7 +338,7 @@ static int get_next_req(MPIDI_VC_t *vc)
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
     int prev_owner_rank;
-    MPID_Request *req;
+    MPIR_Request *req;
     MPIDI_STATE_DECL(MPID_STATE_GET_NEXT_REQ);
 
     MPIDI_FUNC_ENTER(MPID_STATE_GET_NEXT_REQ);
@@ -440,7 +440,7 @@ static int get_next_req(MPIDI_VC_t *vc)
 #define FUNCNAME lmt_shm_send_progress
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
+static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
@@ -532,7 +532,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 #define FUNCNAME lmt_shm_recv_progress
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
+static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPIR_Request *req, int *done)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
@@ -666,7 +666,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 #define FUNCNAME MPID_nem_lmt_shm_handle_cookie
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
+int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_HANDLE_COOKIE);
 
@@ -680,7 +680,7 @@ int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV co
 #define FUNCNAME MPID_nem_lmt_shm_done_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPID_Request *req)
+int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPIR_Request *req)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_DONE_SEND);
 
@@ -694,7 +694,7 @@ int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPID_Request *req)
 #define FUNCNAME MPID_nem_lmt_shm_done_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPID_Request *req)
+int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPIR_Request *req)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_DONE_RECV);
 
@@ -814,7 +814,7 @@ int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc)
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_lmt_shm_wait_element_t *we;
     int req_errno = MPI_SUCCESS;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_VC_TERMINATED);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_SHM_VC_TERMINATED);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
index d8f1909..a8b21c6 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
@@ -24,7 +24,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 struct lmt_vmsplice_node {
     struct lmt_vmsplice_node *next;
     int pipe_fd;
-    MPID_Request *req;
+    MPIR_Request *req;
 };
 
 /* MT: this stack is not thread-safe */
@@ -58,10 +58,10 @@ static int adjust_partially_xferred_iov(MPL_IOV iov[], int *iov_offset,
     return complete;
 }
 
-static inline int check_req_complete(MPIDI_VC_t *vc, MPID_Request *req, int *complete)
+static inline int check_req_complete(MPIDI_VC_t *vc, MPIR_Request *req, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     reqFn = req->dev.OnDataAvail;
     if (reqFn) {
         *complete = 0;
@@ -87,7 +87,7 @@ fn_fail:
 
 /* fills in req->dev.iov{,_offset,_count} based on the datatype info in the
    request, creating a segment if necessary */
-static int populate_iov_from_req(MPID_Request *req)
+static int populate_iov_from_req(MPIR_Request *req)
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
@@ -135,7 +135,7 @@ fn_fail:
     return mpi_errno;
 }
 
-static int do_vmsplice(MPID_Request *sreq, int pipe_fd, MPL_IOV iov[],
+static int do_vmsplice(MPIR_Request *sreq, int pipe_fd, MPL_IOV iov[],
                        int *iov_offset, int *iov_count, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -175,7 +175,7 @@ fn_exit:
 #define FUNCNAME MPID_nem_lmt_vmsplice_initiate_lmt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Request *sreq)
+int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
@@ -216,7 +216,7 @@ fn_exit:
     return mpi_errno;
 }
 
-static int do_readv(MPID_Request *rreq, int pipe_fd, MPL_IOV iov[],
+static int do_readv(MPIR_Request *rreq, int pipe_fd, MPL_IOV iov[],
                     int *iov_offset, int *iov_count, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -255,7 +255,7 @@ fn_exit:
 #define FUNCNAME MPID_nem_lmt_vmsplice_start_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_cookie)
+int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPIR_Request *rreq, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
@@ -377,14 +377,14 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_vmsplice_start_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie)
+int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPIR_Request *sreq, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND);
     int pipe_fd;
     int complete;
     struct lmt_vmsplice_node *node = NULL;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND);
@@ -455,7 +455,7 @@ int MPIDI_CH3_MPID_nem_lmt_vmsplice_vc_terminated(MPIDI_VC_t *vc)
 #define FUNCNAME MPID_nem_lmt_vmsplice_done_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPID_Request *rreq)
+int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPIR_Request *rreq)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_RECV);
 
@@ -471,7 +471,7 @@ int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPID_Request *rreq)
 #define FUNCNAME MPID_nem_lmt_vmsplice_done_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *sreq)
+int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPIR_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_DONE_SEND);
@@ -489,7 +489,7 @@ int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *sreq)
 #define FUNCNAME MPID_nem_lmt_vmsplice_handle_cookie
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
+int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPIR_Request *req, MPL_IOV cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_HANDLE_COOKIE);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index 401f7e4..dafd598 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -79,13 +79,13 @@ fn_fail:
 #define FUNCNAME MPID_nem_send_iov
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPL_IOV *iov, int n_iov)
+int MPID_nem_send_iov(MPIDI_VC_t *vc, MPIR_Request **sreq_ptr, MPL_IOV *iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
     intptr_t data_sz;
     int i;
     int iov_data_copied;
-    MPID_Request *sreq = *sreq_ptr;
+    MPIR_Request *sreq = *sreq_ptr;
     MPL_IOV *data_iov = &iov[1]; /* iov of just the data, not the header */
     int data_n_iov = n_iov - 1;
 
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
index 2cbc297..884b799 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
@@ -50,7 +50,7 @@
     /* MT - not thread safe! */
 #define MPIDI_CH3I_SendQ_dequeue(vcch)					\
 {									\
-    MPID_Request *req_ = vcch->sendq_head;                              \
+    MPIR_Request *req_ = vcch->sendq_head;                              \
     MPL_DBG_MSG(MPIDI_CH3_DBG_MSG,TYPICAL,"Dequeuing this request");\
     vcch->sendq_head = vcch->sendq_head->dev.next;			\
     if (vcch->sendq_head == NULL)					\
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
index df35084..a7a4ded 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
@@ -46,8 +46,8 @@ MPIDI_CH3I_VC_state_t;
 /* channel-specific fields for the VC structure */
 typedef struct MPIDI_CH3I_VC
 {
-    struct MPID_Request * sendq_head;
-    struct MPID_Request * sendq_tail;
+    struct MPIR_Request * sendq_head;
+    struct MPIR_Request * sendq_tail;
     MPIDI_CH3I_VC_state_t state;
     struct MPIDU_Sock *sock;
     struct MPIDI_CH3I_Connection * conn;
@@ -57,7 +57,7 @@ MPIDI_CH3I_VC;
 #define MPIDI_CH3_VC_DECL struct MPIDI_CH3I_VC ch;
 
 /*
- * MPIDI_CH3_REQUEST_DECL (additions to MPID_Request)
+ * MPIDI_CH3_REQUEST_DECL (additions to MPIR_Request)
  * The socket channel makes no additions
  */
 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isend.c b/src/mpid/ch3/channels/sock/src/ch3_isend.c
index 3773855..d354f87 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c
@@ -10,7 +10,7 @@
 #define FUNCNAME update_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static void update_request(MPID_Request * sreq, void * hdr, 
+static void update_request(MPIR_Request * sreq, void * hdr,
 			   intptr_t hdr_sz, MPIU_Size_t nb)
 {
     MPIDI_STATE_DECL(MPID_STATE_UPDATE_REQUEST);
@@ -28,11 +28,11 @@ static void update_request(MPID_Request * sreq, void * hdr,
 #define FUNCNAME MPIDI_CH3_iSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr, 
+int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPIR_Request * sreq, void * hdr,
 		    intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     MPIDI_CH3I_VC *vcch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISEND);
 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isendv.c b/src/mpid/ch3/channels/sock/src/ch3_isendv.c
index 090991d..afba188 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isendv.c
@@ -10,7 +10,7 @@
 #define FUNCNAME update_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static void update_request(MPID_Request * sreq, MPL_IOV * iov, int iov_count,
+static void update_request(MPIR_Request * sreq, MPL_IOV * iov, int iov_count,
 			   int iov_offset, MPIU_Size_t nb)
 {
     int i;
@@ -40,12 +40,12 @@ static void update_request(MPID_Request * sreq, MPL_IOV * iov, int iov_count,
 #define FUNCNAME MPIDI_CH3_iSendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, 
+int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPIR_Request * sreq,
 		     MPL_IOV * iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3I_VC *vcch = &vc->ch;
-    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISENDV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_ISENDV);
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index c9cd240..882d4cf 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -10,10 +10,10 @@
 #define FUNCNAME create_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static MPID_Request * create_request(void * hdr, intptr_t hdr_sz,
+static MPIR_Request * create_request(void * hdr, intptr_t hdr_sz,
 				     MPIU_Size_t nb)
 {
-    MPID_Request * sreq;
+    MPIR_Request * sreq;
     MPIDI_STATE_DECL(MPID_STATE_CREATE_REQUEST);
 
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_REQUEST);
@@ -50,9 +50,9 @@ static MPID_Request * create_request(void * hdr, intptr_t hdr_sz,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
-			MPID_Request ** sreq_ptr)
+			MPIR_Request ** sreq_ptr)
 {
-    MPID_Request * sreq = NULL;
+    MPIR_Request * sreq = NULL;
     MPIDI_CH3I_VC *vcch = &vc->ch;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSG);
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index c316179..07214bb 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -10,10 +10,10 @@
 #define FUNCNAME create_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static MPID_Request * create_request(MPL_IOV * iov, int iov_count, 
+static MPIR_Request * create_request(MPL_IOV * iov, int iov_count,
 				     int iov_offset, MPIU_Size_t nb)
 {
-    MPID_Request * sreq;
+    MPIR_Request * sreq;
     int i;
     MPIDI_STATE_DECL(MPID_STATE_CREATE_REQUEST);
 
@@ -74,9 +74,9 @@ static MPID_Request * create_request(MPL_IOV * iov, int iov_count,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov, 
-			 MPID_Request ** sreq_ptr)
+			 MPIR_Request ** sreq_ptr)
 {
-    MPID_Request * sreq = NULL;
+    MPIR_Request * sreq = NULL;
     MPIDI_CH3I_VC *vcch = &vc->ch;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSGV);
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index 9ff94a5..67d2dd4 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -15,7 +15,7 @@
 
 static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3+1];
 
-static int ReadMoreData( MPIDI_CH3I_Connection_t *, MPID_Request * );
+static int ReadMoreData( MPIDI_CH3I_Connection_t *, MPIR_Request * );
 
 static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * );
 static int MPIDI_CH3i_Progress_test(void);
@@ -467,7 +467,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
                 break;
             }
 		
-	    MPID_Request * rreq = conn->recv_active;
+	    MPIR_Request * rreq = conn->recv_active;
 
 	    /* --BEGIN ERROR HANDLING-- */
 	    if (event->error != MPI_SUCCESS)
@@ -516,7 +516,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
 		}
 		else /* incoming data */
 		{
-		    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+		    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 		    int complete;
 
 		    reqFn = rreq->dev.OnDataAvail;
@@ -577,8 +577,8 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
 		
 	    if (conn->send_active)
 	    {
-		MPID_Request * sreq = conn->send_active;
-		int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+		MPIR_Request * sreq = conn->send_active;
+		int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 		int complete;
 
 		reqFn = sreq->dev.OnDataAvail;
@@ -877,7 +877,7 @@ static int adjust_iov(MPL_IOV ** iovp, int * countp, MPIU_Size_t nb)
 /* end adjust_iov() */
 
 
-static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPID_Request *rreq )
+static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPIR_Request *rreq )
 {
     int mpi_errno = MPI_SUCCESS;
     
@@ -903,7 +903,7 @@ static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPID_Request *rreq )
 		  conn->vc, nb, rreq->handle));
 				
 	if (nb > 0 && adjust_iov(&iovp, &rreq->dev.iov_count, nb)) {
-	    int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
+	    int (*reqFn)(MPIDI_VC_t *, MPIR_Request *, int *);
 	    int complete;
 	    
 	    reqFn = rreq->dev.OnDataAvail;
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index 26924cd..8210bdb 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -221,14 +221,14 @@ static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
 static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
                                     void *ext_hdr_ptr, MPI_Aint ext_hdr_sz,
                                     intptr_t stream_offset, intptr_t stream_size,
-                                    MPID_Request ** req_ptr)
+                                    MPIR_Request ** req_ptr)
 {
     MPI_Datatype target_datatype;
     MPIDU_Datatype*target_dtp = NULL, *origin_dtp = NULL;
     int is_origin_contig;
     MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt = 0;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     MPI_Aint dt_true_lb;
     MPIDI_CH3_Pkt_flags_t flags;
     int is_empty_origin = FALSE;
@@ -400,7 +400,7 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
     MPIDI_VC_t *vc = NULL;
     MPIR_Comm *comm_ptr = win_ptr->comm_ptr;
     MPIDI_CH3_Pkt_put_t *put_pkt = &rma_op->pkt.put;
-    MPID_Request *curr_req = NULL;
+    MPIR_Request *curr_req = NULL;
     MPI_Datatype target_datatype;
     MPIDU_Datatype*target_dtp_ptr = NULL;
     MPIDI_CH3_Ext_pkt_put_derived_t *ext_hdr_ptr = NULL;
@@ -500,7 +500,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
     MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc);
 
     if (rma_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) {
-        MPID_Request *curr_req = NULL;
+        MPIR_Request *curr_req = NULL;
 
         accum_pkt->flags |= flags;
 
@@ -557,7 +557,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
     MPIU_Assert(rma_op->issued_stream_count >= 0);
     for (j = 0; j < stream_unit_count; j++) {
         intptr_t stream_offset, stream_size;
-        MPID_Request *curr_req = NULL;
+        MPIR_Request *curr_req = NULL;
 
         if (j < rma_op->issued_stream_count)
             continue;
@@ -593,7 +593,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
 
                 if (stream_unit_count > 1) {
                     rma_op->multi_reqs =
-                        (MPID_Request **) MPL_malloc(sizeof(MPID_Request *) * rma_op->reqs_size);
+                        (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size);
                     for (i = 0; i < rma_op->reqs_size; i++)
                         rma_op->multi_reqs[i] = NULL;
                 }
@@ -666,8 +666,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
     MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc);
 
     if (rma_op->pkt.type == MPIDI_CH3_PKT_GET_ACCUM_IMMED) {
-        MPID_Request *resp_req = NULL;
-        MPID_Request *curr_req = NULL;
+        MPIR_Request *resp_req = NULL;
+        MPIR_Request *curr_req = NULL;
 
         get_accum_pkt->flags |= flags;
 
@@ -741,7 +741,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
 
     if (rma_op->reqs_size > 1) {
         rma_op->multi_reqs =
-            (MPID_Request **) MPL_malloc(sizeof(MPID_Request *) * rma_op->reqs_size);
+            (MPIR_Request **) MPL_malloc(sizeof(MPIR_Request *) * rma_op->reqs_size);
         for (i = 0; i < rma_op->reqs_size; i++)
             rma_op->multi_reqs[i] = NULL;
     }
@@ -750,8 +750,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
 
     for (j = 0; j < stream_unit_count; j++) {
         intptr_t stream_offset, stream_size;
-        MPID_Request *resp_req = NULL;
-        MPID_Request *curr_req = NULL;
+        MPIR_Request *resp_req = NULL;
+        MPIR_Request *curr_req = NULL;
 
         if (j < rma_op->issued_stream_count)
             continue;
@@ -884,8 +884,8 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPIR_Win * win_ptr,
     MPIR_Comm *comm_ptr;
     MPIDU_Datatype*dtp;
     MPI_Datatype target_datatype;
-    MPID_Request *req = NULL;
-    MPID_Request *curr_req = NULL;
+    MPIR_Request *req = NULL;
+    MPIR_Request *curr_req = NULL;
     MPIDI_CH3_Ext_pkt_get_derived_t *ext_hdr_ptr = NULL;
     MPI_Aint ext_hdr_sz = 0;
     MPL_IOV iov[MPL_IOV_LIMIT];
@@ -1010,8 +1010,8 @@ static int issue_cas_op(MPIDI_RMA_Op_t * rma_op,
     MPIDI_VC_t *vc = NULL;
     MPIR_Comm *comm_ptr = win_ptr->comm_ptr;
     MPIDI_CH3_Pkt_cas_t *cas_pkt = &rma_op->pkt.cas;
-    MPID_Request *rmw_req = NULL;
-    MPID_Request *curr_req = NULL;
+    MPIR_Request *rmw_req = NULL;
+    MPIR_Request *curr_req = NULL;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_ISSUE_CAS_OP);
 
@@ -1073,8 +1073,8 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     MPIDI_VC_t *vc = NULL;
     MPIR_Comm *comm_ptr = win_ptr->comm_ptr;
     MPIDI_CH3_Pkt_fop_t *fop_pkt = &rma_op->pkt.fop;
-    MPID_Request *resp_req = NULL;
-    MPID_Request *curr_req = NULL;
+    MPIR_Request *resp_req = NULL;
+    MPIR_Request *curr_req = NULL;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_ISSUE_FOP_OP);
 
diff --git a/src/mpid/ch3/include/mpid_rma_types.h b/src/mpid/ch3/include/mpid_rma_types.h
index 4e3b9e4..7036da0 100644
--- a/src/mpid/ch3/include/mpid_rma_types.h
+++ b/src/mpid/ch3/include/mpid_rma_types.h
@@ -44,8 +44,8 @@ typedef struct MPIDI_RMA_Op {
     int result_count;
     MPI_Datatype result_datatype;
 
-    struct MPID_Request *single_req;    /* used for unstreamed RMA ops */
-    struct MPID_Request **multi_reqs;   /* used for streamed RMA ops */
+    struct MPIR_Request *single_req;    /* used for unstreamed RMA ops */
+    struct MPIR_Request **multi_reqs;   /* used for streamed RMA ops */
     MPI_Aint reqs_size;         /* when reqs_size == 0, neither single_req nor multi_reqs is used;
                                  * when reqs_size == 1, single_req is used;
                                  * when reqs_size > 1, multi_reqs is used. */
@@ -59,7 +59,7 @@ typedef struct MPIDI_RMA_Op {
     int issued_stream_count;    /* when >= 0, it specifies number of stream units that have been issued;
                                  * when < 0, it means all stream units of this operation haven been issued. */
 
-    MPID_Request *ureq;
+    MPIR_Request *ureq;
 
 } MPIDI_RMA_Op_t;
 
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 426aa50..8df8a17 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -193,12 +193,12 @@ extern MPIDI_Process_t MPIDI_Process;
   ---------------------*/
 
 /*
- * MPID_Requests
+ * MPIR_Requests
  *
- * MPI Requests are handles to MPID_Request structures.  These are used
+ * MPI Requests are handles to MPIR_Request structures.  These are used
  * for most communication operations to provide a uniform way in which to
  * define pending operations.  As such, they contain many fields that are 
- * only used by some operations (logically, an MPID_Request is a union type).
+ * only used by some operations (logically, an MPIR_Request is a union type).
  *
  * There are several kinds of requests.  They are
  *    Send, Receive, RMA, User, Persistent
@@ -254,7 +254,7 @@ extern MPIDI_Process_t MPIDI_Process;
 
 #  define MPIDI_Request_tls_alloc(req_) \
     do { \
-	(req_) = MPIU_Handle_obj_alloc(&MPID_Request_mem); \
+	(req_) = MPIU_Handle_obj_alloc(&MPIR_Request_mem); \
         MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL,VERBOSE,		\
 	       "allocated request, handle=0x%08x", req_);\
     } while (0)
@@ -619,57 +619,57 @@ struct MPIR_Comm;
 typedef struct MPIDI_Comm_ops
 {
     /* Overriding calls in case of matching-capable interfaces */
-    int (*recv_posted)(struct MPIDI_VC *vc, struct MPID_Request *req);
+    int (*recv_posted)(struct MPIDI_VC *vc, struct MPIR_Request *req);
     
     int (*send)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		int dest, int tag, MPIR_Comm *comm, int context_offset,
-		struct MPID_Request **request);
+		struct MPIR_Request **request);
     int (*rsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		 int dest, int tag, MPIR_Comm *comm, int context_offset,
-		 struct MPID_Request **request);
+		 struct MPIR_Request **request);
     int (*ssend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		 int dest, int tag, MPIR_Comm *comm, int context_offset,
-		 struct MPID_Request **request );
+		 struct MPIR_Request **request );
     int (*isend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		 int dest, int tag, MPIR_Comm *comm, int context_offset,
-		 struct MPID_Request **request );
+		 struct MPIR_Request **request );
     int (*irsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		  int dest, int tag, MPIR_Comm *comm, int context_offset,
-		  struct MPID_Request **request );
+		  struct MPIR_Request **request );
     int (*issend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		  int dest, int tag, MPIR_Comm *comm, int context_offset,
-		  struct MPID_Request **request );
+		  struct MPIR_Request **request );
     
     int (*send_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		     int dest, int tag, MPIR_Comm *comm, int context_offset,
-		     struct MPID_Request **request );
+		     struct MPIR_Request **request );
     int (*bsend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
 		      int dest, int tag, MPIR_Comm *comm, int context_offset,
-		      struct MPID_Request **request);
+		      struct MPIR_Request **request);
     int (*rsend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		      int dest, int tag, MPIR_Comm *comm, int context_offset,
-		      struct MPID_Request **request );
+		      struct MPIR_Request **request );
     int (*ssend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype,
 		      int dest, int tag, MPIR_Comm *comm, int context_offset,
-		      struct MPID_Request **request );
-    int (*startall)(struct MPIDI_VC *vc, int count,  struct MPID_Request *requests[]);
+		      struct MPIR_Request **request );
+    int (*startall)(struct MPIDI_VC *vc, int count,  struct MPIR_Request *requests[]);
     
-    int (*cancel_send)(struct MPIDI_VC *vc,  struct MPID_Request *sreq);
-    int (*cancel_recv)(struct MPIDI_VC *vc,  struct MPID_Request *rreq);
+    int (*cancel_send)(struct MPIDI_VC *vc,  struct MPIR_Request *sreq);
+    int (*cancel_recv)(struct MPIDI_VC *vc,  struct MPIR_Request *rreq);
     
     int (*probe)(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset,
 		                  MPI_Status *status);
     int (*iprobe)(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset,
 		  int *flag, MPI_Status *status);
     int (*improbe)(struct MPIDI_VC *vc,  int source, int tag, MPIR_Comm *comm, int context_offset,
-                   int *flag, MPID_Request **message, MPI_Status *status);
-    int (*imrecv)(struct MPIDI_VC *vc, struct MPID_Request *req);
+                   int *flag, MPIR_Request **message, MPI_Status *status);
+    int (*imrecv)(struct MPIDI_VC *vc, struct MPIR_Request *req);
 } MPIDI_Comm_ops_t;
 
 extern int (*MPIDI_Anysource_iprobe_fn)(int tag, MPIR_Comm * comm, int context_offset, int *flag,
                                         MPI_Status * status);
 extern int (*MPIDI_Anysource_improbe_fn)(int tag, MPIR_Comm * comm, int context_offset,
-                                         int *flag, MPID_Request **message,
+                                         int *flag, MPIR_Request **message,
                                          MPI_Status * status);
 #endif
 
@@ -719,11 +719,11 @@ typedef struct MPIDI_VC
 
     /* rendezvous function pointers.  Called to send a rendevous
        message or when one is matched */
-    int (* rndvSend_fn)( struct MPID_Request **sreq_p, const void * buf, MPI_Aint count,
+    int (* rndvSend_fn)( struct MPIR_Request **sreq_p, const void * buf, MPI_Aint count,
                          MPI_Datatype datatype, int dt_contig, intptr_t data_sz,
                          MPI_Aint dt_true_lb, int rank, int tag,
                          struct MPIR_Comm * comm, int context_offset );
-    int (* rndvRecv_fn)( struct MPIDI_VC * vc, struct MPID_Request *rreq );
+    int (* rndvRecv_fn)( struct MPIDI_VC * vc, struct MPIR_Request *rreq );
 
     /* eager message threshold */
     int eager_max_msg_sz;
@@ -734,7 +734,7 @@ typedef struct MPIDI_VC
        noncontiguous message.  Caller must initialize
        sreq->dev.segment, _first and _size.  Contiguous messages are
        called directly from CH3 and cannot be overridden. */
-    int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPID_Request *sreq,
+    int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPIR_Request *sreq,
 			      void *header, intptr_t hdr_sz );
 
 #ifdef ENABLE_COMM_OVERRIDES
@@ -994,7 +994,7 @@ const char * MPIDI_VC_GetStateString(int);
 
 /* Prototypes for internal device routines */
 int MPIDI_Isend_self(const void *, MPI_Aint, MPI_Datatype, int, int, MPIR_Comm *,
-		     int, int, MPID_Request **);
+		     int, int, MPIR_Request **);
 
 /*--------------------------
   BEGIN MPI PORT SECTION
@@ -1134,20 +1134,20 @@ int MPIDI_CH3I_Progress_finalize(void);
 int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
                    origin_datatype, int target_rank, MPI_Aint target_disp,
                    int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr,
-                   MPID_Request * ureq);
+                   MPIR_Request * ureq);
 int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
                    origin_datatype, int target_rank, MPI_Aint target_disp,
                    int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr,
-                   MPID_Request * ureq);
+                   MPIR_Request * ureq);
 int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
                           origin_datatype, int target_rank, MPI_Aint target_disp,
                           int target_count, MPI_Datatype target_datatype, MPI_Op op,
-                          MPIR_Win * win_ptr, MPID_Request * ureq);
+                          MPIR_Win * win_ptr, MPIR_Request * ureq);
 int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
                               MPI_Datatype origin_datatype, void *result_addr, int result_count,
                               MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
                               int target_count, MPI_Datatype target_datatype, MPI_Op op,
-                              MPIR_Win * win_ptr, MPID_Request * ureq);
+                              MPIR_Win * win_ptr, MPIR_Request * ureq);
 
 /*@
   MPIDI_CH3_Progress_signal_completion - Inform the progress engine that a 
@@ -1285,7 +1285,7 @@ int MPID_PG_BCast( MPIR_Comm *peercomm_p, MPIR_Comm *comm_p, int root );
   NULL.
 @*/
 int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, intptr_t pkt_sz,
-			MPID_Request **sreq_ptr);
+			MPIR_Request **sreq_ptr);
 
 
 /*@
@@ -1318,7 +1318,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, intptr_t pkt_sz,
   NULL.
 @*/
 int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n, 
-			 MPID_Request **sreq_ptr);
+			 MPIR_Request **sreq_ptr);
 
 
 /*@
@@ -1349,7 +1349,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n,
   invoke the OnDataAvail routine in the request, if any; otherwise, is 
   must set the request as complete.
 @*/
-int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt, 
+int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPIR_Request * sreq, void * pkt,
 		    intptr_t pkt_sz);
 
 
@@ -1381,7 +1381,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt,
   If the send completes immediately, the channel implementation still must 
   call the OnDataAvail routine in the request, if any.
 @*/
-int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, MPL_IOV * iov, 
+int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPIR_Request * sreq, MPL_IOV * iov,
 		     int iov_n);
 
 /*@
@@ -1406,35 +1406,35 @@ int MPIDI_CH3_Connect_to_root(const char *, MPIDI_VC_t **);
  */
 int MPIDI_CH3U_Recvq_init(void);
 int MPIDI_CH3U_Recvq_FU(int, int, int, MPI_Status * );
-MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request, MPIDI_Message_match *);
-MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_id, MPIR_Comm *comm,
+MPIR_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request, MPIDI_Message_match *);
+MPIR_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_id, MPIR_Comm *comm,
                                    int *foundp);
-MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, 
+MPIR_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
                                           int context_id, MPIR_Comm *comm, void *user_buf,
                                            MPI_Aint user_count, MPI_Datatype datatype, int * foundp);
-int MPIDI_CH3U_Recvq_DP(MPID_Request * rreq);
-MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match, 
+int MPIDI_CH3U_Recvq_DP(MPIR_Request * rreq);
+MPIR_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
 					   int * found);
 int MPIDI_CH3U_Recvq_count_unexp(void);
 int MPIDI_CH3U_Complete_posted_with_error(MPIDI_VC_t *vc);
 int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr);
 
 
-int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq, 
+int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq,
 				     MPL_IOV * const iov, int * const iov_n);
-int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq);
-int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq);
-int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);
+int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq);
+int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq);
+int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq);
 
 void MPIDI_CH3U_Buffer_copy(const void * const sbuf, MPI_Aint scount,
 			    MPI_Datatype sdt, int * smpi_errno,
 			    void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt,
 			    intptr_t * rdata_sz, int * rmpi_errno);
-int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp);
-int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp);
-int MPIDI_CH3U_Post_data_receive_unexpected(MPID_Request * rreqp);
-int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *buflen, int *complete);
-int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, intptr_t *buflen, int *complete);
+int MPIDI_CH3U_Post_data_receive(int found, MPIR_Request ** rreqp);
+int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreqp);
+int MPIDI_CH3U_Post_data_receive_unexpected(MPIR_Request * rreqp);
+int MPIDI_CH3U_Receive_data_found(MPIR_Request *rreq, char *buf, intptr_t *buflen, int *complete);
+int MPIDI_CH3U_Receive_data_unexpected(MPIR_Request * rreq, char *buf, intptr_t *buflen, int *complete);
 
 /* Initialization routine for ch3u_comm.c */
 int MPIDI_CH3I_Comm_init(void);
@@ -1458,7 +1458,7 @@ int MPIDI_CH3U_Comm_register_destroy_hook(int (*hook_fn)(struct MPIR_Comm *, voi
   Input Parameters:
 . req - pointer to the request object
 @*/
-void MPIDI_CH3_Request_add_ref(MPID_Request * req);
+void MPIDI_CH3_Request_add_ref(MPIR_Request * req);
 #endif
 
 /*@
@@ -1542,7 +1542,7 @@ int MPIDI_CH3_Get_business_card(int myRank, char *value, int length);
   if the channel has made guarantees about ordering.
 E*/
 int MPIDI_CH3U_Handle_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, 
-			       intptr_t *buflen, MPID_Request ** rreqp);
+			       intptr_t *buflen, MPIR_Request ** rreqp);
 
 /*@
   MPIDI_CH3U_Handle_recv_req - Process a receive request for which all of the 
@@ -1556,13 +1556,13 @@ int MPIDI_CH3U_Handle_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
   Output Parameter:
 . complete - data transfer for the request has completed
 @*/
-int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPID_Request * rreq, 
+int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPIR_Request * rreq,
 			       int * complete);
 
 /* Handle_send_req invokes the action (method/function) when data 
    becomes available.  It is an obsolete routine; the completion 
    function should be invoked directly.  */
-int MPIDI_CH3U_Handle_send_req(MPIDI_VC_t * vc, MPID_Request * sreq, 
+int MPIDI_CH3U_Handle_send_req(MPIDI_VC_t * vc, MPIR_Request * sreq,
 			       int *complete);
 
 int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event);
@@ -1672,69 +1672,69 @@ int MPIDI_GetTagFromPort( const char *, int * );
 
 /* Here are the packet handlers */
 int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				   intptr_t *, MPID_Request ** );
+				   intptr_t *, MPIR_Request ** );
 #ifdef USE_EAGER_SHORT
 int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					 intptr_t *, MPID_Request ** );
+					 intptr_t *, MPIR_Request ** );
 #endif
 int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				    intptr_t *, MPID_Request ** );
+				    intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					intptr_t *, MPID_Request ** );
+					intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				       intptr_t *, MPID_Request ** );
+				       intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					intptr_t *, MPID_Request ** );
+					intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					intptr_t *, MPID_Request ** );
+					intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				   intptr_t *, MPID_Request ** );
+				   intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					intptr_t *, MPID_Request ** );
+					intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					 intptr_t *, MPID_Request ** );
+					 intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      intptr_t *, MPID_Request ** );
+			      intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				     intptr_t *, MPID_Request ** );
+				     intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_GetAccumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                        intptr_t *, MPID_Request ** );
+                                        intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                              intptr_t *, MPID_Request ** );
+                              intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_CASResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                  intptr_t *, MPID_Request ** );
+                                  intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                              intptr_t *, MPID_Request ** );
+                              intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_FOPResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                  intptr_t *, MPID_Request ** );
+                                  intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                        intptr_t *, MPID_Request ** );
+                                        intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      intptr_t *, MPID_Request ** );
+			      intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_GetResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				 intptr_t *, MPID_Request ** );
+				 intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Lock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      intptr_t *, MPID_Request ** );
+			      intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_LockAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-				      intptr_t *, MPID_Request ** );
+				      intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_LockOpAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                    intptr_t *, MPID_Request ** );
+                                    intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                 intptr_t *, MPID_Request ** );
+                                 intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                intptr_t *, MPID_Request ** );
+                                intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Ack( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                              intptr_t *, MPID_Request ** );
+                              intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_DecrAtCnt( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                    intptr_t *, MPID_Request ** );
+                                    intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					 intptr_t *, MPID_Request ** );
+					 intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				intptr_t *, MPID_Request ** );
+				intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-				 intptr_t *, MPID_Request ** );
+				 intptr_t *, MPIR_Request ** );
 int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                intptr_t *buflen, MPID_Request **rreqp);
+                                intptr_t *buflen, MPIR_Request **rreqp);
 int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *[], int );
 
 int MPIDI_CH3I_RMA_Make_progress_global(int *made_progress);
@@ -1752,82 +1752,82 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt );
 #endif
 
 /* Routines to create packets (used in implementing MPI communications */
-int MPIDI_CH3_EagerNoncontigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
+int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t,
 				  const void *, MPI_Aint,
 				  MPI_Datatype, intptr_t, int, int, MPIR_Comm *,
 				  int );
-int MPIDI_CH3_EagerContigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
+int MPIDI_CH3_EagerContigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t,
 			       const void *, intptr_t, int,
 			       int, MPIR_Comm *, int );
-int MPIDI_CH3_EagerContigShortSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
+int MPIDI_CH3_EagerContigShortSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t,
 				    const void *, intptr_t,
 				    int, int, MPIR_Comm *, int );
-int MPIDI_CH3_EagerContigIsend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
+int MPIDI_CH3_EagerContigIsend( MPIR_Request **, MPIDI_CH3_Pkt_type_t,
 				const void *, intptr_t, int,
 				int, MPIR_Comm *, int );
 
 
-int MPIDI_CH3_RndvSend( MPID_Request **, const void *, MPI_Aint, MPI_Datatype,
+int MPIDI_CH3_RndvSend( MPIR_Request **, const void *, MPI_Aint, MPI_Datatype,
 			int, intptr_t, MPI_Aint, int, int, MPIR_Comm *, int );
 
-int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **, const void *, int, 
+int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **, const void *, int,
 				      MPI_Datatype, intptr_t, int, MPI_Aint,
 				      int, int, MPIR_Comm *, int );
-int MPIDI_CH3_EagerSyncZero(MPID_Request **, int, int, MPIR_Comm *, int );
+int MPIDI_CH3_EagerSyncZero(MPIR_Request **, int, int, MPIR_Comm *, int );
 
-int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPID_Request *sreq,
+int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPIR_Request *sreq,
                                  void *header, intptr_t hdr_sz );
 
 /* Routines to ack packets, called in the receive routines when a 
    message is matched */
-int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *, MPID_Request * );
-int MPIDI_CH3_RecvFromSelf( MPID_Request *, void *, MPI_Aint, MPI_Datatype );
-int MPIDI_CH3_RecvRndv( MPIDI_VC_t *, MPID_Request * );
+int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *, MPIR_Request * );
+int MPIDI_CH3_RecvFromSelf( MPIR_Request *, void *, MPI_Aint, MPI_Datatype );
+int MPIDI_CH3_RecvRndv( MPIDI_VC_t *, MPIR_Request * );
 
 /* Handler routines to continuing after an IOV is processed (assigned to the
    OnDataAvail field in the device part of a request) */
-int MPIDI_CH3_ReqHandler_RecvComplete( MPIDI_VC_t *, MPID_Request *, int * );
-int MPIDI_CH3_ReqHandler_UnpackUEBufComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_RecvComplete( MPIDI_VC_t *, MPIR_Request *, int * );
+int MPIDI_CH3_ReqHandler_UnpackUEBufComplete( MPIDI_VC_t *, MPIR_Request *,
 					      int * );
-int MPIDI_CH3_ReqHandler_ReloadIOV( MPIDI_VC_t *, MPID_Request *, int * );
+int MPIDI_CH3_ReqHandler_ReloadIOV( MPIDI_VC_t *, MPIR_Request *, int * );
 
-int MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV( MPIDI_VC_t *, MPIR_Request *,
 					       int * );
-int MPIDI_CH3_ReqHandler_UnpackSRBufComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_UnpackSRBufComplete( MPIDI_VC_t *, MPIR_Request *,
 					      int * );
 int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete( MPIDI_VC_t *,
-						   MPID_Request *, int * );
-int MPIDI_CH3_ReqHandler_PutRecvComplete( MPIDI_VC_t *, MPID_Request *,
+						   MPIR_Request *, int * );
+int MPIDI_CH3_ReqHandler_PutRecvComplete( MPIDI_VC_t *, MPIR_Request *,
                                           int * );
-int MPIDI_CH3_ReqHandler_AccumRecvComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_AccumRecvComplete( MPIDI_VC_t *, MPIR_Request *,
                                             int * );
-int MPIDI_CH3_ReqHandler_GaccumRecvComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_GaccumRecvComplete( MPIDI_VC_t *, MPIR_Request *,
                                              int * );
-int MPIDI_CH3_ReqHandler_FOPRecvComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_FOPRecvComplete( MPIDI_VC_t *, MPIR_Request *,
                                           int * );
 int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete( MPIDI_VC_t *,
-                                                    MPID_Request *,
+                                                    MPIR_Request *,
                                                     int * );
 int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete( MPIDI_VC_t *,
-                                                     MPID_Request *,
+                                                     MPIR_Request *,
                                                      int * );
 int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete( MPIDI_VC_t *,
-						   MPID_Request *, int * );
+						   MPIR_Request *, int * );
 int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete( MPIDI_VC_t *,
-                                                      MPID_Request *, int * );
+                                                      MPIR_Request *, int * );
 /* Send Handlers */
-int MPIDI_CH3_ReqHandler_SendReloadIOV( MPIDI_VC_t *vc, MPID_Request *sreq, 
+int MPIDI_CH3_ReqHandler_SendReloadIOV( MPIDI_VC_t *vc, MPIR_Request *sreq,
 					int *complete );
-int MPIDI_CH3_ReqHandler_GetSendComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_GetSendComplete( MPIDI_VC_t *, MPIR_Request *,
                                           int * );
-int MPIDI_CH3_ReqHandler_GaccumSendComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_GaccumSendComplete( MPIDI_VC_t *, MPIR_Request *,
                                              int * );
-int MPIDI_CH3_ReqHandler_CASSendComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_CASSendComplete( MPIDI_VC_t *, MPIR_Request *,
                                           int * );
-int MPIDI_CH3_ReqHandler_FOPSendComplete( MPIDI_VC_t *, MPID_Request *,
+int MPIDI_CH3_ReqHandler_FOPSendComplete( MPIDI_VC_t *, MPIR_Request *,
                                           int * );
 /* RMA operation request handler */
-int MPIDI_CH3_Req_handler_rma_op_complete(MPID_Request *);
+int MPIDI_CH3_Req_handler_rma_op_complete(MPIR_Request *);
 
 #define MPIDI_CH3_GET_EAGER_THRESHOLD(eager_threshold_p, comm, vc)  \
     do {                                                            \
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 9847619..16045fe 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -10,8 +10,8 @@
 #if !defined(MPICH_MPIDPRE_H_INCLUDED)
 #define MPICH_MPIDPRE_H_INCLUDED
 
-/* Tell the compiler that we're going to declare struct MPID_Request later */
-struct MPID_Request;
+/* Tell the compiler that we're going to declare struct MPIR_Request later */
+struct MPIR_Request;
 
 #if defined(HAVE_SYS_TYPES_H)
 #include <sys/types.h>
@@ -32,7 +32,7 @@ struct MPID_Request;
 
 union MPIDI_CH3_Pkt;
 struct MPIDI_VC;
-struct MPID_Request;
+struct MPIR_Request;
 
 /* PktHandler function:
    vc  (INPUT) -- vc on which the packet was received
@@ -46,7 +46,7 @@ struct MPID_Request;
    (This decl needs to come before mpidi_ch3_pre.h)
 */
 typedef int MPIDI_CH3_PktHandler_Fcn(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
-				     intptr_t *buflen, struct MPID_Request **req );
+				     intptr_t *buflen, struct MPIR_Request **req );
 
 /* Include definitions from the channel which must exist before items in this 
    file (mpidpre.h) or the file it includes (mpiimpl.h) can be defined. */
@@ -398,7 +398,7 @@ typedef struct MPIDI_Request {
        For example, when an operation described by an iov has 
        completed.  This replaces the MPIDI_CA_t (completion action)
        field used through MPICH 1.0.4. */
-    int (*OnDataAvail)( struct MPIDI_VC *, struct MPID_Request *, int * );
+    int (*OnDataAvail)( struct MPIDI_VC *, struct MPIR_Request *, int * );
     /* OnFinal is used in the following case:
        OnDataAvail is set to a function, and that function has processed
        all of the data.  At that point, the OnDataAvail function can
@@ -407,7 +407,7 @@ typedef struct MPIDI_Request {
        as a get-response) when processing of the non-contiguous data 
        completes. This value need not be initialized unless OnDataAvail
        is set to a non-null value (and then only in certain cases) */
-    int (*OnFinal)( struct MPIDI_VC *, struct MPID_Request *, int * );
+    int (*OnFinal)( struct MPIDI_VC *, struct MPIR_Request *, int * );
 
     /* tmpbuf and tmpbuf_sz describe temporary storage used for things like 
        unexpected eager messages and packing/unpacking
@@ -464,7 +464,7 @@ typedef struct MPIDI_Request {
        Question: do we want to make this a link instead of reserving 
        a fixed spot in the request? */
     MPIDI_CH3_Pkt_t pending_pkt;
-    struct MPID_Request * next;
+    struct MPIR_Request * next;
 } MPIDI_Request;
 #define MPIR_REQUEST_DECL MPIDI_Request dev;
 
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index bb030fe..325682d 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -22,7 +22,7 @@ static inline int send_lock_msg(int dest, int lock_type, MPIR_Win * win_ptr)
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_lock_t *lock_pkt = &upkt.lock;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     MPIDI_VC_t *vc;
     MPIDI_STATE_DECL(MPID_STATE_SEND_LOCK_MSG);
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_SEND_LOCK_MSG);
@@ -69,7 +69,7 @@ static inline int send_unlock_msg(int dest, MPIR_Win * win_ptr, MPIDI_CH3_Pkt_fl
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_unlock_t *unlock_pkt = &upkt.unlock;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     MPIDI_VC_t *vc;
     MPIDI_STATE_DECL(MPID_STATE_SEND_UNLOCK_MSG);
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_SEND_UNLOCK_MSG);
@@ -115,7 +115,7 @@ static inline int MPIDI_CH3I_Send_lock_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_p
 {
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_lock_ack_t *lock_ack_pkt = &upkt.lock_ack;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     int mpi_errno;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_LOCK_ACK_PKT);
 
@@ -162,7 +162,7 @@ static inline int MPIDI_CH3I_Send_lock_op_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * wi
 {
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_lock_op_ack_t *lock_op_ack_pkt = &upkt.lock_op_ack;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     int mpi_errno;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_LOCK_OP_ACK_PKT);
 
@@ -207,7 +207,7 @@ static inline int MPIDI_CH3I_Send_ack_pkt(MPIDI_VC_t * vc, MPIR_Win * win_ptr,
 {
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_ack_t *ack_pkt = &upkt.ack;
-    MPID_Request *req;
+    MPIR_Request *req;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_ACK_PKT);
 
@@ -244,7 +244,7 @@ static inline int send_decr_at_cnt_msg(int dst, MPIR_Win * win_ptr, MPIDI_CH3_Pk
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_decr_at_counter_t *decr_at_cnt_pkt = &upkt.decr_at_cnt;
     MPIDI_VC_t *vc;
-    MPID_Request *request = NULL;
+    MPIR_Request *request = NULL;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_SEND_DECR_AT_CNT_MSG);
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_SEND_DECR_AT_CNT_MSG);
@@ -286,7 +286,7 @@ static inline int send_flush_msg(int dest, MPIR_Win * win_ptr)
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_flush_t *flush_pkt = &upkt.flush;
-    MPID_Request *req = NULL;
+    MPIR_Request *req = NULL;
     MPIDI_VC_t *vc;
     MPIDI_STATE_DECL(MPID_STATE_SEND_FLUSH_MSG);
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_SEND_FLUSH_MSG);
@@ -320,7 +320,7 @@ static inline int send_flush_msg(int dest, MPIR_Win * win_ptr)
 /* enqueue an unsatisfied origin in passive target at target side. */
 static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
                                       MPIDI_CH3_Pkt_t * pkt,
-                                      intptr_t * buflen, MPID_Request ** reqp)
+                                      intptr_t * buflen, MPIR_Request ** reqp)
 {
     MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
     MPIDI_CH3_Pkt_flags_t flag;
@@ -357,7 +357,7 @@ static inline int enqueue_lock_origin(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
         MPI_Aint type_extent;
         intptr_t recv_data_sz = 0;
         intptr_t buf_size = 0;
-        MPID_Request *req = NULL;
+        MPIR_Request *req = NULL;
         MPI_Datatype target_dtp;
         int target_count;
         int complete = 0;
@@ -645,7 +645,7 @@ static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Tar
 {
     int i, mpi_errno = MPI_SUCCESS;
     int incomplete_req_cnt = 0;
-    MPID_Request **req = NULL;
+    MPIR_Request **req = NULL;
     MPIDI_STATE_DECL(MPID_STATE_CHECK_AND_SET_REQ_COMPLETION);
 
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_CHECK_AND_SET_REQ_COMPLETION);
@@ -661,7 +661,7 @@ static inline int check_and_set_req_completion(MPIR_Win * win_ptr, MPIDI_RMA_Tar
         if ((*req) == NULL)
             continue;
 
-        if (MPID_Request_is_complete((*req))) {
+        if (MPIR_Request_is_complete((*req))) {
             MPID_Request_release((*req));
             (*req) = NULL;
         }
@@ -1036,7 +1036,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
 static inline int check_piggyback_lock(MPIR_Win * win_ptr, MPIDI_VC_t * vc,
                                        MPIDI_CH3_Pkt_t * pkt,
                                        intptr_t * buflen,
-                                       int *acquire_lock_fail, MPID_Request ** reqp)
+                                       int *acquire_lock_fail, MPIR_Request ** reqp)
 {
     int lock_type;
     MPIDI_CH3_Pkt_flags_t flags;
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index 1df0d2c..d73c1b1 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -226,10 +226,10 @@ void MPIDI_CH3U_Buffer_copy(
  * This routine is called by mpid_recv and mpid_irecv when a request
  * matches a send-to-self message 
  */
-int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, MPI_Aint count,
+int MPIDI_CH3_RecvFromSelf( MPIR_Request *rreq, void *buf, MPI_Aint count,
 			    MPI_Datatype datatype )
 {
-    MPID_Request * const sreq = rreq->partner_request;
+    MPIR_Request * const sreq = rreq->partner_request;
     int mpi_errno = MPI_SUCCESS;
 
     if (sreq != NULL)
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index e34e35f..5baeb21 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -20,7 +20,7 @@
 /* MPIDI_CH3_SendNoncontig_iov - Sends a message by loading an
    IOV and calling iSendv.  The caller must initialize
    sreq->dev.segment as well as segment_first and segment_size. */
-int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
+int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPIR_Request *sreq,
                                  void *header, intptr_t hdr_sz )
 {
     int mpi_errno = MPI_SUCCESS;
@@ -85,7 +85,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 /* MPIDI_CH3_EagerNoncontigSend - Eagerly send noncontiguous data */
-int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p, 
+int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **sreq_p,
 				  MPIDI_CH3_Pkt_type_t reqtype, 
 				  const void * buf, MPI_Aint count,
 				  MPI_Datatype datatype, intptr_t data_sz,
@@ -95,7 +95,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_VC_t * vc;
-    MPID_Request *sreq = *sreq_p;
+    MPIR_Request *sreq = *sreq_p;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
     
@@ -151,7 +151,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
 #define FUNCNAME MPIDI_EagerContigSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p, 
+int MPIDI_CH3_EagerContigSend( MPIR_Request **sreq_p,
 			       MPIDI_CH3_Pkt_type_t reqtype, 
 			       const void * buf, intptr_t data_sz, int rank,
 			       int tag, MPIR_Comm * comm, int context_offset )
@@ -160,7 +160,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
     MPIDI_VC_t * vc;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
-    MPID_Request *sreq = *sreq_p;
+    MPIR_Request *sreq = *sreq_p;
     MPL_IOV iov[2];
     
     MPIDI_Pkt_init(eager_pkt, reqtype);
@@ -217,8 +217,8 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
 #define FUNCNAME MPIDI_EagerContigShortSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p, 
-				    MPIDI_CH3_Pkt_type_t reqtype, 
+int MPIDI_CH3_EagerContigShortSend( MPIR_Request **sreq_p,
+				    MPIDI_CH3_Pkt_type_t reqtype,
 				    const void * buf, intptr_t data_sz, int rank,
 				    int tag, MPIR_Comm * comm,
 				    int context_offset )
@@ -228,7 +228,7 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eagershort_send_t * const eagershort_pkt = 
 	&upkt.eagershort_send;
-    MPID_Request *sreq = *sreq_p;
+    MPIR_Request *sreq = *sreq_p;
     
     /*    printf( "Sending short eager\n"); fflush(stdout); */
     MPIDI_Pkt_init(eagershort_pkt, reqtype);
@@ -289,10 +289,10 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-					 intptr_t *buflen, MPID_Request **rreqp )
+					 intptr_t *buflen, MPIR_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eagershort_send_t * eagershort_pkt = &pkt->eagershort_send;
-    MPID_Request * rreq;
+    MPIR_Request * rreq;
     int found;
     int mpi_errno = MPI_SUCCESS;
 
@@ -525,7 +525,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #define FUNCNAME MPIDI_EagerContigIsend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p, 
+int MPIDI_CH3_EagerContigIsend( MPIR_Request **sreq_p,
 				MPIDI_CH3_Pkt_type_t reqtype, 
 				const void * buf, intptr_t data_sz, int rank,
 				int tag, MPIR_Comm * comm, int context_offset )
@@ -534,7 +534,7 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
     MPIDI_VC_t * vc;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
-    MPID_Request *sreq = *sreq_p;
+    MPIR_Request *sreq = *sreq_p;
     MPL_IOV iov[MPL_IOV_LIMIT];
 
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
@@ -605,10 +605,10 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-				    intptr_t *buflen, MPID_Request **rreqp )
+				    intptr_t *buflen, MPIR_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eager_send_t * eager_pkt = &pkt->eager_send;
-    MPID_Request * rreq;
+    MPIR_Request * rreq;
     int found;
     int complete;
     char *data_buf;
@@ -695,10 +695,10 @@ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-				    intptr_t *buflen, MPID_Request **rreqp )
+				    intptr_t *buflen, MPIR_Request **rreqp )
 {
     MPIDI_CH3_Pkt_ready_send_t * ready_pkt = &pkt->ready_send;
-    MPID_Request * rreq;
+    MPIR_Request * rreq;
     int found;
     int complete;
     char *data_buf;
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index cf09ea8..a0dbd95 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -26,7 +26,7 @@
    most application codes should not be using synchronous sends in
    performance-critical operations.
 */
-int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p, 
+int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **sreq_p,
 				      const void * buf, int count, 
 				      MPI_Datatype datatype, intptr_t data_sz,
 				      int dt_contig, MPI_Aint dt_true_lb,
@@ -38,7 +38,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
     MPIDI_CH3_Pkt_t u