[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-403-g398f4af

Service Account noreply at mpich.org
Thu Aug 25 18:25:51 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  398f4af12cf6d05176886515c8f42df870c92631 (commit)
       via  2299f39c89dbcf3bf0a825be7ca02469cc8c825a (commit)
       via  4f2fb4708e7190bb98e5b5b55d0f27d44013aa32 (commit)
       via  9a89293b84fa160b3d5d767bc1e8be3bed27789b (commit)
       via  3359484d7216e598203b8f9655c73ceefaeb844a (commit)
       via  0b72320b7a842e16f3e19dcbacf900a57a6a1c61 (commit)
       via  181430bda15e745f82f761e28643e71eb42bcbb2 (commit)
       via  af99ecc1e04a32f9224f2d803751c1149e0a97c5 (commit)
       via  7910b821f8e6d816e281d42120737e63c63a83b9 (commit)
       via  3257bbea93f661d54b8d43e0d06bc4841d496b13 (commit)
       via  02cae1085c508fe494a14970e9dce541ee3c0c07 (commit)
       via  6ff49c7d01617b757fc4b9450d74496aaf774d80 (commit)
       via  5d2ded70d81461d9db6661e2fb32c8a1b4e97db9 (commit)
       via  7040a6289af4de7ace66ad71248c1ef01f411855 (commit)
       via  21dd483c6c5a075cbe86b0a979af481dfddf9329 (commit)
       via  3dd1f56608e155242d8118cb2391d87f6bb33091 (commit)
       via  daa80957db99eea196c920bf465a67972ad5af9f (commit)
       via  e22e938f22f4af2f432ca3011074c3e630922f2c (commit)
      from  cd846d2c0f3349032f981b297a28eef8af9a5995 (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/398f4af12cf6d05176886515c8f42df870c92631

commit 398f4af12cf6d05176886515c8f42df870c92631
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Aug 25 10:08:08 2016 -0500

    CH4: Fix resource leak in any source receive
    
    When we get a message from the network, clean up the shared memory
    request correctly.  Also, look for request completion rather than
    relying on the netmod setting the request source (which is not
    necessary, as long as the status object is correctly set).
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/src/ch4_recv.h b/src/mpid/ch4/src/ch4_recv.h
index 50370bd..74aafb3 100644
--- a/src/mpid/ch4/src/ch4_recv.h
+++ b/src/mpid/ch4/src/ch4_recv.h
@@ -60,11 +60,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Recv(void *buf,
         }
         /* cancel the shm request if netmod/am handles the request from unexpected queue. */
         else if (*request) {
-            if (MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)->status.MPI_SOURCE != MPI_UNDEFINED) {
+            if (MPIR_Request_is_complete(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request))) {
                 mpi_errno = MPIDI_SHM_cancel_recv(*request);
                 if (MPIR_STATUS_GET_CANCEL_BIT((*request)->status)) {
                     (*request)->status = MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request)->status;
                 }
+                MPIR_Request_free(MPIDI_CH4I_REQUEST_ANYSOURCE_PARTNER(*request));
                 goto fn_exit;
             }
             MPIDI_CH4I_REQUEST(*request, is_local) = 1;

http://git.mpich.org/mpich.git/commitdiff/2299f39c89dbcf3bf0a825be7ca02469cc8c825a

commit 2299f39c89dbcf3bf0a825be7ca02469cc8c825a
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 22:36:21 2016 -0500

    CH4: Fix bug in handling zero-byte AM sends
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index 521d509..460adb9 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -1365,6 +1365,9 @@ static inline int MPIDI_CH4I_do_send_target_handler(void **data,
     *cmpl_handler_fn = MPIDI_CH4U_recv_cmpl_handler;
     MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1);
 
+    if (p_data_sz == NULL)
+        return MPI_SUCCESS;
+
     MPIDI_Datatype_get_info(MPIDI_CH4U_REQUEST(rreq, count),
                             MPIDI_CH4U_REQUEST(rreq, datatype),
                             dt_contig, data_sz, dt_ptr, dt_true_lb);
@@ -1437,9 +1440,15 @@ static inline int MPIDI_CH4U_send_target_handler(int handler_id, void *am_hdr,
 
     if (rreq == NULL) {
         rreq = MPIDI_CH4I_am_request_create(MPIR_REQUEST_KIND__RECV);
-        MPIDI_CH4U_REQUEST(rreq, buffer) = (char *) MPL_malloc(*p_data_sz);
         MPIDI_CH4U_REQUEST(rreq, datatype) = MPI_BYTE;
-        MPIDI_CH4U_REQUEST(rreq, count) = *p_data_sz;
+        if (p_data_sz) {
+            MPIDI_CH4U_REQUEST(rreq, buffer) = (char *) MPL_malloc(*p_data_sz);
+            MPIDI_CH4U_REQUEST(rreq, count) = *p_data_sz;
+        }
+        else {
+            MPIDI_CH4U_REQUEST(rreq, buffer) = NULL;
+            MPIDI_CH4U_REQUEST(rreq, count) = 0;
+        }
         MPIDI_CH4U_REQUEST(rreq, tag) = hdr->msg_tag;
         MPIDI_CH4U_REQUEST(rreq, src_rank) = hdr->src_rank;
         MPIDI_CH4U_REQUEST(rreq, req->status) |= MPIDI_CH4U_REQ_BUSY;
@@ -2574,9 +2583,11 @@ static inline int MPIDI_CH4U_handle_acc_request(int handler_id, void *am_hdr,
         MPIDI_CH4U_acc_cmpl_handler;
     MPIDI_CH4U_REQUEST(rreq, req->seq_no) = OPA_fetch_and_add_int(&MPIDI_CH4_Global.nxt_seq_no, 1);
 
-    *is_contig = 1;
-    *p_data_sz = data_sz;
-    *data = p_data;
+    if (is_contig) {
+        *is_contig = 1;
+        *p_data_sz = data_sz;
+        *data = p_data;
+    }
 
     MPL_HASH_FIND(dev.ch4u.hash_handle, MPIDI_CH4_Global.win_hash,
                   &msg_hdr->win_id, sizeof(uint64_t), win);

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

commit 4f2fb4708e7190bb98e5b5b55d0f27d44013aa32
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 17:56:11 2016 -0500

    CH4: Fixes to improve strict builds.
    
    This patch is incomplete and does not fully fix the build when
    configured with --enable-strict.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/include/mpidch4.h b/src/mpid/ch4/include/mpidch4.h
index bffa964..b0f718d 100644
--- a/src/mpid/ch4/include/mpidch4.h
+++ b/src/mpid/ch4/include/mpidch4.h
@@ -143,8 +143,8 @@ MPIDI_CH4I_API(MPI_Aint, Aint_diff, MPI_Aint, MPI_Aint);
 MPIDI_CH4I_API(int, GPID_GetAllInComm, MPIR_Comm *, int, MPIR_Gpid[], int *);
 MPIDI_CH4I_API(int, GPID_ToLpidArray, int, MPIR_Gpid[], int[]);
 MPIDI_CH4I_API(int, Create_intercomm_from_lpids, MPIR_Comm *, int, const int[]);
-MPIDI_CH4I_API(int, Comm_create, MPIR_Comm *);
-MPIDI_CH4I_API(int, Comm_destroy, MPIR_Comm *);
+MPIDI_CH4I_API(int, Comm_create_hook, MPIR_Comm *);
+MPIDI_CH4I_API(int, Comm_free_hook, MPIR_Comm *);
 MPIDI_CH4I_API(int, Barrier, MPIR_Comm *, MPIR_Errflag_t *);
 MPIDI_CH4I_API(int, Bcast, void *, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *);
 MPIDI_CH4I_API(int, Allreduce, const void *, void *, int, MPI_Datatype, MPI_Op, MPIR_Comm *,
diff --git a/src/mpid/ch4/src/ch4_init.h b/src/mpid/ch4/src/ch4_init.h
index 7d8c10e..ca88320 100644
--- a/src/mpid/ch4/src/ch4_init.h
+++ b/src/mpid/ch4/src/ch4_init.h
@@ -14,6 +14,7 @@
 #include "ch4_impl.h"
 #include "ch4r_proc.h"
 #include "ch4i_comm.h"
+#include "strings.h"
 
 /*
 === BEGIN_MPI_T_CVAR_INFO_BLOCK ===
diff --git a/src/mpid/ch4/src/ch4_recv.h b/src/mpid/ch4/src/ch4_recv.h
index a6ab84a..50370bd 100644
--- a/src/mpid/ch4/src/ch4_recv.h
+++ b/src/mpid/ch4/src/ch4_recv.h
@@ -190,7 +190,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Mrecv(void *buf,
     }
 
     if (unlikely(message->status.MPI_SOURCE == MPI_PROC_NULL)) {
-        MPIR_Request *rreq = message;
+        rreq = message;
         rreq->status.MPI_SOURCE = message->status.MPI_SOURCE;
         rreq->status.MPI_TAG = message->status.MPI_TAG;
         MPIDI_CH4U_request_complete(rreq);

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

commit 9a89293b84fa160b3d5d767bc1e8be3bed27789b
Author: Pavan Balaji <balaji at anl.gov>
Date:   Fri Aug 19 18:53:46 2016 -0500

    CH4: Remove "msg type" field for RMA control messages
    
    Use a single packet handle type to convey this information.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/ofi/ofi_types.h b/src/mpid/ch4/netmod/ofi/ofi_types.h
index 045cc96..9ba98ec 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_types.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_types.h
@@ -38,7 +38,7 @@
 #define MPIDI_OFI_BUF_POOL_SIZE            (1024)
 #define MPIDI_OFI_BUF_POOL_NUM             (1024)
 #define MPIDI_OFI_NUM_CQ_BUFFERED          (1024)
-#define MPIDI_OFI_MAX_AM_HANDLERS_TOTAL    (24)
+#define MPIDI_OFI_MAX_AM_HANDLERS_TOTAL    (100)
 #define MPIDI_OFI_INTERNAL_HANDLER_CONTROL (MPIDI_OFI_MAX_AM_HANDLERS_TOTAL-1)
 #define MPIDI_OFI_INTERNAL_HANDLER_NEXT    (MPIDI_OFI_MAX_AM_HANDLERS_TOTAL-2)
 #define MPIDI_OFI_MAX_AM_HANDLERS          (MPIDI_OFI_INTERNAL_HANDLER_NEXT-1)
diff --git a/src/mpid/ch4/src/ch4_types.h b/src/mpid/ch4/src/ch4_types.h
index 061122e..93b5a17 100644
--- a/src/mpid/ch4/src/ch4_types.h
+++ b/src/mpid/ch4/src/ch4_types.h
@@ -49,7 +49,7 @@ typedef struct progress_hook_slot {
     int active;
 } progress_hook_slot_t;
 
-typedef enum {
+enum {
     MPIDI_CH4U_SEND = 0,        /* Eager send */
 
     MPIDI_CH4U_SEND_LONG_REQ,   /* Rendezvous send RTS (request to send) */
@@ -59,8 +59,6 @@ typedef enum {
     MPIDI_CH4U_SSEND_REQ,
     MPIDI_CH4U_SSEND_ACK,
 
-    MPIDI_CH4U_WIN_CTRL,
-
     MPIDI_CH4U_PUT_REQ,
     MPIDI_CH4U_PUT_ACK,
     MPIDI_CH4U_PUT_IOV_REQ,
@@ -79,10 +77,8 @@ typedef enum {
 
     MPIDI_CH4U_CSWAP_REQ,
     MPIDI_CH4U_CSWAP_ACK,
-    MPIDI_CH4U_FETCH_OP
-} MPIDI_CH4U_TYPE;
+    MPIDI_CH4U_FETCH_OP,
 
-typedef enum {
     MPIDI_CH4U_WIN_COMPLETE,
     MPIDI_CH4U_WIN_POST,
     MPIDI_CH4U_WIN_LOCK,
@@ -93,7 +89,7 @@ typedef enum {
     MPIDI_CH4U_WIN_LOCKALL_ACK,
     MPIDI_CH4U_WIN_UNLOCKALL,
     MPIDI_CH4U_WIN_UNLOCKALL_ACK
-} MPIDI_CH4U_WIN_CTRL_MSG_TYPE;
+};
 
 enum {
     MPIDI_CH4U_EPOTYPE_NONE = 0,          /**< No epoch in affect */
@@ -144,7 +140,6 @@ typedef struct MPIDI_CH4U_win_cntrl_msg_t {
     uint64_t win_id;
     uint32_t origin_rank;
     int16_t lock_type;
-    int16_t type;
 } MPIDI_CH4U_win_cntrl_msg_t;
 
 typedef struct MPIDI_CH4U_put_msg_t {
diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index be2291f..521d509 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -1885,18 +1885,19 @@ static inline int MPIDI_CH4U_win_lock_advance(MPIR_Win * win)
         slock->local.type = lock->type;
 
         MPIDI_CH4U_win_cntrl_msg_t msg;
+        int handler_id;
         msg.win_id = MPIDI_CH4U_WIN(win, win_id);
         msg.origin_rank = win->comm_ptr->rank;
 
         if (lock->mtype == MPIDI_CH4U_WIN_LOCK)
-            msg.type = MPIDI_CH4U_WIN_LOCK_ACK;
+            handler_id = MPIDI_CH4U_WIN_LOCK_ACK;
         else if (lock->mtype == MPIDI_CH4U_WIN_LOCKALL)
-            msg.type = MPIDI_CH4U_WIN_LOCKALL_ACK;
+            handler_id = MPIDI_CH4U_WIN_LOCKALL_ACK;
         else
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rmasync");
 
         mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win),
-                                               lock->rank, MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
+                                               lock->rank, handler_id, &msg, sizeof(msg));
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         MPL_free(lock);
@@ -1917,7 +1918,8 @@ static inline int MPIDI_CH4U_win_lock_advance(MPIR_Win * win)
 #define FUNCNAME MPIDI_CH4U_win_lock_req_proc
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline void MPIDI_CH4U_win_lock_req_proc(const MPIDI_CH4U_win_cntrl_msg_t * info,
+static inline void MPIDI_CH4U_win_lock_req_proc(int handler_id,
+                                                const MPIDI_CH4U_win_cntrl_msg_t * info,
                                                 MPIR_Win * win)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_WIN_LOCK_REQ_PROC);
@@ -1926,11 +1928,7 @@ static inline void MPIDI_CH4U_win_lock_req_proc(const MPIDI_CH4U_win_cntrl_msg_t
     struct MPIDI_CH4U_win_lock *lock = (struct MPIDI_CH4U_win_lock *)
         MPL_calloc(1, sizeof(struct MPIDI_CH4U_win_lock));
 
-    if (info->type == MPIDI_CH4U_WIN_LOCK)
-        lock->mtype = MPIDI_CH4U_WIN_LOCK;
-    else if (info->type == MPIDI_CH4U_WIN_LOCKALL)
-        lock->mtype = MPIDI_CH4U_WIN_LOCKALL;
-
+    lock->mtype = handler_id;
     lock->rank = info->origin_rank;
     lock->type = info->lock_type;
     struct MPIDI_CH4U_win_queue *q = &MPIDI_CH4U_WIN(win, sync).lock.local.requested;
@@ -1952,15 +1950,16 @@ static inline void MPIDI_CH4U_win_lock_req_proc(const MPIDI_CH4U_win_cntrl_msg_t
 #define FUNCNAME MPIDI_CH4U_win_lock_ack_proc
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline void MPIDI_CH4U_win_lock_ack_proc(const MPIDI_CH4U_win_cntrl_msg_t * info,
+static inline void MPIDI_CH4U_win_lock_ack_proc(int handler_id,
+                                                const MPIDI_CH4U_win_cntrl_msg_t * info,
                                                 MPIR_Win * win)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_WIN_LOCK_ACK_PROC);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4U_WIN_LOCK_ACK_PROC);
 
-    if (info->type == MPIDI_CH4U_WIN_LOCK_ACK)
+    if (handler_id == MPIDI_CH4U_WIN_LOCK_ACK)
         MPIDI_CH4U_WIN(win, sync).lock.remote.locked += 1;
-    else if (info->type == MPIDI_CH4U_WIN_LOCKALL_ACK)
+    else if (handler_id == MPIDI_CH4U_WIN_LOCKALL_ACK)
         MPIDI_CH4U_WIN(win, sync).lock.remote.allLocked += 1;
 
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_CH4U_WIN_LOCK_ACK_PROC);
@@ -1985,11 +1984,10 @@ static inline void MPIDI_CH4U_win_unlock_proc(const MPIDI_CH4U_win_cntrl_msg_t *
     MPIDI_CH4U_win_cntrl_msg_t msg;
     msg.win_id = MPIDI_CH4U_WIN(win, win_id);
     msg.origin_rank = win->comm_ptr->rank;
-    msg.type = MPIDI_CH4U_WIN_UNLOCK_ACK;
 
     mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win),
                                            info->origin_rank,
-                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
+                                           MPIDI_CH4U_WIN_UNLOCK_ACK, &msg, sizeof(msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -2074,17 +2072,17 @@ static inline int MPIDI_CH4U_win_ctrl_target_handler(int handler_id, void *am_hd
                   &msg_hdr->win_id, sizeof(uint64_t), win);
     /* TODO: check output win ptr */
 
-    switch (msg_hdr->type) {
+    switch (handler_id) {
         char buff[32];
 
     case MPIDI_CH4U_WIN_LOCK:
     case MPIDI_CH4U_WIN_LOCKALL:
-        MPIDI_CH4U_win_lock_req_proc(msg_hdr, win);
+        MPIDI_CH4U_win_lock_req_proc(handler_id, msg_hdr, win);
         break;
 
     case MPIDI_CH4U_WIN_LOCK_ACK:
     case MPIDI_CH4U_WIN_LOCKALL_ACK:
-        MPIDI_CH4U_win_lock_ack_proc(msg_hdr, win);
+        MPIDI_CH4U_win_lock_ack_proc(handler_id, msg_hdr, win);
         break;
 
     case MPIDI_CH4U_WIN_UNLOCK:
@@ -2106,7 +2104,7 @@ static inline int MPIDI_CH4U_win_ctrl_target_handler(int handler_id, void *am_hd
         break;
 
     default:
-        MPL_snprintf(buff, sizeof(buff), "Invalid message type: %d\n", msg_hdr->type);
+        MPL_snprintf(buff, sizeof(buff), "Invalid message type: %d\n", handler_id);
         MPID_Abort(NULL, MPI_ERR_INTERN, 1, buff);
     }
 
diff --git a/src/mpid/ch4/src/ch4r_init.h b/src/mpid/ch4/src/ch4r_init.h
index f692720..0089861 100644
--- a/src/mpid/ch4/src/ch4r_init.h
+++ b/src/mpid/ch4/src/ch4r_init.h
@@ -215,11 +215,55 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_init(MPIR_Comm * comm_world, MPIR_Comm *
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_CTRL,
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_COMPLETE,
                                         NULL, &MPIDI_CH4U_win_ctrl_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_POST,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_LOCK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_LOCK_ACK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_UNLOCK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_UNLOCK_ACK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_LOCKALL,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_LOCKALL_ACK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_UNLOCKALL,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_UNLOCKALL_ACK,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    if (mpi_errno)
+        MPIR_ERR_POP(mpi_errno);
 
     mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_IOV_REQ,
                                         &MPIDI_CH4U_put_iov_origin_cmpl_handler,
diff --git a/src/mpid/ch4/src/ch4r_win.h b/src/mpid/ch4/src/ch4r_win.h
index ebf3299..035e125 100644
--- a/src/mpid/ch4/src/ch4r_win.h
+++ b/src/mpid/ch4/src/ch4r_win.h
@@ -273,7 +273,6 @@ static inline int MPIDI_CH4R_win_complete(MPIR_Win * win)
 
     msg.win_id = MPIDI_CH4U_WIN(win, win_id);
     msg.origin_rank = win->comm_ptr->rank;
-    msg.type = MPIDI_CH4U_WIN_COMPLETE;
 
     ranks_in_win_grp = (int *) MPL_malloc(sizeof(int) * group->size);
     MPIR_Assert(ranks_in_win_grp);
@@ -285,7 +284,7 @@ static inline int MPIDI_CH4R_win_complete(MPIR_Win * win)
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
         mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr,
-                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                         MPIDI_CH4U_WIN_COMPLETE, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     }
@@ -327,7 +326,6 @@ static inline int MPIDI_CH4R_win_post(MPIR_Group * group, int assert, MPIR_Win *
 
     msg.win_id = MPIDI_CH4U_WIN(win, win_id);
     msg.origin_rank = win->comm_ptr->rank;
-    msg.type = MPIDI_CH4U_WIN_POST;
 
     ranks_in_win_grp = (int *) MPL_malloc(sizeof(int) * group->size);
     MPIR_Assert(ranks_in_win_grp);
@@ -339,7 +337,7 @@ static inline int MPIDI_CH4R_win_post(MPIR_Group * group, int assert, MPIR_Win *
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
         mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr,
-                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                         MPIDI_CH4U_WIN_POST, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     }
@@ -436,12 +434,11 @@ static inline int MPIDI_CH4R_win_lock(int lock_type, int rank, int assert, MPIR_
     MPIDI_CH4U_win_cntrl_msg_t msg;
     msg.win_id = MPIDI_CH4U_WIN(win, win_id);
     msg.origin_rank = win->comm_ptr->rank;
-    msg.type = MPIDI_CH4U_WIN_LOCK;
     msg.lock_type = lock_type;
 
     locked = slock->remote.locked + 1;
     mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr,
-                                     MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                     MPIDI_CH4U_WIN_LOCK, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     MPIDI_CH4R_PROGRESS_WHILE(slock->remote.locked != locked);
@@ -479,11 +476,10 @@ static inline int MPIDI_CH4R_win_unlock(int rank, MPIR_Win * win)
 
     msg.win_id = MPIDI_CH4U_WIN(win, win_id);
     msg.origin_rank = win->comm_ptr->rank;
-    msg.type = MPIDI_CH4U_WIN_UNLOCK;
     unlocked = MPIDI_CH4U_WIN(win, sync).lock.remote.locked - 1;
 
     mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr,
-                                     MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                     MPIDI_CH4U_WIN_UNLOCK, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 
@@ -1060,14 +1056,13 @@ static inline int MPIDI_CH4R_win_unlock_all(MPIR_Win * win)
         MPIDI_CH4U_win_cntrl_msg_t msg;
         msg.win_id = MPIDI_CH4U_WIN(win, win_id);
         msg.origin_rank = win->comm_ptr->rank;
-        msg.type = MPIDI_CH4U_WIN_UNLOCKALL;
 
         lockQ[i].done = 0;
         lockQ[i].peer = i;
         lockQ[i].win = win;
 
         mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr,
-                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                         MPIDI_CH4U_WIN_UNLOCKALL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 
@@ -1220,7 +1215,6 @@ static inline int MPIDI_CH4R_win_lock_all(int assert, MPIR_Win * win)
         MPIDI_CH4U_win_cntrl_msg_t msg;
         msg.win_id = MPIDI_CH4U_WIN(win, win_id);
         msg.origin_rank = win->comm_ptr->rank;
-        msg.type = MPIDI_CH4U_WIN_LOCKALL;
         msg.lock_type = MPI_LOCK_SHARED;
 
         lockQ[i].done = 0;
@@ -1229,7 +1223,7 @@ static inline int MPIDI_CH4R_win_lock_all(int assert, MPIR_Win * win)
         lockQ[i].lock_type = MPI_LOCK_SHARED;
 
         mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr,
-                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+                                         MPIDI_CH4U_WIN_LOCKALL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 

http://git.mpich.org/mpich.git/commitdiff/3359484d7216e598203b8f9655c73ceefaeb844a

commit 3359484d7216e598203b8f9655c73ceefaeb844a
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 17:12:09 2016 -0500

    CH4: Pass packet handler IDs back to the handlers
    
    This allows the target to use the same function for multiple packet
    types that differ slightly from each other.  The target already has
    this information.  This patch just passes it back to the packet
    handler.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index 04f192b..6e3457d 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -22,7 +22,7 @@ typedef int (*MPIDI_NM_am_origin_handler_fn) (MPIR_Request * req);
 /* Callback function setup by handler register function */
 /* for short cases, output arguments are NULL */
 typedef int (*MPIDI_NM_am_target_handler_fn)
- (void *am_hdr, void **data,    /* data should be iovs if *is_contig is false */
+ (int handler_id, void *am_hdr, void **data,    /* data should be iovs if *is_contig is false */
   size_t * data_sz, int *is_contig, MPIDI_NM_am_completion_handler_fn * cmpl_handler_fn,        /* completion handler */
   MPIR_Request ** req);         /* if allocated, need pointer to completion function */
 
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am_events.h b/src/mpid/ch4/netmod/ofi/ofi_am_events.h
index a309a02..1f83f40 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am_events.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am_events.h
@@ -36,7 +36,7 @@ static inline int MPIDI_OFI_handle_short_am(MPIDI_OFI_am_header_t * msg_hdr)
     p_data = in_data = (char *) msg_hdr->payload + msg_hdr->am_hdr_sz;
     in_data_sz = data_sz = msg_hdr->data_sz;
 
-    MPIDI_Global.am_handlers[msg_hdr->handler_id] (msg_hdr->payload,
+    MPIDI_Global.am_handlers[msg_hdr->handler_id] (msg_hdr->handler_id, msg_hdr->payload,
                                                    &p_data, &data_sz,
                                                    &is_contig, &cmpl_handler_fn, &rreq);
 
@@ -106,7 +106,7 @@ static inline int MPIDI_OFI_handle_short_am_hdr(MPIDI_OFI_am_header_t * msg_hdr,
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_HANDLE_SHORT_AM_HDR);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_HANDLE_SHORT_AM_HDR);
 
-    MPIDI_Global.am_handlers[msg_hdr->handler_id] (am_hdr,
+    MPIDI_Global.am_handlers[msg_hdr->handler_id] (msg_hdr->handler_id, am_hdr,
                                                    NULL, NULL, NULL, &cmpl_handler_fn, &rreq);
 
     if (!rreq)
@@ -225,7 +225,7 @@ static inline int MPIDI_OFI_do_handle_long_am(MPIDI_OFI_am_header_t * msg_hdr,
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_DO_HANDLE_LONG_AM);
 
     in_data_sz = data_sz = msg_hdr->data_sz;
-    MPIDI_Global.am_handlers[msg_hdr->handler_id] (am_hdr,
+    MPIDI_Global.am_handlers[msg_hdr->handler_id] (msg_hdr->handler_id, am_hdr,
                                                    &p_data, &data_sz, &is_contig,
                                                    &cmpl_handler_fn, &rreq);
 
diff --git a/src/mpid/ch4/netmod/ofi/ofi_impl.h b/src/mpid/ch4/netmod/ofi/ofi_impl.h
index 9e6ff5c..95e3117 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_impl.h
@@ -303,7 +303,7 @@ __ALWAYS_INLINE__ void MPIDI_OFI_cntr_incr()
 /* Externs:  see util.c for definition */
 extern int MPIDI_OFI_handle_cq_error_util(ssize_t ret);
 extern int MPIDI_OFI_progress_test_no_inline();
-extern int MPIDI_OFI_control_handler(void *am_hdr,
+extern int MPIDI_OFI_control_handler(int handler_id, void *am_hdr,
                                      void **data, size_t * data_sz, int *is_contig,
                                      MPIDI_NM_am_completion_handler_fn * cmpl_handler_fn,
                                      MPIR_Request ** req);
diff --git a/src/mpid/ch4/netmod/ofi/util.c b/src/mpid/ch4/netmod/ofi/util.c
index 6c30026..f2b2b54 100644
--- a/src/mpid/ch4/netmod/ofi/util.c
+++ b/src/mpid/ch4/netmod/ofi/util.c
@@ -376,7 +376,7 @@ static inline void MPIDI_OFI_get_huge(MPIDI_OFI_send_control_t * info)
     MPIDI_OFI_get_huge_event(NULL, (MPIR_Request *) recv);
 }
 
-int MPIDI_OFI_control_handler(void *am_hdr,
+int MPIDI_OFI_control_handler(int handler_id, void *am_hdr,
                               void **data,
                               size_t * data_sz,
                               int *is_contig,
diff --git a/src/mpid/ch4/netmod/ucx/ucx_progress.h b/src/mpid/ch4/netmod/ucx/ucx_progress.h
index c12801d..0467099 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_progress.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_progress.h
@@ -28,7 +28,7 @@ static inline int MPIDI_UCX_am_handler(void *msg, size_t msg_sz)
     p_data = in_data = (char *) msg_hdr->payload + (msg_sz - msg_hdr->data_sz - sizeof(*msg_hdr));
     in_data_sz = data_sz = msg_hdr->data_sz;
 
-    MPIDI_UCX_global.am_handlers[msg_hdr->handler_id] (msg_hdr->payload,
+    MPIDI_UCX_global.am_handlers[msg_hdr->handler_id] (msg_hdr->handler_id, msg_hdr->payload,
                                                        &p_data, &data_sz,
                                                        &is_contig, &cmpl_handler_fn, &rreq);
 
diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index 0f311d7..be2291f 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -1413,7 +1413,7 @@ static inline int MPIDI_CH4I_do_send_target_handler(void **data,
 #define FUNCNAME MPIDI_CH4U_send_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_send_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_send_target_handler(int handler_id, void *am_hdr,
                                                  void **data,
                                                  size_t * p_data_sz,
                                                  int *is_contig,
@@ -1476,7 +1476,7 @@ static inline int MPIDI_CH4U_send_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_send_long_req_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_send_long_req_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_send_long_req_target_handler(int handler_id, void *am_hdr,
                                                           void **data,
                                                           size_t * p_data_sz,
                                                           int *is_contig,
@@ -1545,7 +1545,7 @@ static inline int MPIDI_CH4U_send_long_req_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_send_long_lmt_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_send_long_lmt_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_send_long_lmt_target_handler(int handler_id, void *am_hdr,
                                                           void **data,
                                                           size_t * p_data_sz,
                                                           int *is_contig,
@@ -1574,7 +1574,7 @@ static inline int MPIDI_CH4U_send_long_lmt_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_ssend_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_ssend_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_ssend_target_handler(int handler_id, void *am_hdr,
                                                   void **data,
                                                   size_t * p_data_sz,
                                                   int *is_contig,
@@ -1587,7 +1587,7 @@ static inline int MPIDI_CH4U_ssend_target_handler(void *am_hdr,
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_SSEND_HANDLER);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4U_SSEND_HANDLER);
 
-    mpi_errno = MPIDI_CH4U_send_target_handler(am_hdr,
+    mpi_errno = MPIDI_CH4U_send_target_handler(handler_id, am_hdr,
                                                data, p_data_sz, is_contig, cmpl_handler_fn, req);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
@@ -1606,7 +1606,7 @@ static inline int MPIDI_CH4U_ssend_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_ssend_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_ssend_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_ssend_ack_target_handler(int handler_id, void *am_hdr,
                                                       void **data,
                                                       size_t * p_data_sz, int *is_contig,
                                                       MPIDI_NM_am_completion_handler_fn *
@@ -1634,7 +1634,7 @@ static inline int MPIDI_CH4U_ssend_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_send_long_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_send_long_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_send_long_ack_target_handler(int handler_id, void *am_hdr,
                                                           void **data,
                                                           size_t * p_data_sz, int *is_contig,
                                                           MPIDI_NM_am_completion_handler_fn *
@@ -1679,7 +1679,7 @@ static inline int MPIDI_CH4U_send_long_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_put_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_put_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_put_ack_target_handler(int handler_id, void *am_hdr,
                                                     void **data,
                                                     size_t * p_data_sz, int *is_contig,
                                                     MPIDI_NM_am_completion_handler_fn *
@@ -1719,7 +1719,7 @@ static inline int MPIDI_CH4U_put_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_acc_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_acc_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_acc_ack_target_handler(int handler_id, void *am_hdr,
                                                     void **data,
                                                     size_t * p_data_sz, int *is_contig,
                                                     MPIDI_NM_am_completion_handler_fn *
@@ -1759,7 +1759,7 @@ static inline int MPIDI_CH4U_acc_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_get_acc_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_get_acc_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_get_acc_ack_target_handler(int handler_id, void *am_hdr,
                                                         void **data,
                                                         size_t * p_data_sz, int *is_contig,
                                                         MPIDI_NM_am_completion_handler_fn *
@@ -1831,7 +1831,7 @@ static inline int MPIDI_CH4U_get_acc_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_cswap_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_cswap_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_cswap_ack_target_handler(int handler_id, void *am_hdr,
                                                       void **data,
                                                       size_t * p_data_sz, int *is_contig,
                                                       MPIDI_NM_am_completion_handler_fn *
@@ -2057,7 +2057,7 @@ static inline void MPIDI_CH4U_win_unlock_done_cb(const MPIDI_CH4U_win_cntrl_msg_
 #define FUNCNAME MPIDI_CH4U_win_ctrl_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_win_ctrl_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_win_ctrl_target_handler(int handler_id, void *am_hdr,
                                                      void **data,
                                                      size_t * p_data_sz, int *is_contig,
                                                      MPIDI_NM_am_completion_handler_fn *
@@ -2123,7 +2123,7 @@ static inline int MPIDI_CH4U_win_ctrl_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_put_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_put_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_put_target_handler(int handler_id, void *am_hdr,
                                                 void **data,
                                                 size_t * p_data_sz,
                                                 int *is_contig,
@@ -2228,7 +2228,7 @@ static inline int MPIDI_CH4U_put_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_put_iov_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_put_iov_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_put_iov_target_handler(int handler_id, void *am_hdr,
                                                     void **data,
                                                     size_t * p_data_sz,
                                                     int *is_contig,
@@ -2284,7 +2284,7 @@ static inline int MPIDI_CH4U_put_iov_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_put_iov_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_put_iov_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_put_iov_ack_target_handler(int handler_id, void *am_hdr,
                                                         void **data,
                                                         size_t * p_data_sz,
                                                         int *is_contig,
@@ -2333,7 +2333,7 @@ static inline int MPIDI_CH4U_put_iov_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_acc_iov_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_acc_iov_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_acc_iov_ack_target_handler(int handler_id, void *am_hdr,
                                                         void **data,
                                                         size_t * p_data_sz,
                                                         int *is_contig,
@@ -2383,7 +2383,7 @@ static inline int MPIDI_CH4U_acc_iov_ack_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_put_data_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_put_data_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_put_data_target_handler(int handler_id, void *am_hdr,
                                                      void **data,
                                                      size_t * p_data_sz,
                                                      int *is_contig,
@@ -2424,7 +2424,7 @@ static inline int MPIDI_CH4U_put_data_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_acc_data_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_acc_data_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_acc_data_target_handler(int handler_id, void *am_hdr,
                                                      void **data,
                                                      size_t * p_data_sz,
                                                      int *is_contig,
@@ -2475,7 +2475,7 @@ static inline int MPIDI_CH4U_acc_data_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_cswap_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_cswap_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_cswap_target_handler(int handler_id, void *am_hdr,
                                                   void **data,
                                                   size_t * p_data_sz,
                                                   int *is_contig,
@@ -2540,7 +2540,7 @@ static inline int MPIDI_CH4U_cswap_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_handle_acc_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_handle_acc_request(void *am_hdr,
+static inline int MPIDI_CH4U_handle_acc_request(int handler_id, void *am_hdr,
                                                 void **data,
                                                 size_t * p_data_sz,
                                                 int *is_contig,
@@ -2627,7 +2627,7 @@ static inline int MPIDI_CH4U_handle_acc_request(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_acc_iov_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_acc_iov_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_acc_iov_target_handler(int handler_id, void *am_hdr,
                                                     void **data,
                                                     size_t * p_data_sz,
                                                     int *is_contig,
@@ -2695,7 +2695,7 @@ static inline int MPIDI_CH4U_acc_iov_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_get_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_get_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_get_target_handler(int handler_id, void *am_hdr,
                                                 void **data,
                                                 size_t * p_data_sz,
                                                 int *is_contig,
@@ -2759,7 +2759,7 @@ static inline int MPIDI_CH4U_get_target_handler(void *am_hdr,
 #define FUNCNAME MPIDI_CH4U_get_ack_target_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_CH4U_get_ack_target_handler(void *am_hdr,
+static inline int MPIDI_CH4U_get_ack_target_handler(int handler_id, void *am_hdr,
                                                     void **data,
                                                     size_t * p_data_sz,
                                                     int *is_contig,

http://git.mpich.org/mpich.git/commitdiff/0b72320b7a842e16f3e19dcbacf900a57a6a1c61

commit 0b72320b7a842e16f3e19dcbacf900a57a6a1c61
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 17:04:14 2016 -0500

    CH4: Remove __CH4_INLINE__
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/include/mpidch4.h b/src/mpid/ch4/include/mpidch4.h
index 7c408bd..bffa964 100644
--- a/src/mpid/ch4/include/mpidch4.h
+++ b/src/mpid/ch4/include/mpidch4.h
@@ -11,16 +11,13 @@
 #ifndef MPIDCH4_H_INCLUDED
 #define MPIDCH4_H_INCLUDED
 
-#define __CH4_INLINE__ __attribute__((always_inline)) static inline
-
 /* We need to define the static inlines right away to avoid
  * any implicit prototype generation and subsequent warnings
  * This allows us to make ADI up calls from within a direct
  * netmod.
  */
 #define MPIDI_CH4I_API(rc,fcnname,...)            \
-  __CH4_INLINE__ rc MPIDI_##fcnname(__VA_ARGS__) \
-  __attribute__((always_inline))
+  MPL_STATIC_INLINE_PREFIX rc MPIDI_##fcnname(__VA_ARGS__) MPL_STATIC_INLINE_SUFFIX
 
 MPIDI_CH4I_API(int, Init, int *, char ***, int, int *, int *, int *);
 MPIDI_CH4I_API(int, InitCompleted, void);
@@ -239,7 +236,7 @@ MPIDI_CH4I_API(int, Iscatterv, const void *, const int *, const int *, MPI_Datat
  * similar to the functions above. Other CH4-level functions should call this
  * function to query locality. This function will determine whether to call the
  * netmod or CH4U locality functions. */
-__CH4_INLINE__ int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm);
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm);
 
 /* Include netmod prototypes */
 #include <netmod.h>
diff --git a/src/mpid/ch4/src/ch4_coll.h b/src/mpid/ch4/src/ch4_coll.h
index 03dae8f..595b176 100644
--- a/src/mpid/ch4/src/ch4_coll.h
+++ b/src/mpid/ch4/src/ch4_coll.h
@@ -14,362 +14,382 @@
 #include "ch4_impl.h"
 #include "ch4r_proc.h"
 
-__CH4_INLINE__ int MPIDI_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_barrier(comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Bcast(void *buffer, int count, MPI_Datatype datatype,
-                               int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast(void *buffer, int count, MPI_Datatype datatype,
+                                         int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_bcast(buffer, count, datatype, root, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Allreduce(const void *sendbuf, void *recvbuf, int count,
-                                   MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                   MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                             MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                   MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather(const void *sendbuf, int sendcount,
+                                             MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                             MPI_Datatype recvtype, MPIR_Comm * comm,
+                                             MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_allgather(sendbuf, sendcount, sendtype, recvbuf,
                               recvcount, recvtype, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                    void *recvbuf, const int *recvcounts, const int *displs,
-                                    MPI_Datatype recvtype, MPIR_Comm * comm,
-                                    MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              const int *recvcounts, const int *displs,
+                                              MPI_Datatype recvtype, MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_allgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                recvcounts, displs, recvtype, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                 int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter(const void *sendbuf, int sendcount,
+                                           MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                           MPI_Datatype recvtype, int root, MPIR_Comm * comm,
+                                           MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_scatter(sendbuf, sendcount, sendtype, recvbuf,
                             recvcount, recvtype, root, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Scatterv(const void *sendbuf, const int *sendcounts,
-                                  const int *displs, MPI_Datatype sendtype,
-                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                  int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv(const void *sendbuf, const int *sendcounts,
+                                            const int *displs, MPI_Datatype sendtype,
+                                            void *recvbuf, int recvcount, MPI_Datatype recvtype,
+                                            int root, MPIR_Comm * comm_ptr,
+                                            MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_scatterv(sendbuf, sendcounts, displs, sendtype,
                              recvbuf, recvcount, recvtype, root, comm_ptr, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
+                                          void *recvbuf, int recvcount, MPI_Datatype recvtype,
+                                          int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_gather(sendbuf, sendcount, sendtype, recvbuf,
                            recvcount, recvtype, root, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                 void *recvbuf, const int *recvcounts,
-                                 const int *displs, MPI_Datatype recvtype,
-                                 int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv(const void *sendbuf, int sendcount,
+                                           MPI_Datatype sendtype, void *recvbuf,
+                                           const int *recvcounts, const int *displs,
+                                           MPI_Datatype recvtype, int root, MPIR_Comm * comm,
+                                           MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_gatherv(sendbuf, sendcount, sendtype, recvbuf,
                             recvcounts, displs, recvtype, root, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                  MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall(const void *sendbuf, int sendcount,
+                                            MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                            MPI_Datatype recvtype, MPIR_Comm * comm,
+                                            MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_alltoall(sendbuf, sendcount, sendtype, recvbuf,
                              recvcount, recvtype, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Alltoallv(const void *sendbuf, const int *sendcounts,
-                                   const int *sdispls, MPI_Datatype sendtype,
-                                   void *recvbuf, const int *recvcounts,
-                                   const int *rdispls, MPI_Datatype recvtype,
-                                   MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv(const void *sendbuf, const int *sendcounts,
+                                             const int *sdispls, MPI_Datatype sendtype,
+                                             void *recvbuf, const int *recvcounts,
+                                             const int *rdispls, MPI_Datatype recvtype,
+                                             MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_alltoallv(sendbuf, sendcounts, sdispls, sendtype,
                               recvbuf, recvcounts, rdispls, recvtype, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_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[],
-                                   MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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[],
+                                             MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                               recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Reduce(const void *sendbuf, void *recvbuf,
-                                int count, MPI_Datatype datatype, MPI_Op op,
-                                int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce(const void *sendbuf, void *recvbuf,
+                                          int count, MPI_Datatype datatype, MPI_Op op,
+                                          int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Reduce_scatter(const void *sendbuf, void *recvbuf,
-                                        const int recvcounts[], MPI_Datatype datatype,
-                                        MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                  const int recvcounts[], MPI_Datatype datatype,
+                                                  MPI_Op op, MPIR_Comm * comm_ptr,
+                                                  MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
-                                              MPI_Datatype datatype, MPI_Op op,
-                                              MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                        int recvcount, MPI_Datatype datatype,
+                                                        MPI_Op op, MPIR_Comm * comm_ptr,
+                                                        MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_reduce_scatter_block(sendbuf, recvbuf, recvcount,
                                          datatype, op, comm_ptr, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Scan(const void *sendbuf, void *recvbuf, int count,
-                              MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                              MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Scan(const void *sendbuf, void *recvbuf, int count,
+                                        MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                        MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_scan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Exscan(const void *sendbuf, void *recvbuf, int count,
-                                MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Exscan(const void *sendbuf, void *recvbuf, int count,
+                                          MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                          MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_exscan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 }
 
-__CH4_INLINE__ int MPIDI_Neighbor_allgather(const void *sendbuf, int sendcount,
-                                            MPI_Datatype sendtype, void *recvbuf, int recvcount,
-                                            MPI_Datatype recvtype, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Neighbor_allgather(const void *sendbuf, int sendcount,
+                                                      MPI_Datatype sendtype, void *recvbuf,
+                                                      int recvcount, MPI_Datatype recvtype,
+                                                      MPIR_Comm * comm)
 {
     return MPIDI_NM_neighbor_allgather(sendbuf, sendcount, sendtype,
                                        recvbuf, recvcount, recvtype, comm);
 }
 
-__CH4_INLINE__ int MPIDI_Neighbor_allgatherv(const void *sendbuf, int sendcount,
-                                             MPI_Datatype sendtype, void *recvbuf,
-                                             const int *recvcounts, const int *displs,
-                                             MPI_Datatype recvtype, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Neighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                       MPI_Datatype sendtype, void *recvbuf,
+                                                       const int *recvcounts, const int *displs,
+                                                       MPI_Datatype recvtype, MPIR_Comm * comm)
 {
     return MPIDI_NM_neighbor_allgatherv(sendbuf, sendcount, sendtype,
                                         recvbuf, recvcounts, displs, recvtype, comm);
 }
 
-__CH4_INLINE__ int MPIDI_Neighbor_alltoallv(const void *sendbuf, const int *sendcounts,
-                                            const int *sdispls, MPI_Datatype sendtype,
-                                            void *recvbuf, const int *recvcounts,
-                                            const int *rdispls, MPI_Datatype recvtype,
-                                            MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Neighbor_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                      const int *sdispls, MPI_Datatype sendtype,
+                                                      void *recvbuf, const int *recvcounts,
+                                                      const int *rdispls, MPI_Datatype recvtype,
+                                                      MPIR_Comm * comm)
 {
     return MPIDI_NM_neighbor_alltoallv(sendbuf, sendcounts, sdispls,
                                        sendtype, recvbuf, recvcounts, rdispls, recvtype, comm);
 }
 
-__CH4_INLINE__ int MPIDI_Neighbor_alltoallw(const void *sendbuf, const int *sendcounts,
-                                            const MPI_Aint * sdispls,
-                                            const MPI_Datatype * sendtypes, void *recvbuf,
-                                            const int *recvcounts, const MPI_Aint * rdispls,
-                                            const MPI_Datatype * recvtypes, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Neighbor_alltoallw(const void *sendbuf, const int *sendcounts,
+                                                      const MPI_Aint * sdispls,
+                                                      const MPI_Datatype * sendtypes, void *recvbuf,
+                                                      const int *recvcounts,
+                                                      const MPI_Aint * rdispls,
+                                                      const MPI_Datatype * recvtypes,
+                                                      MPIR_Comm * comm)
 {
     return MPIDI_NM_neighbor_alltoallw(sendbuf, sendcounts, sdispls,
                                        sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm);
 }
 
-__CH4_INLINE__ int MPIDI_Neighbor_alltoall(const void *sendbuf, int sendcount,
-                                           MPI_Datatype sendtype, void *recvbuf, int recvcount,
-                                           MPI_Datatype recvtype, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Neighbor_alltoall(const void *sendbuf, int sendcount,
+                                                     MPI_Datatype sendtype, void *recvbuf,
+                                                     int recvcount, MPI_Datatype recvtype,
+                                                     MPIR_Comm * comm)
 {
     return MPIDI_NM_neighbor_alltoall(sendbuf, sendcount, sendtype,
                                       recvbuf, recvcount, recvtype, comm);
 }
 
-__CH4_INLINE__ int MPIDI_Ineighbor_allgather(const void *sendbuf, int sendcount,
-                                             MPI_Datatype sendtype, void *recvbuf,
-                                             int recvcount, MPI_Datatype recvtype,
-                                             MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ineighbor_allgather(const void *sendbuf, int sendcount,
+                                                       MPI_Datatype sendtype, void *recvbuf,
+                                                       int recvcount, MPI_Datatype recvtype,
+                                                       MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ineighbor_allgather(sendbuf, sendcount, sendtype,
                                         recvbuf, recvcount, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ineighbor_allgatherv(const void *sendbuf, int sendcount,
-                                              MPI_Datatype sendtype, void *recvbuf,
-                                              const int *recvcounts, const int *displs,
-                                              MPI_Datatype recvtype, MPIR_Comm * comm,
-                                              MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ineighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                        MPI_Datatype sendtype, void *recvbuf,
+                                                        const int *recvcounts, const int *displs,
+                                                        MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                        MPI_Request * req)
 {
     return MPIDI_NM_ineighbor_allgatherv(sendbuf, sendcount, sendtype,
                                          recvbuf, recvcounts, displs, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ineighbor_alltoall(const void *sendbuf, int sendcount,
-                                            MPI_Datatype sendtype, void *recvbuf,
-                                            int recvcount, MPI_Datatype recvtype,
-                                            MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ineighbor_alltoall(const void *sendbuf, int sendcount,
+                                                      MPI_Datatype sendtype, void *recvbuf,
+                                                      int recvcount, MPI_Datatype recvtype,
+                                                      MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ineighbor_alltoall(sendbuf, sendcount, sendtype,
                                        recvbuf, recvcount, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ineighbor_alltoallv(const void *sendbuf, const int *sendcounts,
-                                             const int *sdispls, MPI_Datatype sendtype,
-                                             void *recvbuf, const int *recvcounts,
-                                             const int *rdispls, MPI_Datatype recvtype,
-                                             MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ineighbor_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                       const int *sdispls, MPI_Datatype sendtype,
+                                                       void *recvbuf, const int *recvcounts,
+                                                       const int *rdispls, MPI_Datatype recvtype,
+                                                       MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ineighbor_alltoallv(sendbuf, sendcounts, sdispls,
                                         sendtype, recvbuf, recvcounts, rdispls, recvtype, comm,
                                         req);
 }
 
-__CH4_INLINE__ int MPIDI_Ineighbor_alltoallw(const void *sendbuf, const int *sendcounts,
-                                             const MPI_Aint * sdispls,
-                                             const MPI_Datatype * sendtypes, void *recvbuf,
-                                             const int *recvcounts, const MPI_Aint * rdispls,
-                                             const MPI_Datatype * recvtypes, MPIR_Comm * comm,
-                                             MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ineighbor_alltoallw(const void *sendbuf, const int *sendcounts,
+                                                       const MPI_Aint * sdispls,
+                                                       const MPI_Datatype * sendtypes,
+                                                       void *recvbuf, const int *recvcounts,
+                                                       const MPI_Aint * rdispls,
+                                                       const MPI_Datatype * recvtypes,
+                                                       MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ineighbor_alltoallw(sendbuf, sendcounts, sdispls,
                                         sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm,
                                         req);
 }
 
-__CH4_INLINE__ int MPIDI_Ibarrier(MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ibarrier(MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ibarrier(comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ibcast(void *buffer, int count, MPI_Datatype datatype,
-                                int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ibcast(void *buffer, int count, MPI_Datatype datatype,
+                                          int root, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ibcast(buffer, count, datatype, root, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                    void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                    MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iallgather(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                              MPI_Datatype recvtype, MPIR_Comm * comm,
+                                              MPI_Request * req)
 {
     return MPIDI_NM_iallgather(sendbuf, sendcount, sendtype, recvbuf,
                                recvcount, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                     void *recvbuf, const int *recvcounts, const int *displs,
-                                     MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iallgatherv(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               const int *recvcounts, const int *displs,
+                                               MPI_Datatype recvtype, MPIR_Comm * comm,
+                                               MPI_Request * req)
 {
     return MPIDI_NM_iallgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                 recvcounts, displs, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
-                                    MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                    MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                              MPI_Request * req)
 {
     return MPIDI_NM_iallreduce(sendbuf, recvbuf, count, datatype, op, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                   MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ialltoall(const void *sendbuf, int sendcount,
+                                             MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                             MPI_Datatype recvtype, MPIR_Comm * comm,
+                                             MPI_Request * req)
 {
     return MPIDI_NM_ialltoall(sendbuf, sendcount, sendtype, recvbuf,
                               recvcount, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ialltoallv(const void *sendbuf, const int *sendcounts,
-                                    const int *sdispls, MPI_Datatype sendtype,
-                                    void *recvbuf, const int *recvcounts,
-                                    const int *rdispls, MPI_Datatype recvtype,
-                                    MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ialltoallv(const void *sendbuf, const int *sendcounts,
+                                              const int *sdispls, MPI_Datatype sendtype,
+                                              void *recvbuf, const int *recvcounts,
+                                              const int *rdispls, MPI_Datatype recvtype,
+                                              MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ialltoallv(sendbuf, sendcounts, sdispls, sendtype,
                                recvbuf, recvcounts, rdispls, recvtype, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_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,
-                                    MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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,
+                                              MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ialltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                                recvbuf, recvcounts, rdispls, recvtypes, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iexscan(const void *sendbuf, void *recvbuf, int count,
-                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iexscan(const void *sendbuf, void *recvbuf, int count,
+                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                           MPI_Request * req)
 {
     return MPIDI_NM_iexscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                 int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Igather(const void *sendbuf, int sendcount,
+                                           MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                           MPI_Datatype recvtype, int root, MPIR_Comm * comm,
+                                           MPI_Request * req)
 {
     return MPIDI_NM_igather(sendbuf, sendcount, sendtype, recvbuf,
                             recvcount, recvtype, root, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                                  void *recvbuf, const int *recvcounts, const int *displs,
-                                  MPI_Datatype recvtype, int root, MPIR_Comm * comm,
-                                  MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Igatherv(const void *sendbuf, int sendcount,
+                                            MPI_Datatype sendtype, void *recvbuf,
+                                            const int *recvcounts, const int *displs,
+                                            MPI_Datatype recvtype, int root, MPIR_Comm * comm,
+                                            MPI_Request * req)
 {
     return MPIDI_NM_igatherv(sendbuf, sendcount, sendtype, recvbuf,
                              recvcounts, displs, recvtype, root, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
-                                               MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                               MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                         int recvcount, MPI_Datatype datatype,
+                                                         MPI_Op op, MPIR_Comm * comm,
+                                                         MPI_Request * req)
 {
     return MPIDI_NM_ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ireduce_scatter(const void *sendbuf, void *recvbuf,
-                                         const int *recvcounts, MPI_Datatype datatype,
-                                         MPI_Op op, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                   const int *recvcounts, MPI_Datatype datatype,
+                                                   MPI_Op op, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Ireduce(const void *sendbuf, void *recvbuf, int count,
-                                 MPI_Datatype datatype, MPI_Op op, int root,
-                                 MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ireduce(const void *sendbuf, void *recvbuf, int count,
+                                           MPI_Datatype datatype, MPI_Op op, int root,
+                                           MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iscan(const void *sendbuf, void *recvbuf, int count,
-                               MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                               MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iscan(const void *sendbuf, void *recvbuf, int count,
+                                         MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                         MPI_Request * req)
 {
     return MPIDI_NM_iscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iscatter(const void *sendbuf, int sendcount,
-                                  MPI_Datatype sendtype, void *recvbuf, int recvcount,
-                                  MPI_Datatype recvtype, int root, MPIR_Comm * comm,
-                                  MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iscatter(const void *sendbuf, int sendcount,
+                                            MPI_Datatype sendtype, void *recvbuf, int recvcount,
+                                            MPI_Datatype recvtype, int root, MPIR_Comm * comm,
+                                            MPI_Request * req)
 {
     return MPIDI_NM_iscatter(sendbuf, sendcount, sendtype, recvbuf,
                              recvcount, recvtype, root, comm, req);
 }
 
-__CH4_INLINE__ int MPIDI_Iscatterv(const void *sendbuf, const int *sendcounts,
-                                   const int *displs, MPI_Datatype sendtype,
-                                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                                   int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iscatterv(const void *sendbuf, const int *sendcounts,
+                                             const int *displs, MPI_Datatype sendtype,
+                                             void *recvbuf, int recvcount, MPI_Datatype recvtype,
+                                             int root, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_iscatterv(sendbuf, sendcounts, displs, sendtype,
                               recvbuf, recvcount, recvtype, root, comm, req);
diff --git a/src/mpid/ch4/src/ch4_comm.h b/src/mpid/ch4/src/ch4_comm.h
index c5a9520..f849329 100644
--- a/src/mpid/ch4/src/ch4_comm.h
+++ b/src/mpid/ch4/src/ch4_comm.h
@@ -14,51 +14,54 @@
 #include "ch4_impl.h"
 #include "ch4i_comm.h"
 
-__CH4_INLINE__ int MPIDI_Comm_AS_enabled(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_AS_enabled(MPIR_Comm * comm)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_reenable_anysource(MPIR_Comm * comm, MPIR_Group ** failed_group_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_reenable_anysource(MPIR_Comm * comm,
+                                                           MPIR_Group ** failed_group_ptr)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_remote_group_failed(MPIR_Comm * comm, MPIR_Group ** failed_group_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_remote_group_failed(MPIR_Comm * comm,
+                                                            MPIR_Group ** failed_group_ptr)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_group_failed(MPIR_Comm * comm_ptr, MPIR_Group ** failed_group_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_group_failed(MPIR_Comm * comm_ptr,
+                                                     MPIR_Group ** failed_group_ptr)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_failure_ack(MPIR_Comm * comm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_failure_ack(MPIR_Comm * comm_ptr)
 {
     MPIR_Assert(0);
     return 0;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_failure_get_acked(MPIR_Comm * comm_ptr,
-                                                MPIR_Group ** failed_group_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_failure_get_acked(MPIR_Comm * comm_ptr,
+                                                          MPIR_Group ** failed_group_ptr)
 {
     MPIR_Assert(0);
     return 0;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_revoke(MPIR_Comm * comm_ptr, int is_remote)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_revoke(MPIR_Comm * comm_ptr, int is_remote)
 {
     MPIR_Assert(0);
     return 0;
 }
 
-__CH4_INLINE__ int MPIDI_Comm_get_all_failed_procs(MPIR_Comm * comm_ptr, MPIR_Group ** failed_group,
-                                                   int tag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_get_all_failed_procs(MPIR_Comm * comm_ptr,
+                                                             MPIR_Group ** failed_group, int tag)
 {
     MPIR_Assert(0);
     return 0;
@@ -68,9 +71,10 @@ __CH4_INLINE__ int MPIDI_Comm_get_all_failed_procs(MPIR_Comm * comm_ptr, MPIR_Gr
 #define FUNCNAME MPIDI_Comm_split_type
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_split_type(MPIR_Comm * comm_ptr,
-                                         int split_type,
-                                         int key, MPIR_Info * info_ptr, MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_split_type(MPIR_Comm * comm_ptr,
+                                                   int split_type,
+                                                   int key, MPIR_Info * info_ptr,
+                                                   MPIR_Comm ** newcomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     int idx;
@@ -95,7 +99,7 @@ __CH4_INLINE__ int MPIDI_Comm_split_type(MPIR_Comm * comm_ptr,
 #define FUNCNAME MPIDI_Comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_create_hook(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno;
     int i, *uniq_avtids;
@@ -167,7 +171,7 @@ __CH4_INLINE__ int MPIDI_Comm_create_hook(MPIR_Comm * comm)
 #define FUNCNAME MPIDI_Comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_free_hook(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno;
     int i, *uniq_avtids;
diff --git a/src/mpid/ch4/src/ch4_impl.h b/src/mpid/ch4/src/ch4_impl.h
index f8a8b75..301d561 100644
--- a/src/mpid/ch4/src/ch4_impl.h
+++ b/src/mpid/ch4/src/ch4_impl.h
@@ -80,7 +80,7 @@ static inline MPIR_Context_id_t MPIDI_CH4U_win_to_context(const MPIR_Win * win)
 #define FUNCNAME MPIDI_CH4U_request_release
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_request_release(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_request_release(MPIR_Request * req)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4R_REQUEST_RELEASE);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4R_REQEUST_RELEASE);
@@ -97,7 +97,7 @@ __CH4_INLINE__ void MPIDI_CH4U_request_release(MPIR_Request * req)
 #define FUNCNAME MPIDI_CH4U_request_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_request_complete(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_request_complete(MPIR_Request * req)
 {
     int incomplete;
     MPIR_cc_decr(req->cc_ptr, &incomplete);
diff --git a/src/mpid/ch4/src/ch4_init.h b/src/mpid/ch4/src/ch4_init.h
index 2365b85..7d8c10e 100644
--- a/src/mpid/ch4/src/ch4_init.h
+++ b/src/mpid/ch4/src/ch4_init.h
@@ -145,9 +145,9 @@ static inline int MPIDI_choose_shm(void)
 #define FUNCNAME MPIDI_Init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Init(int *argc,
-                              char ***argv,
-                              int requested, int *provided, int *has_args, int *has_env)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Init(int *argc,
+                                        char ***argv,
+                                        int requested, int *provided, int *has_args, int *has_env)
 {
     int pmi_errno, mpi_errno = MPI_SUCCESS, rank, has_parent, size, appnum, thr_err;
     void *netmod_contexts;
@@ -326,7 +326,7 @@ __CH4_INLINE__ int MPIDI_Init(int *argc,
 #define FUNCNAME MPIDI_InitCompleted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_InitCompleted(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_InitCompleted(void)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_INITCOMPLETED);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_INITCOMPLETED);
@@ -339,7 +339,7 @@ __CH4_INLINE__ int MPIDI_InitCompleted(void)
 #define FUNCNAME MPIDI_Finalize
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Finalize(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Finalize(void)
 {
     int mpi_errno, thr_err;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_FINALIZE);
@@ -380,7 +380,7 @@ __CH4_INLINE__ int MPIDI_Finalize(void)
 #define FUNCNAME MPIDI_Get_universe_size
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Get_universe_size(int *universe_size)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Get_universe_size(int *universe_size)
 {
     int mpi_errno = MPI_SUCCESS;
     int pmi_errno = PMI_SUCCESS;
@@ -408,7 +408,7 @@ __CH4_INLINE__ int MPIDI_Get_universe_size(int *universe_size)
 #define FUNCNAME MPIDI_Get_processor_name
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Get_processor_name(char *name, int namelen, int *resultlen)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Get_processor_name(char *name, int namelen, int *resultlen)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GET_PROCESSOR_NAME);
@@ -451,8 +451,8 @@ __CH4_INLINE__ int MPIDI_Get_processor_name(char *name, int namelen, int *result
 #define FUNCNAME MPIDI_Abort
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Abort(MPIR_Comm * comm,
-                               int mpi_errno, int exit_code, const char *error_msg)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Abort(MPIR_Comm * comm,
+                                         int mpi_errno, int exit_code, const char *error_msg)
 {
     char sys_str[MPI_MAX_ERROR_STRING + 5] = "";
     char comm_str[MPI_MAX_ERROR_STRING] = "";
@@ -495,7 +495,7 @@ __CH4_INLINE__ int MPIDI_Abort(MPIR_Comm * comm,
 #define FUNCNAME MPIDI_Alloc_mem
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void *MPIDI_Alloc_mem(size_t size, MPIR_Info * info_ptr)
+MPL_STATIC_INLINE_PREFIX void *MPIDI_Alloc_mem(size_t size, MPIR_Info * info_ptr)
 {
     void *p;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ALLOC_MEM);
@@ -511,7 +511,7 @@ __CH4_INLINE__ void *MPIDI_Alloc_mem(size_t size, MPIR_Info * info_ptr)
 #define FUNCNAME MPIDI_Free_mem
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Free_mem(void *ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Free_mem(void *ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_FREE_MEM);
@@ -533,8 +533,8 @@ __CH4_INLINE__ int MPIDI_Free_mem(void *ptr)
 #define FUNCNAME MPIDI_Comm_get_lpid
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_get_lpid(MPIR_Comm * comm_ptr,
-                                       int idx, int *lpid_ptr, MPL_bool is_remote)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_get_lpid(MPIR_Comm * comm_ptr,
+                                                 int idx, int *lpid_ptr, MPL_bool is_remote)
 {
     int mpi_errno = MPI_SUCCESS;
     int avtid = 0, lpid = 0;
@@ -559,7 +559,7 @@ __CH4_INLINE__ int MPIDI_Comm_get_lpid(MPIR_Comm * comm_ptr,
 #define FUNCNAME MPIDI_GPID_Get
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_GPID_Get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gpid)
+MPL_STATIC_INLINE_PREFIX int MPIDI_GPID_Get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gpid)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GPID_GET);
@@ -583,7 +583,7 @@ __CH4_INLINE__ int MPIDI_GPID_Get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gp
 #define FUNCNAME MPIDI_Get_node_id
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GET_NODE_ID);
@@ -599,7 +599,7 @@ __CH4_INLINE__ int MPIDI_Get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t
 #define FUNCNAME MPIDI_Get_max_node_id
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GET_MAX_NODE_ID);
@@ -615,8 +615,9 @@ __CH4_INLINE__ int MPIDI_Get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_
 #define FUNCNAME MPIDI_GetAllInComm
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_GPID_GetAllInComm(MPIR_Comm * comm_ptr,
-                                           int local_size, MPIR_Gpid local_gpids[], int *singleAVT)
+MPL_STATIC_INLINE_PREFIX int MPIDI_GPID_GetAllInComm(MPIR_Comm * comm_ptr,
+                                                     int local_size, MPIR_Gpid local_gpids[],
+                                                     int *singleAVT)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GETALLINCOMM);
@@ -639,7 +640,7 @@ __CH4_INLINE__ int MPIDI_GPID_GetAllInComm(MPIR_Comm * comm_ptr,
 #define FUNCNAME MPIDI_GPID_ToLpidArray
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_GPID_ToLpidArray(int size, MPIR_Gpid gpid[], int lpid[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_GPID_ToLpidArray(int size, MPIR_Gpid gpid[], int lpid[])
 {
     int mpi_errno = MPI_SUCCESS, i;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GPID_TOLPIDARRAY);
@@ -683,8 +684,8 @@ __CH4_INLINE__ int MPIDI_GPID_ToLpidArray(int size, MPIR_Gpid gpid[], int lpid[]
 #define FUNCNAME MPIDI_Create_intercomm_from_lpids
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
-                                                     int size, const int lpids[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
+                                                               int size, const int lpids[])
 {
     int mpi_errno = MPI_SUCCESS, i;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_CREATE_INTERCOMM_FROM_LPIDS);
@@ -722,7 +723,7 @@ __CH4_INLINE__ int MPIDI_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
 #define FUNCNAME MPIDI_Aint_add
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPI_Aint MPIDI_Aint_add(MPI_Aint base, MPI_Aint disp)
+MPL_STATIC_INLINE_PREFIX MPI_Aint MPIDI_Aint_add(MPI_Aint base, MPI_Aint disp)
 {
     MPI_Aint result;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_AINT_ADD);
@@ -736,7 +737,7 @@ __CH4_INLINE__ MPI_Aint MPIDI_Aint_add(MPI_Aint base, MPI_Aint disp)
 #define FUNCNAME MPIDI_Aint_diff
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPI_Aint MPIDI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
+MPL_STATIC_INLINE_PREFIX MPI_Aint MPIDI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
 {
     MPI_Aint result;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_AINT_DIFF);
@@ -752,7 +753,7 @@ __CH4_INLINE__ MPI_Aint MPIDI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
 #define FUNCNAME MPIDI_Type_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Type_create_hook(MPIR_Datatype * type)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Type_create_hook(MPIR_Datatype * type)
 {
     int mpi_errno;
 
@@ -782,7 +783,7 @@ __CH4_INLINE__ int MPIDI_Type_create_hook(MPIR_Datatype * type)
 #define FUNCNAME MPIDI_Type_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Type_free_hook(MPIR_Datatype * type)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Type_free_hook(MPIR_Datatype * type)
 {
     int mpi_errno;
 
@@ -812,7 +813,7 @@ __CH4_INLINE__ int MPIDI_Type_free_hook(MPIR_Datatype * type)
 #define FUNCNAME MPIDI_Op_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Op_create_hook(MPIR_Op * op)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Op_create_hook(MPIR_Op * op)
 {
     int mpi_errno;
 
@@ -842,7 +843,7 @@ __CH4_INLINE__ int MPIDI_Op_create_hook(MPIR_Op * op)
 #define FUNCNAME MPIDI_Op_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Op_free_hook(MPIR_Op * op)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Op_free_hook(MPIR_Op * op)
 {
     int mpi_errno;
 
diff --git a/src/mpid/ch4/src/ch4_probe.h b/src/mpid/ch4/src/ch4_probe.h
index 89b7bc9..2e43468 100644
--- a/src/mpid/ch4/src/ch4_probe.h
+++ b/src/mpid/ch4/src/ch4_probe.h
@@ -17,8 +17,9 @@
 #define FUNCNAME MPIDI_Probe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Probe(int source,
-                               int tag, MPIR_Comm * comm, int context_offset, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Probe(int source,
+                                         int tag, MPIR_Comm * comm, int context_offset,
+                                         MPI_Status * status)
 {
     int mpi_errno, flag = 0;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_PROBE);
@@ -72,10 +73,11 @@ __CH4_INLINE__ int MPIDI_Probe(int source,
 #define FUNCNAME MPIDI_Mprobe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Mprobe(int source,
-                                int tag,
-                                MPIR_Comm * comm,
-                                int context_offset, MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Mprobe(int source,
+                                          int tag,
+                                          MPIR_Comm * comm,
+                                          int context_offset, MPIR_Request ** message,
+                                          MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS, flag = 0;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_MPROBE);
@@ -132,11 +134,11 @@ __CH4_INLINE__ int MPIDI_Mprobe(int source,
 #define FUNCNAME MPIDI_Improbe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Improbe(int source,
-                                 int tag,
-                                 MPIR_Comm * comm,
-                                 int context_offset,
-                                 int *flag, MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Improbe(int source,
+                                           int tag,
+                                           MPIR_Comm * comm,
+                                           int context_offset,
+                                           int *flag, MPIR_Request ** message, MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_IMPROBE);
@@ -177,10 +179,10 @@ __CH4_INLINE__ int MPIDI_Improbe(int source,
 #define FUNCNAME MPIDI_Iprobe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Iprobe(int source,
-                                int tag,
-                                MPIR_Comm * comm,
-                                int context_offset, int *flag, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Iprobe(int source,
+                                          int tag,
+                                          MPIR_Comm * comm,
+                                          int context_offset, int *flag, MPI_Status * status)
 {
 
     int mpi_errno;
diff --git a/src/mpid/ch4/src/ch4_proc.h b/src/mpid/ch4/src/ch4_proc.h
index 4aefcf0..7666a82 100644
--- a/src/mpid/ch4/src/ch4_proc.h
+++ b/src/mpid/ch4/src/ch4_proc.h
@@ -17,7 +17,7 @@
 #define FUNCNAME MPIDI_CH4_rank_is_local
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm)
 {
     int ret;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPIDI_STATE_CH4_RANK_IS_LOCAL);
diff --git a/src/mpid/ch4/src/ch4_progress.h b/src/mpid/ch4/src/ch4_progress.h
index 37bffef..66a022d 100644
--- a/src/mpid/ch4/src/ch4_progress.h
+++ b/src/mpid/ch4/src/ch4_progress.h
@@ -17,7 +17,7 @@
 #define FUNCNAME MPIDI_Progress_test
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Progress_test(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_test(void)
 {
     int mpi_errno, made_progress, i;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_PROGRESS_TEST);
@@ -56,22 +56,22 @@ __CH4_INLINE__ int MPIDI_Progress_test(void)
     goto fn_exit;;
 }
 
-__CH4_INLINE__ int MPIDI_Progress_poke(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_poke(void)
 {
     return MPIDI_Progress_test();
 }
 
-__CH4_INLINE__ void MPIDI_Progress_start(MPID_Progress_state * state)
+MPL_STATIC_INLINE_PREFIX void MPIDI_Progress_start(MPID_Progress_state * state)
 {
     return;
 }
 
-__CH4_INLINE__ void MPIDI_Progress_end(MPID_Progress_state * state)
+MPL_STATIC_INLINE_PREFIX void MPIDI_Progress_end(MPID_Progress_state * state)
 {
     return;
 }
 
-__CH4_INLINE__ int MPIDI_Progress_wait(MPID_Progress_state * state)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_wait(MPID_Progress_state * state)
 {
     return MPIDI_Progress_test();
 }
@@ -81,7 +81,7 @@ __CH4_INLINE__ int MPIDI_Progress_wait(MPID_Progress_state * state)
 #define FUNCNAME MPIDI_Progress_register
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Progress_register(int (*progress_fn) (int *), int *id)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_register(int (*progress_fn) (int *), int *id)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
@@ -119,7 +119,7 @@ __CH4_INLINE__ int MPIDI_Progress_register(int (*progress_fn) (int *), int *id)
 #define FUNCNAME MPIDI_Progress_deregister
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Progress_deregister(int id)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_deregister(int id)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PROGRESS_DEREGISTER);
@@ -142,7 +142,7 @@ __CH4_INLINE__ int MPIDI_Progress_deregister(int id)
 #define FUNCNAME MPIDI_Progress_activate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Progress_activate(int id)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_activate(int id)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PROGRESS_ACTIVATE);
@@ -164,7 +164,7 @@ __CH4_INLINE__ int MPIDI_Progress_activate(int id)
 #define FUNCNAME MPIDI_Progress_deactivate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Progress_deactivate(int id)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Progress_deactivate(int id)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_PROGRESS_DEACTIVATE);
diff --git a/src/mpid/ch4/src/ch4_recv.h b/src/mpid/ch4/src/ch4_recv.h
index 71af9db..a6ab84a 100644
--- a/src/mpid/ch4/src/ch4_recv.h
+++ b/src/mpid/ch4/src/ch4_recv.h
@@ -17,13 +17,14 @@
 #define FUNCNAME MPIDI_Recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Recv(void *buf,
-                              int count,
-                              MPI_Datatype datatype,
-                              int rank,
-                              int tag,
-                              MPIR_Comm * comm,
-                              int context_offset, MPI_Status * status, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Recv(void *buf,
+                                        int count,
+                                        MPI_Datatype datatype,
+                                        int rank,
+                                        int tag,
+                                        MPIR_Comm * comm,
+                                        int context_offset, MPI_Status * status,
+                                        MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RECV);
@@ -104,12 +105,13 @@ __CH4_INLINE__ int MPIDI_Recv(void *buf,
 #define FUNCNAME MPIDI_Recv_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Recv_init(void *buf,
-                                   int count,
-                                   MPI_Datatype datatype,
-                                   int rank,
-                                   int tag,
-                                   MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Recv_init(void *buf,
+                                             int count,
+                                             MPI_Datatype datatype,
+                                             int rank,
+                                             int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RECV_INIT);
@@ -167,9 +169,10 @@ __CH4_INLINE__ int MPIDI_Recv_init(void *buf,
 #define FUNCNAME MPIDI_Mrecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Mrecv(void *buf,
-                               int count,
-                               MPI_Datatype datatype, MPIR_Request * message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Mrecv(void *buf,
+                                         int count,
+                                         MPI_Datatype datatype, MPIR_Request * message,
+                                         MPI_Status * status)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_MRECV);
@@ -256,10 +259,10 @@ __CH4_INLINE__ int MPIDI_Mrecv(void *buf,
 #define FUNCNAME MPIDI_Imrecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Imrecv(void *buf,
-                                int count,
-                                MPI_Datatype datatype,
-                                MPIR_Request * message, MPIR_Request ** rreqp)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Imrecv(void *buf,
+                                          int count,
+                                          MPI_Datatype datatype,
+                                          MPIR_Request * message, MPIR_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_IMRECV);
@@ -311,12 +314,13 @@ __CH4_INLINE__ int MPIDI_Imrecv(void *buf,
 #define FUNCNAME MPIDI_Irecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Irecv(void *buf,
-                               int count,
-                               MPI_Datatype datatype,
-                               int rank,
-                               int tag,
-                               MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Irecv(void *buf,
+                                         int count,
+                                         MPI_Datatype datatype,
+                                         int rank,
+                                         int tag,
+                                         MPIR_Comm * comm, int context_offset,
+                                         MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_IRECV);
@@ -385,7 +389,7 @@ __CH4_INLINE__ int MPIDI_Irecv(void *buf,
 #define FUNCNAME MPIDI_Cancel_Recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Cancel_recv(MPIR_Request * rreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Cancel_recv(MPIR_Request * rreq)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_CANCEL_RECV);
diff --git a/src/mpid/ch4/src/ch4_request.h b/src/mpid/ch4/src/ch4_request.h
index ac11dac..a38a5fa 100644
--- a/src/mpid/ch4/src/ch4_request.h
+++ b/src/mpid/ch4/src/ch4_request.h
@@ -14,31 +14,31 @@
 #include "ch4_impl.h"
 #include "ch4r_buf.h"
 
-__CH4_INLINE__ int MPIDI_Request_is_anysource(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Request_is_anysource(MPIR_Request * req)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ int MPIDI_Request_is_pending_failure(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Request_is_pending_failure(MPIR_Request * req)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-__CH4_INLINE__ void MPIDI_Request_set_completed(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_Request_set_completed(MPIR_Request * req)
 {
     MPIR_cc_set(&req->cc, 0);
     return;
 }
 
-__CH4_INLINE__ void MPIDI_Request_add_ref(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_Request_add_ref(MPIR_Request * req)
 {
     MPIR_Request_add_ref(req);
     return;
 }
 
-__CH4_INLINE__ void MPIDI_Request_release_ref(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_Request_release_ref(MPIR_Request * req)
 {
     int inuse;
     MPIR_Request_release_ref(req, &inuse);
@@ -80,7 +80,7 @@ __CH4_INLINE__ void MPIDI_Request_release_ref(MPIR_Request * req)
 #define FUNCNAME MPIDI_request_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Request_complete(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Request_complete(MPIR_Request * req)
 {
     int incomplete;
     MPIR_cc_decr(req->cc_ptr, &incomplete);
diff --git a/src/mpid/ch4/src/ch4_rma.h b/src/mpid/ch4/src/ch4_rma.h
index a85cdb8..7eabd9d 100644
--- a/src/mpid/ch4/src/ch4_rma.h
+++ b/src/mpid/ch4/src/ch4_rma.h
@@ -17,12 +17,13 @@
 #define FUNCNAME MPIDI_Put
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_PUT);
@@ -43,12 +44,13 @@ __CH4_INLINE__ int MPIDI_Put(const void *origin_addr,
 #define FUNCNAME MPIDI_Get
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GET);
@@ -69,13 +71,14 @@ __CH4_INLINE__ int MPIDI_Get(void *origin_addr,
 #define FUNCNAME MPIDI_Accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ACCUMULATE);
@@ -97,11 +100,12 @@ __CH4_INLINE__ int MPIDI_Accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_Compare_and_swap
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Compare_and_swap(const void *origin_addr,
-                                          const void *compare_addr,
-                                          void *result_addr,
-                                          MPI_Datatype datatype,
-                                          int target_rank, MPI_Aint target_disp, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Compare_and_swap(const void *origin_addr,
+                                                    const void *compare_addr,
+                                                    void *result_addr,
+                                                    MPI_Datatype datatype,
+                                                    int target_rank, MPI_Aint target_disp,
+                                                    MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_COMPARE_AND_SWAP);
@@ -122,14 +126,14 @@ __CH4_INLINE__ int MPIDI_Compare_and_swap(const void *origin_addr,
 #define FUNCNAME MPIDI_Raccumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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, MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RACCUMULATE);
@@ -151,17 +155,18 @@ __CH4_INLINE__ int MPIDI_Raccumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_Rget_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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,
+                                                   MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RGET_ACCUMULATE);
@@ -184,11 +189,11 @@ __CH4_INLINE__ int MPIDI_Rget_accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_Fetch_and_op
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Fetch_and_op(const void *origin_addr,
-                                      void *result_addr,
-                                      MPI_Datatype datatype,
-                                      int target_rank,
-                                      MPI_Aint target_disp, MPI_Op op, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Fetch_and_op(const void *origin_addr,
+                                                void *result_addr,
+                                                MPI_Datatype datatype,
+                                                int target_rank,
+                                                MPI_Aint target_disp, MPI_Op op, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_FETCH_AND_OP);
@@ -210,13 +215,14 @@ __CH4_INLINE__ int MPIDI_Fetch_and_op(const void *origin_addr,
 #define FUNCNAME MPIDI_Rget
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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,
+                                        MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RGET);
@@ -238,13 +244,14 @@ __CH4_INLINE__ int MPIDI_Rget(void *origin_addr,
 #define FUNCNAME MPIDI_Rput
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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,
+                                        MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RPUT);
@@ -266,16 +273,17 @@ __CH4_INLINE__ int MPIDI_Rput(const void *origin_addr,
 #define FUNCNAME MPIDI_Get_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_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)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_GET_ACCUMULATE);
diff --git a/src/mpid/ch4/src/ch4_send.h b/src/mpid/ch4/src/ch4_send.h
index 318e79b..c719115 100644
--- a/src/mpid/ch4/src/ch4_send.h
+++ b/src/mpid/ch4/src/ch4_send.h
@@ -17,12 +17,13 @@
 #define FUNCNAME MPIDI_Send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Send(const void *buf,
-                              int count,
-                              MPI_Datatype datatype,
-                              int rank,
-                              int tag,
-                              MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Send(const void *buf,
+                                        int count,
+                                        MPI_Datatype datatype,
+                                        int rank,
+                                        int tag,
+                                        MPIR_Comm * comm, int context_offset,
+                                        MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_SEND);
@@ -62,12 +63,13 @@ __CH4_INLINE__ int MPIDI_Send(const void *buf,
 #define FUNCNAME MPIDI_Isend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Isend(const void *buf,
-                               int count,
-                               MPI_Datatype datatype,
-                               int rank,
-                               int tag,
-                               MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Isend(const void *buf,
+                                         int count,
+                                         MPI_Datatype datatype,
+                                         int rank,
+                                         int tag,
+                                         MPIR_Comm * comm, int context_offset,
+                                         MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ISEND);
@@ -108,12 +110,13 @@ __CH4_INLINE__ int MPIDI_Isend(const void *buf,
 #define FUNCNAME MPIDI_Rsend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Rsend(const void *buf,
-                               int count,
-                               MPI_Datatype datatype,
-                               int rank,
-                               int tag,
-                               MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Rsend(const void *buf,
+                                         int count,
+                                         MPI_Datatype datatype,
+                                         int rank,
+                                         int tag,
+                                         MPIR_Comm * comm, int context_offset,
+                                         MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RSEND);
@@ -154,12 +157,13 @@ __CH4_INLINE__ int MPIDI_Rsend(const void *buf,
 #define FUNCNAME MPIDI_Irsend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Irsend(const void *buf,
-                                int count,
-                                MPI_Datatype datatype,
-                                int rank,
-                                int tag,
-                                MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Irsend(const void *buf,
+                                          int count,
+                                          MPI_Datatype datatype,
+                                          int rank,
+                                          int tag,
+                                          MPIR_Comm * comm, int context_offset,
+                                          MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_IRSEND);
@@ -199,12 +203,13 @@ __CH4_INLINE__ int MPIDI_Irsend(const void *buf,
 #define FUNCNAME MPIDI_Ssend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Ssend(const void *buf,
-                               int count,
-                               MPI_Datatype datatype,
-                               int rank,
-                               int tag,
-                               MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ssend(const void *buf,
+                                         int count,
+                                         MPI_Datatype datatype,
+                                         int rank,
+                                         int tag,
+                                         MPIR_Comm * comm, int context_offset,
+                                         MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_SSEND);
@@ -244,12 +249,13 @@ __CH4_INLINE__ int MPIDI_Ssend(const void *buf,
 #define FUNCNAME MPIDI_Issend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Issend(const void *buf,
-                                int count,
-                                MPI_Datatype datatype,
-                                int rank,
-                                int tag,
-                                MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Issend(const void *buf,
+                                          int count,
+                                          MPI_Datatype datatype,
+                                          int rank,
+                                          int tag,
+                                          MPIR_Comm * comm, int context_offset,
+                                          MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ISSEND);
@@ -290,7 +296,7 @@ __CH4_INLINE__ int MPIDI_Issend(const void *buf,
 #define FUNCNAME MPIDI_Startall
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Startall(int count, MPIR_Request * requests[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_Startall(int count, MPIR_Request * requests[])
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_STARTALL);
@@ -333,12 +339,13 @@ __CH4_INLINE__ int MPIDI_Startall(int count, MPIR_Request * requests[])
 #define FUNCNAME MPIDI_Send_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Send_init(const void *buf,
-                                   int count,
-                                   MPI_Datatype datatype,
-                                   int rank,
-                                   int tag,
-                                   MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Send_init(const void *buf,
+                                             int count,
+                                             MPI_Datatype datatype,
+                                             int rank,
+                                             int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_SEND_INIT);
@@ -371,12 +378,13 @@ __CH4_INLINE__ int MPIDI_Send_init(const void *buf,
 #define FUNCNAME MPIDI_Ssend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Ssend_init(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Ssend_init(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_SSEND_INIT);
@@ -410,12 +418,13 @@ __CH4_INLINE__ int MPIDI_Ssend_init(const void *buf,
 #define FUNCNAME MPIDI_Bsend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Bsend_init(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Bsend_init(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_BSEND_INIT);
@@ -449,12 +458,13 @@ __CH4_INLINE__ int MPIDI_Bsend_init(const void *buf,
 #define FUNCNAME MPIDI_Rsend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Rsend_init(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Rsend_init(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_RSEND_INIT);
@@ -489,7 +499,7 @@ __CH4_INLINE__ int MPIDI_Rsend_init(const void *buf,
 #define FUNCNAME MPIDI_Cancel_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Cancel_send(MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Cancel_send(MPIR_Request * sreq)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_CANCEL_SEND);
diff --git a/src/mpid/ch4/src/ch4_spawn.h b/src/mpid/ch4/src/ch4_spawn.h
index d4968a1..07290cc 100644
--- a/src/mpid/ch4/src/ch4_spawn.h
+++ b/src/mpid/ch4/src/ch4_spawn.h
@@ -70,14 +70,14 @@ static inline void MPIDI_free_pmi_keyvals(PMI_keyval_t ** kv, int size, int *cou
 #define FUNCNAME MPIDI_Comm_spawn_multiple
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_spawn_multiple(int count,
-                                             char *commands[],
-                                             char **argvs[],
-                                             const int maxprocs[],
-                                             MPIR_Info * info_ptrs[],
-                                             int root,
-                                             MPIR_Comm * comm_ptr,
-                                             MPIR_Comm ** intercomm, int errcodes[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_spawn_multiple(int count,
+                                                       char *commands[],
+                                                       char **argvs[],
+                                                       const int maxprocs[],
+                                                       MPIR_Info * info_ptrs[],
+                                                       int root,
+                                                       MPIR_Comm * comm_ptr,
+                                                       MPIR_Comm ** intercomm, int errcodes[])
 {
     char port_name[MPI_MAX_PORT_NAME];
     int *info_keyval_sizes = 0, i, mpi_errno = MPI_SUCCESS;
@@ -206,9 +206,10 @@ __CH4_INLINE__ int MPIDI_Comm_spawn_multiple(int count,
 #define FUNCNAME MPIDI_Comm_connect
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_connect(const char *port_name,
-                                      MPIR_Info * info,
-                                      int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_connect(const char *port_name,
+                                                MPIR_Info * info,
+                                                int root, MPIR_Comm * comm,
+                                                MPIR_Comm ** newcomm_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_COMM_CONNECT);
@@ -230,7 +231,7 @@ __CH4_INLINE__ int MPIDI_Comm_connect(const char *port_name,
 #define FUNCNAME MPIDI_Comm_disconnect
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_disconnect(MPIR_Comm * comm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_disconnect(MPIR_Comm * comm_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_COMM_DISCONNECT);
@@ -252,7 +253,7 @@ __CH4_INLINE__ int MPIDI_Comm_disconnect(MPIR_Comm * comm_ptr)
 #define FUNCNAME MPIDI_Open_port
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Open_port(MPIR_Info * info_ptr, char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Open_port(MPIR_Info * info_ptr, char *port_name)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_OPEN_PORT);
@@ -274,7 +275,7 @@ __CH4_INLINE__ int MPIDI_Open_port(MPIR_Info * info_ptr, char *port_name)
 #define FUNCNAME MPIDI_Close_port
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Close_port(const char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Close_port(const char *port_name)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_CLOSE_PORT);
@@ -296,9 +297,9 @@ __CH4_INLINE__ int MPIDI_Close_port(const char *port_name)
 #define FUNCNAME MPIDI_Comm_accept
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_accept(const char *port_name,
-                                     MPIR_Info * info,
-                                     int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Comm_accept(const char *port_name,
+                                               MPIR_Info * info,
+                                               int root, MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_COMM_ACCEPT);
diff --git a/src/mpid/ch4/src/ch4_win.h b/src/mpid/ch4/src/ch4_win.h
index 222f7fe..12f899d 100644
--- a/src/mpid/ch4/src/ch4_win.h
+++ b/src/mpid/ch4/src/ch4_win.h
@@ -17,7 +17,7 @@
 #define FUNCNAME MPIDI_Win_set_info
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_set_info(MPIR_Win * win, MPIR_Info * info)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_set_info(MPIR_Win * win, MPIR_Info * info)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_SET_INFO);
@@ -37,7 +37,7 @@ __CH4_INLINE__ int MPIDI_Win_set_info(MPIR_Win * win, MPIR_Info * info)
 #define FUNCNAME MPIDI_Win_start
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_start(MPIR_Group * group, int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_start(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_START);
@@ -57,7 +57,7 @@ __CH4_INLINE__ int MPIDI_Win_start(MPIR_Group * group, int assert, MPIR_Win * wi
 #define FUNCNAME MPIDI_Win_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_complete(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_complete(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_COMPLETE);
@@ -77,7 +77,7 @@ __CH4_INLINE__ int MPIDI_Win_complete(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_post
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_post(MPIR_Group * group, int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_post(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_POST);
@@ -97,7 +97,7 @@ __CH4_INLINE__ int MPIDI_Win_post(MPIR_Group * group, int assert, MPIR_Win * win
 #define FUNCNAME MPIDI_Win_wait
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_wait(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_wait(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_WAIT);
@@ -118,7 +118,7 @@ __CH4_INLINE__ int MPIDI_Win_wait(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_test
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_test(MPIR_Win * win, int *flag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_test(MPIR_Win * win, int *flag)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_TEST);
@@ -138,7 +138,7 @@ __CH4_INLINE__ int MPIDI_Win_test(MPIR_Win * win, int *flag)
 #define FUNCNAME MPIDI_Win_lock
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_lock(int lock_type, int rank, int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_lock(int lock_type, int rank, int assert, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_LOCK);
@@ -158,7 +158,7 @@ __CH4_INLINE__ int MPIDI_Win_lock(int lock_type, int rank, int assert, MPIR_Win
 #define FUNCNAME MPIDI_Win_unlock
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_unlock(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_unlock(int rank, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_UNLOCK);
@@ -178,7 +178,7 @@ __CH4_INLINE__ int MPIDI_Win_unlock(int rank, MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_get_info
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_GET_INFO);
@@ -198,7 +198,7 @@ __CH4_INLINE__ int MPIDI_Win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
 #define FUNCNAME MPIDI_Win_free
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_free(MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_free(MPIR_Win ** win_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FREE);
@@ -218,7 +218,7 @@ __CH4_INLINE__ int MPIDI_Win_free(MPIR_Win ** win_ptr)
 #define FUNCNAME MPIDI_Win_fence
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_fence(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_fence(int assert, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FENCE);
@@ -238,10 +238,11 @@ __CH4_INLINE__ int MPIDI_Win_fence(int assert, MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_create
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_create(void *base,
-                                    MPI_Aint length,
-                                    int disp_unit,
-                                    MPIR_Info * info, MPIR_Comm * comm_ptr, MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_create(void *base,
+                                              MPI_Aint length,
+                                              int disp_unit,
+                                              MPIR_Info * info, MPIR_Comm * comm_ptr,
+                                              MPIR_Win ** win_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_CREATE);
@@ -261,7 +262,7 @@ __CH4_INLINE__ int MPIDI_Win_create(void *base,
 #define FUNCNAME MPIDI_Win_attach
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_attach(MPIR_Win * win, void *base, MPI_Aint size)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_attach(MPIR_Win * win, void *base, MPI_Aint size)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_ATTACH);
@@ -281,11 +282,11 @@ __CH4_INLINE__ int MPIDI_Win_attach(MPIR_Win * win, void *base, MPI_Aint size)
 #define FUNCNAME MPIDI_Win_allocate_shared
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_allocate_shared(MPI_Aint size,
-                                             int disp_unit,
-                                             MPIR_Info * info_ptr,
-                                             MPIR_Comm * comm_ptr,
-                                             void **base_ptr, MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_allocate_shared(MPI_Aint size,
+                                                       int disp_unit,
+                                                       MPIR_Info * info_ptr,
+                                                       MPIR_Comm * comm_ptr,
+                                                       void **base_ptr, MPIR_Win ** win_ptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_ALLOCATE_SHARED);
@@ -306,7 +307,7 @@ __CH4_INLINE__ int MPIDI_Win_allocate_shared(MPI_Aint size,
 #define FUNCNAME MPIDI_Win_flush_local
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_flush_local(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_flush_local(int rank, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FLUSH_LOCAL);
@@ -326,7 +327,7 @@ __CH4_INLINE__ int MPIDI_Win_flush_local(int rank, MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_detach
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_detach(MPIR_Win * win, const void *base)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_detach(MPIR_Win * win, const void *base)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_DETACH);
@@ -347,8 +348,9 @@ __CH4_INLINE__ int MPIDI_Win_detach(MPIR_Win * win, const void *base)
 #define FUNCNAME MPIDI_Win_shared_query
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_shared_query(MPIR_Win * win,
-                                          int rank, MPI_Aint * size, int *disp_unit, void *baseptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_shared_query(MPIR_Win * win,
+                                                    int rank, MPI_Aint * size, int *disp_unit,
+                                                    void *baseptr)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_SHARED_QUERY);
@@ -368,10 +370,10 @@ __CH4_INLINE__ int MPIDI_Win_shared_query(MPIR_Win * win,
 #define FUNCNAME MPIDI_Win_allocate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_allocate(MPI_Aint size,
-                                      int disp_unit,
-                                      MPIR_Info * info,
-                                      MPIR_Comm * comm, void *baseptr, MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_allocate(MPI_Aint size,
+                                                int disp_unit,
+                                                MPIR_Info * info,
+                                                MPIR_Comm * comm, void *baseptr, MPIR_Win ** win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_ALLOCATE);
@@ -391,7 +393,7 @@ __CH4_INLINE__ int MPIDI_Win_allocate(MPI_Aint size,
 #define FUNCNAME MPIDI_Win_flush
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_flush(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_flush(int rank, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FLUSH);
@@ -411,7 +413,7 @@ __CH4_INLINE__ int MPIDI_Win_flush(int rank, MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_flush_local_all
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_flush_local_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_flush_local_all(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FLUSH_LOCAL_ALL);
@@ -431,7 +433,7 @@ __CH4_INLINE__ int MPIDI_Win_flush_local_all(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_unlock_all
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_unlock_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_unlock_all(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_UNLOCK_ALL);
@@ -451,7 +453,8 @@ __CH4_INLINE__ int MPIDI_Win_unlock_all(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_create_dynamic
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm, MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
+                                                      MPIR_Win ** win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_CREATE_DYNAMIC);
@@ -471,7 +474,7 @@ __CH4_INLINE__ int MPIDI_Win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
 #define FUNCNAME MPIDI_Win_sync
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_sync(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_sync(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_SYNC);
@@ -491,7 +494,7 @@ __CH4_INLINE__ int MPIDI_Win_sync(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_flush_all
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_flush_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_flush_all(MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_FLUSH_ALL);
@@ -511,7 +514,7 @@ __CH4_INLINE__ int MPIDI_Win_flush_all(MPIR_Win * win)
 #define FUNCNAME MPIDI_Win_lock_all
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Win_lock_all(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_Win_lock_all(int assert, MPIR_Win * win)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_WIN_LOCK_ALL);
diff --git a/src/mpid/ch4/src/ch4i_comm.h b/src/mpid/ch4/src/ch4i_comm.h
index b34405c..a5575d7 100644
--- a/src/mpid/ch4/src/ch4i_comm.h
+++ b/src/mpid/ch4/src/ch4i_comm.h
@@ -977,7 +977,7 @@ static inline int MPIDII_set_map(MPIDII_rank_map_t * src_rmap,
 #define FUNCNAME MPIDII_comm_create_rank_map
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDII_comm_create_rank_map(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDII_comm_create_rank_map(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm_map_t *mapper;
diff --git a/src/mpid/ch4/src/ch4r_init.h b/src/mpid/ch4/src/ch4r_init.h
index 9126e17..f692720 100644
--- a/src/mpid/ch4/src/ch4r_init.h
+++ b/src/mpid/ch4/src/ch4r_init.h
@@ -21,7 +21,7 @@
 #define FUNCNAME MPIDI_CH4U_init_comm
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_init_comm(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_init_comm(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm;
     MPIDI_CH4U_rreq_t **uelist;
@@ -72,7 +72,7 @@ __CH4_INLINE__ int MPIDI_CH4U_init_comm(MPIR_Comm * comm)
 #define FUNCNAME MPIDI_CH4U_destroy_comm
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_destroy_comm(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_destroy_comm(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS, comm_idx, subcomm_type, is_localcomm;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_DESTROY_COMM);
@@ -104,8 +104,8 @@ __CH4_INLINE__ int MPIDI_CH4U_destroy_comm(MPIR_Comm * comm)
 #define FUNCNAME MPIDI_CH4U_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self,
-                                   int num_contexts, void **netmod_contexts)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self,
+                                             int num_contexts, void **netmod_contexts)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_INIT);
@@ -278,7 +278,7 @@ __CH4_INLINE__ int MPIDI_CH4U_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self
 #define FUNCNAME MPIDI_CH4U_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_finalize()
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_finalize()
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_FINALIZE);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4U_FINALIZE);
@@ -293,7 +293,7 @@ __CH4_INLINE__ void MPIDI_CH4U_finalize()
 #define FUNCNAME MPIDI_CH4U_alloc_mem
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void *MPIDI_CH4U_alloc_mem(size_t size, MPIR_Info * info_ptr)
+MPL_STATIC_INLINE_PREFIX void *MPIDI_CH4U_alloc_mem(size_t size, MPIR_Info * info_ptr)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_ALLOC_MEM);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4U_ALLOC_MEM);
@@ -307,7 +307,7 @@ __CH4_INLINE__ void *MPIDI_CH4U_alloc_mem(size_t size, MPIR_Info * info_ptr)
 #define FUNCNAME MPIDI_CH4U_free_mem
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_free_mem(void *ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_free_mem(void *ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_FREE_MEM);
diff --git a/src/mpid/ch4/src/ch4r_probe.h b/src/mpid/ch4/src/ch4r_probe.h
index 20753db..015a274 100644
--- a/src/mpid/ch4/src/ch4r_probe.h
+++ b/src/mpid/ch4/src/ch4r_probe.h
@@ -17,10 +17,10 @@
 #define FUNCNAME MPIDI_CH4U_iprobe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_iprobe(int source,
-                                     int tag,
-                                     MPIR_Comm * comm,
-                                     int context_offset, int *flag, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_iprobe(int source,
+                                               int tag,
+                                               MPIR_Comm * comm,
+                                               int context_offset, int *flag, MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *root_comm;
@@ -69,9 +69,10 @@ __CH4_INLINE__ int MPIDI_CH4U_iprobe(int source,
 #define FUNCNAME MPIDI_Probe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_probe(int source,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_probe(int source,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPI_Status * status)
 {
     int mpi_errno, flag = 0;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_PROBE);
@@ -94,11 +95,12 @@ __CH4_INLINE__ int MPIDI_CH4U_probe(int source,
 #define FUNCNAME MPIDI_CH4U_improbe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_improbe(int source,
-                                      int tag,
-                                      MPIR_Comm * comm,
-                                      int context_offset,
-                                      int *flag, MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_improbe(int source,
+                                                int tag,
+                                                MPIR_Comm * comm,
+                                                int context_offset,
+                                                int *flag, MPIR_Request ** message,
+                                                MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Comm *root_comm;
@@ -157,11 +159,11 @@ __CH4_INLINE__ int MPIDI_CH4U_improbe(int source,
 #define FUNCNAME MPIDI_CH4U_mprobe
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_mprobe(int source,
-                                     int tag,
-                                     MPIR_Comm * comm,
-                                     int context_offset,
-                                     MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mprobe(int source,
+                                               int tag,
+                                               MPIR_Comm * comm,
+                                               int context_offset,
+                                               MPIR_Request ** message, MPI_Status * status)
 {
     int mpi_errno, flag = 0;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_MPROBE);
diff --git a/src/mpid/ch4/src/ch4r_recv.h b/src/mpid/ch4/src/ch4r_recv.h
index c77040c..4672198 100644
--- a/src/mpid/ch4/src/ch4r_recv.h
+++ b/src/mpid/ch4/src/ch4r_recv.h
@@ -213,13 +213,14 @@ static inline int MPIDI_CH4I_do_irecv(void *buf,
 #define FUNCNAME MPIDI_CH4U_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_recv(void *buf,
-                                   int count,
-                                   MPI_Datatype datatype,
-                                   int rank,
-                                   int tag,
-                                   MPIR_Comm * comm,
-                                   int context_offset, MPI_Status * status, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_recv(void *buf,
+                                             int count,
+                                             MPI_Datatype datatype,
+                                             int rank,
+                                             int tag,
+                                             MPIR_Comm * comm,
+                                             int context_offset, MPI_Status * status,
+                                             MPIR_Request ** request)
 {
     int mpi_errno;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_RECV);
@@ -241,13 +242,13 @@ __CH4_INLINE__ int MPIDI_CH4U_recv(void *buf,
 #define FUNCNAME MPIDI_CH4U_recv_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_recv_init(void *buf,
-                                        int count,
-                                        MPI_Datatype datatype,
-                                        int rank,
-                                        int tag,
-                                        MPIR_Comm * comm,
-                                        int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_recv_init(void *buf,
+                                                  int count,
+                                                  MPI_Datatype datatype,
+                                                  int rank,
+                                                  int tag,
+                                                  MPIR_Comm * comm,
+                                                  int context_offset, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *rreq;
@@ -279,10 +280,10 @@ __CH4_INLINE__ int MPIDI_CH4U_recv_init(void *buf,
 #define FUNCNAME MPIDI_CH4U_imrecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_imrecv(void *buf,
-                                     int count,
-                                     MPI_Datatype datatype,
-                                     MPIR_Request * message, MPIR_Request ** rreqp)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_imrecv(void *buf,
+                                               int count,
+                                               MPI_Datatype datatype,
+                                               MPIR_Request * message, MPIR_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *rreq;
@@ -332,10 +333,10 @@ __CH4_INLINE__ int MPIDI_CH4U_imrecv(void *buf,
 #define FUNCNAME MPIDI_CH4U_mrecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_mrecv(void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    MPIR_Request * message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_mrecv(void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              MPIR_Request * message, MPI_Status * status)
 {
     int mpi_errno = MPI_SUCCESS, active_flag;
     MPI_Request req_handle;
@@ -369,12 +370,13 @@ __CH4_INLINE__ int MPIDI_CH4U_mrecv(void *buf,
 #define FUNCNAME MPIDI_CH4U_irecv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_irecv(void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_irecv(void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_IRECV);
@@ -395,7 +397,7 @@ __CH4_INLINE__ int MPIDI_CH4U_irecv(void *buf,
 #define FUNCNAME MPIDI_CH4U_cancel_recv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_cancel_recv(MPIR_Request * rreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_cancel_recv(MPIR_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS, found;
     MPIR_Comm *root_comm;
diff --git a/src/mpid/ch4/src/ch4r_recvq.h b/src/mpid/ch4/src/ch4r_recvq.h
index ff98e36..03e41d7 100644
--- a/src/mpid/ch4/src/ch4r_recvq.h
+++ b/src/mpid/ch4/src/ch4r_recvq.h
@@ -21,7 +21,8 @@
 #define FUNCNAME MPIDI_CH4U_enqueue_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_posted(MPIR_Request * req,
+                                                        MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ENQUEUE_POSTED);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_ENQUEUE_POSTED);
@@ -34,7 +35,8 @@ __CH4_INLINE__ void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, MPIDI_CH4U_rre
 #define FUNCNAME MPIDI_CH4U_enqueue_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req,
+                                                       MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ENQUEUE_UNEXP);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_ENQUEUE_UNEXP);
@@ -47,7 +49,7 @@ __CH4_INLINE__ void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, MPIDI_CH4U_rreq
 #define FUNCNAME MPIDI_CH4U_delete_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_DELETE_UNEXP);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_DELETE_UNEXP);
@@ -59,8 +61,9 @@ __CH4_INLINE__ void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_
 #define FUNCNAME MPIDI_CH4U_dequeue_unexp_strict
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag, uint64_t ignore,
-                                                             MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag,
+                                                                       uint64_t ignore,
+                                                                       MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -84,8 +87,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag, uint6
 #define FUNCNAME MPIDI_CH4U_dequeue_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ignore,
-                                                      MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ignore,
+                                                                MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -108,8 +111,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ign
 #define FUNCNAME MPIDI_CH4U_find_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore,
-                                                   MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore,
+                                                             MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -131,7 +134,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore
 #define FUNCNAME MPIDI_CH4U_dequeue_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag,
+                                                                 MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_Request *req = NULL;
     MPIDI_CH4U_rreq_t *curr, *tmp;
@@ -155,7 +159,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag, MPIDI_CH4U_
 #define FUNCNAME MPIDI_CH4U_delete_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req,
+                                                      MPIDI_CH4U_rreq_t ** list)
 {
     int found = 0;
     MPIDI_CH4U_rreq_t *curr, *tmp;
@@ -180,7 +185,8 @@ __CH4_INLINE__ int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, MPIDI_CH4U_
 #define FUNCNAME MPIDI_CH4U_enqueue_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_posted(MPIR_Request * req,
+                                                        MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ENQUEUE_POSTED);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_ENQUEUE_POSTED);
@@ -193,7 +199,8 @@ __CH4_INLINE__ void MPIDI_CH4U_enqueue_posted(MPIR_Request * req, MPIDI_CH4U_rre
 #define FUNCNAME MPIDI_CH4U_enqueue_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req,
+                                                       MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_ENQUEUE_UNEXP);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_ENQUEUE_UNEXP);
@@ -206,7 +213,7 @@ __CH4_INLINE__ void MPIDI_CH4U_enqueue_unexp(MPIR_Request * req, MPIDI_CH4U_rreq
 #define FUNCNAME MPIDI_CH4U_delete_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_DELETE_UNEXP);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_DELETE_UNEXP);
@@ -218,8 +225,9 @@ __CH4_INLINE__ void MPIDI_CH4U_delete_unexp(MPIR_Request * req, MPIDI_CH4U_rreq_
 #define FUNCNAME MPIDI_CH4U_dequeue_unexp_strict
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag, uint64_t ignore,
-                                                             MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag,
+                                                                       uint64_t ignore,
+                                                                       MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -243,8 +251,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp_strict(uint64_t tag, uint6
 #define FUNCNAME MPIDI_CH4U_dequeue_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ignore,
-                                                      MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ignore,
+                                                                MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -267,8 +275,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_unexp(uint64_t tag, uint64_t ign
 #define FUNCNAME MPIDI_CH4U_find_unexp
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore,
-                                                   MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore,
+                                                             MPIDI_CH4U_rreq_t ** list)
 {
     MPIDI_CH4U_rreq_t *curr, *tmp;
     MPIR_Request *req = NULL;
@@ -290,7 +298,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_find_unexp(uint64_t tag, uint64_t ignore
 #define FUNCNAME MPIDI_CH4U_dequeue_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag,
+                                                                 MPIDI_CH4U_rreq_t ** list)
 {
     MPIR_Request *req = NULL;
     MPIDI_CH4U_rreq_t *curr, *tmp;
@@ -314,7 +323,8 @@ __CH4_INLINE__ MPIR_Request *MPIDI_CH4U_dequeue_posted(uint64_t tag, MPIDI_CH4U_
 #define FUNCNAME MPIDI_CH4U_delete_posted
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req, MPIDI_CH4U_rreq_t ** list)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_delete_posted(MPIDI_CH4U_rreq_t * req,
+                                                      MPIDI_CH4U_rreq_t ** list)
 {
     int found = 0;
     MPIDI_CH4U_rreq_t *curr, *tmp;
diff --git a/src/mpid/ch4/src/ch4r_request.h b/src/mpid/ch4/src/ch4r_request.h
index 68399c5..0308b09 100644
--- a/src/mpid/ch4/src/ch4r_request.h
+++ b/src/mpid/ch4/src/ch4r_request.h
@@ -68,7 +68,7 @@ static inline MPIR_Request *MPIDI_CH4I_am_win_request_create()
 #define FUNCNAME MPIDI_CH4I_am_request_complete
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ void MPIDI_CH4I_am_request_complete(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_CH4I_am_request_complete(MPIR_Request * req)
 {
     int incomplete;
     MPIR_cc_decr(req->cc_ptr, &incomplete);
diff --git a/src/mpid/ch4/src/ch4r_rma.h b/src/mpid/ch4/src/ch4r_rma.h
index 637ba56..39bf2cf 100644
--- a/src/mpid/ch4/src/ch4r_rma.h
+++ b/src/mpid/ch4/src/ch4r_rma.h
@@ -253,12 +253,13 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_put
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_PUT);
@@ -280,14 +281,14 @@ __CH4_INLINE__ int MPIDI_CH4U_put(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_rput
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_RPUT);
@@ -310,12 +311,13 @@ __CH4_INLINE__ int MPIDI_CH4U_rput(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_get
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_GET);
@@ -337,14 +339,14 @@ __CH4_INLINE__ int MPIDI_CH4U_get(void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_rget
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_RGET);
@@ -366,15 +368,15 @@ __CH4_INLINE__ int MPIDI_CH4U_rget(void *origin_addr,
 #define FUNCNAME MPIDI_CH4I_do_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4I_do_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,
-                                            int do_get, MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4I_do_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,
+                                                      int do_get, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS, c, n_iov;
     size_t basic_type_size;
@@ -510,14 +512,15 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_raccumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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,
+                                                    MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *sreq;
@@ -551,13 +554,14 @@ __CH4_INLINE__ int MPIDI_CH4U_raccumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_ACCUMULATE);
@@ -582,17 +586,18 @@ __CH4_INLINE__ int MPIDI_CH4U_accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_rget_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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,
+                                                        MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Request *sreq;
@@ -632,17 +637,17 @@ __CH4_INLINE__ int MPIDI_CH4U_rget_accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_get_accumulate
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_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)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_GET_ACCUMULATE);
@@ -670,12 +675,12 @@ __CH4_INLINE__ int MPIDI_CH4U_get_accumulate(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_compare_and_swap
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_compare_and_swap(const void *origin_addr,
-                                               const void *compare_addr,
-                                               void *result_addr,
-                                               MPI_Datatype datatype,
-                                               int target_rank,
-                                               MPI_Aint target_disp, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_compare_and_swap(const void *origin_addr,
+                                                         const void *compare_addr,
+                                                         void *result_addr,
+                                                         MPI_Datatype datatype,
+                                                         int target_rank,
+                                                         MPI_Aint target_disp, MPIR_Win * win)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIR_Request *sreq = NULL;
@@ -738,11 +743,12 @@ __CH4_INLINE__ int MPIDI_CH4U_compare_and_swap(const void *origin_addr,
 #define FUNCNAME MPIDI_CH4U_fetch_and_op
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_fetch_and_op(const void *origin_addr,
-                                           void *result_addr,
-                                           MPI_Datatype datatype,
-                                           int target_rank,
-                                           MPI_Aint target_disp, MPI_Op op, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_fetch_and_op(const void *origin_addr,
+                                                     void *result_addr,
+                                                     MPI_Datatype datatype,
+                                                     int target_rank,
+                                                     MPI_Aint target_disp, MPI_Op op,
+                                                     MPIR_Win * win)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_FETCH_AND_OP);
diff --git a/src/mpid/ch4/src/ch4r_send.h b/src/mpid/ch4/src/ch4r_send.h
index dc1f3e7..57f50cb 100644
--- a/src/mpid/ch4/src/ch4r_send.h
+++ b/src/mpid/ch4/src/ch4r_send.h
@@ -140,12 +140,13 @@ static inline int MPIDI_CH4I_psend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_send(const void *buf,
-                                   int count,
-                                   MPI_Datatype datatype,
-                                   int rank,
-                                   int tag,
-                                   MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_send(const void *buf,
+                                             int count,
+                                             MPI_Datatype datatype,
+                                             int rank,
+                                             int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_SEND);
@@ -160,12 +161,13 @@ __CH4_INLINE__ int MPIDI_CH4U_send(const void *buf,
 #define FUNCNAME MPIDI_CH4U_isend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_isend(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_isend(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_ISEND);
@@ -182,12 +184,13 @@ __CH4_INLINE__ int MPIDI_CH4U_isend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_rsend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_rsend(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rsend(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_RSEND);
@@ -203,12 +206,13 @@ __CH4_INLINE__ int MPIDI_CH4U_rsend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_irsend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_irsend(const void *buf,
-                                     int count,
-                                     MPI_Datatype datatype,
-                                     int rank,
-                                     int tag,
-                                     MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_irsend(const void *buf,
+                                               int count,
+                                               MPI_Datatype datatype,
+                                               int rank,
+                                               int tag,
+                                               MPIR_Comm * comm, int context_offset,
+                                               MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_IRSEND);
@@ -223,12 +227,13 @@ __CH4_INLINE__ int MPIDI_CH4U_irsend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_ssend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_ssend(const void *buf,
-                                    int count,
-                                    MPI_Datatype datatype,
-                                    int rank,
-                                    int tag,
-                                    MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_ssend(const void *buf,
+                                              int count,
+                                              MPI_Datatype datatype,
+                                              int rank,
+                                              int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_SSEND);
@@ -243,12 +248,13 @@ __CH4_INLINE__ int MPIDI_CH4U_ssend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_issend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_issend(const void *buf,
-                                     int count,
-                                     MPI_Datatype datatype,
-                                     int rank,
-                                     int tag,
-                                     MPIR_Comm * comm, int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_issend(const void *buf,
+                                               int count,
+                                               MPI_Datatype datatype,
+                                               int rank,
+                                               int tag,
+                                               MPIR_Comm * comm, int context_offset,
+                                               MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_ISSEND);
@@ -263,7 +269,7 @@ __CH4_INLINE__ int MPIDI_CH4U_issend(const void *buf,
 #define FUNCNAME MPIDI_CH4U_startall
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_startall(int count, MPIR_Request * requests[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_startall(int count, MPIR_Request * requests[])
 {
     int mpi_errno = MPI_SUCCESS, i;
     int rank, tag, context_offset;
@@ -371,13 +377,13 @@ __CH4_INLINE__ int MPIDI_CH4U_startall(int count, MPIR_Request * requests[])
 #define FUNCNAME MPIDI_CH4U_send_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_send_init(const void *buf,
-                                        int count,
-                                        MPI_Datatype datatype,
-                                        int rank,
-                                        int tag,
-                                        MPIR_Comm * comm,
-                                        int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_send_init(const void *buf,
+                                                  int count,
+                                                  MPI_Datatype datatype,
+                                                  int rank,
+                                                  int tag,
+                                                  MPIR_Comm * comm,
+                                                  int context_offset, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_SEND_INIT);
@@ -392,13 +398,13 @@ __CH4_INLINE__ int MPIDI_CH4U_send_init(const void *buf,
 #define FUNCNAME MPIDI_CH4U_ssend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_ssend_init(const void *buf,
-                                         int count,
-                                         MPI_Datatype datatype,
-                                         int rank,
-                                         int tag,
-                                         MPIR_Comm * comm,
-                                         int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_ssend_init(const void *buf,
+                                                   int count,
+                                                   MPI_Datatype datatype,
+                                                   int rank,
+                                                   int tag,
+                                                   MPIR_Comm * comm,
+                                                   int context_offset, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_SSEND_INIT);
@@ -413,13 +419,13 @@ __CH4_INLINE__ int MPIDI_CH4U_ssend_init(const void *buf,
 #define FUNCNAME MPIDI_CH4U_bsend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_bsend_init(const void *buf,
-                                         int count,
-                                         MPI_Datatype datatype,
-                                         int rank,
-                                         int tag,
-                                         MPIR_Comm * comm,
-                                         int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_bsend_init(const void *buf,
+                                                   int count,
+                                                   MPI_Datatype datatype,
+                                                   int rank,
+                                                   int tag,
+                                                   MPIR_Comm * comm,
+                                                   int context_offset, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_BSEND_INIT);
@@ -434,13 +440,13 @@ __CH4_INLINE__ int MPIDI_CH4U_bsend_init(const void *buf,
 #define FUNCNAME MPIDI_CH4U_rsend_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_rsend_init(const void *buf,
-                                         int count,
-                                         MPI_Datatype datatype,
-                                         int rank,
-                                         int tag,
-                                         MPIR_Comm * comm,
-                                         int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_rsend_init(const void *buf,
+                                                   int count,
+                                                   MPI_Datatype datatype,
+                                                   int rank,
+                                                   int tag,
+                                                   MPIR_Comm * comm,
+                                                   int context_offset, MPIR_Request ** request)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_RSEND_INIT);
@@ -455,7 +461,7 @@ __CH4_INLINE__ int MPIDI_CH4U_rsend_init(const void *buf,
 #define FUNCNAME MPIDI_CH4U_cancel_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_CH4U_cancel_send(MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_CH4U_cancel_send(MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4U_CANCEL_SEND);

http://git.mpich.org/mpich.git/commitdiff/181430bda15e745f82f761e28643e71eb42bcbb2

commit 181430bda15e745f82f761e28643e71eb42bcbb2
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 17:00:47 2016 -0500

    CH4: Rename send/inject to isend/send_hdr
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index 6230eac..04f192b 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -41,24 +41,22 @@ typedef int (*MPIDI_NM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_NM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_NM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                        MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_NM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz,
-                                         void *netmod_context);
-typedef int (*MPIDI_NM_am_send_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
-                                   size_t am_hdr_sz, const void *data, MPI_Count count,
-                                   MPI_Datatype datatype, MPIR_Request * sreq,
-                                   void *netmod_context);
-typedef int (*MPIDI_NM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                    struct iovec * am_hdrs, size_t iov_len, const void *data,
-                                    MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
+typedef int (*MPIDI_NM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+                                       const void *am_hdr, size_t am_hdr_sz, void *netmod_context);
+typedef int (*MPIDI_NM_am_isend_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
+                                    size_t am_hdr_sz, const void *data, MPI_Count count,
+                                    MPI_Datatype datatype, MPIR_Request * sreq,
                                     void *netmod_context);
-typedef int (*MPIDI_NM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                               int handler_id, const void *am_hdr,
-                                               size_t am_hdr_sz);
-typedef int (*MPIDI_NM_am_send_reply_t) (MPIR_Context_id_t context_id, int src_rank, int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz, const void *data,
-                                         MPI_Count count, MPI_Datatype datatype,
-                                         MPIR_Request * sreq);
+typedef int (*MPIDI_NM_am_isendv_t) (int rank, MPIR_Comm * comm, int handler_id,
+                                     struct iovec * am_hdrs, size_t iov_len, const void *data,
+                                     MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
+                                     void *netmod_context);
+typedef int (*MPIDI_NM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+                                             int handler_id, const void *am_hdr, size_t am_hdr_sz);
+typedef int (*MPIDI_NM_am_isend_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+                                          int handler_id, const void *am_hdr, size_t am_hdr_sz,
+                                          const void *data, MPI_Count count, MPI_Datatype datatype,
+                                          MPIR_Request * sreq);
 typedef size_t(*MPIDI_NM_am_hdr_max_sz_t) (void);
 typedef int (*MPIDI_NM_am_recv_t) (MPIR_Request * req);
 typedef int (*MPIDI_NM_comm_get_lpid_t) (MPIR_Comm * comm_ptr, int idx, int *lpid_ptr,
@@ -366,11 +364,11 @@ typedef struct MPIDI_NM_funcs {
     MPIDI_NM_am_request_finalize_t am_request_finalize;
     /* Active Message Routines */
     MPIDI_NM_am_reg_handler_t am_reg_handler;
-    MPIDI_NM_am_inject_hdr_t am_inject_hdr;
-    MPIDI_NM_am_send_t am_send;
-    MPIDI_NM_am_sendv_t am_sendv;
-    MPIDI_NM_am_inject_hdr_reply_t am_inject_hdr_reply;
-    MPIDI_NM_am_send_reply_t am_send_reply;
+    MPIDI_NM_am_send_hdr_t am_send_hdr;
+    MPIDI_NM_am_isend_t am_isend;
+    MPIDI_NM_am_isendv_t am_isendv;
+    MPIDI_NM_am_send_hdr_reply_t am_send_hdr_reply;
+    MPIDI_NM_am_isend_reply_t am_isend_reply;
     MPIDI_NM_am_hdr_max_sz_t am_hdr_max_sz;
     MPIDI_NM_am_recv_t am_recv;
 } MPIDI_NM_funcs_t;
@@ -517,29 +515,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
                                                   int root, MPIR_Comm * comm,
                                                   MPIR_Comm **
                                                   newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                    const void *am_hdr, size_t am_hdr_sz,
-                                                    void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send(int rank, MPIR_Comm * comm, int handler_id,
-                                              const void *am_hdr, size_t am_hdr_sz,
-                                              const void *data, MPI_Count count,
-                                              MPI_Datatype datatype, MPIR_Request * sreq,
-                                              void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
-                                               struct iovec *am_hdrs, size_t iov_len,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                  const void *am_hdr, size_t am_hdr_sz,
+                                                  void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend(int rank, MPIR_Comm * comm, int handler_id,
+                                               const void *am_hdr, size_t am_hdr_sz,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                                          int src_rank, int handler_id,
-                                                          const void *am_hdr,
-                                                          size_t am_hdr_sz)
-    MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                    int handler_id, const void *am_hdr,
-                                                    size_t am_hdr_sz, const void *data,
-                                                    MPI_Count count, MPI_Datatype datatype,
-                                                    MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isendv(int rank, MPIR_Comm * comm, int handler_id,
+                                                struct iovec *am_hdrs, size_t iov_len,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
+                                                        const void *am_hdr,
+                                                        size_t am_hdr_sz) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, int src_rank,
+                                                     int handler_id, const void *am_hdr,
+                                                     size_t am_hdr_sz, const void *data,
+                                                     MPI_Count count, MPI_Datatype datatype,
+                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index dc4f022..781da99 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -72,48 +72,48 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
     return MPIDI_NM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                    const void *am_hdr, size_t am_hdr_sz,
-                                                    void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                  const void *am_hdr, size_t am_hdr_sz,
+                                                  void *netmod_context)
 {
-    return MPIDI_NM_func->am_inject_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, netmod_context);
+    return MPIDI_NM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send(int rank, MPIR_Comm * comm, int handler_id,
-                                              const void *am_hdr, size_t am_hdr_sz,
-                                              const void *data, MPI_Count count,
-                                              MPI_Datatype datatype, MPIR_Request * sreq,
-                                              void *netmod_context)
-{
-    return MPIDI_NM_func->am_send(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
-                                  sreq, netmod_context);
-};
-
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
-                                               struct iovec *am_hdrs, size_t iov_len,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend(int rank, MPIR_Comm * comm, int handler_id,
+                                               const void *am_hdr, size_t am_hdr_sz,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *netmod_context)
 {
-    return MPIDI_NM_func->am_sendv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
+    return MPIDI_NM_func->am_isend(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
                                    sreq, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                                          int src_rank, int handler_id,
-                                                          const void *am_hdr, size_t am_hdr_sz)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isendv(int rank, MPIR_Comm * comm, int handler_id,
+                                                struct iovec *am_hdrs, size_t iov_len,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *netmod_context)
+{
+    return MPIDI_NM_func->am_isendv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
+                                    sreq, netmod_context);
+};
+
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
+                                                        const void *am_hdr, size_t am_hdr_sz)
 {
-    return MPIDI_NM_func->am_inject_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
+    return MPIDI_NM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                    int handler_id, const void *am_hdr,
-                                                    size_t am_hdr_sz, const void *data,
-                                                    MPI_Count count, MPI_Datatype datatype,
-                                                    MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, int src_rank,
+                                                     int handler_id, const void *am_hdr,
+                                                     size_t am_hdr_sz, const void *data,
+                                                     MPI_Count count, MPI_Datatype datatype,
+                                                     MPIR_Request * sreq)
 {
-    return MPIDI_NM_func->am_send_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
-                                        count, datatype, sreq);
+    return MPIDI_NM_func->am_isend_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
+                                         count, datatype, sreq);
 };
 
 MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void)
diff --git a/src/mpid/ch4/netmod/ofi/func_table.c b/src/mpid/ch4/netmod/ofi/func_table.c
index ae06b7b..bed0f63 100644
--- a/src/mpid/ch4/netmod/ofi/func_table.c
+++ b/src/mpid/ch4/netmod/ofi/func_table.c
@@ -32,11 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_inject_hdr,
-    MPIDI_NM_am_send,
-    MPIDI_NM_am_sendv,
-    MPIDI_NM_am_inject_hdr_reply,
-    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_isend,
+    MPIDI_NM_am_isendv,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_isend_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am.h b/src/mpid/ch4/netmod/ofi/ofi_am.h
index f139399..c0f1257 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am.h
@@ -44,7 +44,7 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
     }
 
     MPIDI_Global.am_handlers[handler_id] = target_handler_fn;
-    MPIDI_Global.am_send_cmpl_handlers[handler_id] = origin_handler_fn;
+    MPIDI_Global.am_isend_cmpl_handlers[handler_id] = origin_handler_fn;
   fn_exit:
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_REG_HDR_HANDLER);
     return mpi_errno;
@@ -53,45 +53,46 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send
+#define FUNCNAME MPIDI_NM_am_isend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send(int rank,
-                                   MPIR_Comm * comm,
-                                   int handler_id,
-                                   const void *am_hdr,
-                                   size_t am_hdr_sz,
-                                   const void *data,
-                                   MPI_Count count,
-                                   MPI_Datatype datatype, MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isend(int rank,
+                                    MPIR_Comm * comm,
+                                    int handler_id,
+                                    const void *am_hdr,
+                                    size_t am_hdr_sz,
+                                    const void *data,
+                                    MPI_Count count,
+                                    MPI_Datatype datatype, MPIR_Request * sreq,
+                                    void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM);
     if (count)
-        mpi_errno = MPIDI_OFI_do_am_send(rank, comm, handler_id,
-                                         am_hdr, am_hdr_sz, data, count, datatype, sreq, FALSE);
+        mpi_errno = MPIDI_OFI_do_am_isend(rank, comm, handler_id,
+                                          am_hdr, am_hdr_sz, data, count, datatype, sreq, FALSE);
     else
-        mpi_errno = MPIDI_OFI_do_am_send_header(rank, comm, handler_id,
-                                                am_hdr, am_hdr_sz, sreq, FALSE);
+        mpi_errno = MPIDI_OFI_do_am_isend_header(rank, comm, handler_id,
+                                                 am_hdr, am_hdr_sz, sreq, FALSE);
 
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM);
     return mpi_errno;
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_sendv
+#define FUNCNAME MPIDI_NM_am_isendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_sendv(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    struct iovec *am_hdr,
-                                    size_t iov_len,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype,
-                                    MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isendv(int rank,
+                                     MPIR_Comm * comm,
+                                     int handler_id,
+                                     struct iovec *am_hdr,
+                                     size_t iov_len,
+                                     const void *data,
+                                     MPI_Count count,
+                                     MPI_Datatype datatype,
+                                     MPIR_Request * sreq, void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS, is_allocated;
     size_t am_hdr_sz = 0, i;
@@ -121,8 +122,8 @@ static inline int MPIDI_NM_am_sendv(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_am_send(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
-                                 data, count, datatype, sreq, netmod_context);
+    mpi_errno = MPIDI_NM_am_isend(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+                                  data, count, datatype, sreq, netmod_context);
 
     if (is_allocated)
         MPL_free(am_hdr_buf);
@@ -134,30 +135,30 @@ static inline int MPIDI_NM_am_sendv(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_reply
+#define FUNCNAME MPIDI_NM_am_isend_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
-                                         int src_rank,
-                                         int handler_id,
-                                         const void *am_hdr,
-                                         size_t am_hdr_sz,
-                                         const void *data,
-                                         MPI_Count count,
-                                         MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id,
+                                          int src_rank,
+                                          int handler_id,
+                                          const void *am_hdr,
+                                          size_t am_hdr_sz,
+                                          const void *data,
+                                          MPI_Count count,
+                                          MPI_Datatype datatype, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_REPLY);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_REPLY);
     if (count)
-        mpi_errno = MPIDI_OFI_do_am_send(src_rank,
-                                         MPIDI_CH4U_context_id_to_comm(context_id),
-                                         handler_id,
-                                         am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE);
+        mpi_errno = MPIDI_OFI_do_am_isend(src_rank,
+                                          MPIDI_CH4U_context_id_to_comm(context_id),
+                                          handler_id,
+                                          am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE);
     else
-        mpi_errno = MPIDI_OFI_do_am_send_header(src_rank,
-                                                MPIDI_CH4U_context_id_to_comm(context_id),
-                                                handler_id, am_hdr, am_hdr_sz, sreq, TRUE);
+        mpi_errno = MPIDI_OFI_do_am_isend_header(src_rank,
+                                                 MPIDI_CH4U_context_id_to_comm(context_id),
+                                                 handler_id, am_hdr, am_hdr_sz, sreq, TRUE);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_REPLY);
     return mpi_errno;
 }
@@ -173,10 +174,10 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return MPL_MIN(max_shortsend, max_representable);
 }
 
-static inline int MPIDI_NM_am_inject_hdr(int rank,
-                                         MPIR_Comm * comm,
-                                         int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
+static inline int MPIDI_NM_am_send_hdr(int rank,
+                                       MPIR_Comm * comm,
+                                       int handler_id,
+                                       const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_INJECT_AM_HDR);
@@ -195,9 +196,9 @@ static inline int MPIDI_NM_am_inject_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                               int src_rank,
-                                               int handler_id, const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                             int src_rank,
+                                             int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -228,9 +229,9 @@ static inline int MPIDI_NM_am_recv(MPIR_Request * req)
     msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr));
     msg.rreq_ptr = (uint64_t) req;
     MPIR_Assert((void *) msg.sreq_ptr != NULL);
-    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
-                                             MPIDI_CH4U_REQUEST(req, src_rank),
-                                             MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
+    mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
+                                           MPIDI_CH4U_REQUEST(req, src_rank),
+                                           MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am_events.h b/src/mpid/ch4/netmod/ofi/ofi_am_events.h
index fdc920c..a309a02 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am_events.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am_events.h
@@ -367,7 +367,7 @@ static inline int MPIDI_OFI_handle_lmt_ack(MPIDI_OFI_am_header_t * msg_hdr)
 
     handler_id = MPIDI_OFI_AMREQUEST_HDR(sreq, msg_hdr).handler_id;
     MPIDI_OFI_am_request_complete(sreq);
-    mpi_errno = MPIDI_Global.am_send_cmpl_handlers[handler_id] (sreq);
+    mpi_errno = MPIDI_Global.am_isend_cmpl_handlers[handler_id] (sreq);
 
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am_impl.h b/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
index 058c936..1f0537a 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
@@ -20,10 +20,10 @@ static inline int MPIDI_OFI_progress_do_queue(void *netmod_context);
 
   * When calling OFI function MPIDI_OFI_THREAD_FI_MUTEX must be held.
   * When being called from the MPI layer (app), we must grab the lock.
-    This is the case for regular (non-reply) functions such as am_send.
+    This is the case for regular (non-reply) functions such as am_isend.
   * When being called from callback function or progress engine, we must
     not grab the lock because the progress engine is already holding the lock.
-    This is the case for reply functions such as am_send_reply.
+    This is the case for reply functions such as am_isend_reply.
 */
 #define MPIDI_OFI_CALL_RETRY_AM(FUNC,LOCK,STR)                  \
     do {                                                                \
@@ -192,14 +192,14 @@ static inline int MPIDI_OFI_progress_do_queue(void *netmod_context)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_do_am_send_header
+#define FUNCNAME MPIDI_OFI_do_am_isend_header
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_do_am_send_header(int rank,
-                                              MPIR_Comm * comm,
-                                              int handler_id,
-                                              const void *am_hdr,
-                                              size_t am_hdr_sz, MPIR_Request * sreq, int is_reply)
+static inline int MPIDI_OFI_do_am_isend_header(int rank,
+                                               MPIR_Comm * comm,
+                                               int handler_id,
+                                               const void *am_hdr,
+                                               size_t am_hdr_sz, MPIR_Request * sreq, int is_reply)
 {
     struct iovec iov[2];
     MPIDI_OFI_am_header_t *msg_hdr;
@@ -246,16 +246,16 @@ static inline int MPIDI_OFI_do_am_send_header(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_am_send_long
+#define FUNCNAME MPIDI_OFI_am_isend_long
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_am_send_long(int rank,
-                                         MPIR_Comm * comm,
-                                         int handler_id,
-                                         const void *am_hdr,
-                                         size_t am_hdr_sz,
-                                         const void *data,
-                                         size_t data_sz, MPIR_Request * sreq, int need_lock)
+static inline int MPIDI_OFI_am_isend_long(int rank,
+                                          MPIR_Comm * comm,
+                                          int handler_id,
+                                          const void *am_hdr,
+                                          size_t am_hdr_sz,
+                                          const void *data,
+                                          size_t data_sz, MPIR_Request * sreq, int need_lock)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_OFI_am_header_t *msg_hdr;
@@ -337,16 +337,16 @@ static inline int MPIDI_OFI_am_send_long(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_am_send_short
+#define FUNCNAME MPIDI_OFI_am_isend_short
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_am_send_short(int rank,
-                                          MPIR_Comm * comm,
-                                          int handler_id,
-                                          const void *am_hdr,
-                                          size_t am_hdr_sz,
-                                          const void *data,
-                                          MPI_Count count, MPIR_Request * sreq, int need_lock)
+static inline int MPIDI_OFI_am_isend_short(int rank,
+                                           MPIR_Comm * comm,
+                                           int handler_id,
+                                           const void *am_hdr,
+                                           size_t am_hdr_sz,
+                                           const void *data,
+                                           MPI_Count count, MPIR_Request * sreq, int need_lock)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_OFI_am_header_t *msg_hdr;
@@ -388,17 +388,17 @@ static inline int MPIDI_OFI_am_send_short(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_do_am_send
+#define FUNCNAME MPIDI_OFI_do_am_isend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_do_am_send(int rank,
-                                       MPIR_Comm * comm,
-                                       int handler_id,
-                                       const void *am_hdr,
-                                       size_t am_hdr_sz,
-                                       const void *buf,
-                                       size_t count,
-                                       MPI_Datatype datatype, MPIR_Request * sreq, int is_reply)
+static inline int MPIDI_OFI_do_am_isend(int rank,
+                                        MPIR_Comm * comm,
+                                        int handler_id,
+                                        const void *am_hdr,
+                                        size_t am_hdr_sz,
+                                        const void *buf,
+                                        size_t count,
+                                        MPI_Datatype datatype, MPIR_Request * sreq, int is_reply)
 {
     int dt_contig, mpi_errno = MPI_SUCCESS;
     char *send_buf;
@@ -426,8 +426,8 @@ static inline int MPIDI_OFI_do_am_send(int rank,
         MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype;
         MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag = lreq_hdr.hdr.msg_tag;
         MPIDI_CH4U_REQUEST(sreq, src_rank) = rank;
-        mpi_errno = MPIDI_NM_am_inject_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
-                                           &lreq_hdr, sizeof(lreq_hdr), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
+                                         &lreq_hdr, sizeof(lreq_hdr), NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;
@@ -461,13 +461,13 @@ static inline int MPIDI_OFI_do_am_send(int rank,
 
     if (am_hdr_sz + data_sz + sizeof(MPIDI_OFI_am_header_t) <= MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE) {
         mpi_errno =
-            MPIDI_OFI_am_send_short(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
-                                    am_hdr_sz, send_buf, data_sz, sreq, need_lock);
+            MPIDI_OFI_am_isend_short(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
+                                     am_hdr_sz, send_buf, data_sz, sreq, need_lock);
     }
     else {
         mpi_errno =
-            MPIDI_OFI_am_send_long(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
-                                   am_hdr_sz, send_buf, data_sz, sreq, need_lock);
+            MPIDI_OFI_am_isend_long(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
+                                    am_hdr_sz, send_buf, data_sz, sreq, need_lock);
     }
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch4/netmod/ofi/ofi_events.h b/src/mpid/ch4/netmod/ofi/ofi_events.h
index 3ddb664..191bc51 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_events.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_events.h
@@ -444,10 +444,10 @@ __ALWAYS_INLINE__ int MPIDI_OFI_dynproc_done_event(struct fi_cq_tagged_entry *wc
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_am_send_event
+#define FUNCNAME MPIDI_OFI_am_isend_event
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__ALWAYS_INLINE__ int MPIDI_OFI_am_send_event(struct fi_cq_tagged_entry *wc, MPIR_Request * sreq)
+__ALWAYS_INLINE__ int MPIDI_OFI_am_isend_event(struct fi_cq_tagged_entry *wc, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_OFI_am_header_t *msg_hdr;
@@ -472,7 +472,7 @@ __ALWAYS_INLINE__ int MPIDI_OFI_am_send_event(struct fi_cq_tagged_entry *wc, MPI
         MPIDI_OFI_AMREQUEST_HDR(sreq, pack_buffer) = NULL;
     }
 
-    mpi_errno = MPIDI_Global.am_send_cmpl_handlers[msg_hdr->handler_id] (sreq);
+    mpi_errno = MPIDI_Global.am_isend_cmpl_handlers[msg_hdr->handler_id] (sreq);
 
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
@@ -615,7 +615,7 @@ __ALWAYS_INLINE__ int MPIDI_OFI_dispatch_function(struct fi_cq_tagged_entry *wc,
         goto fn_exit;
     }
     else if (likely(MPIDI_OFI_REQUEST(req, event_id) == MPIDI_OFI_EVENT_AM_SEND)) {
-        mpi_errno = MPIDI_OFI_am_send_event(wc, req);
+        mpi_errno = MPIDI_OFI_am_isend_event(wc, req);
         goto fn_exit;
     }
     else if (likely(MPIDI_OFI_REQUEST(req, event_id) == MPIDI_OFI_EVENT_AM_RECV)) {
diff --git a/src/mpid/ch4/netmod/ofi/ofi_init.h b/src/mpid/ch4/netmod/ofi/ofi_init.h
index f6655df..d8a9579 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_init.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_init.h
@@ -390,7 +390,7 @@ static inline int MPIDI_OFI_init_generic(int rank,
     /* ---------------------------------- */
     if (do_am) {
         /* Maximum possible message size for short message send (=eager send)
-         * See MPIDI_OFI_do_am_send for short/long switching logic */
+         * See MPIDI_OFI_do_am_isend for short/long switching logic */
         MPIR_Assert(MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE <= MPIDI_Global.max_send);
         MPIDI_Global.am_buf_pool =
             MPIDI_CH4U_create_buf_pool(MPIDI_OFI_BUF_POOL_NUM, MPIDI_OFI_BUF_POOL_SIZE);
@@ -427,7 +427,7 @@ static inline int MPIDI_OFI_init_generic(int rank,
 
         /* Grow the header handlers down */
         MPIDI_Global.am_handlers[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = MPIDI_OFI_control_handler;
-        MPIDI_Global.am_send_cmpl_handlers[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = NULL;
+        MPIDI_Global.am_isend_cmpl_handlers[MPIDI_OFI_INTERNAL_HANDLER_CONTROL] = NULL;
     }
     OPA_store_int(&MPIDI_Global.am_inflight_inject_emus, 0);
     OPA_store_int(&MPIDI_Global.am_inflight_rma_send_mrs, 0);
diff --git a/src/mpid/ch4/netmod/ofi/ofi_recv.h b/src/mpid/ch4/netmod/ofi/ofi_recv.h
index 2f9e0e8..bed547d 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_recv.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_recv.h
@@ -277,7 +277,7 @@ __ALWAYS_INLINE__ int MPIDI_NM_cancel_recv(MPIR_Request * rreq)
     return mpi_errno;
 
 #ifndef MPIDI_BUILD_CH4_SHM
-fn_fail:
+  fn_fail:
     goto fn_exit;
 #endif
 }
diff --git a/src/mpid/ch4/netmod/ofi/ofi_types.h b/src/mpid/ch4/netmod/ofi/ofi_types.h
index a501d7e..045cc96 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_types.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_types.h
@@ -380,7 +380,7 @@ typedef struct {
     void *am_bufs[MPIDI_OFI_NUM_AM_BUFFERS];
     MPIDI_OFI_am_repost_request_t am_reqs[MPIDI_OFI_NUM_AM_BUFFERS];
     MPIDI_NM_am_target_handler_fn am_handlers[MPIDI_OFI_MAX_AM_HANDLERS_TOTAL];
-    MPIDI_NM_am_origin_handler_fn am_send_cmpl_handlers[MPIDI_OFI_MAX_AM_HANDLERS_TOTAL];
+    MPIDI_NM_am_origin_handler_fn am_isend_cmpl_handlers[MPIDI_OFI_MAX_AM_HANDLERS_TOTAL];
     MPIU_buf_pool_t *am_buf_pool;
     OPA_int_t am_inflight_inject_emus;
     OPA_int_t am_inflight_rma_send_mrs;
diff --git a/src/mpid/ch4/netmod/portals4/func_table.c b/src/mpid/ch4/netmod/portals4/func_table.c
index eade09e..8d39e10 100644
--- a/src/mpid/ch4/netmod/portals4/func_table.c
+++ b/src/mpid/ch4/netmod/portals4/func_table.c
@@ -32,11 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_inject_hdr,
-    MPIDI_NM_am_send,
-    MPIDI_NM_am_sendv,
-    MPIDI_NM_am_inject_hdr_reply,
-    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_isend,
+    MPIDI_NM_am_isendv,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_isend_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/portals4/ptl_am.h b/src/mpid/ch4/netmod/portals4/ptl_am.h
index 0ff7db0..cbb9d14 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_am.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_am.h
@@ -34,14 +34,15 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_send(int rank,
-                                   MPIR_Comm * comm,
-                                   int handler_id,
-                                   const void *am_hdr,
-                                   size_t am_hdr_sz,
-                                   const void *data,
-                                   MPI_Count count,
-                                   MPI_Datatype datatype, MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isend(int rank,
+                                    MPIR_Comm * comm,
+                                    int handler_id,
+                                    const void *am_hdr,
+                                    size_t am_hdr_sz,
+                                    const void *data,
+                                    MPI_Count count,
+                                    MPI_Datatype datatype, MPIR_Request * sreq,
+                                    void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS, ret, c;
     size_t data_sz;
@@ -129,28 +130,28 @@ static inline int MPIDI_NM_am_send(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_sendv(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    struct iovec *am_hdr,
-                                    size_t iov_len,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype,
-                                    MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isendv(int rank,
+                                     MPIR_Comm * comm,
+                                     int handler_id,
+                                     struct iovec *am_hdr,
+                                     size_t iov_len,
+                                     const void *data,
+                                     MPI_Count count,
+                                     MPI_Datatype datatype,
+                                     MPIR_Request * sreq, void *netmod_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
-                                         int src_rank,
-                                         int handler_id,
-                                         const void *am_hdr,
-                                         size_t am_hdr_sz,
-                                         const void *data,
-                                         MPI_Count count,
-                                         MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id,
+                                          int src_rank,
+                                          int handler_id,
+                                          const void *am_hdr,
+                                          size_t am_hdr_sz,
+                                          const void *data,
+                                          MPI_Count count,
+                                          MPI_Datatype datatype, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS, ret, c;
     size_t data_sz;
@@ -231,10 +232,10 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_NM_am_inject_hdr(int rank,
-                                         MPIR_Comm * comm,
-                                         int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
+static inline int MPIDI_NM_am_send_hdr(int rank,
+                                       MPIR_Comm * comm,
+                                       int handler_id,
+                                       const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS, ret, c;
     ptl_hdr_data_t ptl_hdr;
@@ -266,9 +267,9 @@ static inline int MPIDI_NM_am_inject_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                               int src_rank,
-                                               int handler_id, const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                             int src_rank,
+                                             int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS, ret, c;
     ptl_hdr_data_t ptl_hdr;
diff --git a/src/mpid/ch4/netmod/stubnm/globals.c b/src/mpid/ch4/netmod/stubnm/globals.c
index 89a5cc9..9dc545b 100644
--- a/src/mpid/ch4/netmod/stubnm/globals.c
+++ b/src/mpid/ch4/netmod/stubnm/globals.c
@@ -32,11 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_inject_hdr,
-    MPIDI_NM_am_send,
-    MPIDI_NM_am_sendv,
-    MPIDI_NM_am_inject_hdr_reply,
-    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_isend,
+    MPIDI_NM_am_isendv,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_isend_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_am.h b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
index f33e1c3..e3986d2 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_am.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
@@ -21,40 +21,41 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_send(int rank,
-                                   MPIR_Comm * comm,
-                                   int handler_id,
-                                   const void *am_hdr,
-                                   size_t am_hdr_sz,
-                                   const void *data,
-                                   MPI_Count count,
-                                   MPI_Datatype datatype, MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isend(int rank,
+                                    MPIR_Comm * comm,
+                                    int handler_id,
+                                    const void *am_hdr,
+                                    size_t am_hdr_sz,
+                                    const void *data,
+                                    MPI_Count count,
+                                    MPI_Datatype datatype, MPIR_Request * sreq,
+                                    void *netmod_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_sendv(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    struct iovec *am_hdr,
-                                    size_t iov_len,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype,
-                                    MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isendv(int rank,
+                                     MPIR_Comm * comm,
+                                     int handler_id,
+                                     struct iovec *am_hdr,
+                                     size_t iov_len,
+                                     const void *data,
+                                     MPI_Count count,
+                                     MPI_Datatype datatype,
+                                     MPIR_Request * sreq, void *netmod_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
-                                         int handler_id,
-                                         const void *am_hdr,
-                                         size_t am_hdr_sz,
-                                         const void *data,
-                                         MPI_Count count,
-                                         MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id, int src_rank,
+                                          int handler_id,
+                                          const void *am_hdr,
+                                          size_t am_hdr_sz,
+                                          const void *data,
+                                          MPI_Count count,
+                                          MPI_Datatype datatype, MPIR_Request * sreq)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
@@ -66,17 +67,17 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_NM_am_inject_hdr(int rank,
-                                         MPIR_Comm * comm,
-                                         int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
+static inline int MPIDI_NM_am_send_hdr(int rank,
+                                       MPIR_Comm * comm,
+                                       int handler_id,
+                                       const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                               int handler_id, const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+                                             int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
diff --git a/src/mpid/ch4/netmod/ucx/func_table.c b/src/mpid/ch4/netmod/ucx/func_table.c
index 121a197..e4801eb 100644
--- a/src/mpid/ch4/netmod/ucx/func_table.c
+++ b/src/mpid/ch4/netmod/ucx/func_table.c
@@ -30,11 +30,11 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_inject_hdr,
-    MPIDI_NM_am_send,
-    MPIDI_NM_am_sendv,
-    MPIDI_NM_am_inject_hdr_reply,
-    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_isend,
+    MPIDI_NM_am_isendv,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_isend_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ucx/ucx_am.h b/src/mpid/ch4/netmod/ucx/ucx_am.h
index 3277010..4d1f8ec 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_am.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_am.h
@@ -33,7 +33,7 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
 }
 
 
-static inline void MPIDI_UCX_am_send_callback(void *request, ucs_status_t status)
+static inline void MPIDI_UCX_am_isend_callback(void *request, ucs_status_t status)
 {
     MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request;
 
@@ -76,17 +76,18 @@ static inline void MPIDI_UCX_inject_am_callback(void *request, ucs_status_t stat
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send
+#define FUNCNAME MPIDI_NM_am_isend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send(int rank,
-                                   MPIR_Comm * comm,
-                                   int handler_id,
-                                   const void *am_hdr,
-                                   size_t am_hdr_sz,
-                                   const void *data,
-                                   MPI_Count count,
-                                   MPI_Datatype datatype, MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isend(int rank,
+                                    MPIR_Comm * comm,
+                                    int handler_id,
+                                    const void *am_hdr,
+                                    size_t am_hdr_sz,
+                                    const void *data,
+                                    MPI_Count count,
+                                    MPI_Datatype datatype, MPIR_Request * sreq,
+                                    void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_UCX_ucp_request_t *ucp_request;
@@ -116,8 +117,8 @@ static inline int MPIDI_NM_am_send(int rank,
         MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype;
         MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag = lreq_hdr.hdr.msg_tag;
         MPIDI_CH4U_REQUEST(sreq, src_rank) = rank;
-        mpi_errno = MPIDI_NM_am_inject_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
-                                           &lreq_hdr, sizeof(lreq_hdr), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
+                                         &lreq_hdr, sizeof(lreq_hdr), NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;
@@ -158,7 +159,7 @@ static inline int MPIDI_NM_am_send(int rank,
     ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf,
                                                               data_sz + am_hdr_sz + sizeof(ucx_hdr),
                                                               ucp_dt_make_contig(1), ucx_tag,
-                                                              &MPIDI_UCX_am_send_callback);
+                                                              &MPIDI_UCX_am_isend_callback);
     MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
     /* send is done. free all resources and complete the request */
     if (ucp_request == NULL) {
@@ -191,18 +192,18 @@ static inline int MPIDI_NM_am_send(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_sendv
+#define FUNCNAME MPIDI_NM_am_isendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_sendv(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    struct iovec *am_hdr,
-                                    size_t iov_len,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype,
-                                    MPIR_Request * sreq, void *netmod_context)
+static inline int MPIDI_NM_am_isendv(int rank,
+                                     MPIR_Comm * comm,
+                                     int handler_id,
+                                     struct iovec *am_hdr,
+                                     size_t iov_len,
+                                     const void *data,
+                                     MPI_Count count,
+                                     MPI_Datatype datatype,
+                                     MPIR_Request * sreq, void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS;
     size_t am_hdr_sz = 0, i;
@@ -224,8 +225,8 @@ static inline int MPIDI_NM_am_sendv(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_am_send(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
-                                 data, count, datatype, sreq, netmod_context);
+    mpi_errno = MPIDI_NM_am_isend(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+                                  data, count, datatype, sreq, netmod_context);
 
     MPL_free(am_hdr_buf);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_SEND_AMV);
@@ -234,16 +235,16 @@ static inline int MPIDI_NM_am_sendv(int rank,
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_reply
+#define FUNCNAME MPIDI_NM_am_isend_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
-                                         int src_rank,
-                                         int handler_id,
-                                         const void *am_hdr,
-                                         size_t am_hdr_sz,
-                                         const void *data, MPI_Count count,
-                                         MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_NM_am_isend_reply(MPIR_Context_id_t context_id,
+                                          int src_rank,
+                                          int handler_id,
+                                          const void *am_hdr,
+                                          size_t am_hdr_sz,
+                                          const void *data, MPI_Count count,
+                                          MPI_Datatype datatype, MPIR_Request * sreq)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_UCX_ucp_request_t *ucp_request;
@@ -281,7 +282,7 @@ static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
                                                                   data_sz + am_hdr_sz +
                                                                   sizeof(ucx_hdr),
                                                                   ucp_dt_make_contig(1), ucx_tag,
-                                                                  &MPIDI_UCX_am_send_callback);
+                                                                  &MPIDI_UCX_am_isend_callback);
         MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
     }
 
@@ -321,10 +322,10 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return (MPIDI_UCX_MAX_AM_EAGER_SZ - sizeof(MPIDI_UCX_am_header_t));
 }
 
-static inline int MPIDI_NM_am_inject_hdr(int rank,
-                                         MPIR_Comm * comm,
-                                         int handler_id,
-                                         const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
+static inline int MPIDI_NM_am_send_hdr(int rank,
+                                       MPIR_Comm * comm,
+                                       int handler_id,
+                                       const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_UCX_ucp_request_t *ucp_request;
@@ -374,9 +375,9 @@ static inline int MPIDI_NM_am_inject_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                               int src_rank,
-                                               int handler_id, const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                             int src_rank,
+                                             int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS, c;
     MPIDI_UCX_ucp_request_t *ucp_request;
@@ -437,9 +438,9 @@ static inline int MPIDI_NM_am_recv(MPIR_Request * req)
     msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr));
     msg.rreq_ptr = (uint64_t) req;
     MPIR_Assert((void *) msg.sreq_ptr != NULL);
-    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
-                                             MPIDI_CH4U_REQUEST(req, src_rank),
-                                             MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
+    mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
+                                           MPIDI_CH4U_REQUEST(req, src_rank),
+                                           MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch4/shm/include/shm.h b/src/mpid/ch4/shm/include/shm.h
index 1013990..7b90ecb 100644
--- a/src/mpid/ch4/shm/include/shm.h
+++ b/src/mpid/ch4/shm/include/shm.h
@@ -40,28 +40,27 @@ typedef int (*MPIDI_SHM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_SHM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_SHM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                         MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_SHM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                          const void *am_hdr, size_t am_hdr_sz, void *shm_context);
-typedef int (*MPIDI_SHM_am_send_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
-                                    size_t am_hdr_sz, const void *data, MPI_Count count,
-                                    MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context);
+typedef int (*MPIDI_SHM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+                                        const void *am_hdr, size_t am_hdr_sz, void *shm_context);
+typedef int (*MPIDI_SHM_am_isend_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
+                                     size_t am_hdr_sz, const void *data, MPI_Count count,
+                                     MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context);
 typedef int (*MPIDI_SHM_inject_am_t) (int rank, MPIR_Comm * comm, int handler_id,
                                       const void *am_hdr, size_t am_hdr_sz, const void *data,
                                       MPI_Count count, MPI_Datatype datatype, void *shm_context);
-typedef int (*MPIDI_SHM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                     struct iovec * am_hdrs, size_t iov_len, const void *data,
-                                     MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
-                                     void *shm_context);
+typedef int (*MPIDI_SHM_am_isendv_t) (int rank, MPIR_Comm * comm, int handler_id,
+                                      struct iovec * am_hdrs, size_t iov_len, const void *data,
+                                      MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
+                                      void *shm_context);
 typedef int (*MPIDI_SHM_inject_amv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                        struct iovec * am_hdrs, size_t iov_len, const void *data,
                                        MPI_Count count, MPI_Datatype datatype, void *shm_context);
-typedef int (*MPIDI_SHM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                                int handler_id, const void *am_hdr,
-                                                size_t am_hdr_sz);
-typedef int (*MPIDI_SHM_am_send_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                          int handler_id, const void *am_hdr, size_t am_hdr_sz,
-                                          const void *data, MPI_Count count, MPI_Datatype datatype,
-                                          MPIR_Request * sreq);
+typedef int (*MPIDI_SHM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+                                              int handler_id, const void *am_hdr, size_t am_hdr_sz);
+typedef int (*MPIDI_SHM_am_isend_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+                                           int handler_id, const void *am_hdr, size_t am_hdr_sz,
+                                           const void *data, MPI_Count count, MPI_Datatype datatype,
+                                           MPIR_Request * sreq);
 typedef int (*MPIDI_SHM_inject_am_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                             int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                             const void *data, MPI_Count count,
@@ -372,13 +371,13 @@ typedef struct MPIDI_SHM_funcs {
     MPIDI_SHM_open_port_t open_port;
     MPIDI_SHM_close_port_t close_port;
     MPIDI_SHM_comm_accept_t comm_accept;
-    MPIDI_SHM_am_inject_hdr_t am_inject_hdr;
-    MPIDI_SHM_am_send_t am_send;
+    MPIDI_SHM_am_send_hdr_t am_send_hdr;
+    MPIDI_SHM_am_isend_t am_isend;
     MPIDI_SHM_inject_am_t inject_am;
-    MPIDI_SHM_am_sendv_t am_sendv;
+    MPIDI_SHM_am_isendv_t am_isendv;
     MPIDI_SHM_inject_amv_t inject_amv;
-    MPIDI_SHM_am_inject_hdr_reply_t am_inject_hdr_reply;
-    MPIDI_SHM_am_send_reply_t am_send_reply;
+    MPIDI_SHM_am_send_hdr_reply_t am_send_hdr_reply;
+    MPIDI_SHM_am_isend_reply_t am_isend_reply;
     MPIDI_SHM_inject_am_reply_t inject_am_reply;
     MPIDI_SHM_inject_amv_reply_t inject_amv_reply;
     MPIDI_SHM_am_hdr_max_sz_t am_hdr_max_sz;
@@ -533,41 +532,40 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
                                                    int root, MPIR_Comm * comm,
                                                    MPIR_Comm **
                                                    newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
-                                                     int handler_id, const void *am_hdr,
-                                                     size_t am_hdr_sz,
-                                                     void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send(int rank, MPIR_Comm * comm, int handler_id,
-                                               const void *am_hdr, size_t am_hdr_sz,
-                                               const void *data, MPI_Count count,
-                                               MPI_Datatype datatype, MPIR_Request * sreq,
-                                               void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm,
+                                                   int handler_id, const void *am_hdr,
+                                                   size_t am_hdr_sz,
+                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isend(int rank, MPIR_Comm * comm, int handler_id,
+                                                const void *am_hdr, size_t am_hdr_sz,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *shm_context) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
                                                  const void *am_hdr, size_t am_hdr_sz,
                                                  const void *data, MPI_Count count,
                                                  MPI_Datatype datatype,
                                                  void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
-                                                struct iovec *am_hdrs, size_t iov_len,
-                                                const void *data, MPI_Count count,
-                                                MPI_Datatype datatype, MPIR_Request * sreq,
-                                                void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isendv(int rank, MPIR_Comm * comm, int handler_id,
+                                                 struct iovec *am_hdrs, size_t iov_len,
+                                                 const void *data, MPI_Count count,
+                                                 MPI_Datatype datatype, MPIR_Request * sreq,
+                                                 void *shm_context) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
                                                   struct iovec *am_hdrs, size_t iov_len,
                                                   const void *data, MPI_Count count,
                                                   MPI_Datatype datatype,
                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                                           int src_rank, int handler_id,
-                                                           const void *am_hdr,
-                                                           size_t am_hdr_sz)
-    MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id,
-                                                     int src_rank, int handler_id,
-                                                     const void *am_hdr, size_t am_hdr_sz,
-                                                     const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype,
-                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                                         int src_rank, int handler_id,
+                                                         const void *am_hdr,
+                                                         size_t am_hdr_sz) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isend_reply(MPIR_Context_id_t context_id,
+                                                      int src_rank, int handler_id,
+                                                      const void *am_hdr, size_t am_hdr_sz,
+                                                      const void *data, MPI_Count count,
+                                                      MPI_Datatype datatype,
+                                                      MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
                                                        int src_rank, int handler_id,
                                                        const void *am_hdr, size_t am_hdr_sz,
diff --git a/src/mpid/ch4/shm/include/shm_impl.h b/src/mpid/ch4/shm/include/shm_impl.h
index dd7a495..b563ae2 100644
--- a/src/mpid/ch4/shm/include/shm_impl.h
+++ b/src/mpid/ch4/shm/include/shm_impl.h
@@ -68,21 +68,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
     return MPIDI_SHM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
-                                                     int handler_id, const void *am_hdr,
-                                                     size_t am_hdr_sz, void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm,
+                                                   int handler_id, const void *am_hdr,
+                                                   size_t am_hdr_sz, void *shm_context)
 {
-    return MPIDI_SHM_func->am_inject_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, shm_context);
+    return MPIDI_SHM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send(int rank, MPIR_Comm * comm, int handler_id,
-                                               const void *am_hdr, size_t am_hdr_sz,
-                                               const void *data, MPI_Count count,
-                                               MPI_Datatype datatype, MPIR_Request * sreq,
-                                               void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isend(int rank, MPIR_Comm * comm, int handler_id,
+                                                const void *am_hdr, size_t am_hdr_sz,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *shm_context)
 {
-    return MPIDI_SHM_func->am_send(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
-                                   sreq, shm_context);
+    return MPIDI_SHM_func->am_isend(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count,
+                                    datatype, sreq, shm_context);
 };
 
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
@@ -94,14 +94,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int
                                      datatype, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
-                                                struct iovec *am_hdrs, size_t iov_len,
-                                                const void *data, MPI_Count count,
-                                                MPI_Datatype datatype, MPIR_Request * sreq,
-                                                void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isendv(int rank, MPIR_Comm * comm, int handler_id,
+                                                 struct iovec *am_hdrs, size_t iov_len,
+                                                 const void *data, MPI_Count count,
+                                                 MPI_Datatype datatype, MPIR_Request * sreq,
+                                                 void *shm_context)
 {
-    return MPIDI_SHM_func->am_sendv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
-                                    sreq, shm_context);
+    return MPIDI_SHM_func->am_isendv(rank, comm, handler_id, am_hdrs, iov_len, data, count,
+                                     datatype, sreq, shm_context);
 };
 
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
@@ -113,21 +113,21 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, in
                                       datatype, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
-                                                           int src_rank, int handler_id,
-                                                           const void *am_hdr, size_t am_hdr_sz)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
+                                                         int src_rank, int handler_id,
+                                                         const void *am_hdr, size_t am_hdr_sz)
 {
-    return MPIDI_SHM_func->am_inject_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
+    return MPIDI_SHM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id,
-                                                     int src_rank, int handler_id,
-                                                     const void *am_hdr, size_t am_hdr_sz,
-                                                     const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype, MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_isend_reply(MPIR_Context_id_t context_id,
+                                                      int src_rank, int handler_id,
+                                                      const void *am_hdr, size_t am_hdr_sz,
+                                                      const void *data, MPI_Count count,
+                                                      MPI_Datatype datatype, MPIR_Request * sreq)
 {
-    return MPIDI_SHM_func->am_send_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
-                                         count, datatype, sreq);
+    return MPIDI_SHM_func->am_isend_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
+                                          count, datatype, sreq);
 };
 
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
diff --git a/src/mpid/ch4/shm/posix/func_table.c b/src/mpid/ch4/shm/posix/func_table.c
index f6d884f..3319e3a 100644
--- a/src/mpid/ch4/shm/posix/func_table.c
+++ b/src/mpid/ch4/shm/posix/func_table.c
@@ -22,13 +22,13 @@ MPIDI_SHM_funcs_t MPIDI_SHM_posix_funcs = {
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_am_inject_hdr,
-    MPIDI_SHM_am_send,
+    MPIDI_SHM_am_send_hdr,
+    MPIDI_SHM_am_isend,
     MPIDI_SHM_inject_am,
-    MPIDI_SHM_am_sendv,
+    MPIDI_SHM_am_isendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_am_inject_hdr_reply,
-    MPIDI_SHM_am_send_reply,
+    MPIDI_SHM_am_send_hdr_reply,
+    MPIDI_SHM_am_isend_reply,
     MPIDI_SHM_inject_am_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
diff --git a/src/mpid/ch4/shm/posix/posix_am.h b/src/mpid/ch4/shm/posix/posix_am.h
index 6b41b54..63a44c0 100644
--- a/src/mpid/ch4/shm/posix/posix_am.h
+++ b/src/mpid/ch4/shm/posix/posix_am.h
@@ -20,24 +20,11 @@ static inline int MPIDI_SHM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    const void *am_hdr,
-                                    size_t am_hdr_sz,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_SHM_am_sendv(int rank,
+static inline int MPIDI_SHM_am_isend(int rank,
                                      MPIR_Comm * comm,
                                      int handler_id,
-                                     struct iovec *am_hdr,
-                                     size_t iov_len,
+                                     const void *am_hdr,
+                                     size_t am_hdr_sz,
                                      const void *data,
                                      MPI_Count count,
                                      MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
@@ -46,13 +33,26 @@ static inline int MPIDI_SHM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
-                                          int handler_id,
-                                          const void *am_hdr,
-                                          size_t am_hdr_sz,
-                                          const void *data,
-                                          MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_SHM_am_isendv(int rank,
+                                      MPIR_Comm * comm,
+                                      int handler_id,
+                                      struct iovec *am_hdr,
+                                      size_t iov_len,
+                                      const void *data,
+                                      MPI_Count count,
+                                      MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
+{
+    MPIR_Assert(0);
+    return MPI_SUCCESS;
+}
+
+static inline int MPIDI_SHM_am_isend_reply(MPIR_Context_id_t context_id, int src_rank,
+                                           int handler_id,
+                                           const void *am_hdr,
+                                           size_t am_hdr_sz,
+                                           const void *data,
+                                           MPI_Count count,
+                                           MPI_Datatype datatype, MPIR_Request * sreq)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
@@ -64,10 +64,10 @@ static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_SHM_am_inject_hdr(int rank,
-                                          MPIR_Comm * comm,
-                                          int handler_id,
-                                          const void *am_hdr, size_t am_hdr_sz, void *shm_context)
+static inline int MPIDI_SHM_am_send_hdr(int rank,
+                                        MPIR_Comm * comm,
+                                        int handler_id,
+                                        const void *am_hdr, size_t am_hdr_sz, void *shm_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
@@ -97,9 +97,8 @@ static inline int MPIDI_SHM_inject_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                int handler_id,
-                                                const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+                                              int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
diff --git a/src/mpid/ch4/shm/stubshm/func_table.c b/src/mpid/ch4/shm/stubshm/func_table.c
index 3b8253c..44a89c5 100644
--- a/src/mpid/ch4/shm/stubshm/func_table.c
+++ b/src/mpid/ch4/shm/stubshm/func_table.c
@@ -22,13 +22,13 @@ MPIDI_SHM_funcs_t MPIDI_SHM_stubshm_funcs = {
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_am_inject_hdr,
-    MPIDI_SHM_am_send,
+    MPIDI_SHM_am_send_hdr,
+    MPIDI_SHM_am_isend,
     MPIDI_SHM_inject_am,
-    MPIDI_SHM_am_sendv,
+    MPIDI_SHM_am_isendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_am_inject_hdr_reply,
-    MPIDI_SHM_am_send_reply,
+    MPIDI_SHM_am_send_hdr_reply,
+    MPIDI_SHM_am_isend_reply,
     MPIDI_SHM_inject_am_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
diff --git a/src/mpid/ch4/shm/stubshm/stubshm_am.h b/src/mpid/ch4/shm/stubshm/stubshm_am.h
index 2e29e5d..0191b50 100644
--- a/src/mpid/ch4/shm/stubshm/stubshm_am.h
+++ b/src/mpid/ch4/shm/stubshm/stubshm_am.h
@@ -20,24 +20,11 @@ static inline int MPIDI_SHM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send(int rank,
-                                    MPIR_Comm * comm,
-                                    int handler_id,
-                                    const void *am_hdr,
-                                    size_t am_hdr_sz,
-                                    const void *data,
-                                    MPI_Count count,
-                                    MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_SHM_am_sendv(int rank,
+static inline int MPIDI_SHM_am_isend(int rank,
                                      MPIR_Comm * comm,
                                      int handler_id,
-                                     struct iovec *am_hdr,
-                                     size_t iov_len,
+                                     const void *am_hdr,
+                                     size_t am_hdr_sz,
                                      const void *data,
                                      MPI_Count count,
                                      MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
@@ -46,13 +33,26 @@ static inline int MPIDI_SHM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
-                                          int handler_id,
-                                          const void *am_hdr,
-                                          size_t am_hdr_sz,
-                                          const void *data,
-                                          MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
+static inline int MPIDI_SHM_am_isendv(int rank,
+                                      MPIR_Comm * comm,
+                                      int handler_id,
+                                      struct iovec *am_hdr,
+                                      size_t iov_len,
+                                      const void *data,
+                                      MPI_Count count,
+                                      MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context)
+{
+    MPIR_Assert(0);
+    return MPI_SUCCESS;
+}
+
+static inline int MPIDI_SHM_am_isend_reply(MPIR_Context_id_t context_id, int src_rank,
+                                           int handler_id,
+                                           const void *am_hdr,
+                                           size_t am_hdr_sz,
+                                           const void *data,
+                                           MPI_Count count,
+                                           MPI_Datatype datatype, MPIR_Request * sreq)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
@@ -64,10 +64,10 @@ static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_SHM_am_inject_hdr(int rank,
-                                          MPIR_Comm * comm,
-                                          int handler_id,
-                                          const void *am_hdr, size_t am_hdr_sz, void *shm_context)
+static inline int MPIDI_SHM_am_send_hdr(int rank,
+                                        MPIR_Comm * comm,
+                                        int handler_id,
+                                        const void *am_hdr, size_t am_hdr_sz, void *shm_context)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
@@ -97,9 +97,8 @@ static inline int MPIDI_SHM_inject_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                int handler_id,
-                                                const void *am_hdr, size_t am_hdr_sz)
+static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+                                              int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index 3ab5c1d..0f311d7 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -152,13 +152,13 @@ static inline int MPIDI_CH4U_get_cmpl_handler(MPIR_Request * req)
     win = MPIDI_CH4U_REQUEST(req, req->greq.win_ptr);
     context_id = MPIDI_CH4U_win_to_context(win);
     if (MPIDI_CH4U_REQUEST(req, req->greq.n_iov) == 0) {
-        mpi_errno = MPIDI_NM_am_send_reply(context_id,
-                                           MPIDI_CH4U_REQUEST(req, src_rank),
-                                           MPIDI_CH4U_GET_ACK,
-                                           &get_ack, sizeof(get_ack),
-                                           (void *) MPIDI_CH4U_REQUEST(req, req->greq.addr),
-                                           MPIDI_CH4U_REQUEST(req, req->greq.count),
-                                           MPIDI_CH4U_REQUEST(req, req->greq.datatype), req);
+        mpi_errno = MPIDI_NM_am_isend_reply(context_id,
+                                            MPIDI_CH4U_REQUEST(req, src_rank),
+                                            MPIDI_CH4U_GET_ACK,
+                                            &get_ack, sizeof(get_ack),
+                                            (void *) MPIDI_CH4U_REQUEST(req, req->greq.addr),
+                                            MPIDI_CH4U_REQUEST(req, req->greq.count),
+                                            MPIDI_CH4U_REQUEST(req, req->greq.datatype), req);
         MPIDI_CH4I_am_request_complete(req);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
@@ -186,10 +186,10 @@ static inline int MPIDI_CH4U_get_cmpl_handler(MPIR_Request * req)
     MPL_free(MPIDI_CH4U_REQUEST(req, req->greq.dt_iov));
     MPIDI_CH4U_REQUEST(req, req->greq.dt_iov) = (void *) p_data;
 
-    mpi_errno = MPIDI_NM_am_send_reply(context_id,
-                                       MPIDI_CH4U_REQUEST(req, src_rank),
-                                       MPIDI_CH4U_GET_ACK,
-                                       &get_ack, sizeof(get_ack), p_data, data_sz, MPI_BYTE, req);
+    mpi_errno = MPIDI_NM_am_isend_reply(context_id,
+                                        MPIDI_CH4U_REQUEST(req, src_rank),
+                                        MPIDI_CH4U_GET_ACK,
+                                        &get_ack, sizeof(get_ack), p_data, data_sz, MPI_BYTE, req);
     MPIDI_CH4I_am_request_complete(req);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
@@ -414,10 +414,10 @@ static inline int MPIDI_CH4U_reply_ssend(MPIR_Request * rreq)
     MPIR_cc_incr(rreq->cc_ptr, &c);
     ack_msg.sreq_ptr = MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr);
 
-    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
-                                       MPIDI_CH4U_REQUEST(rreq, src_rank),
-                                       MPIDI_CH4U_SSEND_ACK, &ack_msg, sizeof(ack_msg),
-                                       NULL, 0, MPI_DATATYPE_NULL, rreq);
+    mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
+                                        MPIDI_CH4U_REQUEST(rreq, src_rank),
+                                        MPIDI_CH4U_SSEND_ACK, &ack_msg, sizeof(ack_msg),
+                                        NULL, 0, MPI_DATATYPE_NULL, rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -440,10 +440,10 @@ static inline int MPIDI_CH4U_ack_put(MPIR_Request * rreq)
 
     ack_msg.preq_ptr = MPIDI_CH4U_REQUEST(rreq, req->preq.preq_ptr);
     mpi_errno =
-        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
-                                     (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
-                                     MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_ACK,
-                                     &ack_msg, sizeof(ack_msg));
+        MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context
+                                   (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
+                                   MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_ACK,
+                                   &ack_msg, sizeof(ack_msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -474,12 +474,13 @@ static inline int MPIDI_CH4U_ack_cswap(MPIR_Request * rreq)
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->creq.creq_ptr);
 
     mpi_errno =
-        MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context
-                               (MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr)),
-                               MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_CSWAP_ACK, &ack_msg,
-                               sizeof(ack_msg), result_addr, 1, MPIDI_CH4U_REQUEST(rreq,
-                                                                                   req->creq.
-                                                                                   datatype), rreq);
+        MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context
+                                (MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr)),
+                                MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_CSWAP_ACK, &ack_msg,
+                                sizeof(ack_msg), result_addr, 1, MPIDI_CH4U_REQUEST(rreq,
+                                                                                    req->creq.
+                                                                                    datatype),
+                                rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -504,10 +505,10 @@ static inline int MPIDI_CH4U_ack_acc(MPIR_Request * rreq)
 
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr);
     mpi_errno =
-        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
-                                     (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
-                                     MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_ACK,
-                                     &ack_msg, sizeof(ack_msg));
+        MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context
+                                   (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
+                                   MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_ACK,
+                                   &ack_msg, sizeof(ack_msg));
 
     win = MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr);
     /* MPIDI_CS_ENTER(); */
@@ -539,11 +540,11 @@ static inline int MPIDI_CH4U_ack_get_acc(MPIR_Request * rreq)
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr);
 
     mpi_errno =
-        MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context
-                               (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
-                               MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_GET_ACC_ACK, &ack_msg,
-                               sizeof(ack_msg), MPIDI_CH4U_REQUEST(rreq, req->areq.data),
-                               MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq);
+        MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context
+                                (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
+                                MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_GET_ACC_ACK,
+                                &ack_msg, sizeof(ack_msg), MPIDI_CH4U_REQUEST(rreq, req->areq.data),
+                                MPIDI_CH4U_REQUEST(rreq, req->areq.data_sz), MPI_BYTE, rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -900,10 +901,10 @@ static inline int MPIDI_CH4U_put_iov_cmpl_handler(MPIR_Request * rreq)
     ack_msg.target_preq_ptr = (uint64_t) rreq;
 
     mpi_errno =
-        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
-                                     (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
-                                     MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_IOV_ACK,
-                                     &ack_msg, sizeof(ack_msg));
+        MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context
+                                   (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
+                                   MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_IOV_ACK,
+                                   &ack_msg, sizeof(ack_msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -930,10 +931,10 @@ static inline int MPIDI_CH4U_acc_iov_cmpl_handler(MPIR_Request * rreq)
     ack_msg.target_preq_ptr = (uint64_t) rreq;
 
     mpi_errno =
-        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
-                                     (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
-                                     MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_IOV_ACK,
-                                     &ack_msg, sizeof(ack_msg));
+        MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context
+                                   (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
+                                   MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_IOV_ACK,
+                                   &ack_msg, sizeof(ack_msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -1652,14 +1653,14 @@ static inline int MPIDI_CH4U_send_long_ack_target_handler(void *am_hdr,
     /* Start the main data transfer */
     send_hdr.rreq_ptr = msg_hdr->rreq_ptr;
     mpi_errno =
-        MPIDI_NM_am_send_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag),
-                               MPIDI_CH4U_REQUEST(sreq, src_rank), MPIDI_CH4U_SEND_LONG_LMT,
-                               &send_hdr, sizeof(send_hdr), MPIDI_CH4U_REQUEST(sreq,
-                                                                               req->lreq).src_buf,
-                               MPIDI_CH4U_REQUEST(sreq, req->lreq).count, MPIDI_CH4U_REQUEST(sreq,
-                                                                                             req->
-                                                                                             lreq).
-                               datatype, sreq);
+        MPIDI_NM_am_isend_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag),
+                                MPIDI_CH4U_REQUEST(sreq, src_rank), MPIDI_CH4U_SEND_LONG_LMT,
+                                &send_hdr, sizeof(send_hdr), MPIDI_CH4U_REQUEST(sreq,
+                                                                                req->lreq).src_buf,
+                                MPIDI_CH4U_REQUEST(sreq, req->lreq).count, MPIDI_CH4U_REQUEST(sreq,
+                                                                                              req->
+                                                                                              lreq).
+                                datatype, sreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -1894,9 +1895,8 @@ static inline int MPIDI_CH4U_win_lock_advance(MPIR_Win * win)
         else
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rmasync");
 
-        mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context(win),
-                                                 lock->rank,
-                                                 MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
+        mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win),
+                                               lock->rank, MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         MPL_free(lock);
@@ -1987,9 +1987,9 @@ static inline void MPIDI_CH4U_win_unlock_proc(const MPIDI_CH4U_win_cntrl_msg_t *
     msg.origin_rank = win->comm_ptr->rank;
     msg.type = MPIDI_CH4U_WIN_UNLOCK_ACK;
 
-    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context(win),
-                                             info->origin_rank,
-                                             MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
+    mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_win_to_context(win),
+                                           info->origin_rank,
+                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
@@ -2307,14 +2307,14 @@ static inline int MPIDI_CH4U_put_iov_ack_target_handler(void *am_hdr,
     origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr;
     dat_msg.preq_ptr = msg_hdr->target_preq_ptr;
     win = MPIDI_CH4U_REQUEST(origin_req, req->preq.win_ptr);
-    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context(win),
-                                       MPIDI_CH4U_REQUEST(origin_req, src_rank),
-                                       MPIDI_CH4U_PUT_DAT_REQ,
-                                       &dat_msg, sizeof(dat_msg),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_addr),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_count),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_datatype),
-                                       rreq);
+    mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context(win),
+                                        MPIDI_CH4U_REQUEST(origin_req, src_rank),
+                                        MPIDI_CH4U_PUT_DAT_REQ,
+                                        &dat_msg, sizeof(dat_msg),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_addr),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_count),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_datatype),
+                                        rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
     dtype_release_if_not_builtin(MPIDI_CH4U_REQUEST(origin_req, req->preq.origin_datatype));
@@ -2356,14 +2356,14 @@ static inline int MPIDI_CH4U_acc_iov_ack_target_handler(void *am_hdr,
     origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr;
     dat_msg.preq_ptr = msg_hdr->target_preq_ptr;
     win = MPIDI_CH4U_REQUEST(origin_req, req->areq.win_ptr);
-    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context(win),
-                                       MPIDI_CH4U_REQUEST(origin_req, src_rank),
-                                       MPIDI_CH4U_ACC_DAT_REQ,
-                                       &dat_msg, sizeof(dat_msg),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count),
-                                       MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_datatype),
-                                       rreq);
+    mpi_errno = MPIDI_NM_am_isend_reply(MPIDI_CH4U_win_to_context(win),
+                                        MPIDI_CH4U_REQUEST(origin_req, src_rank),
+                                        MPIDI_CH4U_ACC_DAT_REQ,
+                                        &dat_msg, sizeof(dat_msg),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_addr),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_count),
+                                        MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_datatype),
+                                        rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
     dtype_release_if_not_builtin(MPIDI_CH4U_REQUEST(origin_req, req->areq.origin_datatype));
diff --git a/src/mpid/ch4/src/ch4r_rma.h b/src/mpid/ch4/src/ch4r_rma.h
index adaaa0c..637ba56 100644
--- a/src/mpid/ch4/src/ch4r_rma.h
+++ b/src/mpid/ch4/src/ch4r_rma.h
@@ -81,9 +81,9 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
-                                     &am_hdr, sizeof(am_hdr), origin_addr,
-                                     origin_count, origin_datatype, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
+                                      &am_hdr, sizeof(am_hdr), origin_addr,
+                                      origin_count, origin_datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;
@@ -114,9 +114,9 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
     MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = dt_iov;
 
     if ((am_iov[0].iov_len + am_iov[1].iov_len) <= MPIDI_NM_am_hdr_max_sz()) {
-        mpi_errno = MPIDI_NM_am_sendv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
-                                      &am_iov[0], 2, origin_addr, origin_count, origin_datatype,
-                                      sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
+                                       &am_iov[0], 2, origin_addr, origin_count, origin_datatype,
+                                       sreq, NULL);
     }
     else {
         MPIDI_CH4U_REQUEST(sreq, req->preq.origin_addr) = (void *) origin_addr;
@@ -125,9 +125,9 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
         MPIDI_CH4U_REQUEST(sreq, src_rank) = target_rank;
         dtype_add_ref_if_not_builtin(origin_datatype);
 
-        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ,
-                                     &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
-                                     am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ,
+                                      &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
+                                      am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
     }
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
@@ -210,9 +210,9 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr,
-                                     MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr),
-                                     NULL, 0, MPI_DATATYPE_NULL, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr,
+                                      MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr),
+                                      NULL, 0, MPI_DATATYPE_NULL, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;
@@ -236,9 +236,9 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
     MPL_free(segment_ptr);
 
     MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = dt_iov;
-    mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ,
-                                 &am_hdr, sizeof(am_hdr), dt_iov,
-                                 sizeof(struct iovec) * am_hdr.n_iov, MPI_BYTE, sreq, NULL);
+    mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ,
+                                  &am_hdr, sizeof(am_hdr), dt_iov,
+                                  sizeof(struct iovec) * am_hdr.n_iov, MPI_BYTE, sreq, NULL);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -442,10 +442,10 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
-                                     &am_hdr, sizeof(am_hdr), origin_addr,
-                                     (op == MPI_NO_OP) ? 0 : origin_count,
-                                     origin_datatype, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
+                                      &am_hdr, sizeof(am_hdr), origin_addr,
+                                      (op == MPI_NO_OP) ? 0 : origin_count,
+                                      origin_datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;
@@ -480,10 +480,10 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
     MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = dt_iov;
 
     if ((am_iov[0].iov_len + am_iov[1].iov_len) <= MPIDI_NM_am_hdr_max_sz()) {
-        mpi_errno = MPIDI_NM_am_sendv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
-                                      &am_iov[0], 2, origin_addr,
-                                      (op == MPI_NO_OP) ? 0 : origin_count,
-                                      origin_datatype, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isendv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
+                                       &am_iov[0], 2, origin_addr,
+                                       (op == MPI_NO_OP) ? 0 : origin_count,
+                                       origin_datatype, sreq, NULL);
     }
     else {
         MPIDI_CH4U_REQUEST(sreq, req->areq.origin_addr) = (void *) origin_addr;
@@ -492,9 +492,9 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
         MPIDI_CH4U_REQUEST(sreq, src_rank) = target_rank;
         dtype_add_ref_if_not_builtin(origin_datatype);
 
-        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ,
-                                     &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
-                                     am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ,
+                                      &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
+                                      am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
     }
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
@@ -722,8 +722,9 @@ __CH4_INLINE__ int MPIDI_CH4U_compare_and_swap(const void *origin_addr,
     OPA_incr_int(&MPIDI_CH4U_WIN(win, outstanding_ops));
     /* MPIDI_CS_EXIT(); */
 
-    mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ,
-                                 &am_hdr, sizeof(am_hdr), (char *) p_data, 2, datatype, sreq, NULL);
+    mpi_errno = MPIDI_NM_am_isend(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ,
+                                  &am_hdr, sizeof(am_hdr), (char *) p_data, 2, datatype, sreq,
+                                  NULL);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
diff --git a/src/mpid/ch4/src/ch4r_send.h b/src/mpid/ch4/src/ch4r_send.h
index 30f4f4e..dc1f3e7 100644
--- a/src/mpid/ch4/src/ch4r_send.h
+++ b/src/mpid/ch4/src/ch4r_send.h
@@ -49,15 +49,15 @@ static inline int MPIDI_CH4I_do_send(const void *buf,
         ssend_req.sreq_ptr = (uint64_t) sreq;
         MPIR_cc_incr(sreq->cc_ptr, &c);
 
-        mpi_errno = MPIDI_NM_am_send(rank, comm, MPIDI_CH4U_SSEND_REQ,
-                                     &ssend_req, sizeof(ssend_req),
-                                     buf, count, datatype, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(rank, comm, MPIDI_CH4U_SSEND_REQ,
+                                      &ssend_req, sizeof(ssend_req),
+                                      buf, count, datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
     }
     else {
-        mpi_errno = MPIDI_NM_am_send(rank, comm, MPIDI_CH4U_SEND,
-                                     &am_hdr, sizeof(am_hdr), buf, count, datatype, sreq, NULL);
+        mpi_errno = MPIDI_NM_am_isend(rank, comm, MPIDI_CH4U_SEND,
+                                      &am_hdr, sizeof(am_hdr), buf, count, datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
     }
diff --git a/src/mpid/ch4/src/ch4r_win.h b/src/mpid/ch4/src/ch4r_win.h
index 4bcd90d..ebf3299 100644
--- a/src/mpid/ch4/src/ch4r_win.h
+++ b/src/mpid/ch4/src/ch4r_win.h
@@ -284,8 +284,8 @@ static inline int MPIDI_CH4R_win_complete(MPIR_Win * win)
 
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
-        mpi_errno = MPIDI_NM_am_inject_hdr(peer, win->comm_ptr,
-                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr,
+                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     }
@@ -338,8 +338,8 @@ static inline int MPIDI_CH4R_win_post(MPIR_Group * group, int assert, MPIR_Win *
 
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
-        mpi_errno = MPIDI_NM_am_inject_hdr(peer, win->comm_ptr,
-                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(peer, win->comm_ptr,
+                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     }
@@ -440,8 +440,8 @@ static inline int MPIDI_CH4R_win_lock(int lock_type, int rank, int assert, MPIR_
     msg.lock_type = lock_type;
 
     locked = slock->remote.locked + 1;
-    mpi_errno = MPIDI_NM_am_inject_hdr(rank, win->comm_ptr,
-                                       MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+    mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr,
+                                     MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
     MPIDI_CH4R_PROGRESS_WHILE(slock->remote.locked != locked);
@@ -482,8 +482,8 @@ static inline int MPIDI_CH4R_win_unlock(int rank, MPIR_Win * win)
     msg.type = MPIDI_CH4U_WIN_UNLOCK;
     unlocked = MPIDI_CH4U_WIN(win, sync).lock.remote.locked - 1;
 
-    mpi_errno = MPIDI_NM_am_inject_hdr(rank, win->comm_ptr,
-                                       MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+    mpi_errno = MPIDI_NM_am_send_hdr(rank, win->comm_ptr,
+                                     MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 
@@ -1066,8 +1066,8 @@ static inline int MPIDI_CH4R_win_unlock_all(MPIR_Win * win)
         lockQ[i].peer = i;
         lockQ[i].win = win;
 
-        mpi_errno = MPIDI_NM_am_inject_hdr(i, win->comm_ptr,
-                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr,
+                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 
@@ -1228,8 +1228,8 @@ static inline int MPIDI_CH4R_win_lock_all(int assert, MPIR_Win * win)
         lockQ[i].win = win;
         lockQ[i].lock_type = MPI_LOCK_SHARED;
 
-        mpi_errno = MPIDI_NM_am_inject_hdr(i, win->comm_ptr,
-                                           MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
+        mpi_errno = MPIDI_NM_am_send_hdr(i, win->comm_ptr,
+                                         MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
 

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

commit af99ecc1e04a32f9224f2d803751c1149e0a97c5
Author: Pavan Balaji <balaji at anl.gov>
Date:   Fri Aug 19 10:40:32 2016 -0500

    CH4/OFI: Build fix
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/ofi/ofi_recv.h b/src/mpid/ch4/netmod/ofi/ofi_recv.h
index ecc93b5..2f9e0e8 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_recv.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_recv.h
@@ -275,6 +275,11 @@ __ALWAYS_INLINE__ int MPIDI_NM_cancel_recv(MPIR_Request * rreq)
   fn_exit:
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_CANCEL_RECV);
     return mpi_errno;
+
+#ifndef MPIDI_BUILD_CH4_SHM
+fn_fail:
+    goto fn_exit;
+#endif
 }
 
 #endif /* NETMOD_OFI_RECV_H_INCLUDED */

http://git.mpich.org/mpich.git/commitdiff/7910b821f8e6d816e281d42120737e63c63a83b9

commit 7910b821f8e6d816e281d42120737e63c63a83b9
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 16:43:08 2016 -0500

    CH4: Remove hdr-only AM API
    
    Merge am_send and am_send_hdr into a single function.  Remove
    sendv_hdr and sendv_reply, since they are unused.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index f013ed3..6230eac 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -41,9 +41,6 @@ typedef int (*MPIDI_NM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_NM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_NM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                        MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_NM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                       const void *am_hdr, size_t am_hdr_sz, MPIR_Request * sreq,
-                                       void *netmod_context);
 typedef int (*MPIDI_NM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz,
                                          void *netmod_context);
@@ -55,12 +52,6 @@ typedef int (*MPIDI_NM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                     struct iovec * am_hdrs, size_t iov_len, const void *data,
                                     MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
                                     void *netmod_context);
-typedef int (*MPIDI_NM_am_sendv_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                        struct iovec * am_hdrs, size_t iov_len, MPIR_Request * sreq,
-                                        void *netmod_context);
-typedef int (*MPIDI_NM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                             int handler_id, const void *am_hdr, size_t am_hdr_sz,
-                                             MPIR_Request * sreq);
 typedef int (*MPIDI_NM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                                int handler_id, const void *am_hdr,
                                                size_t am_hdr_sz);
@@ -68,10 +59,6 @@ typedef int (*MPIDI_NM_am_send_reply_t) (MPIR_Context_id_t context_id, int src_r
                                          const void *am_hdr, size_t am_hdr_sz, const void *data,
                                          MPI_Count count, MPI_Datatype datatype,
                                          MPIR_Request * sreq);
-typedef int (*MPIDI_NM_am_sendv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                          int handler_id, struct iovec * am_hdr, size_t iov_len,
-                                          const void *data, MPI_Count count, MPI_Datatype datatype,
-                                          MPIR_Request * sreq);
 typedef size_t(*MPIDI_NM_am_hdr_max_sz_t) (void);
 typedef int (*MPIDI_NM_am_recv_t) (MPIR_Request * req);
 typedef int (*MPIDI_NM_comm_get_lpid_t) (MPIR_Comm * comm_ptr, int idx, int *lpid_ptr,
@@ -379,15 +366,11 @@ typedef struct MPIDI_NM_funcs {
     MPIDI_NM_am_request_finalize_t am_request_finalize;
     /* Active Message Routines */
     MPIDI_NM_am_reg_handler_t am_reg_handler;
-    MPIDI_NM_am_send_hdr_t am_send_hdr;
     MPIDI_NM_am_inject_hdr_t am_inject_hdr;
     MPIDI_NM_am_send_t am_send;
     MPIDI_NM_am_sendv_t am_sendv;
-    MPIDI_NM_am_sendv_hdr_t am_sendv_hdr;
-    MPIDI_NM_am_send_hdr_reply_t am_send_hdr_reply;
     MPIDI_NM_am_inject_hdr_reply_t am_inject_hdr_reply;
     MPIDI_NM_am_send_reply_t am_send_reply;
-    MPIDI_NM_am_sendv_reply_t am_sendv_reply;
     MPIDI_NM_am_hdr_max_sz_t am_hdr_max_sz;
     MPIDI_NM_am_recv_t am_recv;
 } MPIDI_NM_funcs_t;
@@ -534,10 +517,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
                                                   int root, MPIR_Comm * comm,
                                                   MPIR_Comm **
                                                   newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                  const void *am_hdr, size_t am_hdr_sz,
-                                                  MPIR_Request * sreq,
-                                                  void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                     const void *am_hdr, size_t am_hdr_sz,
                                                     void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
@@ -551,15 +530,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int h
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                   struct iovec *am_hdrs, size_t iov_len,
-                                                   MPIR_Request * sreq,
-                                                   void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                                        int src_rank, int handler_id,
-                                                        const void *am_hdr, size_t am_hdr_sz,
-                                                        MPIR_Request *
-                                                        sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                           int src_rank, int handler_id,
                                                           const void *am_hdr,
@@ -570,12 +540,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id
                                                     size_t am_hdr_sz, const void *data,
                                                     MPI_Count count, MPI_Datatype datatype,
                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                                     int src_rank, int handler_id,
-                                                     struct iovec *am_hdr, size_t iov_len,
-                                                     const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype,
-                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index d143059..dc4f022 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -72,14 +72,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
     return MPIDI_NM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                  const void *am_hdr, size_t am_hdr_sz,
-                                                  MPIR_Request * sreq, void *netmod_context)
-{
-    return MPIDI_NM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
-                                      netmod_context);
-};
-
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                     const void *am_hdr, size_t am_hdr_sz,
                                                     void *netmod_context)
@@ -107,23 +99,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int h
                                    sreq, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                   struct iovec *am_hdrs, size_t iov_len,
-                                                   MPIR_Request * sreq, void *netmod_context)
-{
-    return MPIDI_NM_func->am_sendv_hdr(rank, comm, handler_id, am_hdrs, iov_len, sreq,
-                                       netmod_context);
-};
-
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                                        int src_rank, int handler_id,
-                                                        const void *am_hdr, size_t am_hdr_sz,
-                                                        MPIR_Request * sreq)
-{
-    return MPIDI_NM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
-                                            sreq);
-};
-
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                           int src_rank, int handler_id,
                                                           const void *am_hdr, size_t am_hdr_sz)
@@ -141,16 +116,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id
                                         count, datatype, sreq);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                                     int src_rank, int handler_id,
-                                                     struct iovec *am_hdr, size_t iov_len,
-                                                     const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    return MPIDI_NM_func->am_sendv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
-                                         count, datatype, sreq);
-};
-
 MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void)
 {
     return MPIDI_NM_func->am_hdr_max_sz();
diff --git a/src/mpid/ch4/netmod/ofi/func_table.c b/src/mpid/ch4/netmod/ofi/func_table.c
index c96f47d..ae06b7b 100644
--- a/src/mpid/ch4/netmod/ofi/func_table.c
+++ b/src/mpid/ch4/netmod/ofi/func_table.c
@@ -32,15 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_send_hdr,
     MPIDI_NM_am_inject_hdr,
     MPIDI_NM_am_send,
     MPIDI_NM_am_sendv,
-    MPIDI_NM_am_sendv_hdr,
-    MPIDI_NM_am_send_hdr_reply,
     MPIDI_NM_am_inject_hdr_reply,
     MPIDI_NM_am_send_reply,
-    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am.h b/src/mpid/ch4/netmod/ofi/ofi_am.h
index f624d28..f139399 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am.h
@@ -53,26 +53,6 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_hdr
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_hdr(int rank,
-                                       MPIR_Comm * comm,
-                                       int handler_id,
-                                       const void *am_hdr,
-                                       size_t am_hdr_sz, MPIR_Request * sreq, void *netmod_context)
-{
-    int mpi_errno = MPI_SUCCESS;
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_HDR);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_HDR);
-
-    mpi_errno = MPIDI_OFI_do_am_send_header(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq, FALSE);
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_HDR);
-    return mpi_errno;
-}
-
-
-#undef FUNCNAME
 #define FUNCNAME MPIDI_NM_am_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
@@ -88,8 +68,12 @@ static inline int MPIDI_NM_am_send(int rank,
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM);
-    mpi_errno = MPIDI_OFI_do_am_send(rank, comm, handler_id,
-                                     am_hdr, am_hdr_sz, data, count, datatype, sreq, FALSE);
+    if (count)
+        mpi_errno = MPIDI_OFI_do_am_send(rank, comm, handler_id,
+                                         am_hdr, am_hdr_sz, data, count, datatype, sreq, FALSE);
+    else
+        mpi_errno = MPIDI_OFI_do_am_send_header(rank, comm, handler_id,
+                                                am_hdr, am_hdr_sz, sreq, FALSE);
 
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM);
     return mpi_errno;
@@ -150,77 +134,6 @@ static inline int MPIDI_NM_am_sendv(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_sendv_hdr
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_sendv_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        struct iovec *am_hdr,
-                                        size_t iov_len, MPIR_Request * sreq, void *netmod_context)
-{
-    int mpi_errno = MPI_SUCCESS, is_allocated;
-    size_t am_hdr_sz = 0, i;
-    char *am_hdr_buf;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_SEND_AMV_HDR);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_SEND_AMV_HDR);
-
-    for (i = 0; i < iov_len; i++) {
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    /* TODO: avoid the malloc here, use the am_hdr directly */
-    if (am_hdr_sz > MPIDI_OFI_BUF_POOL_SIZE) {
-        am_hdr_buf = (char *) MPL_malloc(am_hdr_sz);
-        is_allocated = 1;
-    }
-    else {
-        am_hdr_buf = (char *) MPIDI_CH4R_get_buf(MPIDI_Global.am_buf_pool);
-        is_allocated = 0;
-    }
-
-    MPIR_Assert(am_hdr_buf);
-    am_hdr_sz = 0;
-
-    for (i = 0; i < iov_len; i++) {
-        MPIR_Memcpy(am_hdr_buf + am_hdr_sz, am_hdr[i].iov_base, am_hdr[i].iov_len);
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
-                                     sreq, netmod_context);
-
-    if (is_allocated)
-        MPL_free(am_hdr_buf);
-    else
-        MPIDI_CH4R_release_buf(am_hdr_buf);
-
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SEND_AMV_HDR);
-    return mpi_errno;
-}
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_hdr_reply
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                             int src_rank,
-                                             int handler_id,
-                                             const void *am_hdr,
-                                             size_t am_hdr_sz, MPIR_Request * sreq)
-{
-    int mpi_errno = MPI_SUCCESS;
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
-    mpi_errno = MPIDI_OFI_do_am_send_header(src_rank,
-                                            MPIDI_CH4U_context_id_to_comm(context_id),
-                                            handler_id, am_hdr, am_hdr_sz, sreq, TRUE);
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
-    return mpi_errno;
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIDI_NM_am_send_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
@@ -236,61 +149,16 @@ static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_REPLY);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_REPLY);
-    mpi_errno = MPIDI_OFI_do_am_send(src_rank,
-                                     MPIDI_CH4U_context_id_to_comm(context_id),
-                                     handler_id,
-                                     am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE);
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_REPLY);
-    return mpi_errno;
-}
-
-static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                          int src_rank,
-                                          int handler_id,
-                                          struct iovec *am_hdr,
-                                          size_t iov_len,
-                                          const void *data,
-                                          MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    int mpi_errno = MPI_SUCCESS, is_allocated;
-    size_t am_hdr_sz = 0, i;
-    char *am_hdr_buf;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_SEND_AMV_REPLY);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_OFI_SEND_AMV_REPLY);
-
-    for (i = 0; i < iov_len; i++) {
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    /* TODO: avoid the malloc here, use the am_hdr directly */
-    if (am_hdr_sz > MPIDI_OFI_BUF_POOL_SIZE) {
-        am_hdr_buf = (char *) MPL_malloc(am_hdr_sz);
-        is_allocated = 1;
-    }
-    else {
-        am_hdr_buf = (char *) MPIDI_CH4R_get_buf(MPIDI_Global.am_buf_pool);
-        is_allocated = 0;
-    }
-
-    MPIR_Assert(am_hdr_buf);
-    am_hdr_sz = 0;
-
-    for (i = 0; i < iov_len; i++) {
-        MPIR_Memcpy(am_hdr_buf + am_hdr_sz, am_hdr[i].iov_base, am_hdr[i].iov_len);
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    mpi_errno = MPIDI_NM_am_send_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
-                                       data, count, datatype, sreq);
-
-    if (is_allocated)
-        MPL_free(am_hdr_buf);
+    if (count)
+        mpi_errno = MPIDI_OFI_do_am_send(src_rank,
+                                         MPIDI_CH4U_context_id_to_comm(context_id),
+                                         handler_id,
+                                         am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE);
     else
-        MPIDI_CH4R_release_buf(am_hdr_buf);
-
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_OFI_SEND_AMV_REPLY);
+        mpi_errno = MPIDI_OFI_do_am_send_header(src_rank,
+                                                MPIDI_CH4U_context_id_to_comm(context_id),
+                                                handler_id, am_hdr, am_hdr_sz, sreq, TRUE);
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_REPLY);
     return mpi_errno;
 }
 
diff --git a/src/mpid/ch4/netmod/portals4/func_table.c b/src/mpid/ch4/netmod/portals4/func_table.c
index c5b92db..eade09e 100644
--- a/src/mpid/ch4/netmod/portals4/func_table.c
+++ b/src/mpid/ch4/netmod/portals4/func_table.c
@@ -32,15 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_send_hdr,
     MPIDI_NM_am_inject_hdr,
     MPIDI_NM_am_send,
     MPIDI_NM_am_sendv,
-    MPIDI_NM_am_sendv_hdr,
-    MPIDI_NM_am_send_hdr_reply,
     MPIDI_NM_am_inject_hdr_reply,
     MPIDI_NM_am_send_reply,
-    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/portals4/ptl_am.h b/src/mpid/ch4/netmod/portals4/ptl_am.h
index c2a560c..0ff7db0 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_am.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_am.h
@@ -34,41 +34,6 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_send_hdr(int rank,
-                                       MPIR_Comm * comm,
-                                       int handler_id,
-                                       const void *am_hdr,
-                                       size_t am_hdr_sz, MPIR_Request * sreq, void *netmod_context)
-{
-    int mpi_errno = MPI_SUCCESS, ret, c;
-    ptl_hdr_data_t ptl_hdr;
-    ptl_match_bits_t match_bits;
-    char *send_buf = NULL;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM);
-
-    ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, 0);
-    match_bits = MPIDI_PTL_init_tag(comm->context_id, MPIDI_PTL_AM_TAG);
-    sreq->dev.ch4.ch4u.netmod_am.portals4.handler_id = handler_id;
-
-    MPIR_cc_incr(sreq->cc_ptr, &c);
-
-    send_buf = MPL_malloc(am_hdr_sz);
-    MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz);
-    sreq->dev.ch4.ch4u.netmod_am.portals4.pack_buffer = send_buf;
-
-    ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz,
-                 PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process,
-                 MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, sreq, ptl_hdr);
-
-  fn_exit:
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM);
-    return mpi_errno;
-  fn_fail:
-    goto fn_exit;
-}
-
 static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
@@ -90,13 +55,29 @@ static inline int MPIDI_NM_am_send(int rank,
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM);
 
-    MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
     match_bits = MPIDI_PTL_init_tag(comm->context_id, MPIDI_PTL_AM_TAG);
-    ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, data_sz);
     sreq->dev.ch4.ch4u.netmod_am.portals4.handler_id = handler_id;
 
     MPIR_cc_incr(sreq->cc_ptr, &c);
 
+    /* fast path: there's no data to be sent */
+    if (count == 0) {
+        send_buf = MPL_malloc(am_hdr_sz);
+        MPIR_Memcpy(send_buf, am_hdr, am_hdr_sz);
+        sreq->dev.ch4.ch4u.netmod_am.portals4.pack_buffer = send_buf;
+
+        ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, 0);
+
+        ret = PtlPut(MPIDI_PTL_global.md, (ptl_size_t) send_buf, am_hdr_sz,
+                     PTL_ACK_REQ, MPIDI_PTL_global.addr_table[rank].process,
+                     MPIDI_PTL_global.addr_table[rank].pt, match_bits, 0, sreq, ptl_hdr);
+
+        goto fn_exit;
+    }
+
+    MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
+    ptl_hdr = MPIDI_PTL_init_am_hdr(handler_id, data_sz);
+
     if (dt_contig) {
         /* create a two element iovec and send */
         ptl_md_t md;
@@ -162,26 +143,6 @@ static inline int MPIDI_NM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_sendv_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        struct iovec *am_hdr,
-                                        size_t iov_len, MPIR_Request * sreq, void *netmod_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                             int src_rank,
-                                             int handler_id,
-                                             const void *am_hdr,
-                                             size_t am_hdr_sz, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
                                          int src_rank,
                                          int handler_id,
@@ -264,19 +225,6 @@ static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                          int src_rank,
-                                          int handler_id,
-                                          struct iovec *am_hdr,
-                                          size_t iov_len,
-                                          const void *data,
-                                          MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline size_t MPIDI_NM_am_hdr_max_sz(void)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/stubnm/globals.c b/src/mpid/ch4/netmod/stubnm/globals.c
index 7ecbbb2..89a5cc9 100644
--- a/src/mpid/ch4/netmod/stubnm/globals.c
+++ b/src/mpid/ch4/netmod/stubnm/globals.c
@@ -32,15 +32,11 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_send_hdr,
     MPIDI_NM_am_inject_hdr,
     MPIDI_NM_am_send,
     MPIDI_NM_am_sendv,
-    MPIDI_NM_am_sendv_hdr,
-    MPIDI_NM_am_send_hdr_reply,
     MPIDI_NM_am_inject_hdr_reply,
     MPIDI_NM_am_send_reply,
-    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_am.h b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
index 074c696..f33e1c3 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_am.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
@@ -21,16 +21,6 @@ static inline int MPIDI_NM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_send_hdr(int rank,
-                                       MPIR_Comm * comm,
-                                       int handler_id,
-                                       const void *am_hdr,
-                                       size_t am_hdr_sz, MPIR_Request * sreq, void *netmod_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
@@ -58,25 +48,6 @@ static inline int MPIDI_NM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_sendv_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        struct iovec *am_hdr,
-                                        size_t iov_len, MPIR_Request * sreq, void *netmod_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                             int handler_id,
-                                             const void *am_hdr,
-                                             size_t am_hdr_sz, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                          int handler_id,
                                          const void *am_hdr,
@@ -89,18 +60,6 @@ static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_r
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
-                                          int handler_id,
-                                          struct iovec *am_hdr,
-                                          size_t iov_len,
-                                          const void *data,
-                                          MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline size_t MPIDI_NM_am_hdr_max_sz(void)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/ucx/func_table.c b/src/mpid/ch4/netmod/ucx/func_table.c
index f4a03fe..121a197 100644
--- a/src/mpid/ch4/netmod/ucx/func_table.c
+++ b/src/mpid/ch4/netmod/ucx/func_table.c
@@ -30,15 +30,11 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_am_reg_handler,
-    MPIDI_NM_am_send_hdr,
     MPIDI_NM_am_inject_hdr,
     MPIDI_NM_am_send,
     MPIDI_NM_am_sendv,
-    MPIDI_NM_am_sendv_hdr,
-    MPIDI_NM_am_send_hdr_reply,
     MPIDI_NM_am_inject_hdr_reply,
     MPIDI_NM_am_send_reply,
-    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ucx/ucx_am.h b/src/mpid/ch4/netmod/ucx/ucx_am.h
index 64a0051..3277010 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_am.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_am.h
@@ -76,74 +76,6 @@ static inline void MPIDI_UCX_inject_am_callback(void *request, ucs_status_t stat
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_hdr
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_hdr(int rank,
-                                       MPIR_Comm * comm,
-                                       int handler_id,
-                                       const void *am_hdr,
-                                       size_t am_hdr_sz, MPIR_Request * sreq, void *netmod_context)
-{
-    int mpi_errno = MPI_SUCCESS, c;
-    MPIDI_UCX_ucp_request_t *ucp_request;
-    ucp_ep_h ep;
-    uint64_t ucx_tag;
-    char *send_buf;
-    MPIDI_UCX_am_header_t ucx_hdr;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_HDR);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_HDR);
-
-    ep = MPIDI_UCX_COMM_TO_EP(comm, rank);
-    ucx_tag = MPIDI_UCX_init_tag(0, 0, MPIDI_UCX_AM_TAG);
-
-    /* initialize our portion of the hdr */
-    ucx_hdr.handler_id = handler_id;
-    ucx_hdr.data_sz = 0;
-
-    /* just pack and send for now */
-    send_buf = MPL_malloc(am_hdr_sz + sizeof(ucx_hdr));
-    MPIR_Memcpy(send_buf, &ucx_hdr, sizeof(ucx_hdr));
-    MPIR_Memcpy(send_buf + sizeof(ucx_hdr), am_hdr, am_hdr_sz);
-
-    ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf,
-                                                              am_hdr_sz + sizeof(ucx_hdr),
-                                                              ucp_dt_make_contig(1), ucx_tag,
-                                                              &MPIDI_UCX_am_send_callback);
-    MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
-
-    /* send is done. free all resources and complete the request */
-    if (ucp_request == NULL) {
-        MPL_free(send_buf);
-        MPIDI_UCX_global.send_cmpl_handlers[handler_id] (sreq);
-        goto fn_exit;
-    }
-
-    /* request completed between the UCP call and now. free resources
-     * and complete the send request */
-    if (ucp_request->req) {
-        MPL_free(send_buf);
-        MPIDI_UCX_global.send_cmpl_handlers[handler_id] (sreq);
-        ucp_request->req = NULL;
-        ucp_request_release(ucp_request);
-    }
-    else {
-        /* set the ch4r request inside the UCP request */
-        sreq->dev.ch4.ch4u.netmod_am.ucx.pack_buffer = send_buf;
-        sreq->dev.ch4.ch4u.netmod_am.ucx.handler_id = handler_id;
-        ucp_request->req = sreq;
-        ucp_request_release(ucp_request);
-    }
-
-  fn_exit:
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_HDR);
-    return mpi_errno;
-  fn_fail:
-    goto fn_exit;
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIDI_NM_am_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
@@ -259,43 +191,6 @@ static inline int MPIDI_NM_am_send(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_sendv_hdr
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_sendv_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        struct iovec *am_hdr,
-                                        size_t iov_len, MPIR_Request * sreq, void *netmod_context)
-{
-    int mpi_errno = MPI_SUCCESS;
-    size_t am_hdr_sz = 0, i;
-    char *am_hdr_buf;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_SEND_AMV_HDR);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_SEND_AMV_HDR);
-
-    for (i = 0; i < iov_len; i++) {
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    am_hdr_buf = (char *) MPL_malloc(am_hdr_sz);
-    MPIR_Assert(am_hdr_buf);
-    am_hdr_sz = 0;
-
-    for (i = 0; i < iov_len; i++) {
-        MPIR_Memcpy(am_hdr_buf + am_hdr_sz, am_hdr[i].iov_base, am_hdr[i].iov_len);
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
-                                     sreq, netmod_context);
-    MPL_free(am_hdr_buf);
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_SEND_AMV_HDR);
-    return mpi_errno;
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIDI_NM_am_sendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
@@ -339,21 +234,6 @@ static inline int MPIDI_NM_am_sendv(int rank,
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_am_send_hdr_reply
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                             int src_rank,
-                                             int handler_id,
-                                             const void *am_hdr,
-                                             size_t am_hdr_sz, MPIR_Request * sreq)
-{
-
-    return MPIDI_NM_am_send_hdr(src_rank, MPIDI_CH4U_context_id_to_comm(context_id), handler_id,
-                                am_hdr, am_hdr_sz, sreq, NULL);
-}
-
-#undef FUNCNAME
 #define FUNCNAME MPIDI_NM_am_send_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
@@ -436,42 +316,6 @@ static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                          int src_rank,
-                                          int handler_id,
-                                          struct iovec *am_hdr,
-                                          size_t iov_len,
-                                          const void *data, MPI_Count count,
-                                          MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    int mpi_errno = MPI_SUCCESS;
-    size_t am_hdr_sz = 0, i;
-    char *am_hdr_buf;
-
-    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_SEND_AMV_REPLY);
-    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_UCX_SEND_AMV_REPLY);
-
-    for (i = 0; i < iov_len; i++) {
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    am_hdr_buf = (char *) MPL_malloc(am_hdr_sz);
-
-    MPIR_Assert(am_hdr_buf);
-    am_hdr_sz = 0;
-
-    for (i = 0; i < iov_len; i++) {
-        MPIR_Memcpy(am_hdr_buf + am_hdr_sz, am_hdr[i].iov_base, am_hdr[i].iov_len);
-        am_hdr_sz += am_hdr[i].iov_len;
-    }
-
-    mpi_errno = MPIDI_NM_am_send_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
-                                       data, count, datatype, sreq);
-    MPL_free(am_hdr_buf);
-    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_SEND_AMV_REPLY);
-    return mpi_errno;
-}
-
 static inline size_t MPIDI_NM_am_hdr_max_sz(void)
 {
     return (MPIDI_UCX_MAX_AM_EAGER_SZ - sizeof(MPIDI_UCX_am_header_t));
diff --git a/src/mpid/ch4/shm/include/shm.h b/src/mpid/ch4/shm/include/shm.h
index ed7f0f3..1013990 100644
--- a/src/mpid/ch4/shm/include/shm.h
+++ b/src/mpid/ch4/shm/include/shm.h
@@ -40,9 +40,6 @@ typedef int (*MPIDI_SHM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_SHM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_SHM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                         MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_SHM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
-                                        const void *am_hdr, size_t am_hdr_sz, MPIR_Request * sreq,
-                                        void *shm_context);
 typedef int (*MPIDI_SHM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                           const void *am_hdr, size_t am_hdr_sz, void *shm_context);
 typedef int (*MPIDI_SHM_am_send_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
@@ -58,9 +55,6 @@ typedef int (*MPIDI_SHM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
 typedef int (*MPIDI_SHM_inject_amv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                        struct iovec * am_hdrs, size_t iov_len, const void *data,
                                        MPI_Count count, MPI_Datatype datatype, void *shm_context);
-typedef int (*MPIDI_SHM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                              int handler_id, const void *am_hdr, size_t am_hdr_sz,
-                                              MPIR_Request * sreq);
 typedef int (*MPIDI_SHM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                                 int handler_id, const void *am_hdr,
                                                 size_t am_hdr_sz);
@@ -72,10 +66,6 @@ typedef int (*MPIDI_SHM_inject_am_reply_t) (MPIR_Context_id_t context_id, int sr
                                             int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                             const void *data, MPI_Count count,
                                             MPI_Datatype datatype);
-typedef int (*MPIDI_SHM_am_sendv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
-                                           int handler_id, struct iovec * am_hdr, size_t iov_len,
-                                           const void *data, MPI_Count count, MPI_Datatype datatype,
-                                           MPIR_Request * sreq);
 typedef int (*MPIDI_SHM_inject_amv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                              int handler_id, struct iovec * am_hdrs, size_t iov_len,
                                              const void *data, MPI_Count count,
@@ -382,17 +372,14 @@ typedef struct MPIDI_SHM_funcs {
     MPIDI_SHM_open_port_t open_port;
     MPIDI_SHM_close_port_t close_port;
     MPIDI_SHM_comm_accept_t comm_accept;
-    MPIDI_SHM_am_send_hdr_t am_send_hdr;
     MPIDI_SHM_am_inject_hdr_t am_inject_hdr;
     MPIDI_SHM_am_send_t am_send;
     MPIDI_SHM_inject_am_t inject_am;
     MPIDI_SHM_am_sendv_t am_sendv;
     MPIDI_SHM_inject_amv_t inject_amv;
-    MPIDI_SHM_am_send_hdr_reply_t am_send_hdr_reply;
     MPIDI_SHM_am_inject_hdr_reply_t am_inject_hdr_reply;
     MPIDI_SHM_am_send_reply_t am_send_reply;
     MPIDI_SHM_inject_am_reply_t inject_am_reply;
-    MPIDI_SHM_am_sendv_reply_t am_sendv_reply;
     MPIDI_SHM_inject_amv_reply_t inject_amv_reply;
     MPIDI_SHM_am_hdr_max_sz_t am_hdr_max_sz;
     MPIDI_SHM_am_inject_max_sz_t am_inject_max_sz;
@@ -546,10 +533,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
                                                    int root, MPIR_Comm * comm,
                                                    MPIR_Comm **
                                                    newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                   const void *am_hdr, size_t am_hdr_sz,
-                                                   MPIR_Request * sreq,
-                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
                                                      int handler_id, const void *am_hdr,
                                                      size_t am_hdr_sz,
@@ -574,11 +557,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, in
                                                   const void *data, MPI_Count count,
                                                   MPI_Datatype datatype,
                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                                         int src_rank, int handler_id,
-                                                         const void *am_hdr, size_t am_hdr_sz,
-                                                         MPIR_Request *
-                                                         sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                            int src_rank, int handler_id,
                                                            const void *am_hdr,
@@ -596,12 +574,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context
                                                        const void *data, MPI_Count count,
                                                        MPI_Datatype datatype)
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                                      int src_rank, int handler_id,
-                                                      struct iovec *am_hdr, size_t iov_len,
-                                                      const void *data, MPI_Count count,
-                                                      MPI_Datatype datatype,
-                                                      MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
                                                         int src_rank, int handler_id,
                                                         struct iovec *am_hdrs, size_t iov_len,
diff --git a/src/mpid/ch4/shm/include/shm_impl.h b/src/mpid/ch4/shm/include/shm_impl.h
index 92a5e0b..dd7a495 100644
--- a/src/mpid/ch4/shm/include/shm_impl.h
+++ b/src/mpid/ch4/shm/include/shm_impl.h
@@ -68,14 +68,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
     return MPIDI_SHM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                   const void *am_hdr, size_t am_hdr_sz,
-                                                   MPIR_Request * sreq, void *shm_context)
-{
-    return MPIDI_SHM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
-                                       shm_context);
-};
-
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
                                                      int handler_id, const void *am_hdr,
                                                      size_t am_hdr_sz, void *shm_context)
@@ -121,15 +113,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, in
                                       datatype, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
-                                                         int src_rank, int handler_id,
-                                                         const void *am_hdr, size_t am_hdr_sz,
-                                                         MPIR_Request * sreq)
-{
-    return MPIDI_SHM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
-                                             sreq);
-};
-
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                            int src_rank, int handler_id,
                                                            const void *am_hdr, size_t am_hdr_sz)
@@ -157,16 +140,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context
                                            data, count, datatype);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id,
-                                                      int src_rank, int handler_id,
-                                                      struct iovec *am_hdr, size_t iov_len,
-                                                      const void *data, MPI_Count count,
-                                                      MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    return MPIDI_SHM_func->am_sendv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
-                                          count, datatype, sreq);
-};
-
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
                                                         int src_rank, int handler_id,
                                                         struct iovec *am_hdrs, size_t iov_len,
diff --git a/src/mpid/ch4/shm/posix/func_table.c b/src/mpid/ch4/shm/posix/func_table.c
index 4a39d50..f6d884f 100644
--- a/src/mpid/ch4/shm/posix/func_table.c
+++ b/src/mpid/ch4/shm/posix/func_table.c
@@ -22,17 +22,14 @@ MPIDI_SHM_funcs_t MPIDI_SHM_posix_funcs = {
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_am_send_hdr,
     MPIDI_SHM_am_inject_hdr,
     MPIDI_SHM_am_send,
     MPIDI_SHM_inject_am,
     MPIDI_SHM_am_sendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_am_send_hdr_reply,
     MPIDI_SHM_am_inject_hdr_reply,
     MPIDI_SHM_am_send_reply,
     MPIDI_SHM_inject_am_reply,
-    MPIDI_SHM_am_sendv_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
     MPIDI_SHM_am_inject_max_sz,
diff --git a/src/mpid/ch4/shm/posix/posix_am.h b/src/mpid/ch4/shm/posix/posix_am.h
index 842bf6c..6b41b54 100644
--- a/src/mpid/ch4/shm/posix/posix_am.h
+++ b/src/mpid/ch4/shm/posix/posix_am.h
@@ -20,16 +20,6 @@ static inline int MPIDI_SHM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        const void *am_hdr,
-                                        size_t am_hdr_sz, MPIR_Request * sreq, void *shm_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_SHM_am_send(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
@@ -56,15 +46,6 @@ static inline int MPIDI_SHM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                              int handler_id,
-                                              const void *am_hdr,
-                                              size_t am_hdr_sz, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id,
                                           const void *am_hdr,
@@ -77,18 +58,6 @@ static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
-                                           int handler_id,
-                                           struct iovec *am_hdr,
-                                           size_t iov_len,
-                                           const void *data,
-                                           MPI_Count count,
-                                           MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/shm/stubshm/func_table.c b/src/mpid/ch4/shm/stubshm/func_table.c
index 237869c..3b8253c 100644
--- a/src/mpid/ch4/shm/stubshm/func_table.c
+++ b/src/mpid/ch4/shm/stubshm/func_table.c
@@ -22,17 +22,14 @@ MPIDI_SHM_funcs_t MPIDI_SHM_stubshm_funcs = {
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_am_send_hdr,
     MPIDI_SHM_am_inject_hdr,
     MPIDI_SHM_am_send,
     MPIDI_SHM_inject_am,
     MPIDI_SHM_am_sendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_am_send_hdr_reply,
     MPIDI_SHM_am_inject_hdr_reply,
     MPIDI_SHM_am_send_reply,
     MPIDI_SHM_inject_am_reply,
-    MPIDI_SHM_am_sendv_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
     MPIDI_SHM_am_inject_max_sz,
diff --git a/src/mpid/ch4/shm/stubshm/stubshm_am.h b/src/mpid/ch4/shm/stubshm/stubshm_am.h
index e837c9f..2e29e5d 100644
--- a/src/mpid/ch4/shm/stubshm/stubshm_am.h
+++ b/src/mpid/ch4/shm/stubshm/stubshm_am.h
@@ -20,16 +20,6 @@ static inline int MPIDI_SHM_am_reg_handler(int handler_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_hdr(int rank,
-                                        MPIR_Comm * comm,
-                                        int handler_id,
-                                        const void *am_hdr,
-                                        size_t am_hdr_sz, MPIR_Request * sreq, void *shm_context)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_SHM_am_send(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
@@ -56,15 +46,6 @@ static inline int MPIDI_SHM_am_sendv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
-                                              int handler_id,
-                                              const void *am_hdr,
-                                              size_t am_hdr_sz, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id,
                                           const void *am_hdr,
@@ -77,18 +58,6 @@ static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
-                                           int handler_id,
-                                           struct iovec *am_hdr,
-                                           size_t iov_len,
-                                           const void *data,
-                                           MPI_Count count,
-                                           MPI_Datatype datatype, MPIR_Request * sreq)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index 471d3e3..3ab5c1d 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -414,9 +414,10 @@ static inline int MPIDI_CH4U_reply_ssend(MPIR_Request * rreq)
     MPIR_cc_incr(rreq->cc_ptr, &c);
     ack_msg.sreq_ptr = MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr);
 
-    mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
-                                           MPIDI_CH4U_REQUEST(rreq, src_rank),
-                                           MPIDI_CH4U_SSEND_ACK, &ack_msg, sizeof(ack_msg), rreq);
+    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
+                                       MPIDI_CH4U_REQUEST(rreq, src_rank),
+                                       MPIDI_CH4U_SSEND_ACK, &ack_msg, sizeof(ack_msg),
+                                       NULL, 0, MPI_DATATYPE_NULL, rreq);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
   fn_exit:
diff --git a/src/mpid/ch4/src/ch4r_rma.h b/src/mpid/ch4/src/ch4r_rma.h
index 1277ff5..adaaa0c 100644
--- a/src/mpid/ch4/src/ch4r_rma.h
+++ b/src/mpid/ch4/src/ch4r_rma.h
@@ -210,8 +210,9 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_am_send_hdr(target_rank, win->comm_ptr,
-                                         MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr), sreq, NULL);
+        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr,
+                                     MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr),
+                                     NULL, 0, MPI_DATATYPE_NULL, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
         goto fn_exit;

http://git.mpich.org/mpich.git/commitdiff/3257bbea93f661d54b8d43e0d06bc4841d496b13

commit 3257bbea93f661d54b8d43e0d06bc4841d496b13
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 16:34:32 2016 -0500

    CH4: Name AM functions consistently
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index 1225705..f013ed3 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -31,9 +31,9 @@ typedef int (*MPIDI_NM_init_t) (int rank, int size, int appnum, int *tag_ub, MPI
                                 void **netmod_contexts);
 typedef int (*MPIDI_NM_finalize_t) (void);
 typedef int (*MPIDI_NM_progress_t) (void *netmod_context, int blocking);
-typedef int (*MPIDI_NM_reg_hdr_handler_t) (int handler_id,
-                                           MPIDI_NM_am_origin_handler_fn origin_handler_fn,
-                                           MPIDI_NM_am_target_handler_fn target_handler_fn);
+typedef int (*MPIDI_NM_am_reg_handler_t) (int handler_id,
+                                          MPIDI_NM_am_origin_handler_fn origin_handler_fn,
+                                          MPIDI_NM_am_target_handler_fn target_handler_fn);
 typedef int (*MPIDI_NM_comm_connect_t) (const char *port_name, MPIR_Info * info, int root,
                                         MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
 typedef int (*MPIDI_NM_comm_disconnect_t) (MPIR_Comm * comm_ptr);
@@ -41,34 +41,34 @@ typedef int (*MPIDI_NM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_NM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_NM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                        MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_NM_send_am_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_NM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                        const void *am_hdr, size_t am_hdr_sz, MPIR_Request * sreq,
                                        void *netmod_context);
-typedef int (*MPIDI_NM_inject_am_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_NM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz,
                                          void *netmod_context);
-typedef int (*MPIDI_NM_send_am_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
+typedef int (*MPIDI_NM_am_send_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
                                    size_t am_hdr_sz, const void *data, MPI_Count count,
                                    MPI_Datatype datatype, MPIR_Request * sreq,
                                    void *netmod_context);
-typedef int (*MPIDI_NM_send_amv_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_NM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                     struct iovec * am_hdrs, size_t iov_len, const void *data,
                                     MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
                                     void *netmod_context);
-typedef int (*MPIDI_NM_send_amv_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_NM_am_sendv_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                         struct iovec * am_hdrs, size_t iov_len, MPIR_Request * sreq,
                                         void *netmod_context);
-typedef int (*MPIDI_NM_send_am_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_NM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                              int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                              MPIR_Request * sreq);
-typedef int (*MPIDI_NM_inject_am_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_NM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                                int handler_id, const void *am_hdr,
                                                size_t am_hdr_sz);
-typedef int (*MPIDI_NM_send_am_reply_t) (MPIR_Context_id_t context_id, int src_rank, int handler_id,
+typedef int (*MPIDI_NM_am_send_reply_t) (MPIR_Context_id_t context_id, int src_rank, int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz, const void *data,
                                          MPI_Count count, MPI_Datatype datatype,
                                          MPIR_Request * sreq);
-typedef int (*MPIDI_NM_send_amv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_NM_am_sendv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id, struct iovec * am_hdr, size_t iov_len,
                                           const void *data, MPI_Count count, MPI_Datatype datatype,
                                           MPIR_Request * sreq);
@@ -378,16 +378,16 @@ typedef struct MPIDI_NM_funcs {
     MPIDI_NM_am_request_init_t am_request_init;
     MPIDI_NM_am_request_finalize_t am_request_finalize;
     /* Active Message Routines */
-    MPIDI_NM_reg_hdr_handler_t reg_hdr_handler;
-    MPIDI_NM_send_am_hdr_t send_am_hdr;
-    MPIDI_NM_inject_am_hdr_t inject_am_hdr;
-    MPIDI_NM_send_am_t send_am;
-    MPIDI_NM_send_amv_t send_amv;
-    MPIDI_NM_send_amv_hdr_t send_amv_hdr;
-    MPIDI_NM_send_am_hdr_reply_t send_am_hdr_reply;
-    MPIDI_NM_inject_am_hdr_reply_t inject_am_hdr_reply;
-    MPIDI_NM_send_am_reply_t send_am_reply;
-    MPIDI_NM_send_amv_reply_t send_amv_reply;
+    MPIDI_NM_am_reg_handler_t am_reg_handler;
+    MPIDI_NM_am_send_hdr_t am_send_hdr;
+    MPIDI_NM_am_inject_hdr_t am_inject_hdr;
+    MPIDI_NM_am_send_t am_send;
+    MPIDI_NM_am_sendv_t am_sendv;
+    MPIDI_NM_am_sendv_hdr_t am_sendv_hdr;
+    MPIDI_NM_am_send_hdr_reply_t am_send_hdr_reply;
+    MPIDI_NM_am_inject_hdr_reply_t am_inject_hdr_reply;
+    MPIDI_NM_am_send_reply_t am_send_reply;
+    MPIDI_NM_am_sendv_reply_t am_sendv_reply;
     MPIDI_NM_am_hdr_max_sz_t am_hdr_max_sz;
     MPIDI_NM_am_recv_t am_recv;
 } MPIDI_NM_funcs_t;
@@ -516,11 +516,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_init(int rank, int size, int appnum, int *
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_finalize(void) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context,
                                                int blocking) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                                      MPIDI_NM_am_origin_handler_fn
-                                                      origin_handler_fn,
-                                                      MPIDI_NM_am_target_handler_fn
-                                                      target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_reg_handler(int handler_id,
+                                                     MPIDI_NM_am_origin_handler_fn
+                                                     origin_handler_fn,
+                                                     MPIDI_NM_am_target_handler_fn
+                                                     target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
                                                    int root, MPIR_Comm * comm,
                                                    MPIR_Comm **
@@ -534,43 +534,43 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
                                                   int root, MPIR_Comm * comm,
                                                   MPIR_Comm **
                                                   newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                   const void *am_hdr, size_t am_hdr_sz,
                                                   MPIR_Request * sreq,
                                                   void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                     const void *am_hdr, size_t am_hdr_sz,
                                                     void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send(int rank, MPIR_Comm * comm, int handler_id,
                                               const void *am_hdr, size_t am_hdr_sz,
                                               const void *data, MPI_Count count,
                                               MPI_Datatype datatype, MPIR_Request * sreq,
                                               void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
                                                struct iovec *am_hdrs, size_t iov_len,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                    struct iovec *am_hdrs, size_t iov_len,
                                                    MPIR_Request * sreq,
                                                    void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                                         int src_rank, int handler_id,
                                                         const void *am_hdr, size_t am_hdr_sz,
                                                         MPIR_Request *
                                                         sreq) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                           int src_rank, int handler_id,
                                                           const void *am_hdr,
                                                           size_t am_hdr_sz)
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                                     int handler_id, const void *am_hdr,
                                                     size_t am_hdr_sz, const void *data,
                                                     MPI_Count count, MPI_Datatype datatype,
                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
                                                      int src_rank, int handler_id,
                                                      struct iovec *am_hdr, size_t iov_len,
                                                      const void *data, MPI_Count count,
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index 7b50bfb..d143059 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -34,13 +34,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context, int blockin
     return MPIDI_NM_func->progress(netmod_context, blocking);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                                      MPIDI_NM_am_origin_handler_fn
-                                                      origin_handler_fn,
-                                                      MPIDI_NM_am_target_handler_fn
-                                                      target_handler_fn)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_reg_handler(int handler_id,
+                                                     MPIDI_NM_am_origin_handler_fn
+                                                     origin_handler_fn,
+                                                     MPIDI_NM_am_target_handler_fn
+                                                     target_handler_fn)
 {
-    return MPIDI_NM_func->reg_hdr_handler(handler_id, origin_handler_fn, target_handler_fn);
+    return MPIDI_NM_func->am_reg_handler(handler_id, origin_handler_fn, target_handler_fn);
 };
 
 MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
@@ -72,82 +72,82 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_In
     return MPIDI_NM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                   const void *am_hdr, size_t am_hdr_sz,
                                                   MPIR_Request * sreq, void *netmod_context)
 {
-    return MPIDI_NM_func->send_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
+    return MPIDI_NM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
                                       netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                     const void *am_hdr, size_t am_hdr_sz,
                                                     void *netmod_context)
 {
-    return MPIDI_NM_func->inject_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, netmod_context);
+    return MPIDI_NM_func->am_inject_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send(int rank, MPIR_Comm * comm, int handler_id,
                                               const void *am_hdr, size_t am_hdr_sz,
                                               const void *data, MPI_Count count,
                                               MPI_Datatype datatype, MPIR_Request * sreq,
                                               void *netmod_context)
 {
-    return MPIDI_NM_func->send_am(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
+    return MPIDI_NM_func->am_send(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
                                   sreq, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
                                                struct iovec *am_hdrs, size_t iov_len,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *netmod_context)
 {
-    return MPIDI_NM_func->send_amv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
+    return MPIDI_NM_func->am_sendv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
                                    sreq, netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                    struct iovec *am_hdrs, size_t iov_len,
                                                    MPIR_Request * sreq, void *netmod_context)
 {
-    return MPIDI_NM_func->send_amv_hdr(rank, comm, handler_id, am_hdrs, iov_len, sreq,
+    return MPIDI_NM_func->am_sendv_hdr(rank, comm, handler_id, am_hdrs, iov_len, sreq,
                                        netmod_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                                         int src_rank, int handler_id,
                                                         const void *am_hdr, size_t am_hdr_sz,
                                                         MPIR_Request * sreq)
 {
-    return MPIDI_NM_func->send_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
+    return MPIDI_NM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
                                             sreq);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                           int src_rank, int handler_id,
                                                           const void *am_hdr, size_t am_hdr_sz)
 {
-    return MPIDI_NM_func->inject_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
+    return MPIDI_NM_func->am_inject_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                                     int handler_id, const void *am_hdr,
                                                     size_t am_hdr_sz, const void *data,
                                                     MPI_Count count, MPI_Datatype datatype,
                                                     MPIR_Request * sreq)
 {
-    return MPIDI_NM_func->send_am_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
+    return MPIDI_NM_func->am_send_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
                                         count, datatype, sreq);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
                                                      int src_rank, int handler_id,
                                                      struct iovec *am_hdr, size_t iov_len,
                                                      const void *data, MPI_Count count,
                                                      MPI_Datatype datatype, MPIR_Request * sreq)
 {
-    return MPIDI_NM_func->send_amv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
+    return MPIDI_NM_func->am_sendv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
                                          count, datatype, sreq);
 };
 
diff --git a/src/mpid/ch4/netmod/ofi/func_table.c b/src/mpid/ch4/netmod/ofi/func_table.c
index dff22ff..c96f47d 100644
--- a/src/mpid/ch4/netmod/ofi/func_table.c
+++ b/src/mpid/ch4/netmod/ofi/func_table.c
@@ -31,16 +31,16 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
-    MPIDI_NM_reg_hdr_handler,
-    MPIDI_NM_send_am_hdr,
-    MPIDI_NM_inject_am_hdr,
-    MPIDI_NM_send_am,
-    MPIDI_NM_send_amv,
-    MPIDI_NM_send_amv_hdr,
-    MPIDI_NM_send_am_hdr_reply,
-    MPIDI_NM_inject_am_hdr_reply,
-    MPIDI_NM_send_am_reply,
-    MPIDI_NM_send_amv_reply,
+    MPIDI_NM_am_reg_handler,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_inject_hdr,
+    MPIDI_NM_am_send,
+    MPIDI_NM_am_sendv,
+    MPIDI_NM_am_sendv_hdr,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_inject_hdr_reply,
+    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am.h b/src/mpid/ch4/netmod/ofi/ofi_am.h
index e3b6287..f624d28 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am.h
@@ -27,12 +27,12 @@ static inline void MPIDI_NM_am_request_finalize(MPIR_Request * req)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_reg_hdr_handler
+#define FUNCNAME MPIDI_NM_am_reg_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                           MPIDI_NM_am_origin_handler_fn origin_handler_fn,
-                                           MPIDI_NM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_NM_am_reg_handler(int handler_id,
+                                          MPIDI_NM_am_origin_handler_fn origin_handler_fn,
+                                          MPIDI_NM_am_target_handler_fn target_handler_fn)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_REG_HDR_HANDLER);
@@ -53,10 +53,10 @@ static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_hdr
+#define FUNCNAME MPIDI_NM_am_send_hdr
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_hdr(int rank,
+static inline int MPIDI_NM_am_send_hdr(int rank,
                                        MPIR_Comm * comm,
                                        int handler_id,
                                        const void *am_hdr,
@@ -66,17 +66,17 @@ static inline int MPIDI_NM_send_am_hdr(int rank,
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_HDR);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_HDR);
 
-    mpi_errno = MPIDI_OFI_do_send_am_header(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq, FALSE);
+    mpi_errno = MPIDI_OFI_do_am_send_header(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq, FALSE);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_HDR);
     return mpi_errno;
 }
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am
+#define FUNCNAME MPIDI_NM_am_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am(int rank,
+static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
                                    const void *am_hdr,
@@ -88,7 +88,7 @@ static inline int MPIDI_NM_send_am(int rank,
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM);
-    mpi_errno = MPIDI_OFI_do_send_am(rank, comm, handler_id,
+    mpi_errno = MPIDI_OFI_do_am_send(rank, comm, handler_id,
                                      am_hdr, am_hdr_sz, data, count, datatype, sreq, FALSE);
 
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM);
@@ -96,10 +96,10 @@ static inline int MPIDI_NM_send_am(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_amv
+#define FUNCNAME MPIDI_NM_am_sendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_amv(int rank,
+static inline int MPIDI_NM_am_sendv(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     struct iovec *am_hdr,
@@ -137,7 +137,7 @@ static inline int MPIDI_NM_send_amv(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
                                  data, count, datatype, sreq, netmod_context);
 
     if (is_allocated)
@@ -150,10 +150,10 @@ static inline int MPIDI_NM_send_amv(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_amv_hdr
+#define FUNCNAME MPIDI_NM_am_sendv_hdr
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_amv_hdr(int rank,
+static inline int MPIDI_NM_am_sendv_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         struct iovec *am_hdr,
@@ -188,7 +188,7 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
                                      sreq, netmod_context);
 
     if (is_allocated)
@@ -201,10 +201,10 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_hdr_reply
+#define FUNCNAME MPIDI_NM_am_send_hdr_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                              int src_rank,
                                              int handler_id,
                                              const void *am_hdr,
@@ -213,7 +213,7 @@ static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
-    mpi_errno = MPIDI_OFI_do_send_am_header(src_rank,
+    mpi_errno = MPIDI_OFI_do_am_send_header(src_rank,
                                             MPIDI_CH4U_context_id_to_comm(context_id),
                                             handler_id, am_hdr, am_hdr_sz, sreq, TRUE);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_SEND_AM_HDR_REPLY);
@@ -221,10 +221,10 @@ static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_reply
+#define FUNCNAME MPIDI_NM_am_send_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
                                          int src_rank,
                                          int handler_id,
                                          const void *am_hdr,
@@ -236,7 +236,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_SEND_AM_REPLY);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_NETMOD_SEND_AM_REPLY);
-    mpi_errno = MPIDI_OFI_do_send_am(src_rank,
+    mpi_errno = MPIDI_OFI_do_am_send(src_rank,
                                      MPIDI_CH4U_context_id_to_comm(context_id),
                                      handler_id,
                                      am_hdr, am_hdr_sz, data, count, datatype, sreq, TRUE);
@@ -244,7 +244,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
     return mpi_errno;
 }
 
-static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
                                           int src_rank,
                                           int handler_id,
                                           struct iovec *am_hdr,
@@ -282,7 +282,7 @@ static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
                                        data, count, datatype, sreq);
 
     if (is_allocated)
@@ -305,7 +305,7 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return MPL_MIN(max_shortsend, max_representable);
 }
 
-static inline int MPIDI_NM_inject_am_hdr(int rank,
+static inline int MPIDI_NM_am_inject_hdr(int rank,
                                          MPIR_Comm * comm,
                                          int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
@@ -327,7 +327,7 @@ static inline int MPIDI_NM_inject_am_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                int src_rank,
                                                int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
@@ -360,7 +360,7 @@ static inline int MPIDI_NM_am_recv(MPIR_Request * req)
     msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr));
     msg.rreq_ptr = (uint64_t) req;
     MPIR_Assert((void *) msg.sreq_ptr != NULL);
-    mpi_errno = MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
+    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
                                              MPIDI_CH4U_REQUEST(req, src_rank),
                                              MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
     if (mpi_errno)
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am_impl.h b/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
index 1a9cba6..058c936 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am_impl.h
@@ -20,10 +20,10 @@ static inline int MPIDI_OFI_progress_do_queue(void *netmod_context);
 
   * When calling OFI function MPIDI_OFI_THREAD_FI_MUTEX must be held.
   * When being called from the MPI layer (app), we must grab the lock.
-    This is the case for regular (non-reply) functions such as send_am.
+    This is the case for regular (non-reply) functions such as am_send.
   * When being called from callback function or progress engine, we must
     not grab the lock because the progress engine is already holding the lock.
-    This is the case for reply functions such as send_am_reply.
+    This is the case for reply functions such as am_send_reply.
 */
 #define MPIDI_OFI_CALL_RETRY_AM(FUNC,LOCK,STR)                  \
     do {                                                                \
@@ -192,10 +192,10 @@ static inline int MPIDI_OFI_progress_do_queue(void *netmod_context)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_do_send_am_header
+#define FUNCNAME MPIDI_OFI_do_am_send_header
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_do_send_am_header(int rank,
+static inline int MPIDI_OFI_do_am_send_header(int rank,
                                               MPIR_Comm * comm,
                                               int handler_id,
                                               const void *am_hdr,
@@ -246,10 +246,10 @@ static inline int MPIDI_OFI_do_send_am_header(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_send_am_long
+#define FUNCNAME MPIDI_OFI_am_send_long
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_send_am_long(int rank,
+static inline int MPIDI_OFI_am_send_long(int rank,
                                          MPIR_Comm * comm,
                                          int handler_id,
                                          const void *am_hdr,
@@ -337,10 +337,10 @@ static inline int MPIDI_OFI_send_am_long(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_send_am_short
+#define FUNCNAME MPIDI_OFI_am_send_short
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_send_am_short(int rank,
+static inline int MPIDI_OFI_am_send_short(int rank,
                                           MPIR_Comm * comm,
                                           int handler_id,
                                           const void *am_hdr,
@@ -388,10 +388,10 @@ static inline int MPIDI_OFI_send_am_short(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_OFI_do_send_am
+#define FUNCNAME MPIDI_OFI_do_am_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_OFI_do_send_am(int rank,
+static inline int MPIDI_OFI_do_am_send(int rank,
                                        MPIR_Comm * comm,
                                        int handler_id,
                                        const void *am_hdr,
@@ -426,7 +426,7 @@ static inline int MPIDI_OFI_do_send_am(int rank,
         MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype;
         MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag = lreq_hdr.hdr.msg_tag;
         MPIDI_CH4U_REQUEST(sreq, src_rank) = rank;
-        mpi_errno = MPIDI_NM_inject_am_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
+        mpi_errno = MPIDI_NM_am_inject_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
                                            &lreq_hdr, sizeof(lreq_hdr), NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
@@ -461,12 +461,12 @@ static inline int MPIDI_OFI_do_send_am(int rank,
 
     if (am_hdr_sz + data_sz + sizeof(MPIDI_OFI_am_header_t) <= MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE) {
         mpi_errno =
-            MPIDI_OFI_send_am_short(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
+            MPIDI_OFI_am_send_short(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
                                     am_hdr_sz, send_buf, data_sz, sreq, need_lock);
     }
     else {
         mpi_errno =
-            MPIDI_OFI_send_am_long(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
+            MPIDI_OFI_am_send_long(rank, comm, handler_id, MPIDI_OFI_AMREQUEST_HDR(sreq, am_hdr),
                                    am_hdr_sz, send_buf, data_sz, sreq, need_lock);
     }
     if (mpi_errno)
diff --git a/src/mpid/ch4/netmod/ofi/ofi_init.h b/src/mpid/ch4/netmod/ofi/ofi_init.h
index 7b12704..f6655df 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_init.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_init.h
@@ -390,7 +390,7 @@ static inline int MPIDI_OFI_init_generic(int rank,
     /* ---------------------------------- */
     if (do_am) {
         /* Maximum possible message size for short message send (=eager send)
-         * See MPIDI_OFI_do_send_am for short/long switching logic */
+         * See MPIDI_OFI_do_am_send for short/long switching logic */
         MPIR_Assert(MPIDI_OFI_DEFAULT_SHORT_SEND_SIZE <= MPIDI_Global.max_send);
         MPIDI_Global.am_buf_pool =
             MPIDI_CH4U_create_buf_pool(MPIDI_OFI_BUF_POOL_NUM, MPIDI_OFI_BUF_POOL_SIZE);
diff --git a/src/mpid/ch4/netmod/portals4/func_table.c b/src/mpid/ch4/netmod/portals4/func_table.c
index 4511394..c5b92db 100644
--- a/src/mpid/ch4/netmod/portals4/func_table.c
+++ b/src/mpid/ch4/netmod/portals4/func_table.c
@@ -31,16 +31,16 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
-    MPIDI_NM_reg_hdr_handler,
-    MPIDI_NM_send_am_hdr,
-    MPIDI_NM_inject_am_hdr,
-    MPIDI_NM_send_am,
-    MPIDI_NM_send_amv,
-    MPIDI_NM_send_amv_hdr,
-    MPIDI_NM_send_am_hdr_reply,
-    MPIDI_NM_inject_am_hdr_reply,
-    MPIDI_NM_send_am_reply,
-    MPIDI_NM_send_amv_reply,
+    MPIDI_NM_am_reg_handler,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_inject_hdr,
+    MPIDI_NM_am_send,
+    MPIDI_NM_am_sendv,
+    MPIDI_NM_am_sendv_hdr,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_inject_hdr_reply,
+    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/portals4/ptl_am.h b/src/mpid/ch4/netmod/portals4/ptl_am.h
index de0e607..c2a560c 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_am.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_am.h
@@ -14,12 +14,12 @@
 #include "ptl_impl.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_reg_hdr_handler
+#define FUNCNAME MPIDI_NM_am_reg_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                           MPIDI_NM_am_origin_handler_fn origin_handler_fn,
-                                           MPIDI_NM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_NM_am_reg_handler(int handler_id,
+                                          MPIDI_NM_am_origin_handler_fn origin_handler_fn,
+                                          MPIDI_NM_am_target_handler_fn target_handler_fn)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_REG_HDR_HANDLER);
@@ -34,7 +34,7 @@ static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_send_am_hdr(int rank,
+static inline int MPIDI_NM_am_send_hdr(int rank,
                                        MPIR_Comm * comm,
                                        int handler_id,
                                        const void *am_hdr,
@@ -69,7 +69,7 @@ static inline int MPIDI_NM_send_am_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_send_am(int rank,
+static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
                                    const void *am_hdr,
@@ -148,7 +148,7 @@ static inline int MPIDI_NM_send_am(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_send_amv(int rank,
+static inline int MPIDI_NM_am_sendv(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     struct iovec *am_hdr,
@@ -162,7 +162,7 @@ static inline int MPIDI_NM_send_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_amv_hdr(int rank,
+static inline int MPIDI_NM_am_sendv_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         struct iovec *am_hdr,
@@ -172,7 +172,7 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                              int src_rank,
                                              int handler_id,
                                              const void *am_hdr,
@@ -182,7 +182,7 @@ static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
                                          int src_rank,
                                          int handler_id,
                                          const void *am_hdr,
@@ -264,7 +264,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
                                           int src_rank,
                                           int handler_id,
                                           struct iovec *am_hdr,
@@ -283,7 +283,7 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_NM_inject_am_hdr(int rank,
+static inline int MPIDI_NM_am_inject_hdr(int rank,
                                          MPIR_Comm * comm,
                                          int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
@@ -318,7 +318,7 @@ static inline int MPIDI_NM_inject_am_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                int src_rank,
                                                int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
diff --git a/src/mpid/ch4/netmod/stubnm/globals.c b/src/mpid/ch4/netmod/stubnm/globals.c
index b886803..7ecbbb2 100644
--- a/src/mpid/ch4/netmod/stubnm/globals.c
+++ b/src/mpid/ch4/netmod/stubnm/globals.c
@@ -31,16 +31,16 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
-    MPIDI_NM_reg_hdr_handler,
-    MPIDI_NM_send_am_hdr,
-    MPIDI_NM_inject_am_hdr,
-    MPIDI_NM_send_am,
-    MPIDI_NM_send_amv,
-    MPIDI_NM_send_amv_hdr,
-    MPIDI_NM_send_am_hdr_reply,
-    MPIDI_NM_inject_am_hdr_reply,
-    MPIDI_NM_send_am_reply,
-    MPIDI_NM_send_amv_reply,
+    MPIDI_NM_am_reg_handler,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_inject_hdr,
+    MPIDI_NM_am_send,
+    MPIDI_NM_am_sendv,
+    MPIDI_NM_am_sendv_hdr,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_inject_hdr_reply,
+    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv,
 };
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_am.h b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
index e3bcda3..074c696 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_am.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
@@ -13,15 +13,15 @@
 
 #include "stubnm_impl.h"
 
-static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                           MPIDI_NM_am_origin_handler_fn origin_handler_fn,
-                                           MPIDI_NM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_NM_am_reg_handler(int handler_id,
+                                          MPIDI_NM_am_origin_handler_fn origin_handler_fn,
+                                          MPIDI_NM_am_target_handler_fn target_handler_fn)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am_hdr(int rank,
+static inline int MPIDI_NM_am_send_hdr(int rank,
                                        MPIR_Comm * comm,
                                        int handler_id,
                                        const void *am_hdr,
@@ -31,7 +31,7 @@ static inline int MPIDI_NM_send_am_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am(int rank,
+static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
                                    const void *am_hdr,
@@ -44,7 +44,7 @@ static inline int MPIDI_NM_send_am(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_amv(int rank,
+static inline int MPIDI_NM_am_sendv(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     struct iovec *am_hdr,
@@ -58,7 +58,7 @@ static inline int MPIDI_NM_send_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_amv_hdr(int rank,
+static inline int MPIDI_NM_am_sendv_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         struct iovec *am_hdr,
@@ -68,7 +68,7 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                              int handler_id,
                                              const void *am_hdr,
                                              size_t am_hdr_sz, MPIR_Request * sreq)
@@ -77,7 +77,7 @@ static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id, int s
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                          int handler_id,
                                          const void *am_hdr,
                                          size_t am_hdr_sz,
@@ -89,7 +89,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_r
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id,
                                           struct iovec *am_hdr,
                                           size_t iov_len,
@@ -107,7 +107,7 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_NM_inject_am_hdr(int rank,
+static inline int MPIDI_NM_am_inject_hdr(int rank,
                                          MPIR_Comm * comm,
                                          int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
@@ -116,7 +116,7 @@ static inline int MPIDI_NM_inject_am_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                                int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/ucx/func_table.c b/src/mpid/ch4/netmod/ucx/func_table.c
index 8bd03fb..f4a03fe 100644
--- a/src/mpid/ch4/netmod/ucx/func_table.c
+++ b/src/mpid/ch4/netmod/ucx/func_table.c
@@ -29,16 +29,16 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
-    MPIDI_NM_reg_hdr_handler,
-    MPIDI_NM_send_am_hdr,
-    MPIDI_NM_inject_am_hdr,
-    MPIDI_NM_send_am,
-    MPIDI_NM_send_amv,
-    MPIDI_NM_send_amv_hdr,
-    MPIDI_NM_send_am_hdr_reply,
-    MPIDI_NM_inject_am_hdr_reply,
-    MPIDI_NM_send_am_reply,
-    MPIDI_NM_send_amv_reply,
+    MPIDI_NM_am_reg_handler,
+    MPIDI_NM_am_send_hdr,
+    MPIDI_NM_am_inject_hdr,
+    MPIDI_NM_am_send,
+    MPIDI_NM_am_sendv,
+    MPIDI_NM_am_sendv_hdr,
+    MPIDI_NM_am_send_hdr_reply,
+    MPIDI_NM_am_inject_hdr_reply,
+    MPIDI_NM_am_send_reply,
+    MPIDI_NM_am_sendv_reply,
     MPIDI_NM_am_hdr_max_sz,
     MPIDI_NM_am_recv
 };
diff --git a/src/mpid/ch4/netmod/ucx/ucx_am.h b/src/mpid/ch4/netmod/ucx/ucx_am.h
index 1a4c595..64a0051 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_am.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_am.h
@@ -12,12 +12,12 @@
 #include "ucx_impl.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_reg_hdr_handler
+#define FUNCNAME MPIDI_NM_am_reg_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                           MPIDI_NM_am_origin_handler_fn origin_handler_fn,
-                                           MPIDI_NM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_NM_am_reg_handler(int handler_id,
+                                          MPIDI_NM_am_origin_handler_fn origin_handler_fn,
+                                          MPIDI_NM_am_target_handler_fn target_handler_fn)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_REG_HDR_HANDLER);
@@ -33,7 +33,7 @@ static inline int MPIDI_NM_reg_hdr_handler(int handler_id,
 }
 
 
-static inline void MPIDI_UCX_send_am_callback(void *request, ucs_status_t status)
+static inline void MPIDI_UCX_am_send_callback(void *request, ucs_status_t status)
 {
     MPIDI_UCX_ucp_request_t *ucp_request = (MPIDI_UCX_ucp_request_t *) request;
 
@@ -76,10 +76,10 @@ static inline void MPIDI_UCX_inject_am_callback(void *request, ucs_status_t stat
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_hdr
+#define FUNCNAME MPIDI_NM_am_send_hdr
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_hdr(int rank,
+static inline int MPIDI_NM_am_send_hdr(int rank,
                                        MPIR_Comm * comm,
                                        int handler_id,
                                        const void *am_hdr,
@@ -110,7 +110,7 @@ static inline int MPIDI_NM_send_am_hdr(int rank,
     ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf,
                                                               am_hdr_sz + sizeof(ucx_hdr),
                                                               ucp_dt_make_contig(1), ucx_tag,
-                                                              &MPIDI_UCX_send_am_callback);
+                                                              &MPIDI_UCX_am_send_callback);
     MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
 
     /* send is done. free all resources and complete the request */
@@ -144,10 +144,10 @@ static inline int MPIDI_NM_send_am_hdr(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am
+#define FUNCNAME MPIDI_NM_am_send
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am(int rank,
+static inline int MPIDI_NM_am_send(int rank,
                                    MPIR_Comm * comm,
                                    int handler_id,
                                    const void *am_hdr,
@@ -184,7 +184,7 @@ static inline int MPIDI_NM_send_am(int rank,
         MPIDI_CH4U_REQUEST(sreq, req->lreq).datatype = datatype;
         MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag = lreq_hdr.hdr.msg_tag;
         MPIDI_CH4U_REQUEST(sreq, src_rank) = rank;
-        mpi_errno = MPIDI_NM_inject_am_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
+        mpi_errno = MPIDI_NM_am_inject_hdr(rank, comm, MPIDI_CH4U_SEND_LONG_REQ,
                                            &lreq_hdr, sizeof(lreq_hdr), NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
@@ -226,7 +226,7 @@ static inline int MPIDI_NM_send_am(int rank,
     ucp_request = (MPIDI_UCX_ucp_request_t *) ucp_tag_send_nb(ep, send_buf,
                                                               data_sz + am_hdr_sz + sizeof(ucx_hdr),
                                                               ucp_dt_make_contig(1), ucx_tag,
-                                                              &MPIDI_UCX_send_am_callback);
+                                                              &MPIDI_UCX_am_send_callback);
     MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
     /* send is done. free all resources and complete the request */
     if (ucp_request == NULL) {
@@ -259,10 +259,10 @@ static inline int MPIDI_NM_send_am(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_amv_hdr
+#define FUNCNAME MPIDI_NM_am_sendv_hdr
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_amv_hdr(int rank,
+static inline int MPIDI_NM_am_sendv_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         struct iovec *am_hdr,
@@ -288,7 +288,7 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send_hdr(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
                                      sreq, netmod_context);
     MPL_free(am_hdr_buf);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_SEND_AMV_HDR);
@@ -296,10 +296,10 @@ static inline int MPIDI_NM_send_amv_hdr(int rank,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_amv
+#define FUNCNAME MPIDI_NM_am_sendv
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_amv(int rank,
+static inline int MPIDI_NM_am_sendv(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     struct iovec *am_hdr,
@@ -329,7 +329,7 @@ static inline int MPIDI_NM_send_amv(int rank,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send(rank, comm, handler_id, am_hdr_buf, am_hdr_sz,
                                  data, count, datatype, sreq, netmod_context);
 
     MPL_free(am_hdr_buf);
@@ -339,25 +339,25 @@ static inline int MPIDI_NM_send_amv(int rank,
 
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_hdr_reply
+#define FUNCNAME MPIDI_NM_am_send_hdr_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                              int src_rank,
                                              int handler_id,
                                              const void *am_hdr,
                                              size_t am_hdr_sz, MPIR_Request * sreq)
 {
 
-    return MPIDI_NM_send_am_hdr(src_rank, MPIDI_CH4U_context_id_to_comm(context_id), handler_id,
+    return MPIDI_NM_am_send_hdr(src_rank, MPIDI_CH4U_context_id_to_comm(context_id), handler_id,
                                 am_hdr, am_hdr_sz, sreq, NULL);
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_send_am_reply
+#define FUNCNAME MPIDI_NM_am_send_reply
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_send_reply(MPIR_Context_id_t context_id,
                                          int src_rank,
                                          int handler_id,
                                          const void *am_hdr,
@@ -401,7 +401,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
                                                                   data_sz + am_hdr_sz +
                                                                   sizeof(ucx_hdr),
                                                                   ucp_dt_make_contig(1), ucx_tag,
-                                                                  &MPIDI_UCX_send_am_callback);
+                                                                  &MPIDI_UCX_am_send_callback);
         MPIDI_CH4_UCX_REQUEST(ucp_request, tag_send_nb);
     }
 
@@ -436,7 +436,7 @@ static inline int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_sendv_reply(MPIR_Context_id_t context_id,
                                           int src_rank,
                                           int handler_id,
                                           struct iovec *am_hdr,
@@ -465,7 +465,7 @@ static inline int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
         am_hdr_sz += am_hdr[i].iov_len;
     }
 
-    mpi_errno = MPIDI_NM_send_am_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
+    mpi_errno = MPIDI_NM_am_send_reply(context_id, src_rank, handler_id, am_hdr_buf, am_hdr_sz,
                                        data, count, datatype, sreq);
     MPL_free(am_hdr_buf);
     MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_NETMOD_UCX_SEND_AMV_REPLY);
@@ -477,7 +477,7 @@ static inline size_t MPIDI_NM_am_hdr_max_sz(void)
     return (MPIDI_UCX_MAX_AM_EAGER_SZ - sizeof(MPIDI_UCX_am_header_t));
 }
 
-static inline int MPIDI_NM_inject_am_hdr(int rank,
+static inline int MPIDI_NM_am_inject_hdr(int rank,
                                          MPIR_Comm * comm,
                                          int handler_id,
                                          const void *am_hdr, size_t am_hdr_sz, void *netmod_context)
@@ -530,7 +530,7 @@ static inline int MPIDI_NM_inject_am_hdr(int rank,
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+static inline int MPIDI_NM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                int src_rank,
                                                int handler_id, const void *am_hdr, size_t am_hdr_sz)
 {
@@ -593,7 +593,7 @@ static inline int MPIDI_NM_am_recv(MPIR_Request * req)
     msg.sreq_ptr = (MPIDI_CH4U_REQUEST(req, req->rreq.peer_req_ptr));
     msg.rreq_ptr = (uint64_t) req;
     MPIR_Assert((void *) msg.sreq_ptr != NULL);
-    mpi_errno = MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
+    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(req, tag)),
                                              MPIDI_CH4U_REQUEST(req, src_rank),
                                              MPIDI_CH4U_SEND_LONG_ACK, &msg, sizeof(msg));
     if (mpi_errno)
diff --git a/src/mpid/ch4/shm/include/shm.h b/src/mpid/ch4/shm/include/shm.h
index 11acade..ed7f0f3 100644
--- a/src/mpid/ch4/shm/include/shm.h
+++ b/src/mpid/ch4/shm/include/shm.h
@@ -30,9 +30,9 @@ typedef int (*MPIDI_SHM_am_target_handler_fn)
 typedef int (*MPIDI_SHM_init_t) (int rank, int size);
 typedef int (*MPIDI_SHM_finalize_t) (void);
 typedef int (*MPIDI_SHM_progress_t) (int blocking);
-typedef int (*MPIDI_SHM_reg_hdr_handler_t) (int handler_id,
-                                            MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
-                                            MPIDI_SHM_am_target_handler_fn target_handler_fn);
+typedef int (*MPIDI_SHM_am_reg_handler_t) (int handler_id,
+                                           MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
+                                           MPIDI_SHM_am_target_handler_fn target_handler_fn);
 typedef int (*MPIDI_SHM_comm_connect_t) (const char *port_name, MPIR_Info * info, int root,
                                          MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
 typedef int (*MPIDI_SHM_comm_disconnect_t) (MPIR_Comm * comm_ptr);
@@ -40,31 +40,31 @@ typedef int (*MPIDI_SHM_open_port_t) (MPIR_Info * info_ptr, char *port_name);
 typedef int (*MPIDI_SHM_close_port_t) (const char *port_name);
 typedef int (*MPIDI_SHM_comm_accept_t) (const char *port_name, MPIR_Info * info, int root,
                                         MPIR_Comm * comm, MPIR_Comm ** newcomm_ptr);
-typedef int (*MPIDI_SHM_send_am_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_SHM_am_send_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                         const void *am_hdr, size_t am_hdr_sz, MPIR_Request * sreq,
                                         void *shm_context);
-typedef int (*MPIDI_SHM_inject_am_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_SHM_am_inject_hdr_t) (int rank, MPIR_Comm * comm, int handler_id,
                                           const void *am_hdr, size_t am_hdr_sz, void *shm_context);
-typedef int (*MPIDI_SHM_send_am_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
+typedef int (*MPIDI_SHM_am_send_t) (int rank, MPIR_Comm * comm, int handler_id, const void *am_hdr,
                                     size_t am_hdr_sz, const void *data, MPI_Count count,
                                     MPI_Datatype datatype, MPIR_Request * sreq, void *shm_context);
 typedef int (*MPIDI_SHM_inject_am_t) (int rank, MPIR_Comm * comm, int handler_id,
                                       const void *am_hdr, size_t am_hdr_sz, const void *data,
                                       MPI_Count count, MPI_Datatype datatype, void *shm_context);
-typedef int (*MPIDI_SHM_send_amv_t) (int rank, MPIR_Comm * comm, int handler_id,
+typedef int (*MPIDI_SHM_am_sendv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                      struct iovec * am_hdrs, size_t iov_len, const void *data,
                                      MPI_Count count, MPI_Datatype datatype, MPIR_Request * sreq,
                                      void *shm_context);
 typedef int (*MPIDI_SHM_inject_amv_t) (int rank, MPIR_Comm * comm, int handler_id,
                                        struct iovec * am_hdrs, size_t iov_len, const void *data,
                                        MPI_Count count, MPI_Datatype datatype, void *shm_context);
-typedef int (*MPIDI_SHM_send_am_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_SHM_am_send_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                               int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                               MPIR_Request * sreq);
-typedef int (*MPIDI_SHM_inject_am_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_SHM_am_inject_hdr_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                                 int handler_id, const void *am_hdr,
                                                 size_t am_hdr_sz);
-typedef int (*MPIDI_SHM_send_am_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_SHM_am_send_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                           const void *data, MPI_Count count, MPI_Datatype datatype,
                                           MPIR_Request * sreq);
@@ -72,7 +72,7 @@ typedef int (*MPIDI_SHM_inject_am_reply_t) (MPIR_Context_id_t context_id, int sr
                                             int handler_id, const void *am_hdr, size_t am_hdr_sz,
                                             const void *data, MPI_Count count,
                                             MPI_Datatype datatype);
-typedef int (*MPIDI_SHM_send_amv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
+typedef int (*MPIDI_SHM_am_sendv_reply_t) (MPIR_Context_id_t context_id, int src_rank,
                                            int handler_id, struct iovec * am_hdr, size_t iov_len,
                                            const void *data, MPI_Count count, MPI_Datatype datatype,
                                            MPIR_Request * sreq);
@@ -376,23 +376,23 @@ typedef struct MPIDI_SHM_funcs {
     MPIDI_SHM_init_t init;
     MPIDI_SHM_finalize_t finalize;
     MPIDI_SHM_progress_t progress;
-    MPIDI_SHM_reg_hdr_handler_t reg_hdr_handler;
+    MPIDI_SHM_am_reg_handler_t am_reg_handler;
     MPIDI_SHM_comm_connect_t comm_connect;
     MPIDI_SHM_comm_disconnect_t comm_disconnect;
     MPIDI_SHM_open_port_t open_port;
     MPIDI_SHM_close_port_t close_port;
     MPIDI_SHM_comm_accept_t comm_accept;
-    MPIDI_SHM_send_am_hdr_t send_am_hdr;
-    MPIDI_SHM_inject_am_hdr_t inject_am_hdr;
-    MPIDI_SHM_send_am_t send_am;
+    MPIDI_SHM_am_send_hdr_t am_send_hdr;
+    MPIDI_SHM_am_inject_hdr_t am_inject_hdr;
+    MPIDI_SHM_am_send_t am_send;
     MPIDI_SHM_inject_am_t inject_am;
-    MPIDI_SHM_send_amv_t send_amv;
+    MPIDI_SHM_am_sendv_t am_sendv;
     MPIDI_SHM_inject_amv_t inject_amv;
-    MPIDI_SHM_send_am_hdr_reply_t send_am_hdr_reply;
-    MPIDI_SHM_inject_am_hdr_reply_t inject_am_hdr_reply;
-    MPIDI_SHM_send_am_reply_t send_am_reply;
+    MPIDI_SHM_am_send_hdr_reply_t am_send_hdr_reply;
+    MPIDI_SHM_am_inject_hdr_reply_t am_inject_hdr_reply;
+    MPIDI_SHM_am_send_reply_t am_send_reply;
     MPIDI_SHM_inject_am_reply_t inject_am_reply;
-    MPIDI_SHM_send_amv_reply_t send_amv_reply;
+    MPIDI_SHM_am_sendv_reply_t am_sendv_reply;
     MPIDI_SHM_inject_amv_reply_t inject_amv_reply;
     MPIDI_SHM_am_hdr_max_sz_t am_hdr_max_sz;
     MPIDI_SHM_am_inject_max_sz_t am_inject_max_sz;
@@ -528,11 +528,11 @@ extern char MPIDI_SHM_strings[][MPIDI_MAX_SHM_STRING_LEN];
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_init(int rank, int size) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_finalize(void) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                                       MPIDI_SHM_am_origin_handler_fn
-                                                       origin_handler_fn,
-                                                       MPIDI_SHM_am_target_handler_fn
-                                                       target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_reg_handler(int handler_id,
+                                                      MPIDI_SHM_am_origin_handler_fn
+                                                      origin_handler_fn,
+                                                      MPIDI_SHM_am_target_handler_fn
+                                                      target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
                                                     int root, MPIR_Comm * comm,
                                                     MPIR_Comm **
@@ -546,15 +546,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
                                                    int root, MPIR_Comm * comm,
                                                    MPIR_Comm **
                                                    newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                    const void *am_hdr, size_t am_hdr_sz,
                                                    MPIR_Request * sreq,
                                                    void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
                                                      int handler_id, const void *am_hdr,
                                                      size_t am_hdr_sz,
                                                      void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send(int rank, MPIR_Comm * comm, int handler_id,
                                                const void *am_hdr, size_t am_hdr_sz,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
@@ -564,7 +564,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int
                                                  const void *data, MPI_Count count,
                                                  MPI_Datatype datatype,
                                                  void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
                                                 struct iovec *am_hdrs, size_t iov_len,
                                                 const void *data, MPI_Count count,
                                                 MPI_Datatype datatype, MPIR_Request * sreq,
@@ -574,17 +574,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, in
                                                   const void *data, MPI_Count count,
                                                   MPI_Datatype datatype,
                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                                          int src_rank, int handler_id,
                                                          const void *am_hdr, size_t am_hdr_sz,
                                                          MPIR_Request *
                                                          sreq) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                            int src_rank, int handler_id,
                                                            const void *am_hdr,
                                                            size_t am_hdr_sz)
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id,
                                                      int src_rank, int handler_id,
                                                      const void *am_hdr, size_t am_hdr_sz,
                                                      const void *data, MPI_Count count,
@@ -596,7 +596,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context
                                                        const void *data, MPI_Count count,
                                                        MPI_Datatype datatype)
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id,
                                                       int src_rank, int handler_id,
                                                       struct iovec *am_hdr, size_t iov_len,
                                                       const void *data, MPI_Count count,
diff --git a/src/mpid/ch4/shm/include/shm_impl.h b/src/mpid/ch4/shm/include/shm_impl.h
index d1125cf..92a5e0b 100644
--- a/src/mpid/ch4/shm/include/shm_impl.h
+++ b/src/mpid/ch4/shm/include/shm_impl.h
@@ -30,13 +30,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking)
     return MPIDI_SHM_func->progress(blocking);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                                       MPIDI_SHM_am_origin_handler_fn
-                                                       origin_handler_fn,
-                                                       MPIDI_SHM_am_target_handler_fn
-                                                       target_handler_fn)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_reg_handler(int handler_id,
+                                                      MPIDI_SHM_am_origin_handler_fn
+                                                      origin_handler_fn,
+                                                      MPIDI_SHM_am_target_handler_fn
+                                                      target_handler_fn)
 {
-    return MPIDI_SHM_func->reg_hdr_handler(handler_id, origin_handler_fn, target_handler_fn);
+    return MPIDI_SHM_func->am_reg_handler(handler_id, origin_handler_fn, target_handler_fn);
 };
 
 MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
@@ -68,28 +68,28 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_I
     return MPIDI_SHM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr(int rank, MPIR_Comm * comm, int handler_id,
                                                    const void *am_hdr, size_t am_hdr_sz,
                                                    MPIR_Request * sreq, void *shm_context)
 {
-    return MPIDI_SHM_func->send_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
+    return MPIDI_SHM_func->am_send_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
                                        shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr(int rank, MPIR_Comm * comm,
                                                      int handler_id, const void *am_hdr,
                                                      size_t am_hdr_sz, void *shm_context)
 {
-    return MPIDI_SHM_func->inject_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, shm_context);
+    return MPIDI_SHM_func->am_inject_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send(int rank, MPIR_Comm * comm, int handler_id,
                                                const void *am_hdr, size_t am_hdr_sz,
                                                const void *data, MPI_Count count,
                                                MPI_Datatype datatype, MPIR_Request * sreq,
                                                void *shm_context)
 {
-    return MPIDI_SHM_func->send_am(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
+    return MPIDI_SHM_func->am_send(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
                                    sreq, shm_context);
 };
 
@@ -102,13 +102,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int
                                      datatype, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv(int rank, MPIR_Comm * comm, int handler_id,
                                                 struct iovec *am_hdrs, size_t iov_len,
                                                 const void *data, MPI_Count count,
                                                 MPI_Datatype datatype, MPIR_Request * sreq,
                                                 void *shm_context)
 {
-    return MPIDI_SHM_func->send_amv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
+    return MPIDI_SHM_func->am_sendv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
                                     sreq, shm_context);
 };
 
@@ -121,29 +121,29 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, in
                                       datatype, shm_context);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id,
                                                          int src_rank, int handler_id,
                                                          const void *am_hdr, size_t am_hdr_sz,
                                                          MPIR_Request * sreq)
 {
-    return MPIDI_SHM_func->send_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
+    return MPIDI_SHM_func->am_send_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
                                              sreq);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id,
                                                            int src_rank, int handler_id,
                                                            const void *am_hdr, size_t am_hdr_sz)
 {
-    return MPIDI_SHM_func->inject_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
+    return MPIDI_SHM_func->am_inject_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id,
                                                      int src_rank, int handler_id,
                                                      const void *am_hdr, size_t am_hdr_sz,
                                                      const void *data, MPI_Count count,
                                                      MPI_Datatype datatype, MPIR_Request * sreq)
 {
-    return MPIDI_SHM_func->send_am_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
+    return MPIDI_SHM_func->am_send_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
                                          count, datatype, sreq);
 };
 
@@ -157,13 +157,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context
                                            data, count, datatype);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id,
                                                       int src_rank, int handler_id,
                                                       struct iovec *am_hdr, size_t iov_len,
                                                       const void *data, MPI_Count count,
                                                       MPI_Datatype datatype, MPIR_Request * sreq)
 {
-    return MPIDI_SHM_func->send_amv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
+    return MPIDI_SHM_func->am_sendv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
                                           count, datatype, sreq);
 };
 
diff --git a/src/mpid/ch4/shm/posix/func_table.c b/src/mpid/ch4/shm/posix/func_table.c
index 39f2ea5..4a39d50 100644
--- a/src/mpid/ch4/shm/posix/func_table.c
+++ b/src/mpid/ch4/shm/posix/func_table.c
@@ -16,23 +16,23 @@ MPIDI_SHM_funcs_t MPIDI_SHM_posix_funcs = {
     MPIDI_SHM_init,
     MPIDI_SHM_finalize,
     MPIDI_SHM_progress,
-    MPIDI_SHM_reg_hdr_handler,
+    MPIDI_SHM_am_reg_handler,
     MPIDI_SHM_comm_connect,
     MPIDI_SHM_comm_disconnect,
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_send_am_hdr,
-    MPIDI_SHM_inject_am_hdr,
-    MPIDI_SHM_send_am,
+    MPIDI_SHM_am_send_hdr,
+    MPIDI_SHM_am_inject_hdr,
+    MPIDI_SHM_am_send,
     MPIDI_SHM_inject_am,
-    MPIDI_SHM_send_amv,
+    MPIDI_SHM_am_sendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_send_am_hdr_reply,
-    MPIDI_SHM_inject_am_hdr_reply,
-    MPIDI_SHM_send_am_reply,
+    MPIDI_SHM_am_send_hdr_reply,
+    MPIDI_SHM_am_inject_hdr_reply,
+    MPIDI_SHM_am_send_reply,
     MPIDI_SHM_inject_am_reply,
-    MPIDI_SHM_send_amv_reply,
+    MPIDI_SHM_am_sendv_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
     MPIDI_SHM_am_inject_max_sz,
diff --git a/src/mpid/ch4/shm/posix/posix_am.h b/src/mpid/ch4/shm/posix/posix_am.h
index 06b2351..842bf6c 100644
--- a/src/mpid/ch4/shm/posix/posix_am.h
+++ b/src/mpid/ch4/shm/posix/posix_am.h
@@ -12,15 +12,15 @@
 
 #include "posix_impl.h"
 
-static inline int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                            MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
-                                            MPIDI_SHM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_SHM_am_reg_handler(int handler_id,
+                                           MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
+                                           MPIDI_SHM_am_target_handler_fn target_handler_fn)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_hdr(int rank,
+static inline int MPIDI_SHM_am_send_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         const void *am_hdr,
@@ -30,7 +30,7 @@ static inline int MPIDI_SHM_send_am_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am(int rank,
+static inline int MPIDI_SHM_am_send(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     const void *am_hdr,
@@ -43,7 +43,7 @@ static inline int MPIDI_SHM_send_am(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_amv(int rank,
+static inline int MPIDI_SHM_am_sendv(int rank,
                                      MPIR_Comm * comm,
                                      int handler_id,
                                      struct iovec *am_hdr,
@@ -56,7 +56,7 @@ static inline int MPIDI_SHM_send_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                               int handler_id,
                                               const void *am_hdr,
                                               size_t am_hdr_sz, MPIR_Request * sreq)
@@ -65,7 +65,7 @@ static inline int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id, int
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id,
                                           const void *am_hdr,
                                           size_t am_hdr_sz,
@@ -77,7 +77,7 @@ static inline int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id, int src_
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
                                            int handler_id,
                                            struct iovec *am_hdr,
                                            size_t iov_len,
@@ -95,7 +95,7 @@ static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_SHM_inject_am_hdr(int rank,
+static inline int MPIDI_SHM_am_inject_hdr(int rank,
                                           MPIR_Comm * comm,
                                           int handler_id,
                                           const void *am_hdr, size_t am_hdr_sz, void *shm_context)
@@ -128,7 +128,7 @@ static inline int MPIDI_SHM_inject_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                                 int handler_id,
                                                 const void *am_hdr, size_t am_hdr_sz)
 {
diff --git a/src/mpid/ch4/shm/stubshm/func_table.c b/src/mpid/ch4/shm/stubshm/func_table.c
index 264b179..237869c 100644
--- a/src/mpid/ch4/shm/stubshm/func_table.c
+++ b/src/mpid/ch4/shm/stubshm/func_table.c
@@ -16,23 +16,23 @@ MPIDI_SHM_funcs_t MPIDI_SHM_stubshm_funcs = {
     MPIDI_SHM_init,
     MPIDI_SHM_finalize,
     MPIDI_SHM_progress,
-    MPIDI_SHM_reg_hdr_handler,
+    MPIDI_SHM_am_reg_handler,
     MPIDI_SHM_comm_connect,
     MPIDI_SHM_comm_disconnect,
     MPIDI_SHM_open_port,
     MPIDI_SHM_close_port,
     MPIDI_SHM_comm_accept,
-    MPIDI_SHM_send_am_hdr,
-    MPIDI_SHM_inject_am_hdr,
-    MPIDI_SHM_send_am,
+    MPIDI_SHM_am_send_hdr,
+    MPIDI_SHM_am_inject_hdr,
+    MPIDI_SHM_am_send,
     MPIDI_SHM_inject_am,
-    MPIDI_SHM_send_amv,
+    MPIDI_SHM_am_sendv,
     MPIDI_SHM_inject_amv,
-    MPIDI_SHM_send_am_hdr_reply,
-    MPIDI_SHM_inject_am_hdr_reply,
-    MPIDI_SHM_send_am_reply,
+    MPIDI_SHM_am_send_hdr_reply,
+    MPIDI_SHM_am_inject_hdr_reply,
+    MPIDI_SHM_am_send_reply,
     MPIDI_SHM_inject_am_reply,
-    MPIDI_SHM_send_amv_reply,
+    MPIDI_SHM_am_sendv_reply,
     MPIDI_SHM_inject_amv_reply,
     MPIDI_SHM_am_hdr_max_sz,
     MPIDI_SHM_am_inject_max_sz,
diff --git a/src/mpid/ch4/shm/stubshm/stubshm_am.h b/src/mpid/ch4/shm/stubshm/stubshm_am.h
index 1ff7dab..e837c9f 100644
--- a/src/mpid/ch4/shm/stubshm/stubshm_am.h
+++ b/src/mpid/ch4/shm/stubshm/stubshm_am.h
@@ -12,15 +12,15 @@
 
 #include "stubshm_impl.h"
 
-static inline int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                            MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
-                                            MPIDI_SHM_am_target_handler_fn target_handler_fn)
+static inline int MPIDI_SHM_am_reg_handler(int handler_id,
+                                           MPIDI_SHM_am_origin_handler_fn origin_handler_fn,
+                                           MPIDI_SHM_am_target_handler_fn target_handler_fn)
 {
     MPIR_Assert(0);
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_hdr(int rank,
+static inline int MPIDI_SHM_am_send_hdr(int rank,
                                         MPIR_Comm * comm,
                                         int handler_id,
                                         const void *am_hdr,
@@ -30,7 +30,7 @@ static inline int MPIDI_SHM_send_am_hdr(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am(int rank,
+static inline int MPIDI_SHM_am_send(int rank,
                                     MPIR_Comm * comm,
                                     int handler_id,
                                     const void *am_hdr,
@@ -43,7 +43,7 @@ static inline int MPIDI_SHM_send_am(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_amv(int rank,
+static inline int MPIDI_SHM_am_sendv(int rank,
                                      MPIR_Comm * comm,
                                      int handler_id,
                                      struct iovec *am_hdr,
@@ -56,7 +56,7 @@ static inline int MPIDI_SHM_send_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_send_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                               int handler_id,
                                               const void *am_hdr,
                                               size_t am_hdr_sz, MPIR_Request * sreq)
@@ -65,7 +65,7 @@ static inline int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id, int
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_send_reply(MPIR_Context_id_t context_id, int src_rank,
                                           int handler_id,
                                           const void *am_hdr,
                                           size_t am_hdr_sz,
@@ -77,7 +77,7 @@ static inline int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id, int src_
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_sendv_reply(MPIR_Context_id_t context_id, int src_rank,
                                            int handler_id,
                                            struct iovec *am_hdr,
                                            size_t iov_len,
@@ -95,7 +95,7 @@ static inline size_t MPIDI_SHM_am_hdr_max_sz(void)
     return 0;
 }
 
-static inline int MPIDI_SHM_inject_am_hdr(int rank,
+static inline int MPIDI_SHM_am_inject_hdr(int rank,
                                           MPIR_Comm * comm,
                                           int handler_id,
                                           const void *am_hdr, size_t am_hdr_sz, void *shm_context)
@@ -128,7 +128,7 @@ static inline int MPIDI_SHM_inject_amv(int rank,
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
+static inline int MPIDI_SHM_am_inject_hdr_reply(MPIR_Context_id_t context_id, int src_rank,
                                                 int handler_id,
                                                 const void *am_hdr, size_t am_hdr_sz)
 {
diff --git a/src/mpid/ch4/src/ch4r_callbacks.h b/src/mpid/ch4/src/ch4r_callbacks.h
index db0ec20..471d3e3 100644
--- a/src/mpid/ch4/src/ch4r_callbacks.h
+++ b/src/mpid/ch4/src/ch4r_callbacks.h
@@ -152,7 +152,7 @@ static inline int MPIDI_CH4U_get_cmpl_handler(MPIR_Request * req)
     win = MPIDI_CH4U_REQUEST(req, req->greq.win_ptr);
     context_id = MPIDI_CH4U_win_to_context(win);
     if (MPIDI_CH4U_REQUEST(req, req->greq.n_iov) == 0) {
-        mpi_errno = MPIDI_NM_send_am_reply(context_id,
+        mpi_errno = MPIDI_NM_am_send_reply(context_id,
                                            MPIDI_CH4U_REQUEST(req, src_rank),
                                            MPIDI_CH4U_GET_ACK,
                                            &get_ack, sizeof(get_ack),
@@ -186,7 +186,7 @@ static inline int MPIDI_CH4U_get_cmpl_handler(MPIR_Request * req)
     MPL_free(MPIDI_CH4U_REQUEST(req, req->greq.dt_iov));
     MPIDI_CH4U_REQUEST(req, req->greq.dt_iov) = (void *) p_data;
 
-    mpi_errno = MPIDI_NM_send_am_reply(context_id,
+    mpi_errno = MPIDI_NM_am_send_reply(context_id,
                                        MPIDI_CH4U_REQUEST(req, src_rank),
                                        MPIDI_CH4U_GET_ACK,
                                        &get_ack, sizeof(get_ack), p_data, data_sz, MPI_BYTE, req);
@@ -414,7 +414,7 @@ static inline int MPIDI_CH4U_reply_ssend(MPIR_Request * rreq)
     MPIR_cc_incr(rreq->cc_ptr, &c);
     ack_msg.sreq_ptr = MPIDI_CH4U_REQUEST(rreq, req->rreq.peer_req_ptr);
 
-    mpi_errno = MPIDI_NM_send_am_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
+    mpi_errno = MPIDI_NM_am_send_hdr_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(rreq, tag)),
                                            MPIDI_CH4U_REQUEST(rreq, src_rank),
                                            MPIDI_CH4U_SSEND_ACK, &ack_msg, sizeof(ack_msg), rreq);
     if (mpi_errno)
@@ -439,7 +439,7 @@ static inline int MPIDI_CH4U_ack_put(MPIR_Request * rreq)
 
     ack_msg.preq_ptr = MPIDI_CH4U_REQUEST(rreq, req->preq.preq_ptr);
     mpi_errno =
-        MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
                                      (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
                                      MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_ACK,
                                      &ack_msg, sizeof(ack_msg));
@@ -473,7 +473,7 @@ static inline int MPIDI_CH4U_ack_cswap(MPIR_Request * rreq)
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->creq.creq_ptr);
 
     mpi_errno =
-        MPIDI_NM_send_am_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context
                                (MPIDI_CH4U_REQUEST(rreq, req->creq.win_ptr)),
                                MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_CSWAP_ACK, &ack_msg,
                                sizeof(ack_msg), result_addr, 1, MPIDI_CH4U_REQUEST(rreq,
@@ -503,7 +503,7 @@ static inline int MPIDI_CH4U_ack_acc(MPIR_Request * rreq)
 
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr);
     mpi_errno =
-        MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
                                      (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
                                      MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_ACK,
                                      &ack_msg, sizeof(ack_msg));
@@ -538,7 +538,7 @@ static inline int MPIDI_CH4U_ack_get_acc(MPIR_Request * rreq)
     ack_msg.req_ptr = MPIDI_CH4U_REQUEST(rreq, req->areq.req_ptr);
 
     mpi_errno =
-        MPIDI_NM_send_am_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context
                                (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
                                MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_GET_ACC_ACK, &ack_msg,
                                sizeof(ack_msg), MPIDI_CH4U_REQUEST(rreq, req->areq.data),
@@ -899,7 +899,7 @@ static inline int MPIDI_CH4U_put_iov_cmpl_handler(MPIR_Request * rreq)
     ack_msg.target_preq_ptr = (uint64_t) rreq;
 
     mpi_errno =
-        MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
                                      (MPIDI_CH4U_REQUEST(rreq, req->preq.win_ptr)),
                                      MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_PUT_IOV_ACK,
                                      &ack_msg, sizeof(ack_msg));
@@ -929,7 +929,7 @@ static inline int MPIDI_CH4U_acc_iov_cmpl_handler(MPIR_Request * rreq)
     ack_msg.target_preq_ptr = (uint64_t) rreq;
 
     mpi_errno =
-        MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context
+        MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context
                                      (MPIDI_CH4U_REQUEST(rreq, req->areq.win_ptr)),
                                      MPIDI_CH4U_REQUEST(rreq, src_rank), MPIDI_CH4U_ACC_IOV_ACK,
                                      &ack_msg, sizeof(ack_msg));
@@ -1651,7 +1651,7 @@ static inline int MPIDI_CH4U_send_long_ack_target_handler(void *am_hdr,
     /* Start the main data transfer */
     send_hdr.rreq_ptr = msg_hdr->rreq_ptr;
     mpi_errno =
-        MPIDI_NM_send_am_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag),
+        MPIDI_NM_am_send_reply(MPIDI_CH4U_get_context(MPIDI_CH4U_REQUEST(sreq, req->lreq).msg_tag),
                                MPIDI_CH4U_REQUEST(sreq, src_rank), MPIDI_CH4U_SEND_LONG_LMT,
                                &send_hdr, sizeof(send_hdr), MPIDI_CH4U_REQUEST(sreq,
                                                                                req->lreq).src_buf,
@@ -1893,7 +1893,7 @@ static inline int MPIDI_CH4U_win_lock_advance(MPIR_Win * win)
         else
             MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**rmasync");
 
-        mpi_errno = MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context(win),
+        mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context(win),
                                                  lock->rank,
                                                  MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
         if (mpi_errno)
@@ -1986,7 +1986,7 @@ static inline void MPIDI_CH4U_win_unlock_proc(const MPIDI_CH4U_win_cntrl_msg_t *
     msg.origin_rank = win->comm_ptr->rank;
     msg.type = MPIDI_CH4U_WIN_UNLOCK_ACK;
 
-    mpi_errno = MPIDI_NM_inject_am_hdr_reply(MPIDI_CH4U_win_to_context(win),
+    mpi_errno = MPIDI_NM_am_inject_hdr_reply(MPIDI_CH4U_win_to_context(win),
                                              info->origin_rank,
                                              MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg));
     if (mpi_errno)
@@ -2306,7 +2306,7 @@ static inline int MPIDI_CH4U_put_iov_ack_target_handler(void *am_hdr,
     origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr;
     dat_msg.preq_ptr = msg_hdr->target_preq_ptr;
     win = MPIDI_CH4U_REQUEST(origin_req, req->preq.win_ptr);
-    mpi_errno = MPIDI_NM_send_am_reply(MPIDI_CH4U_win_to_context(win),
+    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context(win),
                                        MPIDI_CH4U_REQUEST(origin_req, src_rank),
                                        MPIDI_CH4U_PUT_DAT_REQ,
                                        &dat_msg, sizeof(dat_msg),
@@ -2355,7 +2355,7 @@ static inline int MPIDI_CH4U_acc_iov_ack_target_handler(void *am_hdr,
     origin_req = (MPIR_Request *) msg_hdr->origin_preq_ptr;
     dat_msg.preq_ptr = msg_hdr->target_preq_ptr;
     win = MPIDI_CH4U_REQUEST(origin_req, req->areq.win_ptr);
-    mpi_errno = MPIDI_NM_send_am_reply(MPIDI_CH4U_win_to_context(win),
+    mpi_errno = MPIDI_NM_am_send_reply(MPIDI_CH4U_win_to_context(win),
                                        MPIDI_CH4U_REQUEST(origin_req, src_rank),
                                        MPIDI_CH4U_ACC_DAT_REQ,
                                        &dat_msg, sizeof(dat_msg),
diff --git a/src/mpid/ch4/src/ch4r_init.h b/src/mpid/ch4/src/ch4r_init.h
index 124ac49..9126e17 100644
--- a/src/mpid/ch4/src/ch4r_init.h
+++ b/src/mpid/ch4/src/ch4r_init.h
@@ -129,129 +129,129 @@ __CH4_INLINE__ int MPIDI_CH4U_init(MPIR_Comm * comm_world, MPIR_Comm * comm_self
                                                            MPIDI_CH4I_BUF_POOL_SZ);
     MPIR_Assert(MPIDI_CH4_Global.buf_pool);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SEND,
-                                         &MPIDI_CH4U_send_origin_cmpl_handler,
-                                         &MPIDI_CH4U_send_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SEND,
+                                        &MPIDI_CH4U_send_origin_cmpl_handler,
+                                        &MPIDI_CH4U_send_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SEND_LONG_REQ, NULL /* Injection only */ ,
-                                         &MPIDI_CH4U_send_long_req_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SEND_LONG_REQ, NULL /* Injection only */ ,
+                                        &MPIDI_CH4U_send_long_req_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SEND_LONG_ACK, NULL /* Injection only */ ,
-                                         &MPIDI_CH4U_send_long_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SEND_LONG_ACK, NULL /* Injection only */ ,
+                                        &MPIDI_CH4U_send_long_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SEND_LONG_LMT,
-                                         &MPIDI_CH4U_send_long_lmt_origin_cmpl_handler,
-                                         &MPIDI_CH4U_send_long_lmt_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SEND_LONG_LMT,
+                                        &MPIDI_CH4U_send_long_lmt_origin_cmpl_handler,
+                                        &MPIDI_CH4U_send_long_lmt_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SSEND_REQ,
-                                         &MPIDI_CH4U_send_origin_cmpl_handler,
-                                         &MPIDI_CH4U_ssend_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SSEND_REQ,
+                                        &MPIDI_CH4U_send_origin_cmpl_handler,
+                                        &MPIDI_CH4U_ssend_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_SSEND_ACK,
-                                         &MPIDI_CH4U_ssend_ack_origin_cmpl_handler,
-                                         &MPIDI_CH4U_ssend_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_SSEND_ACK,
+                                        &MPIDI_CH4U_ssend_ack_origin_cmpl_handler,
+                                        &MPIDI_CH4U_ssend_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_PUT_REQ,
-                                         &MPIDI_CH4U_put_origin_cmpl_handler,
-                                         &MPIDI_CH4U_put_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_REQ,
+                                        &MPIDI_CH4U_put_origin_cmpl_handler,
+                                        &MPIDI_CH4U_put_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_PUT_ACK,
-                                         NULL, &MPIDI_CH4U_put_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_ACK,
+                                        NULL, &MPIDI_CH4U_put_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_GET_REQ,
-                                         &MPIDI_CH4U_get_origin_cmpl_handler,
-                                         &MPIDI_CH4U_get_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_GET_REQ,
+                                        &MPIDI_CH4U_get_origin_cmpl_handler,
+                                        &MPIDI_CH4U_get_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_GET_ACK,
-                                         &MPIDI_CH4U_get_ack_origin_cmpl_handler,
-                                         &MPIDI_CH4U_get_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_GET_ACK,
+                                        &MPIDI_CH4U_get_ack_origin_cmpl_handler,
+                                        &MPIDI_CH4U_get_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_CSWAP_REQ,
-                                         &MPIDI_CH4U_cswap_origin_cmpl_handler,
-                                         &MPIDI_CH4U_cswap_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_CSWAP_REQ,
+                                        &MPIDI_CH4U_cswap_origin_cmpl_handler,
+                                        &MPIDI_CH4U_cswap_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_CSWAP_ACK,
-                                         &MPIDI_CH4U_cswap_ack_origin_cmpl_handler,
-                                         &MPIDI_CH4U_cswap_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_CSWAP_ACK,
+                                        &MPIDI_CH4U_cswap_ack_origin_cmpl_handler,
+                                        &MPIDI_CH4U_cswap_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_ACC_REQ,
-                                         &MPIDI_CH4U_acc_origin_cmpl_handler,
-                                         &MPIDI_CH4U_handle_acc_request);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_ACC_REQ,
+                                        &MPIDI_CH4U_acc_origin_cmpl_handler,
+                                        &MPIDI_CH4U_handle_acc_request);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_ACC_ACK,
-                                         NULL, &MPIDI_CH4U_acc_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_ACC_ACK,
+                                        NULL, &MPIDI_CH4U_acc_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_GET_ACC_ACK,
-                                         &MPIDI_CH4U_get_acc_ack_origin_cmpl_handler,
-                                         &MPIDI_CH4U_get_acc_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_GET_ACC_ACK,
+                                        &MPIDI_CH4U_get_acc_ack_origin_cmpl_handler,
+                                        &MPIDI_CH4U_get_acc_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_WIN_CTRL,
-                                         NULL, &MPIDI_CH4U_win_ctrl_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_WIN_CTRL,
+                                        NULL, &MPIDI_CH4U_win_ctrl_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_PUT_IOV_REQ,
-                                         &MPIDI_CH4U_put_iov_origin_cmpl_handler,
-                                         &MPIDI_CH4U_put_iov_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_IOV_REQ,
+                                        &MPIDI_CH4U_put_iov_origin_cmpl_handler,
+                                        &MPIDI_CH4U_put_iov_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_PUT_IOV_ACK,
-                                         NULL, &MPIDI_CH4U_put_iov_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_IOV_ACK,
+                                        NULL, &MPIDI_CH4U_put_iov_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_PUT_DAT_REQ,
-                                         &MPIDI_CH4U_put_data_origin_cmpl_handler,
-                                         &MPIDI_CH4U_put_data_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_PUT_DAT_REQ,
+                                        &MPIDI_CH4U_put_data_origin_cmpl_handler,
+                                        &MPIDI_CH4U_put_data_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_ACC_IOV_REQ,
-                                         &MPIDI_CH4U_acc_iov_origin_cmpl_handler,
-                                         &MPIDI_CH4U_acc_iov_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_ACC_IOV_REQ,
+                                        &MPIDI_CH4U_acc_iov_origin_cmpl_handler,
+                                        &MPIDI_CH4U_acc_iov_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_ACC_IOV_ACK,
-                                         NULL, &MPIDI_CH4U_acc_iov_ack_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_ACC_IOV_ACK,
+                                        NULL, &MPIDI_CH4U_acc_iov_ack_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    mpi_errno = MPIDI_NM_reg_hdr_handler(MPIDI_CH4U_ACC_DAT_REQ,
-                                         &MPIDI_CH4U_acc_data_origin_cmpl_handler,
-                                         &MPIDI_CH4U_acc_data_target_handler);
+    mpi_errno = MPIDI_NM_am_reg_handler(MPIDI_CH4U_ACC_DAT_REQ,
+                                        &MPIDI_CH4U_acc_data_origin_cmpl_handler,
+                                        &MPIDI_CH4U_acc_data_target_handler);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch4/src/ch4r_rma.h b/src/mpid/ch4/src/ch4r_rma.h
index b0411db..1277ff5 100644
--- a/src/mpid/ch4/src/ch4r_rma.h
+++ b/src/mpid/ch4/src/ch4r_rma.h
@@ -81,7 +81,7 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
+        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
                                      &am_hdr, sizeof(am_hdr), origin_addr,
                                      origin_count, origin_datatype, sreq, NULL);
         if (mpi_errno)
@@ -114,7 +114,7 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
     MPIDI_CH4U_REQUEST(sreq, req->preq.dt_iov) = dt_iov;
 
     if ((am_iov[0].iov_len + am_iov[1].iov_len) <= MPIDI_NM_am_hdr_max_sz()) {
-        mpi_errno = MPIDI_NM_send_amv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
+        mpi_errno = MPIDI_NM_am_sendv(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_REQ,
                                       &am_iov[0], 2, origin_addr, origin_count, origin_datatype,
                                       sreq, NULL);
     }
@@ -125,7 +125,7 @@ static inline int MPIDI_CH4I_do_put(const void *origin_addr,
         MPIDI_CH4U_REQUEST(sreq, src_rank) = target_rank;
         dtype_add_ref_if_not_builtin(origin_datatype);
 
-        mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ,
+        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_PUT_IOV_REQ,
                                      &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
                                      am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
     }
@@ -210,7 +210,7 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_send_am_hdr(target_rank, win->comm_ptr,
+        mpi_errno = MPIDI_NM_am_send_hdr(target_rank, win->comm_ptr,
                                          MPIDI_CH4U_GET_REQ, &am_hdr, sizeof(am_hdr), sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
@@ -235,7 +235,7 @@ static inline int MPIDI_CH4I_do_get(void *origin_addr,
     MPL_free(segment_ptr);
 
     MPIDI_CH4U_REQUEST(sreq, req->greq.dt_iov) = dt_iov;
-    mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ,
+    mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_GET_REQ,
                                  &am_hdr, sizeof(am_hdr), dt_iov,
                                  sizeof(struct iovec) * am_hdr.n_iov, MPI_BYTE, sreq, NULL);
     if (mpi_errno)
@@ -441,7 +441,7 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
         am_hdr.n_iov = 0;
         MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = NULL;
 
-        mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
+        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
                                      &am_hdr, sizeof(am_hdr), origin_addr,
                                      (op == MPI_NO_OP) ? 0 : origin_count,
                                      origin_datatype, sreq, NULL);
@@ -479,7 +479,7 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
     MPIDI_CH4U_REQUEST(sreq, req->areq.dt_iov) = dt_iov;
 
     if ((am_iov[0].iov_len + am_iov[1].iov_len) <= MPIDI_NM_am_hdr_max_sz()) {
-        mpi_errno = MPIDI_NM_send_amv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
+        mpi_errno = MPIDI_NM_am_sendv(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_REQ,
                                       &am_iov[0], 2, origin_addr,
                                       (op == MPI_NO_OP) ? 0 : origin_count,
                                       origin_datatype, sreq, NULL);
@@ -491,7 +491,7 @@ __CH4_INLINE__ int MPIDI_CH4I_do_accumulate(const void *origin_addr,
         MPIDI_CH4U_REQUEST(sreq, src_rank) = target_rank;
         dtype_add_ref_if_not_builtin(origin_datatype);
 
-        mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ,
+        mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_ACC_IOV_REQ,
                                      &am_hdr, sizeof(am_hdr), am_iov[1].iov_base,
                                      am_iov[1].iov_len, MPI_BYTE, sreq, NULL);
     }
@@ -721,7 +721,7 @@ __CH4_INLINE__ int MPIDI_CH4U_compare_and_swap(const void *origin_addr,
     OPA_incr_int(&MPIDI_CH4U_WIN(win, outstanding_ops));
     /* MPIDI_CS_EXIT(); */
 
-    mpi_errno = MPIDI_NM_send_am(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ,
+    mpi_errno = MPIDI_NM_am_send(target_rank, win->comm_ptr, MPIDI_CH4U_CSWAP_REQ,
                                  &am_hdr, sizeof(am_hdr), (char *) p_data, 2, datatype, sreq, NULL);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch4/src/ch4r_send.h b/src/mpid/ch4/src/ch4r_send.h
index 84a67e3..30f4f4e 100644
--- a/src/mpid/ch4/src/ch4r_send.h
+++ b/src/mpid/ch4/src/ch4r_send.h
@@ -49,14 +49,14 @@ static inline int MPIDI_CH4I_do_send(const void *buf,
         ssend_req.sreq_ptr = (uint64_t) sreq;
         MPIR_cc_incr(sreq->cc_ptr, &c);
 
-        mpi_errno = MPIDI_NM_send_am(rank, comm, MPIDI_CH4U_SSEND_REQ,
+        mpi_errno = MPIDI_NM_am_send(rank, comm, MPIDI_CH4U_SSEND_REQ,
                                      &ssend_req, sizeof(ssend_req),
                                      buf, count, datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
     }
     else {
-        mpi_errno = MPIDI_NM_send_am(rank, comm, MPIDI_CH4U_SEND,
+        mpi_errno = MPIDI_NM_am_send(rank, comm, MPIDI_CH4U_SEND,
                                      &am_hdr, sizeof(am_hdr), buf, count, datatype, sreq, NULL);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch4/src/ch4r_win.h b/src/mpid/ch4/src/ch4r_win.h
index 833066c..4bcd90d 100644
--- a/src/mpid/ch4/src/ch4r_win.h
+++ b/src/mpid/ch4/src/ch4r_win.h
@@ -284,7 +284,7 @@ static inline int MPIDI_CH4R_win_complete(MPIR_Win * win)
 
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
-        mpi_errno = MPIDI_NM_inject_am_hdr(peer, win->comm_ptr,
+        mpi_errno = MPIDI_NM_am_inject_hdr(peer, win->comm_ptr,
                                            MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
@@ -338,7 +338,7 @@ static inline int MPIDI_CH4R_win_post(MPIR_Group * group, int assert, MPIR_Win *
 
     for (index = 0; index < group->size; ++index) {
         peer = ranks_in_win_grp[index];
-        mpi_errno = MPIDI_NM_inject_am_hdr(peer, win->comm_ptr,
+        mpi_errno = MPIDI_NM_am_inject_hdr(peer, win->comm_ptr,
                                            MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
@@ -440,7 +440,7 @@ static inline int MPIDI_CH4R_win_lock(int lock_type, int rank, int assert, MPIR_
     msg.lock_type = lock_type;
 
     locked = slock->remote.locked + 1;
-    mpi_errno = MPIDI_NM_inject_am_hdr(rank, win->comm_ptr,
+    mpi_errno = MPIDI_NM_am_inject_hdr(rank, win->comm_ptr,
                                        MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
@@ -482,7 +482,7 @@ static inline int MPIDI_CH4R_win_unlock(int rank, MPIR_Win * win)
     msg.type = MPIDI_CH4U_WIN_UNLOCK;
     unlocked = MPIDI_CH4U_WIN(win, sync).lock.remote.locked - 1;
 
-    mpi_errno = MPIDI_NM_inject_am_hdr(rank, win->comm_ptr,
+    mpi_errno = MPIDI_NM_am_inject_hdr(rank, win->comm_ptr,
                                        MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
@@ -1066,7 +1066,7 @@ static inline int MPIDI_CH4R_win_unlock_all(MPIR_Win * win)
         lockQ[i].peer = i;
         lockQ[i].win = win;
 
-        mpi_errno = MPIDI_NM_inject_am_hdr(i, win->comm_ptr,
+        mpi_errno = MPIDI_NM_am_inject_hdr(i, win->comm_ptr,
                                            MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");
@@ -1228,7 +1228,7 @@ static inline int MPIDI_CH4R_win_lock_all(int assert, MPIR_Win * win)
         lockQ[i].win = win;
         lockQ[i].lock_type = MPI_LOCK_SHARED;
 
-        mpi_errno = MPIDI_NM_inject_am_hdr(i, win->comm_ptr,
+        mpi_errno = MPIDI_NM_am_inject_hdr(i, win->comm_ptr,
                                            MPIDI_CH4U_WIN_CTRL, &msg, sizeof(msg), NULL);
         if (mpi_errno != MPI_SUCCESS)
             MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC, goto fn_fail, "**rmasync");

http://git.mpich.org/mpich.git/commitdiff/02cae1085c508fe494a14970e9dce541ee3c0c07

commit 02cae1085c508fe494a14970e9dce541ee3c0c07
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Aug 18 12:23:14 2016 -0500

    CH4: Cleanup comm, type, op, and attr hooks
    
    Name functions similar to their MPI counterparts, and use _hooks in
    the names to make it clear that these are just hooks that get called
    from the upper layer.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/include/mpir_attr_generic.h b/src/include/mpir_attr_generic.h
index 72d7aeb..07fbdd8 100644
--- a/src/include/mpir_attr_generic.h
+++ b/src/include/mpir_attr_generic.h
@@ -81,7 +81,7 @@
  * ADI defines a collection of routines that are used by the implementation
  * of the MPI attribute routines (such as 'MPI_Comm_get_attr').
  * In addition, the MPI routines involving attributes will invoke the
- * corresponding 'hook' functions (e.g., 'MPID_Dev_comm_attr_set_hook')
+ * corresponding 'hook' functions (e.g., 'MPID_Comm_attr_hook')
  * should the device define them.
  *
  * Attributes on windows and datatypes are defined by MPI but not of
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index db47c40..c66a495 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -91,7 +91,7 @@ int MPIR_Comm_set_attr_impl(MPIR_Comm *comm_ptr, int comm_keyval, void *attribut
     
     /* Here is where we could add a hook for the device to detect attribute
        value changes, using something like
-       MPID_Dev_comm_attr_hook( comm_ptr, keyval, attribute_val );
+       MPID_Comm_attr_hook( comm_ptr, keyval, attribute_val );
     */
     
 
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index 0673df9..b9d2b1d 100644
--- a/src/mpi/attr/type_set_attr.c
+++ b/src/mpi/attr/type_set_attr.c
@@ -134,7 +134,7 @@ int MPII_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_v
     
     /* Here is where we could add a hook for the device to detect attribute
        value changes, using something like
-       MPID_Dev_type_attr_hook( type_ptr, keyval, attribute_val );
+       MPID_Type_attr_hook( type_ptr, keyval, attribute_val );
     */
 
     /* ... end of body of routine ... */
diff --git a/src/mpi/attr/win_set_attr.c b/src/mpi/attr/win_set_attr.c
index d9fa7c7..ed4f9e5 100644
--- a/src/mpi/attr/win_set_attr.c
+++ b/src/mpi/attr/win_set_attr.c
@@ -140,7 +140,7 @@ int MPII_Win_set_attr( MPI_Win win, int win_keyval, void *attribute_val,
     
     /* Here is where we could add a hook for the device to detect attribute
        value changes, using something like
-       MPID_Dev_win_attr_hook( win_ptr, keyval, attribute_val );
+       MPID_Win_attr_hook( win_ptr, keyval, attribute_val );
     */
     
     /* ... end of body of routine ... */
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index cd2cae5..6089172 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -131,8 +131,8 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
 
     MPIR_OBJ_PUBLISH_HANDLE(*op, op_ptr->handle);
 
-#ifdef MPID_Dev_op_commit_hook
-    MPID_Dev_op_commit_hook(op_ptr);
+#ifdef MPID_Op_commit_hook
+    MPID_Op_commit_hook(op_ptr);
 #endif
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/coll/op_free.c b/src/mpi/coll/op_free.c
index 2d013ab..4872e66 100644
--- a/src/mpi/coll/op_free.c
+++ b/src/mpi/coll/op_free.c
@@ -91,8 +91,8 @@ int MPI_Op_free(MPI_Op *op)
     MPIR_Op_release_ref( op_ptr, &in_use);
     if (!in_use) {
 	MPIR_Handle_obj_free( &MPIR_Op_mem, op_ptr );
-#ifdef MPID_Dev_op_destroy_hook
-        MPID_Dev_op_destroy_hook(op_ptr);
+#ifdef MPID_Op_free_hook
+        MPID_Op_free_hook(op_ptr);
 #endif
     }
     *op = MPI_OP_NULL;
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index c365612..10840bc 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -543,7 +543,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
         MPIR_ERR_POP(mpi_errno);
 
     /* Notify device of communicator creation */
-    mpi_errno = MPID_Dev_comm_create_hook(comm);
+    mpi_errno = MPID_Comm_create_hook(comm);
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
@@ -612,7 +612,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
                 MPIR_ERR_POP(mpi_errno);
 
             /* Notify device of communicator creation */
-            mpi_errno = MPID_Dev_comm_create_hook(comm->node_comm);
+            mpi_errno = MPID_Comm_create_hook(comm->node_comm);
             if (mpi_errno)
                 MPIR_ERR_POP(mpi_errno);
             /* don't call MPIR_Comm_commit here */
@@ -645,7 +645,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm)
                 MPIR_ERR_POP(mpi_errno);
 
             /* Notify device of communicator creation */
-            mpi_errno = MPID_Dev_comm_create_hook(comm->node_roots_comm);
+            mpi_errno = MPID_Comm_create_hook(comm->node_roots_comm);
             if (mpi_errno)
                 MPIR_ERR_POP(mpi_errno);
             /* don't call MPIR_Comm_commit here */
@@ -953,7 +953,7 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr)
 
         /* Notify the device that the communicator is about to be
          * destroyed */
-        mpi_errno = MPID_Dev_comm_destroy_hook(comm_ptr);
+        mpi_errno = MPID_Comm_free_hook(comm_ptr);
         if (mpi_errno)
             MPIR_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 7b05e75..926612e 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -163,8 +163,8 @@ typedef union {
  * by the channel instance.
  */
 
-#define MPID_Dev_comm_create_hook(comm_) MPIDI_CH3I_Comm_create_hook(comm_)
-#define MPID_Dev_comm_destroy_hook(comm_) MPIDI_CH3I_Comm_destroy_hook(comm_)
+#define MPID_Comm_create_hook(comm_) MPIDI_CH3I_Comm_create_hook(comm_)
+#define MPID_Comm_free_hook(comm_) MPIDI_CH3I_Comm_destroy_hook(comm_)
 
 #ifndef HAVE_MPIDI_VCRT
 #define HAVE_MPIDI_VCRT
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index ac38034..a24d350 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -301,7 +301,7 @@ static int MPIDI_CH3I_Initialize_tmp_comm(MPIR_Comm **comm_pptr,
     /* Even though this is a tmp comm and we don't call
        MPI_Comm_commit, we still need to call the creation hook
        because the destruction hook will be called in comm_release */
-    mpi_errno = MPID_Dev_comm_create_hook(tmp_comm);
+    mpi_errno = MPID_Comm_create_hook(tmp_comm);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     
     *comm_pptr = tmp_comm;
diff --git a/src/mpid/ch4/include/mpidch4.h b/src/mpid/ch4/include/mpidch4.h
index 8110d81..7c408bd 100644
--- a/src/mpid/ch4/include/mpidch4.h
+++ b/src/mpid/ch4/include/mpidch4.h
@@ -374,8 +374,6 @@ __CH4_INLINE__ int MPIDI_CH4_rank_is_local(int rank, MPIR_Comm * comm);
 #define MPID_GPID_ToLpidArray            MPIDI_GPID_ToLpidArray
 #define MPID_Create_intercomm_from_lpids MPIDI_Create_intercomm_from_lpids
 /* Variables */
-#define MPID_Comm_create                 MPIDI_Comm_create
-#define MPID_Comm_destroy                MPIDI_Comm_destroy
 #define MPID_Barrier                     MPIDI_Barrier
 #define MPID_Bcast                       MPIDI_Bcast
 #define MPID_Allreduce                   MPIDI_Allreduce
diff --git a/src/mpid/ch4/include/mpidpre.h b/src/mpid/ch4/include/mpidpre.h
index 6fdd3f8..9990fb1 100644
--- a/src/mpid/ch4/include/mpidpre.h
+++ b/src/mpid/ch4/include/mpidpre.h
@@ -435,14 +435,14 @@ extern MPIDII_av_table_t *MPIDII_av_table0;
 #define MPID_Progress_deactivate_hook(id_) MPID_Progress_deactivate(id_)
 
 #define HAVE_DEV_COMM_HOOK
-#define MPID_Dev_comm_create_hook(a)  (MPID_Comm_create(a))
-#define MPID_Dev_comm_destroy_hook(a) (MPID_Comm_destroy(a))
+#define MPID_Comm_create_hook   MPIDI_Comm_create_hook
+#define MPID_Comm_free_hook     MPIDI_Comm_free_hook
 
-#define MPID_Dev_datatype_commit_hook   MPIDI_NM_datatype_commit
-#define MPID_Dev_datatype_destroy_hook  MPIDI_NM_datatype_destroy
+#define MPID_Type_create_hook   MPIDI_Type_create_hook
+#define MPID_Type_free_hook     MPIDI_Type_free_hook
 
-#define MPID_Dev_op_commit_hook          MPIDI_NM_op_commit
-#define MPID_Dev_op_destroy_hook         MPIDI_NM_op_destroy
+#define MPID_Op_create_hook     MPIDI_Op_create_hook
+#define MPID_Op_free_hook       MPIDI_Op_free_hook
 
 /* operation for (avtid, lpid) to/from "lpid64" */
 /* hard code limit on number of live comm worlds. This should be fixed by future
diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index 6a5cbc3..1225705 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -82,8 +82,8 @@ typedef int (*MPIDI_NM_getallincomm_t) (MPIR_Comm * comm_ptr, int local_size,
 typedef int (*MPIDI_NM_gpid_tolpidarray_t) (int size, MPIR_Gpid gpid[], int lpid[]);
 typedef int (*MPIDI_NM_create_intercomm_from_lpids_t) (MPIR_Comm * newcomm_ptr, int size,
                                                        const int lpids[]);
-typedef int (*MPIDI_NM_comm_create_t) (MPIR_Comm * comm);
-typedef int (*MPIDI_NM_comm_destroy_t) (MPIR_Comm * comm);
+typedef int (*MPIDI_NM_comm_create_hook_t) (MPIR_Comm * comm);
+typedef int (*MPIDI_NM_comm_free_hook_t) (MPIR_Comm * comm);
 typedef void (*MPIDI_NM_am_request_init_t) (MPIR_Request * req);
 typedef void (*MPIDI_NM_am_request_finalize_t) (MPIR_Request * req);
 typedef int (*MPIDI_NM_send_t) (const void *buf, int count, MPI_Datatype datatype, int rank,
@@ -350,12 +350,12 @@ typedef int (*MPIDI_NM_iscatterv_t) (const void *sendbuf, const int *sendcounts,
                                      MPI_Datatype sendtype, void *recvbuf, int recvcount,
                                      MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr,
                                      MPI_Request * req);
-typedef void (*MPIDI_NM_datatype_commit_t) (MPIR_Datatype * datatype_p);
-typedef void (*MPIDI_NM_datatype_dup_t) (MPIR_Datatype * old_datatype_p,
-                                         MPIR_Datatype * new_datatype_p);
-typedef void (*MPIDI_NM_datatype_destroy_t) (MPIR_Datatype * datatype_p);
-typedef void (*MPIDI_NM_op_commit_t) (MPIR_Op * op_p);
-typedef void (*MPIDI_NM_op_destroy_t) (MPIR_Op * op_p);
+typedef void (*MPIDI_NM_type_dup_hook_t) (MPIR_Datatype * old_datatype_p,
+                                          MPIR_Datatype * new_datatype_p);
+typedef int (*MPIDI_NM_type_create_hook_t) (MPIR_Datatype * datatype_p);
+typedef int (*MPIDI_NM_type_free_hook_t) (MPIR_Datatype * datatype_p);
+typedef int (*MPIDI_NM_op_create_hook_t) (MPIR_Op * op_p);
+typedef int (*MPIDI_NM_op_free_hook_t) (MPIR_Op * op_p);
 
 typedef struct MPIDI_NM_funcs {
     MPIDI_NM_init_t init;
@@ -372,8 +372,8 @@ typedef struct MPIDI_NM_funcs {
     MPIDI_NM_getallincomm_t getallincomm;
     MPIDI_NM_gpid_tolpidarray_t gpid_tolpidarray;
     MPIDI_NM_create_intercomm_from_lpids_t create_intercomm_from_lpids;
-    MPIDI_NM_comm_create_t comm_create;
-    MPIDI_NM_comm_destroy_t comm_destroy;
+    MPIDI_NM_comm_create_hook_t comm_create_hook;
+    MPIDI_NM_comm_free_hook_t comm_free_hook;
     /* Request allocation routines */
     MPIDI_NM_am_request_init_t am_request_init;
     MPIDI_NM_am_request_finalize_t am_request_finalize;
@@ -494,12 +494,12 @@ typedef struct MPIDI_NM_native_funcs {
     MPIDI_NM_iscatter_t iscatter;
     MPIDI_NM_iscatterv_t iscatterv;
     /* Datatype hooks */
-    MPIDI_NM_datatype_commit_t datatype_commit;
-    MPIDI_NM_datatype_dup_t datatype_dup;
-    MPIDI_NM_datatype_destroy_t datatype_destroy;
+    MPIDI_NM_type_create_hook_t type_create_hook;
+    MPIDI_NM_type_dup_hook_t type_dup_hook;
+    MPIDI_NM_type_free_hook_t type_free_hook;
     /* Op hooks */
-    MPIDI_NM_op_commit_t op_commit;
-    MPIDI_NM_op_destroy_t op_destroy;
+    MPIDI_NM_op_create_hook_t op_create_hook;
+    MPIDI_NM_op_free_hook_t op_free_hook;
 } MPIDI_NM_native_funcs_t;
 
 extern MPIDI_NM_funcs_t *MPIDI_NM_funcs[];
@@ -592,8 +592,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * ne
                                                                   int size,
                                                                   const int lpids[])
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create_hook(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_free_hook(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request *
                                                            req) MPL_STATIC_INLINE_SUFFIX;
@@ -1004,14 +1004,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *
                                                 MPI_Datatype recvtype, int root,
                                                 MPIR_Comm * comm_ptr,
                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype *
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                                     MPIR_Datatype *
+                                                     new_datatype_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_type_create_hook(MPIR_Datatype *
                                                        datatype_p) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                                    MPIR_Datatype *
-                                                    new_datatype_p) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype *
-                                                        datatype_p) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_type_free_hook(MPIR_Datatype *
+                                                     datatype_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_op_create_hook(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_op_free_hook(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
 
 #endif
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index 5c3f221..7b50bfb 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -189,14 +189,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * ne
     return MPIDI_NM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create_hook(MPIR_Comm * comm)
 {
-    return MPIDI_NM_func->comm_create(comm);
+    return MPIDI_NM_func->comm_create_hook(comm);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_free_hook(MPIR_Comm * comm)
 {
-    return MPIDI_NM_func->comm_destroy(comm);
+    return MPIDI_NM_func->comm_free_hook(comm);
 };
 
 MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req)
@@ -998,30 +998,30 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *
                                            recvcount, recvtype, root, comm_ptr, req);
 };
 
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                                     MPIR_Datatype * new_datatype_p)
 {
-    return MPIDI_NM_native_func->datatype_commit(datatype_p);
+    return MPIDI_NM_native_func->type_dup_hook(old_datatype_p, new_datatype_p);
 };
 
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                                    MPIR_Datatype * new_datatype_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_type_create_hook(MPIR_Datatype * datatype_p)
 {
-    return MPIDI_NM_native_func->datatype_dup(old_datatype_p, new_datatype_p);
+    return MPIDI_NM_native_func->type_create_hook(datatype_p);
 };
 
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_type_free_hook(MPIR_Datatype * datatype_p)
 {
-    return MPIDI_NM_native_func->datatype_destroy(datatype_p);
+    return MPIDI_NM_native_func->type_free_hook(datatype_p);
 };
 
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_op_create_hook(MPIR_Op * op_p)
 {
-    return MPIDI_NM_native_func->op_commit(op_p);
+    return MPIDI_NM_native_func->op_create_hook(op_p);
 };
 
-MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_op_free_hook(MPIR_Op * op_p)
 {
-    return MPIDI_NM_native_func->op_destroy(op_p);
+    return MPIDI_NM_native_func->op_free_hook(op_p);
 };
 
 #endif /* NETMOD_DISABLE_INLINES  */
diff --git a/src/mpid/ch4/netmod/ofi/func_table.c b/src/mpid/ch4/netmod/ofi/func_table.c
index f8a54a4..dff22ff 100644
--- a/src/mpid/ch4/netmod/ofi/func_table.c
+++ b/src/mpid/ch4/netmod/ofi/func_table.c
@@ -27,8 +27,8 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
-    MPIDI_NM_comm_create,
-    MPIDI_NM_comm_destroy,
+    MPIDI_NM_comm_create_hook,
+    MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_reg_hdr_handler,
@@ -145,10 +145,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ofi_funcs = {
     MPIDI_NM_iscan,
     MPIDI_NM_iscatter,
     MPIDI_NM_iscatterv,
-    MPIDI_NM_datatype_commit,
-    MPIDI_NM_datatype_dup,
-    MPIDI_NM_datatype_destroy,
-    MPIDI_NM_op_commit,
-    MPIDI_NM_op_destroy,
+    MPIDI_NM_type_create_hook,
+    MPIDI_NM_type_dup_hook,
+    MPIDI_NM_type_free_hook,
+    MPIDI_NM_op_create_hook,
+    MPIDI_NM_op_free_hook,
 };
 #endif
diff --git a/src/mpid/ch4/netmod/ofi/ofi_comm.h b/src/mpid/ch4/netmod/ofi/ofi_comm.h
index 9f540c9..bf17dab 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_comm.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_comm.h
@@ -15,10 +15,10 @@
 #include "mpl_utlist.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_create
+#define FUNCNAME MPIDI_NM_comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_COMM_CREATE);
@@ -42,10 +42,10 @@ static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_destroy
+#define FUNCNAME MPIDI_NM_comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_OFI_COMM_DESTROY);
diff --git a/src/mpid/ch4/netmod/ofi/ofi_datatype.h b/src/mpid/ch4/netmod/ofi/ofi_datatype.h
index 37ddc69..8e110ca 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_datatype.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_datatype.h
@@ -13,18 +13,18 @@
 
 #include "ofi_impl.h"
 
-static inline void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_free_hook(MPIR_Datatype * datatype_p)
 {
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_create_hook(MPIR_Datatype * datatype_p)
 {
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                         MPIR_Datatype * new_datatype_p)
+static inline void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                          MPIR_Datatype * new_datatype_p)
 {
     return;
 }
diff --git a/src/mpid/ch4/netmod/ofi/ofi_op.h b/src/mpid/ch4/netmod/ofi/ofi_op.h
index 7666d25..7fb4904 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_op.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_op.h
@@ -13,14 +13,14 @@
 
 #include "ofi_impl.h"
 
-static inline void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_free_hook(MPIR_Op * op_p)
 {
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_op_commit(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_create_hook(MPIR_Op * op_p)
 {
-    return;
+    return 0;
 }
 
 
diff --git a/src/mpid/ch4/netmod/portals4/func_table.c b/src/mpid/ch4/netmod/portals4/func_table.c
index c6e9334..4511394 100644
--- a/src/mpid/ch4/netmod/portals4/func_table.c
+++ b/src/mpid/ch4/netmod/portals4/func_table.c
@@ -27,8 +27,8 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
-    MPIDI_NM_comm_create,
-    MPIDI_NM_comm_destroy,
+    MPIDI_NM_comm_create_hook,
+    MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_reg_hdr_handler,
@@ -145,10 +145,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_portals4_funcs = {
     MPIDI_NM_iscan,
     MPIDI_NM_iscatter,
     MPIDI_NM_iscatterv,
-    MPIDI_NM_datatype_commit,
-    MPIDI_NM_datatype_dup,
-    MPIDI_NM_datatype_destroy,
-    MPIDI_NM_op_commit,
-    MPIDI_NM_op_destroy
+    MPIDI_NM_type_create_hook,
+    MPIDI_NM_type_dup_hook,
+    MPIDI_NM_type_free_hook,
+    MPIDI_NM_op_create_hook,
+    MPIDI_NM_op_free_hook
 };
 #endif
diff --git a/src/mpid/ch4/netmod/portals4/ptl_comm.h b/src/mpid/ch4/netmod/portals4/ptl_comm.h
index 651ab1f..4edbcd9 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_comm.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_comm.h
@@ -14,10 +14,10 @@
 #include "ptl_impl.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_create
+#define FUNCNAME MPIDI_NM_comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     mpi_errno = MPIDI_CH4U_init_comm(comm);
@@ -25,10 +25,10 @@ static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_destroy
+#define FUNCNAME MPIDI_NM_comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     mpi_errno = MPIDI_CH4U_destroy_comm(comm);
diff --git a/src/mpid/ch4/netmod/portals4/ptl_datatype.h b/src/mpid/ch4/netmod/portals4/ptl_datatype.h
index 3e529d6..679a48b 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_datatype.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_datatype.h
@@ -9,18 +9,18 @@
 
 #include "ptl_impl.h"
 
-static inline void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_free_hook(MPIR_Datatype * datatype_p)
 {
     return;
 }
 
-static inline void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_create_hook(MPIR_Datatype * datatype_p)
 {
     return;
 }
 
-static inline void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                         MPIR_Datatype * new_datatype_p)
+static inline void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                          MPIR_Datatype * new_datatype_p)
 {
     return;
 }
diff --git a/src/mpid/ch4/netmod/portals4/ptl_op.h b/src/mpid/ch4/netmod/portals4/ptl_op.h
index a202468..a79ad6e 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_op.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_op.h
@@ -9,16 +9,16 @@
 
 #include "ptl_impl.h"
 
-static inline void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_free_hook(MPIR_Op * op_p)
 {
     MPIR_Assert(0);
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_op_commit(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_create_hook(MPIR_Op * op_p)
 {
     MPIR_Assert(0);
-    return;
+    return 0;
 }
 
 #endif /* NETMOD_PTL_OP_H_INCLUDED */
diff --git a/src/mpid/ch4/netmod/stubnm/globals.c b/src/mpid/ch4/netmod/stubnm/globals.c
index 9642082..b886803 100644
--- a/src/mpid/ch4/netmod/stubnm/globals.c
+++ b/src/mpid/ch4/netmod/stubnm/globals.c
@@ -27,8 +27,8 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
-    MPIDI_NM_comm_create,
-    MPIDI_NM_comm_destroy,
+    MPIDI_NM_comm_create_hook,
+    MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_reg_hdr_handler,
@@ -145,10 +145,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_stubnm_funcs = {
     MPIDI_NM_iscan,
     MPIDI_NM_iscatter,
     MPIDI_NM_iscatterv,
-    MPIDI_NM_datatype_commit,
-    MPIDI_NM_datatype_dup,
-    MPIDI_NM_datatype_destroy,
-    MPIDI_NM_op_commit,
-    MPIDI_NM_op_destroy,
+    MPIDI_NM_type_create_hook,
+    MPIDI_NM_type_dup_hook,
+    MPIDI_NM_type_free_hook,
+    MPIDI_NM_op_create_hook,
+    MPIDI_NM_op_free_hook,
 };
 #endif
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_comm.h b/src/mpid/ch4/netmod/stubnm/stubnm_comm.h
index 3188e94..da5ef9a 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_comm.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_comm.h
@@ -14,10 +14,10 @@
 #include "stubnm_impl.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_create
+#define FUNCNAME MPIDI_NM_comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Assert(0);
@@ -25,10 +25,10 @@ static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_destroy
+#define FUNCNAME MPIDI_NM_comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_datatype.h b/src/mpid/ch4/netmod/stubnm/stubnm_datatype.h
index 877009b..323aa6d 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_datatype.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_datatype.h
@@ -13,20 +13,20 @@
 
 #include "stubnm_impl.h"
 
-static inline void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_free_hook(MPIR_Datatype * datatype_p)
 {
     MPIR_Assert(0);
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_create_hook(MPIR_Datatype * datatype_p)
 {
     MPIR_Assert(0);
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                         MPIR_Datatype * new_datatype_p)
+static inline void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                          MPIR_Datatype * new_datatype_p)
 {
     MPIR_Assert(0);
     return;
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_op.h b/src/mpid/ch4/netmod/stubnm/stubnm_op.h
index ae4eade..3c37b0d 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_op.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_op.h
@@ -13,13 +13,13 @@
 
 #include "stubnm_impl.h"
 
-static inline void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_free_hook(MPIR_Op * op_p)
 {
     MPIR_Assert(0);
     return;
 }
 
-static inline void MPIDI_NM_op_commit(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_create_hook(MPIR_Op * op_p)
 {
     MPIR_Assert(0);
     return;
diff --git a/src/mpid/ch4/netmod/ucx/func_table.c b/src/mpid/ch4/netmod/ucx/func_table.c
index 4f60187..8bd03fb 100644
--- a/src/mpid/ch4/netmod/ucx/func_table.c
+++ b/src/mpid/ch4/netmod/ucx/func_table.c
@@ -25,8 +25,8 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
-    MPIDI_NM_comm_create,
-    MPIDI_NM_comm_destroy,
+    MPIDI_NM_comm_create_hook,
+    MPIDI_NM_comm_free_hook,
     MPIDI_NM_am_request_init,
     MPIDI_NM_am_request_finalize,
     MPIDI_NM_reg_hdr_handler,
@@ -143,10 +143,10 @@ MPIDI_NM_native_funcs_t MPIDI_NM_native_ucx_funcs = {
     MPIDI_NM_iscan,
     MPIDI_NM_iscatter,
     MPIDI_NM_iscatterv,
-    MPIDI_NM_datatype_commit,
-    MPIDI_NM_datatype_dup,
-    MPIDI_NM_datatype_destroy,
-    MPIDI_NM_op_commit,
-    MPIDI_NM_op_destroy
+    MPIDI_NM_type_create_hook,
+    MPIDI_NM_type_dup_hook,
+    MPIDI_NM_type_free_hook,
+    MPIDI_NM_op_create_hook,
+    MPIDI_NM_op_free_hook
 };
 #endif
diff --git a/src/mpid/ch4/netmod/ucx/ucx_comm.h b/src/mpid/ch4/netmod/ucx/ucx_comm.h
index b152c29..5b4368c 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_comm.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_comm.h
@@ -12,10 +12,10 @@
 #include "ucx_impl.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_create
+#define FUNCNAME MPIDI_NM_comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_COMM_CREATE);
@@ -29,10 +29,10 @@ static inline int MPIDI_NM_comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_comm_destroy
+#define FUNCNAME MPIDI_NM_comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_NM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_NETMOD_UCX_COMM_DESTROY);
diff --git a/src/mpid/ch4/netmod/ucx/ucx_datatype.h b/src/mpid/ch4/netmod/ucx/ucx_datatype.h
index 32f1df1..eb115f0 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_datatype.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_datatype.h
@@ -107,7 +107,7 @@ static ucp_generic_dt_ops_t MPIDI_UCX_datatype_ops = {
 };
 
 
-static inline void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_free_hook(MPIR_Datatype * datatype_p)
 {
 
 
@@ -116,10 +116,10 @@ static inline void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
         datatype_p->dev.netmod.ucx.ucp_datatype = -1;
     }
 
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+static inline int MPIDI_NM_type_create_hook(MPIR_Datatype * datatype_p)
 {
     ucp_datatype_t ucp_datatype;
     ucs_status_t status;
@@ -138,11 +138,11 @@ static inline void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
 
     }
 
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                         MPIR_Datatype * new_datatype_p)
+static inline void MPIDI_NM_type_dup_hook(MPIR_Datatype * old_datatype_p,
+                                          MPIR_Datatype * new_datatype_p)
 {
     return;
 }
diff --git a/src/mpid/ch4/netmod/ucx/ucx_op.h b/src/mpid/ch4/netmod/ucx/ucx_op.h
index ac10797..fb58231 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_op.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_op.h
@@ -11,14 +11,14 @@
 
 #include "ucx_impl.h"
 
-static inline void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_free_hook(MPIR_Op * op_p)
 {
-    return;
+    return 0;
 }
 
-static inline void MPIDI_NM_op_commit(MPIR_Op * op_p)
+static inline int MPIDI_NM_op_create_hook(MPIR_Op * op_p)
 {
-    return;
+    return 0;
 }
 
 #endif /* NETMOD_UCX_OP_H_INCLUDED */
diff --git a/src/mpid/ch4/netmod/ucx/ucx_pre.h b/src/mpid/ch4/netmod/ucx/ucx_pre.h
index 9779a4d..84e99c8 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_pre.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_pre.h
@@ -11,8 +11,8 @@
 
 #include <ucp/api/ucp.h>
 
-#define HAVE_MPIDI_NM_datatype_commit_hook
-#define HAVE_MPIDI_NM_datatype_destroy_hook
+#define HAVE_MPIDI_NM_type_create_hook
+#define HAVE_MPIDI_NM_type_free_hook
 
 #define MPIDI_UCX_KVSAPPSTRLEN 4096
 
diff --git a/src/mpid/ch4/shm/include/shm.h b/src/mpid/ch4/shm/include/shm.h
index 0ef4704..11acade 100644
--- a/src/mpid/ch4/shm/include/shm.h
+++ b/src/mpid/ch4/shm/include/shm.h
@@ -93,8 +93,12 @@ typedef int (*MPIDI_SHM_getallincomm_t) (MPIR_Comm * comm_ptr, int local_size,
 typedef int (*MPIDI_SHM_gpid_tolpidarray_t) (int size, MPIR_Gpid gpid[], int lpid[]);
 typedef int (*MPIDI_SHM_create_intercomm_from_lpids_t) (MPIR_Comm * newcomm_ptr, int size,
                                                         const int lpids[]);
-typedef int (*MPIDI_SHM_comm_create_t) (MPIR_Comm * comm);
-typedef int (*MPIDI_SHM_comm_destroy_t) (MPIR_Comm * comm);
+typedef int (*MPIDI_SHM_comm_create_hook_t) (MPIR_Comm * comm);
+typedef int (*MPIDI_SHM_comm_free_hook_t) (MPIR_Comm * comm);
+typedef int (*MPIDI_SHM_type_create_hook_t) (MPIR_Datatype * type);
+typedef int (*MPIDI_SHM_type_free_hook_t) (MPIR_Datatype * type);
+typedef int (*MPIDI_SHM_op_create_hook_t) (MPIR_Op * op);
+typedef int (*MPIDI_SHM_op_free_hook_t) (MPIR_Op * op);
 typedef void (*MPIDI_SHM_am_request_init_t) (MPIR_Request * req);
 typedef void (*MPIDI_SHM_am_request_finalize_t) (MPIR_Request * req);
 typedef int (*MPIDI_SHM_send_t) (const void *buf, int count, MPI_Datatype datatype, int rank,
@@ -401,8 +405,12 @@ typedef struct MPIDI_SHM_funcs {
     MPIDI_SHM_getallincomm_t getallincomm;
     MPIDI_SHM_gpid_tolpidarray_t gpid_tolpidarray;
     MPIDI_SHM_create_intercomm_from_lpids_t create_intercomm_from_lpids;
-    MPIDI_SHM_comm_create_t comm_create;
-    MPIDI_SHM_comm_destroy_t comm_destroy;
+    MPIDI_SHM_comm_create_hook_t comm_create_hook;
+    MPIDI_SHM_comm_free_hook_t comm_free_hook;
+    MPIDI_SHM_type_create_hook_t type_create_hook;
+    MPIDI_SHM_type_free_hook_t type_free_hook;
+    MPIDI_SHM_op_create_hook_t op_create_hook;
+    MPIDI_SHM_op_free_hook_t op_free_hook;
     /* Request allocation routines */
     MPIDI_SHM_am_request_init_t am_request_init;
     MPIDI_SHM_am_request_finalize_t am_request_finalize;
@@ -622,8 +630,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * n
                                                                    int size,
                                                                    const int lpids[])
     MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create_hook(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_free_hook(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_type_create_hook(MPIR_Datatype *
+                                                        type) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_type_free_hook(MPIR_Datatype *
+                                                      type) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_op_create_hook(MPIR_Op * op) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_op_free_hook(MPIR_Op * op) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request *
                                                         req) MPL_STATIC_INLINE_SUFFIX;
 MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request *
diff --git a/src/mpid/ch4/shm/include/shm_impl.h b/src/mpid/ch4/shm/include/shm_impl.h
index 34d6038..d1125cf 100644
--- a/src/mpid/ch4/shm/include/shm_impl.h
+++ b/src/mpid/ch4/shm/include/shm_impl.h
@@ -231,14 +231,34 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * n
     return MPIDI_SHM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create_hook(MPIR_Comm * comm)
 {
-    return MPIDI_SHM_func->comm_create(comm);
+    return MPIDI_SHM_func->comm_create_hook(comm);
 };
 
-MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_free_hook(MPIR_Comm * comm)
 {
-    return MPIDI_SHM_func->comm_destroy(comm);
+    return MPIDI_SHM_func->comm_free_hook(comm);
+};
+
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_type_create_hook(MPIR_Datatype * type)
+{
+    return MPIDI_SHM_func->type_create_hook(type);
+};
+
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_type_free_hook(MPIR_Datatype * type)
+{
+    return MPIDI_SHM_func->type_free_hook(type);
+};
+
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_op_create_hook(MPIR_Op * op)
+{
+    return MPIDI_SHM_func->op_create_hook(op);
+};
+
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_op_free_hook(MPIR_Op * op)
+{
+    return MPIDI_SHM_func->op_free_hook(op);
 };
 
 MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request * req)
diff --git a/src/mpid/ch4/shm/posix/func_table.c b/src/mpid/ch4/shm/posix/func_table.c
index 9b8a049..39f2ea5 100644
--- a/src/mpid/ch4/shm/posix/func_table.c
+++ b/src/mpid/ch4/shm/posix/func_table.c
@@ -44,8 +44,12 @@ MPIDI_SHM_funcs_t MPIDI_SHM_posix_funcs = {
     MPIDI_SHM_getallincomm,
     MPIDI_SHM_gpid_tolpidarray,
     MPIDI_SHM_create_intercomm_from_lpids,
-    MPIDI_SHM_comm_create,
-    MPIDI_SHM_comm_destroy,
+    MPIDI_SHM_comm_create_hook,
+    MPIDI_SHM_comm_free_hook,
+    MPIDI_SHM_type_create_hook,
+    MPIDI_SHM_type_free_hook,
+    MPIDI_SHM_op_create_hook,
+    MPIDI_SHM_op_free_hook,
     MPIDI_SHM_am_request_init,
 };
 
diff --git a/src/mpid/ch4/shm/posix/posix_comm.h b/src/mpid/ch4/shm/posix/posix_comm.h
index 336cd74..0aaf6ef 100644
--- a/src/mpid/ch4/shm/posix/posix_comm.h
+++ b/src/mpid/ch4/shm/posix/posix_comm.h
@@ -14,10 +14,10 @@
 #include "mpl_utlist.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_SHM_comm_create
+#define FUNCNAME MPIDI_SHM_comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_SHM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_SHM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_COMM_CREATE);
@@ -28,10 +28,10 @@ static inline int MPIDI_SHM_comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_SHM_comm_destroy
+#define FUNCNAME MPIDI_SHM_comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int MPIDI_SHM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_SHM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_COMM_DESTROY);
diff --git a/src/mpid/ch4/shm/posix/posix_init.h b/src/mpid/ch4/shm/posix/posix_init.h
index 30723a6..c07cbb9 100644
--- a/src/mpid/ch4/shm/posix/posix_init.h
+++ b/src/mpid/ch4/shm/posix/posix_init.h
@@ -321,4 +321,60 @@ static inline int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
     return MPI_SUCCESS;
 }
 
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_type_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_type_create_hook(MPIR_Datatype * type)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_type_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_type_free_hook(MPIR_Datatype * type)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_FREE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_FREE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_op_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_op_create_hook(MPIR_Op * op)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_CREATE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_CREATE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_op_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_op_free_hook(MPIR_Op * op)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_FREE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_FREE_HOOK);
+    return mpi_errno;
+}
+
 #endif /* SHM_POSIX_INIT_H_INCLUDED */
diff --git a/src/mpid/ch4/shm/stubshm/func_table.c b/src/mpid/ch4/shm/stubshm/func_table.c
index 1244e17..264b179 100644
--- a/src/mpid/ch4/shm/stubshm/func_table.c
+++ b/src/mpid/ch4/shm/stubshm/func_table.c
@@ -44,8 +44,12 @@ MPIDI_SHM_funcs_t MPIDI_SHM_stubshm_funcs = {
     MPIDI_SHM_getallincomm,
     MPIDI_SHM_gpid_tolpidarray,
     MPIDI_SHM_create_intercomm_from_lpids,
-    MPIDI_SHM_comm_create,
-    MPIDI_SHM_comm_destroy,
+    MPIDI_SHM_comm_create_hook,
+    MPIDI_SHM_comm_free_hook,
+    MPIDI_SHM_type_create_hook,
+    MPIDI_SHM_type_free_hook,
+    MPIDI_SHM_op_create_hook,
+    MPIDI_SHM_op_free_hook,
     MPIDI_SHM_am_request_init,
 };
 
diff --git a/src/mpid/ch4/shm/stubshm/stubshm_comm.h b/src/mpid/ch4/shm/stubshm/stubshm_comm.h
index db0b3a6..99ae077 100644
--- a/src/mpid/ch4/shm/stubshm/stubshm_comm.h
+++ b/src/mpid/ch4/shm/stubshm/stubshm_comm.h
@@ -11,14 +11,14 @@
 #define SHM_STUBSHM_COMM_H_INCLUDED
 
 #include "stubshm_impl.h"
-static inline int MPIDI_SHM_comm_create(MPIR_Comm * comm)
+static inline int MPIDI_SHM_comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Assert(0);
     return mpi_errno;
 }
 
-static inline int MPIDI_SHM_comm_destroy(MPIR_Comm * comm)
+static inline int MPIDI_SHM_comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/shm/stubshm/stubshm_init.h b/src/mpid/ch4/shm/stubshm/stubshm_init.h
index cfe95fe..f101951 100644
--- a/src/mpid/ch4/shm/stubshm/stubshm_init.h
+++ b/src/mpid/ch4/shm/stubshm/stubshm_init.h
@@ -82,4 +82,60 @@ static inline int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
     return MPI_SUCCESS;
 }
 
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_type_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_type_create_hook(MPIR_Datatype * type)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_CREATE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_type_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_type_free_hook(MPIR_Datatype * type)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_TYPE_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_TYPE_FREE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_TYPE_FREE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_op_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_op_create_hook(MPIR_Op * op)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_CREATE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_CREATE_HOOK);
+    return mpi_errno;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_op_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static inline int MPIDI_SHM_op_free_hook(MPIR_Op * op)
+{
+    int mpi_errno = MPI_SUCCESS;
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_SHM_OP_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_SHM_OP_FREE_HOOK);
+
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_SHM_OP_FREE_HOOK);
+    return mpi_errno;
+}
+
 #endif /* SHM_STUBSHM_INIT_H_INCLUDED */
diff --git a/src/mpid/ch4/src/ch4_comm.h b/src/mpid/ch4/src/ch4_comm.h
index 695566d..c5a9520 100644
--- a/src/mpid/ch4/src/ch4_comm.h
+++ b/src/mpid/ch4/src/ch4_comm.h
@@ -92,22 +92,22 @@ __CH4_INLINE__ int MPIDI_Comm_split_type(MPIR_Comm * comm_ptr,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_Comm_create
+#define FUNCNAME MPIDI_Comm_create_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_create(MPIR_Comm * comm)
+__CH4_INLINE__ int MPIDI_Comm_create_hook(MPIR_Comm * comm)
 {
     int mpi_errno;
     int i, *uniq_avtids;
     int max_n_avts;
     MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_CH4_COMM_CREATE);
     MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_CH4_COMM_CREATE);
-    mpi_errno = MPIDI_NM_comm_create(comm);
+    mpi_errno = MPIDI_NM_comm_create_hook(comm);
     if (mpi_errno != MPI_SUCCESS) {
         MPIR_ERR_POP(mpi_errno);
     }
 #if defined(MPIDI_BUILD_CH4_SHM)
-    mpi_errno = MPIDI_SHM_comm_create(comm);
+    mpi_errno = MPIDI_SHM_comm_create_hook(comm);
     if (mpi_errno != MPI_SUCCESS) {
         MPIR_ERR_POP(mpi_errno);
     }
@@ -164,10 +164,10 @@ __CH4_INLINE__ int MPIDI_Comm_create(MPIR_Comm * comm)
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_Comm_destroy
+#define FUNCNAME MPIDI_Comm_free_hook
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-__CH4_INLINE__ int MPIDI_Comm_destroy(MPIR_Comm * comm)
+__CH4_INLINE__ int MPIDI_Comm_free_hook(MPIR_Comm * comm)
 {
     int mpi_errno;
     int i, *uniq_avtids;
@@ -213,12 +213,12 @@ __CH4_INLINE__ int MPIDI_Comm_destroy(MPIR_Comm * comm)
         MPIDIU_avt_release_ref(MPIDII_COMM(comm, local_map).avtid);
     }
 
-    mpi_errno = MPIDI_NM_comm_destroy(comm);
+    mpi_errno = MPIDI_NM_comm_free_hook(comm);
     if (mpi_errno != MPI_SUCCESS) {
         MPIR_ERR_POP(mpi_errno);
     }
 #if defined(MPIDI_BUILD_CH4_SHM)
-    mpi_errno = MPIDI_SHM_comm_destroy(comm);
+    mpi_errno = MPIDI_SHM_comm_free_hook(comm);
     if (mpi_errno != MPI_SUCCESS) {
         MPIR_ERR_POP(mpi_errno);
     }
diff --git a/src/mpid/ch4/src/ch4_init.h b/src/mpid/ch4/src/ch4_init.h
index c26db6b..2365b85 100644
--- a/src/mpid/ch4/src/ch4_init.h
+++ b/src/mpid/ch4/src/ch4_init.h
@@ -748,4 +748,124 @@ __CH4_INLINE__ MPI_Aint MPIDI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
     return result;
 }
 
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Type_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+__CH4_INLINE__ int MPIDI_Type_create_hook(MPIR_Datatype * type)
+{
+    int mpi_errno;
+
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_CREATE_HOOK);
+
+    mpi_errno = MPIDI_NM_type_create_hook(type);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+
+#if defined(MPIDI_BUILD_CH4_SHM)
+    mpi_errno = MPIDI_SHM_type_create_hook(type);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+#endif
+
+  fn_exit:
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_CREATE_HOOK);
+    return mpi_errno;
+  fn_fail:
+    goto fn_exit;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Type_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+__CH4_INLINE__ int MPIDI_Type_free_hook(MPIR_Datatype * type)
+{
+    int mpi_errno;
+
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_TYPE_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_TYPE_FREE_HOOK);
+
+    mpi_errno = MPIDI_NM_type_free_hook(type);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+
+#if defined(MPIDI_BUILD_CH4_SHM)
+    mpi_errno = MPIDI_SHM_type_free_hook(type);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+#endif
+
+  fn_exit:
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_TYPE_FREE_HOOK);
+    return mpi_errno;
+  fn_fail:
+    goto fn_exit;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Op_create_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+__CH4_INLINE__ int MPIDI_Op_create_hook(MPIR_Op * op)
+{
+    int mpi_errno;
+
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_CREATE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_CREATE_HOOK);
+
+    mpi_errno = MPIDI_NM_op_create_hook(op);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+
+#if defined(MPIDI_BUILD_CH4_SHM)
+    mpi_errno = MPIDI_SHM_op_create_hook(op);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+#endif
+
+  fn_exit:
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_CREATE_HOOK);
+    return mpi_errno;
+  fn_fail:
+    goto fn_exit;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Op_free_hook
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+__CH4_INLINE__ int MPIDI_Op_free_hook(MPIR_Op * op)
+{
+    int mpi_errno;
+
+    MPIR_FUNC_VERBOSE_STATE_DECL(MPID_STATE_MPIDI_OP_FREE_HOOK);
+    MPIR_FUNC_VERBOSE_ENTER(MPID_STATE_MPIDI_OP_FREE_HOOK);
+
+    mpi_errno = MPIDI_NM_op_free_hook(op);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+
+#if defined(MPIDI_BUILD_CH4_SHM)
+    mpi_errno = MPIDI_SHM_op_free_hook(op);
+    if (mpi_errno != MPI_SUCCESS) {
+        MPIR_ERR_POP(mpi_errno);
+    }
+#endif
+
+  fn_exit:
+    MPIR_FUNC_VERBOSE_EXIT(MPID_STATE_MPIDI_OP_FREE_HOOK);
+    return mpi_errno;
+  fn_fail:
+    goto fn_exit;
+}
+
 #endif /* CH4_INIT_H_INCLUDED */
diff --git a/src/mpid/common/datatype/mpidu_datatype_free.c b/src/mpid/common/datatype/mpidu_datatype_free.c
index 362973d..4527af4 100644
--- a/src/mpid/common/datatype/mpidu_datatype_free.c
+++ b/src/mpid/common/datatype/mpidu_datatype_free.c
@@ -37,9 +37,9 @@ void MPIDU_Datatype_free(MPIDU_Datatype *ptr)
 {
     MPL_DBG_MSG_P(MPIR_DBG_DATATYPE,VERBOSE,"type %x freed.", ptr->handle);
 
-#ifdef MPID_Dev_datatype_destroy_hook
-       MPID_Dev_datatype_destroy_hook(ptr);
-#endif /* MPID_Dev_datatype_destroy_hook */
+#ifdef MPID_Type_free_hook
+       MPID_Type_free_hook(ptr);
+#endif /* MPID_Type_free_hook */
 
     /* before freeing the contents, check whether the pointer is not
        null because it is null in the case of a datatype shipped to the target
diff --git a/src/mpid/common/datatype/mpidu_type_commit.c b/src/mpid/common/datatype/mpidu_type_commit.c
index a847ebf..c40f9e7 100644
--- a/src/mpid/common/datatype/mpidu_type_commit.c
+++ b/src/mpid/common/datatype/mpidu_type_commit.c
@@ -63,9 +63,9 @@ int MPIDU_Type_commit(MPI_Datatype *datatype_p)
         MPIDI_Dataloop_dot_printf(datatype_ptr->dataloop, 0, 1);
 #endif
 
-#ifdef MPID_Dev_datatype_commit_hook
-       MPID_Dev_datatype_commit_hook(datatype_ptr);
-#endif /* MPID_Dev_datatype_commit_hook */
+#ifdef MPID_Type_commit_hook
+       MPID_Type_commit_hook(datatype_ptr);
+#endif /* MPID_Type_commit_hook */
 
     }
     return mpi_errno;
diff --git a/src/mpid/common/datatype/mpidu_type_dup.c b/src/mpid/common/datatype/mpidu_type_dup.c
index 55e5155..baf7a5a 100644
--- a/src/mpid/common/datatype/mpidu_type_dup.c
+++ b/src/mpid/common/datatype/mpidu_type_dup.c
@@ -98,9 +98,9 @@ int MPIDU_Type_dup(MPI_Datatype oldtype,
 				  &new_dtp->hetero_dloop);
 	    }
 
-#ifdef MPID_Dev_datatype_commit_hook
-            MPID_Dev_datatype_commit_hook(new_dtp);
-#endif /* MPID_Dev_datatype_commit_hook */
+#ifdef MPID_Type_commit_hook
+            MPID_Type_commit_hook(new_dtp);
+#endif /* MPID_Type_commit_hook */
       }
     }
 
diff --git a/src/mpid/pamid/include/mpidi_hooks.h b/src/mpid/pamid/include/mpidi_hooks.h
index f636731..54e47af 100644
--- a/src/mpid/pamid/include/mpidi_hooks.h
+++ b/src/mpid/pamid/include/mpidi_hooks.h
@@ -59,8 +59,8 @@ typedef size_t              intptr_t;
 /** \brief This defines the portion of MPIR_Win that is specific to the Device */
 #define MPID_DEV_WIN_DECL        struct MPIDI_Win     mpid;
 
-#define MPID_Dev_comm_create_hook(a)  ({ int MPIDI_Comm_create (MPIR_Comm *comm); MPIDI_Comm_create (a); })
-#define MPID_Dev_comm_destroy_hook(a) ({ int MPIDI_Comm_destroy(MPIR_Comm *comm); MPIDI_Comm_destroy(a); })
+#define MPID_Comm_create_hook(a)  ({ int MPIDI_Comm_create (MPIR_Comm *comm); MPIDI_Comm_create (a); })
+#define MPID_Comm_free_hook(a) ({ int MPIDI_Comm_destroy(MPIR_Comm *comm); MPIDI_Comm_destroy(a); })
 
 
 #endif

http://git.mpich.org/mpich.git/commitdiff/6ff49c7d01617b757fc4b9450d74496aaf774d80

commit 6ff49c7d01617b757fc4b9450d74496aaf774d80
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 09:03:48 2016 -0500

    Move static inline macros to MPL.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index 6b79d06..6a5cbc3 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -509,612 +509,509 @@ extern MPIDI_NM_native_funcs_t *MPIDI_NM_native_func;
 extern int MPIDI_num_netmods;
 extern char MPIDI_NM_strings[][MPIDI_MAX_NETMOD_STRING_LEN];
 
-#ifndef MPIDI_NM_STATIC_INLINE_PREFIX
-#define MPIDI_NM_STATIC_INLINE_PREFIX __attribute__((always_inline)) static inline
-#endif
-
-#ifndef MPIDI_NM_STATIC_INLINE_SUFFIX
-#define MPIDI_NM_STATIC_INLINE_SUFFIX __attribute__((always_inline))
-#endif
-
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_init(int rank, int size, int appnum, int *tag_ub,
-                                                MPIR_Comm * comm_world, MPIR_Comm * comm_self,
-                                                int spawned, int num_contexts,
-                                                void **netmod_contexts)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_finalize(void) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context,
-                                                    int blocking) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                                           MPIDI_NM_am_origin_handler_fn
-                                                           origin_handler_fn,
-                                                           MPIDI_NM_am_target_handler_fn
-                                                           target_handler_fn)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
-                                                        int root, MPIR_Comm * comm,
-                                                        MPIR_Comm **
-                                                        newcomm_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_disconnect(MPIR_Comm *
-                                                           comm_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_open_port(MPIR_Info * info_ptr,
-                                                     char *port_name) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_close_port(const char *port_name)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_Info * info,
-                                                       int root, MPIR_Comm * comm,
-                                                       MPIR_Comm **
-                                                       newcomm_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                       const void *am_hdr, size_t am_hdr_sz,
-                                                       MPIR_Request * sreq,
-                                                       void *netmod_context)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                         const void *am_hdr, size_t am_hdr_sz,
-                                                         void *netmod_context)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
-                                                   const void *am_hdr, size_t am_hdr_sz,
-                                                   const void *data, MPI_Count count,
-                                                   MPI_Datatype datatype, MPIR_Request * sreq,
-                                                   void *netmod_context)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
-                                                    struct iovec *am_hdrs, size_t iov_len,
-                                                    const void *data, MPI_Count count,
-                                                    MPI_Datatype datatype, MPIR_Request * sreq,
-                                                    void *netmod_context)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                        struct iovec *am_hdrs, size_t iov_len,
-                                                        MPIR_Request * sreq,
-                                                        void *netmod_context)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                             int src_rank, int handler_id,
-                                                             const void *am_hdr, size_t am_hdr_sz,
-                                                             MPIR_Request *
-                                                             sreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                               int src_rank, int handler_id,
-                                                               const void *am_hdr,
-                                                               size_t am_hdr_sz)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                         int handler_id, const void *am_hdr,
-                                                         size_t am_hdr_sz, const void *data,
-                                                         MPI_Count count, MPI_Datatype datatype,
-                                                         MPIR_Request *
-                                                         sreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_init(int rank, int size, int appnum, int *tag_ub,
+                                           MPIR_Comm * comm_world, MPIR_Comm * comm_self,
+                                           int spawned, int num_contexts,
+                                           void **netmod_contexts) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_finalize(void) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context,
+                                               int blocking) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
+                                                      MPIDI_NM_am_origin_handler_fn
+                                                      origin_handler_fn,
+                                                      MPIDI_NM_am_target_handler_fn
+                                                      target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
+                                                   int root, MPIR_Comm * comm,
+                                                   MPIR_Comm **
+                                                   newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_disconnect(MPIR_Comm *
+                                                      comm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_open_port(MPIR_Info * info_ptr,
+                                                char *port_name) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_close_port(const char *port_name) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_Info * info,
+                                                  int root, MPIR_Comm * comm,
+                                                  MPIR_Comm **
+                                                  newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                  const void *am_hdr, size_t am_hdr_sz,
+                                                  MPIR_Request * sreq,
+                                                  void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                    const void *am_hdr, size_t am_hdr_sz,
+                                                    void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+                                              const void *am_hdr, size_t am_hdr_sz,
+                                              const void *data, MPI_Count count,
+                                              MPI_Datatype datatype, MPIR_Request * sreq,
+                                              void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                               struct iovec *am_hdrs, size_t iov_len,
+                                               const void *data, MPI_Count count,
+                                               MPI_Datatype datatype, MPIR_Request * sreq,
+                                               void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                   struct iovec *am_hdrs, size_t iov_len,
+                                                   MPIR_Request * sreq,
+                                                   void *netmod_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
+                                                        const void *am_hdr, size_t am_hdr_sz,
+                                                        MPIR_Request *
+                                                        sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
                                                           int src_rank, int handler_id,
-                                                          struct iovec *am_hdr, size_t iov_len,
-                                                          const void *data, MPI_Count count,
-                                                          MPI_Datatype datatype,
-                                                          MPIR_Request *
-                                                          sreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request *
-                                                   req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
-                                                         int *lpid_ptr,
-                                                         MPL_bool is_remote)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank,
-                                                    MPIR_Gpid * gpid) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
-                                                        MPIR_Gpid local_gpids[],
-                                                        int *singleAVT)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_tolpidarray(int size, MPIR_Gpid gpid[],
-                                                            int lpid[])
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
-                                                                       int size,
-                                                                       const int lpids[])
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm *
-                                                       comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm *
-                                                        comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request *
-                                                            req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request *
-                                                                req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send(const void *buf, int count, MPI_Datatype datatype,
+                                                          const void *am_hdr,
+                                                          size_t am_hdr_sz)
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+                                                    int handler_id, const void *am_hdr,
+                                                    size_t am_hdr_sz, const void *data,
+                                                    MPI_Count count, MPI_Datatype datatype,
+                                                    MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+                                                     int src_rank, int handler_id,
+                                                     struct iovec *am_hdr, size_t iov_len,
+                                                     const void *data, MPI_Count count,
+                                                     MPI_Datatype datatype,
+                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
+                                                    int *lpid_ptr,
+                                                    MPL_bool is_remote) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank,
+                                               MPIR_Gpid * gpid) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
+                                                   MPIR_Gpid local_gpids[],
+                                                   int *singleAVT) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_tolpidarray(int size, MPIR_Gpid gpid[],
+                                                       int lpid[]) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
+                                                                  int size,
+                                                                  const int lpids[])
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request *
+                                                           req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send(const void *buf, int count, MPI_Datatype datatype,
+                                           int rank, int tag, MPIR_Comm * comm,
+                                           int context_offset,
+                                           MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ssend(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_startall(int count,
+                                               MPIR_Request * requests[]) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_init(const void *buf, int count,
+                                                MPI_Datatype datatype, int rank, int tag,
+                                                MPIR_Comm * comm, int context_offset,
+                                                MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ssend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rsend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_bsend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_isend(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_issend(const void *buf, int count, MPI_Datatype datatype,
+                                             int rank, int tag, MPIR_Comm * comm,
+                                             int context_offset,
+                                             MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_send(MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_recv_init(void *buf, int count, MPI_Datatype datatype,
                                                 int rank, int tag, MPIR_Comm * comm,
                                                 int context_offset,
-                                                MPIR_Request **
-                                                request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ssend(const void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset,
-                                                 MPIR_Request **
-                                                 request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_startall(int count,
-                                                    MPIR_Request *
-                                                    requests[]) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_init(const void *buf, int count,
-                                                     MPI_Datatype datatype, int rank, int tag,
-                                                     MPIR_Comm * comm, int context_offset,
-                                                     MPIR_Request **
-                                                     request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ssend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request **
-                                                      request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_rsend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request **
-                                                      request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_bsend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request **
-                                                      request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_isend(const void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset,
-                                                 MPIR_Request **
-                                                 request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_issend(const void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset,
-                                                  MPIR_Request **
-                                                  request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_send(MPIR_Request *
-                                                       sreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_recv_init(void *buf, int count, MPI_Datatype datatype,
-                                                     int rank, int tag, MPIR_Comm * comm,
-                                                     int context_offset,
-                                                     MPIR_Request **
-                                                     request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_recv(void *buf, int count, MPI_Datatype datatype,
-                                                int rank, int tag, MPIR_Comm * comm,
-                                                int context_offset, MPI_Status * status,
-                                                MPIR_Request **
-                                                request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_irecv(void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset,
-                                                 MPIR_Request **
-                                                 request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_imrecv(void *buf, int count, MPI_Datatype datatype,
-                                                  MPIR_Request * message,
-                                                  MPIR_Request **
-                                                  rreqp) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_recv(MPIR_Request *
-                                                       rreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void *MPIDI_NM_alloc_mem(size_t size,
-                                                       MPIR_Info *
-                                                       info_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_free_mem(void *ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_improbe(int source, int tag, MPIR_Comm * comm,
-                                                   int context_offset, int *flag,
-                                                   MPIR_Request ** message,
-                                                   MPI_Status *
-                                                   status) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iprobe(int source, int tag, MPIR_Comm * comm,
-                                                  int context_offset, int *flag,
-                                                  MPI_Status *
-                                                  status) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_set_info(MPIR_Win * win,
-                                                        MPIR_Info *
-                                                        info) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_shared_query(MPIR_Win * win, int rank,
-                                                            MPI_Aint * size, int *disp_unit,
-                                                            void *baseptr)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_start(MPIR_Group * group, int assert,
-                                                     MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_complete(MPIR_Win *
-                                                        win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_post(MPIR_Group * group, int assert,
-                                                    MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_wait(MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_test(MPIR_Win * win,
-                                                    int *flag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock(int lock_type, int rank, int assert,
-                                                    MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock(int rank,
-                                                      MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_get_info(MPIR_Win * win,
-                                                        MPIR_Info **
-                                                        info_p_p) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_free(MPIR_Win **
-                                                    win_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_fence(int assert,
-                                                     MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_create(void *base, MPI_Aint length, int disp_unit,
-                                                      MPIR_Info * info, MPIR_Comm * comm_ptr,
-                                                      MPIR_Win **
-                                                      win_ptr) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_accumulate(const void *origin_addr, int origin_count,
-                                                      MPI_Datatype origin_datatype, int target_rank,
-                                                      MPI_Aint target_disp, int target_count,
+                                                MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_recv(void *buf, int count, MPI_Datatype datatype,
+                                           int rank, int tag, MPIR_Comm * comm,
+                                           int context_offset, MPI_Status * status,
+                                           MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_irecv(void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_imrecv(void *buf, int count, MPI_Datatype datatype,
+                                             MPIR_Request * message,
+                                             MPIR_Request ** rreqp) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_recv(MPIR_Request * rreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void *MPIDI_NM_alloc_mem(size_t size,
+                                                  MPIR_Info * info_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_free_mem(void *ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_improbe(int source, int tag, MPIR_Comm * comm,
+                                              int context_offset, int *flag,
+                                              MPIR_Request ** message,
+                                              MPI_Status * status) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iprobe(int source, int tag, MPIR_Comm * comm,
+                                             int context_offset, int *flag,
+                                             MPI_Status * status) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_set_info(MPIR_Win * win,
+                                                   MPIR_Info * info) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_shared_query(MPIR_Win * win, int rank,
+                                                       MPI_Aint * size, int *disp_unit,
+                                                       void *baseptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_start(MPIR_Group * group, int assert,
+                                                MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_complete(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_post(MPIR_Group * group, int assert,
+                                               MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_wait(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_test(MPIR_Win * win, int *flag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock(int lock_type, int rank, int assert,
+                                               MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock(int rank, MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_get_info(MPIR_Win * win,
+                                                   MPIR_Info ** info_p_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_free(MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_fence(int assert,
+                                                MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_create(void *base, MPI_Aint length, int disp_unit,
+                                                 MPIR_Info * info, MPIR_Comm * comm_ptr,
+                                                 MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_attach(MPIR_Win * win, void *base,
+                                                 MPI_Aint size) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate_shared(MPI_Aint size, int disp_unit,
+                                                          MPIR_Info * info_ptr,
+                                                          MPIR_Comm * comm_ptr,
+                                                          void **base_ptr,
+                                                          MPIR_Win **
+                                                          win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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,
+                                           MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local(int rank,
+                                                      MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_detach(MPIR_Win * win,
+                                                 const void *base) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_compare_and_swap(const void *origin_addr,
+                                                       const void *compare_addr,
+                                                       void *result_addr,
+                                                       MPI_Datatype datatype, int target_rank,
+                                                       MPI_Aint target_disp,
+                                                       MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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,
+                                                  MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_attach(MPIR_Win * win, void *base,
-                                                      MPI_Aint size) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate_shared(MPI_Aint size, int disp_unit,
-                                                               MPIR_Info * info_ptr,
-                                                               MPIR_Comm * comm_ptr,
-                                                               void **base_ptr,
-                                                               MPIR_Win **
-                                                               win_ptr)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                MPIR_Request **
-                                                request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local(int rank,
-                                                           MPIR_Win *
-                                                           win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_detach(MPIR_Win * win,
-                                                      const void *base)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_compare_and_swap(const void *origin_addr,
-                                                            const void *compare_addr,
-                                                            void *result_addr,
-                                                            MPI_Datatype datatype, int target_rank,
-                                                            MPI_Aint target_disp,
-                                                            MPIR_Win *
-                                                            win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                       MPIR_Request **
-                                                       request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                           MPIR_Request **
-                                                           request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_fetch_and_op(const void *origin_addr, void *result_addr,
-                                                        MPI_Datatype datatype, int target_rank,
-                                                        MPI_Aint target_disp, MPI_Op op,
-                                                        MPIR_Win *
-                                                        win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate(MPI_Aint size, int disp_unit,
-                                                        MPIR_Info * info, MPIR_Comm * comm,
-                                                        void *baseptr,
-                                                        MPIR_Win **
-                                                        win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush(int rank,
-                                                     MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local_all(MPIR_Win *
-                                                               win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock_all(MPIR_Win *
-                                                          win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
-                                                              MPIR_Win **
-                                                              win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                MPIR_Request **
-                                                request) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_sync(MPIR_Win * win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_all(MPIR_Win *
-                                                         win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock_all(int assert,
-                                                        MPIR_Win *
-                                                        win) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_rank_is_local(int target,
-                                                         MPIR_Comm *
-                                                         comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_barrier(MPIR_Comm * comm,
-                                                   MPIR_Errflag_t *
-                                                   errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_bcast(void *buffer, int count, MPI_Datatype datatype,
-                                                 int root, MPIR_Comm * comm,
-                                                 MPIR_Errflag_t *
-                                                 errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allreduce(const void *sendbuf, void *recvbuf, int count,
+                                                      MPIR_Win * win,
+                                                      MPIR_Request **
+                                                      request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_fetch_and_op(const void *origin_addr, void *result_addr,
+                                                   MPI_Datatype datatype, int target_rank,
+                                                   MPI_Aint target_disp, MPI_Op op,
+                                                   MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate(MPI_Aint size, int disp_unit,
+                                                   MPIR_Info * info, MPIR_Comm * comm,
+                                                   void *baseptr,
+                                                   MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush(int rank, MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
+                                                         MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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,
+                                           MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_sync(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock_all(int assert,
+                                                   MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rank_is_local(int target,
+                                                    MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_barrier(MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_bcast(void *buffer, int count, MPI_Datatype datatype,
+                                            int root, MPIR_Comm * comm,
+                                            MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allreduce(const void *sendbuf, void *recvbuf, int count,
+                                                MPI_Datatype datatype, MPI_Op op,
+                                                MPIR_Comm * comm,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allgather(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allgatherv(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 const int *recvcounts, const int *displs,
+                                                 MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scatter(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scatterv(const void *sendbuf, const int *sendcounts,
+                                               const int *displs, MPI_Datatype sendtype,
+                                               void *recvbuf, int recvcount,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm_ptr,
+                                               MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gather(const void *sendbuf, int sendcount,
+                                             MPI_Datatype sendtype, void *recvbuf,
+                                             int recvcount, MPI_Datatype recvtype, int root,
+                                             MPIR_Comm * comm,
+                                             MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gatherv(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              const int *recvcounts, const int *displs,
+                                              MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_alltoall(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype,
+                                               MPIR_Comm * comm,
+                                               MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                const int *sdispls, MPI_Datatype sendtype,
+                                                void *recvbuf, const int *recvcounts,
+                                                const int *rdispls, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
+                                                MPIR_Comm * comm,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op, int root,
+                                             MPIR_Comm * comm_ptr,
+                                             MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                     const int *recvcounts,
                                                      MPI_Datatype datatype, MPI_Op op,
-                                                     MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allgather(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allgatherv(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      const int *recvcounts, const int *displs,
-                                                      MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                      MPIR_Errflag_t *
-                                                      errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scatter(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   int recvcount, MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm,
-                                                   MPIR_Errflag_t *
-                                                   errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scatterv(const void *sendbuf, const int *sendcounts,
-                                                    const int *displs, MPI_Datatype sendtype,
-                                                    void *recvbuf, int recvcount,
-                                                    MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm_ptr,
-                                                    MPIR_Errflag_t *
-                                                    errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gather(const void *sendbuf, int sendcount,
-                                                  MPI_Datatype sendtype, void *recvbuf,
-                                                  int recvcount, MPI_Datatype recvtype, int root,
-                                                  MPIR_Comm * comm,
-                                                  MPIR_Errflag_t *
-                                                  errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gatherv(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   const int *recvcounts, const int *displs,
-                                                   MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm,
-                                                   MPIR_Errflag_t *
-                                                   errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_alltoall(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype,
-                                                    MPIR_Comm * comm,
-                                                    MPIR_Errflag_t *
-                                                    errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_alltoallv(const void *sendbuf, const int *sendcounts,
-                                                     const int *sdispls, MPI_Datatype sendtype,
-                                                     void *recvbuf, const int *recvcounts,
-                                                     const int *rdispls, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
-                                                     MPIR_Comm * comm,
+                                                     MPIR_Comm * comm_ptr,
                                                      MPIR_Errflag_t *
-                                                     errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op, int root,
-                                                  MPIR_Comm * comm_ptr,
-                                                  MPIR_Errflag_t *
-                                                  errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                     errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                           int recvcount,
+                                                           MPI_Datatype datatype, MPI_Op op,
+                                                           MPIR_Comm * comm_ptr,
+                                                           MPIR_Errflag_t *
+                                                           errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scan(const void *sendbuf, void *recvbuf, int count,
+                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                           MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_exscan(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op,
+                                             MPIR_Comm * comm,
+                                             MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgather(const void *sendbuf, int sendcount,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype, void *recvbuf,
                                                           const int *recvcounts,
-                                                          MPI_Datatype datatype, MPI_Op op,
-                                                          MPIR_Comm * comm_ptr,
-                                                          MPIR_Errflag_t *
-                                                          errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter_block(const void *sendbuf, void *recvbuf,
-                                                                int recvcount,
-                                                                MPI_Datatype datatype, MPI_Op op,
-                                                                MPIR_Comm * comm_ptr,
-                                                                MPIR_Errflag_t *
-                                                                errflag)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scan(const void *sendbuf, void *recvbuf, int count,
-                                                MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                                MPIR_Errflag_t *
-                                                errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_exscan(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op,
-                                                  MPIR_Comm * comm,
-                                                  MPIR_Errflag_t *
-                                                  errflag) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgather(const void *sendbuf, int sendcount,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              int recvcount, MPI_Datatype recvtype,
-                                                              MPIR_Comm *
-                                                              comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               const int *recvcounts,
-                                                               const int *displs,
-                                                               MPI_Datatype recvtype,
-                                                               MPIR_Comm *
-                                                               comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallv(const void *sendbuf,
-                                                              const int *sendcounts,
-                                                              const int *sdispls,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              const int *recvcounts,
-                                                              const int *rdispls,
-                                                              MPI_Datatype recvtype,
-                                                              MPIR_Comm *
-                                                              comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallw(const void *sendbuf,
-                                                              const int *sendcounts,
-                                                              const MPI_Aint * sdispls,
-                                                              const MPI_Datatype * sendtypes,
-                                                              void *recvbuf, const int *recvcounts,
-                                                              const MPI_Aint * rdispls,
-                                                              const MPI_Datatype * recvtypes,
-                                                              MPIR_Comm *
-                                                              comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoall(const void *sendbuf, int sendcount,
-                                                             MPI_Datatype sendtype, void *recvbuf,
-                                                             int recvcount, MPI_Datatype recvtype,
-                                                             MPIR_Comm *
-                                                             comm) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgather(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               int recvcount, MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm,
-                                                               MPI_Request *
-                                                               req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const int *displs,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPI_Request *
-                                                                req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoall(const void *sendbuf, int sendcount,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              int recvcount, MPI_Datatype recvtype,
-                                                              MPIR_Comm * comm,
-                                                              MPI_Request *
-                                                              req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallv(const void *sendbuf,
-                                                               const int *sendcounts,
-                                                               const int *sdispls,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               const int *recvcounts,
-                                                               const int *rdispls,
-                                                               MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm,
-                                                               MPI_Request *
-                                                               req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallw(const void *sendbuf,
-                                                               const int *sendcounts,
-                                                               const MPI_Aint * sdispls,
-                                                               const MPI_Datatype * sendtypes,
-                                                               void *recvbuf, const int *recvcounts,
-                                                               const MPI_Aint * rdispls,
-                                                               const MPI_Datatype * recvtypes,
-                                                               MPIR_Comm * comm,
-                                                               MPI_Request *
-                                                               req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ibarrier(MPIR_Comm * comm,
-                                                    MPI_Request *
-                                                    req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ibcast(void *buffer, int count, MPI_Datatype datatype,
-                                                  int root, MPIR_Comm * comm,
-                                                  MPI_Request * req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallgather(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallgatherv(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       const int *recvcounts, const int *displs,
-                                                       MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                       MPI_Request *
-                                                       req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallreduce(const void *sendbuf, void *recvbuf, int count,
-                                                      MPI_Datatype datatype, MPI_Op op,
-                                                      MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoall(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm,
-                                                     MPI_Request *
-                                                     req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoallv(const void *sendbuf, const int *sendcounts,
-                                                      const int *sdispls, MPI_Datatype sendtype,
-                                                      void *recvbuf, const int *recvcounts,
-                                                      const int *rdispls, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
-                                                      MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iexscan(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op,
-                                                   MPIR_Comm * comm,
-                                                   MPI_Request * req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_igather(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   int recvcount, MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm,
-                                                   MPI_Request * req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_igatherv(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    const int *recvcounts, const int *displs,
-                                                    MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm,
-                                                    MPI_Request *
-                                                    req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter_block(const void *sendbuf, void *recvbuf,
-                                                                 int recvcount,
-                                                                 MPI_Datatype datatype, MPI_Op op,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request *
-                                                                 req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                          const int *displs,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm *
+                                                          comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallv(const void *sendbuf,
+                                                         const int *sendcounts,
+                                                         const int *sdispls,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         const int *recvcounts,
+                                                         const int *rdispls,
+                                                         MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallw(const void *sendbuf,
+                                                         const int *sendcounts,
+                                                         const MPI_Aint * sdispls,
+                                                         const MPI_Datatype * sendtypes,
+                                                         void *recvbuf, const int *recvcounts,
+                                                         const MPI_Aint * rdispls,
+                                                         const MPI_Datatype * recvtypes,
+                                                         MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoall(const void *sendbuf, int sendcount,
+                                                        MPI_Datatype sendtype, void *recvbuf,
+                                                        int recvcount, MPI_Datatype recvtype,
+                                                        MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgather(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype, void *recvbuf,
+                                                          int recvcount, MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPI_Request *
+                                                          req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
                                                            const int *recvcounts,
-                                                           MPI_Datatype datatype, MPI_Op op,
+                                                           const int *displs,
+                                                           MPI_Datatype recvtype,
                                                            MPIR_Comm * comm,
                                                            MPI_Request *
-                                                           req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op, int root,
-                                                   MPIR_Comm * comm_ptr,
-                                                   MPI_Request * req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscan(const void *sendbuf, void *recvbuf, int count,
-                                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                                 MPI_Request * req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscatter(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm,
-                                                    MPI_Request *
-                                                    req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *sendcounts,
-                                                     const int *displs, MPI_Datatype sendtype,
-                                                     void *recvbuf, int recvcount,
-                                                     MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm_ptr,
-                                                     MPI_Request *
-                                                     req) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype *
-                                                            datatype_p)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                                         MPIR_Datatype *
-                                                         new_datatype_p)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype *
-                                                             datatype_p)
-    MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op *
-                                                       op_p) MPIDI_NM_STATIC_INLINE_SUFFIX;
+                                                           req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoall(const void *sendbuf, int sendcount,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm,
+                                                         MPI_Request *
+                                                         req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallv(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const int *sdispls,
+                                                          MPI_Datatype sendtype, void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const int *rdispls,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPI_Request *
+                                                          req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallw(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const MPI_Aint * sdispls,
+                                                          const MPI_Datatype * sendtypes,
+                                                          void *recvbuf, const int *recvcounts,
+                                                          const MPI_Aint * rdispls,
+                                                          const MPI_Datatype * recvtypes,
+                                                          MPIR_Comm * comm,
+                                                          MPI_Request *
+                                                          req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ibarrier(MPIR_Comm * comm,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ibcast(void *buffer, int count, MPI_Datatype datatype,
+                                             int root, MPIR_Comm * comm,
+                                             MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallgather(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallgatherv(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  const int *recvcounts, const int *displs,
+                                                  MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                  MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallreduce(const void *sendbuf, void *recvbuf, int count,
+                                                 MPI_Datatype datatype, MPI_Op op,
+                                                 MPIR_Comm * comm,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoall(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm,
+                                                MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoallv(const void *sendbuf, const int *sendcounts,
+                                                 const int *sdispls, MPI_Datatype sendtype,
+                                                 void *recvbuf, const int *recvcounts,
+                                                 const int *rdispls, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
+                                                 MPIR_Comm * comm,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iexscan(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op,
+                                              MPIR_Comm * comm,
+                                              MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_igather(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm,
+                                              MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_igatherv(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               const int *recvcounts, const int *displs,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                            int recvcount,
+                                                            MPI_Datatype datatype, MPI_Op op,
+                                                            MPIR_Comm * comm,
+                                                            MPI_Request *
+                                                            req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                      const int *recvcounts,
+                                                      MPI_Datatype datatype, MPI_Op op,
+                                                      MPIR_Comm * comm,
+                                                      MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op, int root,
+                                              MPIR_Comm * comm_ptr,
+                                              MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscan(const void *sendbuf, void *recvbuf, int count,
+                                            MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                            MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatter(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *sendcounts,
+                                                const int *displs, MPI_Datatype sendtype,
+                                                void *recvbuf, int recvcount,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm_ptr,
+                                                MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype *
+                                                       datatype_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
+                                                    MPIR_Datatype *
+                                                    new_datatype_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype *
+                                                        datatype_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op * op_p) MPL_STATIC_INLINE_SUFFIX;
 
 #endif
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index 4fba2a4..5c3f221 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -16,507 +16,498 @@
 #ifndef NETMOD_DIRECT
 #ifndef NETMOD_DISABLE_INLINES
 
-#ifndef MPIDI_NM_STATIC_INLINE_PREFIX
-#define MPIDI_NM_STATIC_INLINE_PREFIX __attribute__((always_inline)) static inline
-#endif
-
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_init(int rank, int size, int appnum, int *tag_ub,
-                                                MPIR_Comm * comm_world, MPIR_Comm * comm_self,
-                                                int spawned, int num_contexts,
-                                                void **netmod_contexts)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_init(int rank, int size, int appnum, int *tag_ub,
+                                           MPIR_Comm * comm_world, MPIR_Comm * comm_self,
+                                           int spawned, int num_contexts, void **netmod_contexts)
 {
     return MPIDI_NM_func->init(rank, size, appnum, tag_ub, comm_world, comm_self, spawned,
                                num_contexts, netmod_contexts);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_finalize(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_finalize(void)
 {
     return MPIDI_NM_func->finalize();
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context, int blocking)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_progress(void *netmod_context, int blocking)
 {
     return MPIDI_NM_func->progress(netmod_context, blocking);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
-                                                           MPIDI_NM_am_origin_handler_fn
-                                                           origin_handler_fn,
-                                                           MPIDI_NM_am_target_handler_fn
-                                                           target_handler_fn)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reg_hdr_handler(int handler_id,
+                                                      MPIDI_NM_am_origin_handler_fn
+                                                      origin_handler_fn,
+                                                      MPIDI_NM_am_target_handler_fn
+                                                      target_handler_fn)
 {
     return MPIDI_NM_func->reg_hdr_handler(handler_id, origin_handler_fn, target_handler_fn);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
-                                                        int root, MPIR_Comm * comm,
-                                                        MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_connect(const char *port_name, MPIR_Info * info,
+                                                   int root, MPIR_Comm * comm,
+                                                   MPIR_Comm ** newcomm_ptr)
 {
     return MPIDI_NM_func->comm_connect(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_disconnect(MPIR_Comm * comm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_disconnect(MPIR_Comm * comm_ptr)
 {
     return MPIDI_NM_func->comm_disconnect(comm_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_open_port(MPIR_Info * info_ptr, char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_open_port(MPIR_Info * info_ptr, char *port_name)
 {
     return MPIDI_NM_func->open_port(info_ptr, port_name);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_close_port(const char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_close_port(const char *port_name)
 {
     return MPIDI_NM_func->close_port(port_name);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_Info * info,
-                                                       int root, MPIR_Comm * comm,
-                                                       MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_accept(const char *port_name, MPIR_Info * info,
+                                                  int root, MPIR_Comm * comm,
+                                                  MPIR_Comm ** newcomm_ptr)
 {
     return MPIDI_NM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                       const void *am_hdr, size_t am_hdr_sz,
-                                                       MPIR_Request * sreq, void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                  const void *am_hdr, size_t am_hdr_sz,
+                                                  MPIR_Request * sreq, void *netmod_context)
 {
     return MPIDI_NM_func->send_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
                                       netmod_context);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                         const void *am_hdr, size_t am_hdr_sz,
-                                                         void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                    const void *am_hdr, size_t am_hdr_sz,
+                                                    void *netmod_context)
 {
     return MPIDI_NM_func->inject_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, netmod_context);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
-                                                   const void *am_hdr, size_t am_hdr_sz,
-                                                   const void *data, MPI_Count count,
-                                                   MPI_Datatype datatype, MPIR_Request * sreq,
-                                                   void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+                                              const void *am_hdr, size_t am_hdr_sz,
+                                              const void *data, MPI_Count count,
+                                              MPI_Datatype datatype, MPIR_Request * sreq,
+                                              void *netmod_context)
 {
     return MPIDI_NM_func->send_am(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
                                   sreq, netmod_context);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
-                                                    struct iovec *am_hdrs, size_t iov_len,
-                                                    const void *data, MPI_Count count,
-                                                    MPI_Datatype datatype, MPIR_Request * sreq,
-                                                    void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                               struct iovec *am_hdrs, size_t iov_len,
+                                               const void *data, MPI_Count count,
+                                               MPI_Datatype datatype, MPIR_Request * sreq,
+                                               void *netmod_context)
 {
     return MPIDI_NM_func->send_amv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
                                    sreq, netmod_context);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                        struct iovec *am_hdrs, size_t iov_len,
-                                                        MPIR_Request * sreq, void *netmod_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                   struct iovec *am_hdrs, size_t iov_len,
+                                                   MPIR_Request * sreq, void *netmod_context)
 {
     return MPIDI_NM_func->send_amv_hdr(rank, comm, handler_id, am_hdrs, iov_len, sreq,
                                        netmod_context);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                             int src_rank, int handler_id,
-                                                             const void *am_hdr, size_t am_hdr_sz,
-                                                             MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
+                                                        const void *am_hdr, size_t am_hdr_sz,
+                                                        MPIR_Request * sreq)
 {
     return MPIDI_NM_func->send_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
                                             sreq);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                               int src_rank, int handler_id,
-                                                               const void *am_hdr, size_t am_hdr_sz)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                          int src_rank, int handler_id,
+                                                          const void *am_hdr, size_t am_hdr_sz)
 {
     return MPIDI_NM_func->inject_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
-                                                         int handler_id, const void *am_hdr,
-                                                         size_t am_hdr_sz, const void *data,
-                                                         MPI_Count count, MPI_Datatype datatype,
-                                                         MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_am_reply(MPIR_Context_id_t context_id, int src_rank,
+                                                    int handler_id, const void *am_hdr,
+                                                    size_t am_hdr_sz, const void *data,
+                                                    MPI_Count count, MPI_Datatype datatype,
+                                                    MPIR_Request * sreq)
 {
     return MPIDI_NM_func->send_am_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
                                         count, datatype, sreq);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
-                                                          int src_rank, int handler_id,
-                                                          struct iovec *am_hdr, size_t iov_len,
-                                                          const void *data, MPI_Count count,
-                                                          MPI_Datatype datatype,
-                                                          MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t context_id,
+                                                     int src_rank, int handler_id,
+                                                     struct iovec *am_hdr, size_t iov_len,
+                                                     const void *data, MPI_Count count,
+                                                     MPI_Datatype datatype, MPIR_Request * sreq)
 {
     return MPIDI_NM_func->send_amv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
                                          count, datatype, sreq);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void)
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void)
 {
     return MPIDI_NM_func->am_hdr_max_sz();
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     return MPIDI_NM_func->am_recv(req);
 }
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
-                                                         int *lpid_ptr, MPL_bool is_remote)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
+                                                    int *lpid_ptr, MPL_bool is_remote)
 {
     return MPIDI_NM_func->comm_get_lpid(comm_ptr, idx, lpid_ptr, is_remote);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank,
-                                                    MPIR_Gpid * gpid)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gpid)
 {
     return MPIDI_NM_func->gpid_get(comm_ptr, rank, gpid);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
-                                                        MPIR_Gpid local_gpid[], int *singleAVT)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
+                                                   MPIR_Gpid local_gpid[], int *singleAVT)
 {
     return MPIDI_NM_func->getallincomm(comm_ptr, local_size, local_gpid, singleAVT);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_tolpidarray(int size, MPIR_Gpid gpid[], int lpid[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_tolpidarray(int size, MPIR_Gpid gpid[], int lpid[])
 {
     return MPIDI_NM_func->gpid_tolpidarray(size, gpid, lpid);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
-                                                                       int size, const int lpids[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
+                                                                  int size, const int lpids[])
 {
     return MPIDI_NM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_create(MPIR_Comm * comm)
 {
     return MPIDI_NM_func->comm_create(comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_comm_destroy(MPIR_Comm * comm)
 {
     return MPIDI_NM_func->comm_destroy(comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_init(MPIR_Request * req)
 {
     return MPIDI_NM_func->am_request_init(req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_am_request_finalize(MPIR_Request * req)
 {
     return MPIDI_NM_func->am_request_finalize(req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send(const void *buf, int count, MPI_Datatype datatype,
-                                                int rank, int tag, MPIR_Comm * comm,
-                                                int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send(const void *buf, int count, MPI_Datatype datatype,
+                                           int rank, int tag, MPIR_Comm * comm,
+                                           int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->send(buf, count, datatype, rank, tag, comm, context_offset,
                                       request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ssend(const void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ssend(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->ssend(buf, count, datatype, rank, tag, comm, context_offset,
                                        request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_startall(int count, MPIR_Request * requests[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_startall(int count, MPIR_Request * requests[])
 {
     return MPIDI_NM_native_func->startall(count, requests);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_init(const void *buf, int count,
-                                                     MPI_Datatype datatype, int rank, int tag,
-                                                     MPIR_Comm * comm, int context_offset,
-                                                     MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_send_init(const void *buf, int count,
+                                                MPI_Datatype datatype, int rank, int tag,
+                                                MPIR_Comm * comm, int context_offset,
+                                                MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->send_init(buf, count, datatype, rank, tag, comm, context_offset,
                                            request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ssend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ssend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->ssend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                             request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_rsend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rsend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->rsend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                             request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_bsend_init(const void *buf, int count,
-                                                      MPI_Datatype datatype, int rank, int tag,
-                                                      MPIR_Comm * comm, int context_offset,
-                                                      MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_bsend_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->bsend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                             request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_isend(const void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_isend(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->isend(buf, count, datatype, rank, tag, comm, context_offset,
                                        request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_issend(const void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_issend(const void *buf, int count, MPI_Datatype datatype,
+                                             int rank, int tag, MPIR_Comm * comm,
+                                             int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->issend(buf, count, datatype, rank, tag, comm, context_offset,
                                         request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_send(MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_send(MPIR_Request * sreq)
 {
     return MPIDI_NM_native_func->cancel_send(sreq);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_recv_init(void *buf, int count, MPI_Datatype datatype,
-                                                     int rank, int tag, MPIR_Comm * comm,
-                                                     int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_recv_init(void *buf, int count, MPI_Datatype datatype,
+                                                int rank, int tag, MPIR_Comm * comm,
+                                                int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->recv_init(buf, count, datatype, rank, tag, comm, context_offset,
                                            request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_recv(void *buf, int count, MPI_Datatype datatype,
-                                                int rank, int tag, MPIR_Comm * comm,
-                                                int context_offset, MPI_Status * status,
-                                                MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_recv(void *buf, int count, MPI_Datatype datatype,
+                                           int rank, int tag, MPIR_Comm * comm,
+                                           int context_offset, MPI_Status * status,
+                                           MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->recv(buf, count, datatype, rank, tag, comm, context_offset, status,
                                       request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_irecv(void *buf, int count, MPI_Datatype datatype,
-                                                 int rank, int tag, MPIR_Comm * comm,
-                                                 int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_irecv(void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->irecv(buf, count, datatype, rank, tag, comm, context_offset,
                                        request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_imrecv(void *buf, int count, MPI_Datatype datatype,
-                                                  MPIR_Request * message, MPIR_Request ** rreqp)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_imrecv(void *buf, int count, MPI_Datatype datatype,
+                                             MPIR_Request * message, MPIR_Request ** rreqp)
 {
     return MPIDI_NM_native_func->imrecv(buf, count, datatype, message, rreqp);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_recv(MPIR_Request * rreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_cancel_recv(MPIR_Request * rreq)
 {
     return MPIDI_NM_native_func->cancel_recv(rreq);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void *MPIDI_NM_alloc_mem(size_t size, MPIR_Info * info_ptr)
+MPL_STATIC_INLINE_PREFIX void *MPIDI_NM_alloc_mem(size_t size, MPIR_Info * info_ptr)
 {
     return MPIDI_NM_native_func->alloc_mem(size, info_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_free_mem(void *ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_free_mem(void *ptr)
 {
     return MPIDI_NM_native_func->free_mem(ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_improbe(int source, int tag, MPIR_Comm * comm,
-                                                   int context_offset, int *flag,
-                                                   MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_improbe(int source, int tag, MPIR_Comm * comm,
+                                              int context_offset, int *flag,
+                                              MPIR_Request ** message, MPI_Status * status)
 {
     return MPIDI_NM_native_func->improbe(source, tag, comm, context_offset, flag, message, status);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iprobe(int source, int tag, MPIR_Comm * comm,
-                                                  int context_offset, int *flag,
-                                                  MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iprobe(int source, int tag, MPIR_Comm * comm,
+                                             int context_offset, int *flag, MPI_Status * status)
 {
     return MPIDI_NM_native_func->iprobe(source, tag, comm, context_offset, flag, status);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_set_info(MPIR_Win * win, MPIR_Info * info)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_set_info(MPIR_Win * win, MPIR_Info * info)
 {
     return MPIDI_NM_native_func->win_set_info(win, info);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_shared_query(MPIR_Win * win, int rank,
-                                                            MPI_Aint * size, int *disp_unit,
-                                                            void *baseptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_shared_query(MPIR_Win * win, int rank,
+                                                       MPI_Aint * size, int *disp_unit,
+                                                       void *baseptr)
 {
     return MPIDI_NM_native_func->win_shared_query(win, rank, size, disp_unit, baseptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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)
 {
     return MPIDI_NM_native_func->put(origin_addr, origin_count, origin_datatype, target_rank,
                                      target_disp, target_count, target_datatype, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_start(MPIR_Group * group, int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_start(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_start(group, assert, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_complete(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_complete(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_complete(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_post(MPIR_Group * group, int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_post(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_post(group, assert, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_wait(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_wait(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_wait(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_test(MPIR_Win * win, int *flag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_test(MPIR_Win * win, int *flag)
 {
     return MPIDI_NM_native_func->win_test(win, flag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock(int lock_type, int rank, int assert,
-                                                    MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock(int lock_type, int rank, int assert, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_lock(lock_type, rank, assert, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock(int rank, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_unlock(rank, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
 {
     return MPIDI_NM_native_func->win_get_info(win, info_p_p);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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)
 {
     return MPIDI_NM_native_func->get(origin_addr, origin_count, origin_datatype, target_rank,
                                      target_disp, target_count, target_datatype, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_free(MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_free(MPIR_Win ** win_ptr)
 {
     return MPIDI_NM_native_func->win_free(win_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_fence(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_fence(int assert, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_fence(assert, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_create(void *base, MPI_Aint length, int disp_unit,
-                                                      MPIR_Info * info, MPIR_Comm * comm_ptr,
-                                                      MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_create(void *base, MPI_Aint length, int disp_unit,
+                                                 MPIR_Info * info, MPIR_Comm * comm_ptr,
+                                                 MPIR_Win ** win_ptr)
 {
     return MPIDI_NM_native_func->win_create(base, length, disp_unit, info, comm_ptr, win_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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)
 {
     return MPIDI_NM_native_func->accumulate(origin_addr, origin_count, origin_datatype, target_rank,
                                             target_disp, target_count, target_datatype, op, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_attach(MPIR_Win * win, void *base, MPI_Aint size)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_attach(MPIR_Win * win, void *base, MPI_Aint size)
 {
     return MPIDI_NM_native_func->win_attach(win, base, size);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate_shared(MPI_Aint size, int disp_unit,
-                                                               MPIR_Info * info_ptr,
-                                                               MPIR_Comm * comm_ptr,
-                                                               void **base_ptr, MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate_shared(MPI_Aint size, int disp_unit,
+                                                          MPIR_Info * info_ptr,
+                                                          MPIR_Comm * comm_ptr,
+                                                          void **base_ptr, MPIR_Win ** win_ptr)
 {
     return MPIDI_NM_native_func->win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr,
                                                      win_ptr);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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,
+                                           MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->rput(origin_addr, origin_count, origin_datatype, target_rank,
                                       target_disp, target_count, target_datatype, win, request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local(int rank, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_flush_local(rank, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_detach(MPIR_Win * win, const void *base)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_detach(MPIR_Win * win, const void *base)
 {
     return MPIDI_NM_native_func->win_detach(win, base);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_compare_and_swap(const void *origin_addr,
-                                                            const void *compare_addr,
-                                                            void *result_addr,
-                                                            MPI_Datatype datatype, int target_rank,
-                                                            MPI_Aint target_disp, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_compare_and_swap(const void *origin_addr,
+                                                       const void *compare_addr,
+                                                       void *result_addr,
+                                                       MPI_Datatype datatype, int target_rank,
+                                                       MPI_Aint target_disp, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->compare_and_swap(origin_addr, compare_addr, result_addr, datatype,
                                                   target_rank, target_disp, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->raccumulate(origin_addr, origin_count, origin_datatype,
                                              target_rank, target_disp, target_count,
                                              target_datatype, op, win, request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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, MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->rget_accumulate(origin_addr, origin_count, origin_datatype,
                                                  result_addr, result_count, result_datatype,
@@ -524,71 +515,70 @@ MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_rget_accumulate(const void *origin_ad
                                                  target_datatype, op, win, request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_fetch_and_op(const void *origin_addr, void *result_addr,
-                                                        MPI_Datatype datatype, int target_rank,
-                                                        MPI_Aint target_disp, MPI_Op op,
-                                                        MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_fetch_and_op(const void *origin_addr, void *result_addr,
+                                                   MPI_Datatype datatype, int target_rank,
+                                                   MPI_Aint target_disp, MPI_Op op, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->fetch_and_op(origin_addr, result_addr, datatype, target_rank,
                                               target_disp, op, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate(MPI_Aint size, int disp_unit,
-                                                        MPIR_Info * info, MPIR_Comm * comm,
-                                                        void *baseptr, MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_allocate(MPI_Aint size, int disp_unit,
+                                                   MPIR_Info * info, MPIR_Comm * comm,
+                                                   void *baseptr, MPIR_Win ** win)
 {
     return MPIDI_NM_native_func->win_allocate(size, disp_unit, info, comm, baseptr, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush(int rank, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_flush(rank, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_local_all(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_flush_local_all(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_unlock_all(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_unlock_all(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
-                                                              MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
+                                                         MPIR_Win ** win)
 {
     return MPIDI_NM_native_func->win_create_dynamic(info, comm, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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,
-                                                MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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,
+                                           MPIR_Request ** request)
 {
     return MPIDI_NM_native_func->rget(origin_addr, origin_count, origin_datatype, target_rank,
                                       target_disp, target_count, target_datatype, win, request);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_sync(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_sync(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_sync(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_flush_all(MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_flush_all(win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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)
 {
     return MPIDI_NM_native_func->get_accumulate(origin_addr, origin_count, origin_datatype,
                                                 result_addr, result_count, result_datatype,
@@ -596,445 +586,440 @@ MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_get_accumulate(const void *origin_add
                                                 target_datatype, op, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock_all(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_win_lock_all(int assert, MPIR_Win * win)
 {
     return MPIDI_NM_native_func->win_lock_all(assert, win);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_rank_is_local(int target, MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_rank_is_local(int target, MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->rank_is_local(target, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->barrier(comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_bcast(void *buffer, int count, MPI_Datatype datatype,
-                                                 int root, MPIR_Comm * comm,
-                                                 MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_bcast(void *buffer, int count, MPI_Datatype datatype,
+                                            int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->bcast(buffer, count, datatype, root, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allreduce(const void *sendbuf, void *recvbuf, int count,
-                                                     MPI_Datatype datatype, MPI_Op op,
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allreduce(const void *sendbuf, void *recvbuf, int count,
+                                                MPI_Datatype datatype, MPI_Op op,
+                                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allgather(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allgather(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                            recvtype, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_allgatherv(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      const int *recvcounts, const int *displs,
-                                                      MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                      MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_allgatherv(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 const int *recvcounts, const int *displs,
+                                                 MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                                             displs, recvtype, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scatter(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   int recvcount, MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scatter(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
                                          root, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scatterv(const void *sendbuf, const int *sendcounts,
-                                                    const int *displs, MPI_Datatype sendtype,
-                                                    void *recvbuf, int recvcount,
-                                                    MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scatterv(const void *sendbuf, const int *sendcounts,
+                                               const int *displs, MPI_Datatype sendtype,
+                                               void *recvbuf, int recvcount,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount,
                                           recvtype, root, comm_ptr, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gather(const void *sendbuf, int sendcount,
-                                                  MPI_Datatype sendtype, void *recvbuf,
-                                                  int recvcount, MPI_Datatype recvtype, int root,
-                                                  MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gather(const void *sendbuf, int sendcount,
+                                             MPI_Datatype sendtype, void *recvbuf,
+                                             int recvcount, MPI_Datatype recvtype, int root,
+                                             MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
                                         root, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gatherv(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   const int *recvcounts, const int *displs,
-                                                   MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_gatherv(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              const int *recvcounts, const int *displs,
+                                              MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs,
                                          recvtype, root, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_alltoall(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype,
-                                                    MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_alltoall(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype,
+                                               MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                           recvtype, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_alltoallv(const void *sendbuf, const int *sendcounts,
-                                                     const int *sdispls, MPI_Datatype sendtype,
-                                                     void *recvbuf, const int *recvcounts,
-                                                     const int *rdispls, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                const int *sdispls, MPI_Datatype sendtype,
+                                                void *recvbuf, const int *recvcounts,
+                                                const int *rdispls, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
                                            recvcounts, rdispls, recvtype, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
+                                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf,
                                            recvcounts, rdispls, recvtypes, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op, int root,
-                                                  MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op, int root,
+                                             MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr,
                                         errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter(const void *sendbuf, void *recvbuf,
-                                                          const int *recvcounts,
-                                                          MPI_Datatype datatype, MPI_Op op,
-                                                          MPIR_Comm * comm_ptr,
-                                                          MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                     const int *recvcounts,
+                                                     MPI_Datatype datatype, MPI_Op op,
+                                                     MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op,
                                                 comm_ptr, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter_block(const void *sendbuf, void *recvbuf,
-                                                                int recvcount,
-                                                                MPI_Datatype datatype, MPI_Op op,
-                                                                MPIR_Comm * comm_ptr,
-                                                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_reduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                           int recvcount,
+                                                           MPI_Datatype datatype, MPI_Op op,
+                                                           MPIR_Comm * comm_ptr,
+                                                           MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op,
                                                       comm_ptr, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_scan(const void *sendbuf, void *recvbuf, int count,
-                                                MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_scan(const void *sendbuf, void *recvbuf, int count,
+                                           MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                           MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->scan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_exscan(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op,
-                                                  MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_exscan(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op,
+                                             MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_NM_native_func->exscan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgather(const void *sendbuf, int sendcount,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              int recvcount, MPI_Datatype recvtype,
-                                                              MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgather(const void *sendbuf, int sendcount,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->neighbor_allgather(sendbuf, sendcount, sendtype, recvbuf,
                                                     recvcount, recvtype, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               const int *recvcounts,
-                                                               const int *displs,
-                                                               MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype, void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const int *displs,
+                                                          MPI_Datatype recvtype, MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->neighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                                      recvcounts, displs, recvtype, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallv(const void *sendbuf,
-                                                              const int *sendcounts,
-                                                              const int *sdispls,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              const int *recvcounts,
-                                                              const int *rdispls,
-                                                              MPI_Datatype recvtype,
-                                                              MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallv(const void *sendbuf,
+                                                         const int *sendcounts,
+                                                         const int *sdispls,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         const int *recvcounts,
+                                                         const int *rdispls,
+                                                         MPI_Datatype recvtype, MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->neighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
                                                     recvcounts, rdispls, recvtype, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallw(const void *sendbuf,
-                                                              const int *sendcounts,
-                                                              const MPI_Aint * sdispls,
-                                                              const MPI_Datatype * sendtypes,
-                                                              void *recvbuf, const int *recvcounts,
-                                                              const MPI_Aint * rdispls,
-                                                              const MPI_Datatype * recvtypes,
-                                                              MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoallw(const void *sendbuf,
+                                                         const int *sendcounts,
+                                                         const MPI_Aint * sdispls,
+                                                         const MPI_Datatype * sendtypes,
+                                                         void *recvbuf, const int *recvcounts,
+                                                         const MPI_Aint * rdispls,
+                                                         const MPI_Datatype * recvtypes,
+                                                         MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                                                     recvbuf, recvcounts, rdispls, recvtypes, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoall(const void *sendbuf, int sendcount,
-                                                             MPI_Datatype sendtype, void *recvbuf,
-                                                             int recvcount, MPI_Datatype recvtype,
-                                                             MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_neighbor_alltoall(const void *sendbuf, int sendcount,
+                                                        MPI_Datatype sendtype, void *recvbuf,
+                                                        int recvcount, MPI_Datatype recvtype,
+                                                        MPIR_Comm * comm)
 {
     return MPIDI_NM_native_func->neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                                    recvtype, comm);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgather(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               int recvcount, MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgather(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype, void *recvbuf,
+                                                          int recvcount, MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ineighbor_allgather(sendbuf, sendcount, sendtype, recvbuf,
                                                      recvcount, recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const int *displs,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const int *displs,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ineighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                                       recvcounts, displs, recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoall(const void *sendbuf, int sendcount,
-                                                              MPI_Datatype sendtype, void *recvbuf,
-                                                              int recvcount, MPI_Datatype recvtype,
-                                                              MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoall(const void *sendbuf, int sendcount,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf,
                                                     recvcount, recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallv(const void *sendbuf,
-                                                               const int *sendcounts,
-                                                               const int *sdispls,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               const int *recvcounts,
-                                                               const int *rdispls,
-                                                               MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallv(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const int *sdispls,
+                                                          MPI_Datatype sendtype, void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const int *rdispls,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ineighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype,
                                                      recvbuf, recvcounts, rdispls, recvtype, comm,
                                                      req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallw(const void *sendbuf,
-                                                               const int *sendcounts,
-                                                               const MPI_Aint * sdispls,
-                                                               const MPI_Datatype * sendtypes,
-                                                               void *recvbuf, const int *recvcounts,
-                                                               const MPI_Aint * rdispls,
-                                                               const MPI_Datatype * recvtypes,
-                                                               MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ineighbor_alltoallw(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const MPI_Aint * sdispls,
+                                                          const MPI_Datatype * sendtypes,
+                                                          void *recvbuf, const int *recvcounts,
+                                                          const MPI_Aint * rdispls,
+                                                          const MPI_Datatype * recvtypes,
+                                                          MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                                                      recvbuf, recvcounts, rdispls, recvtypes, comm,
                                                      req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ibarrier(MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ibarrier(MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ibarrier(comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ibcast(void *buffer, int count, MPI_Datatype datatype,
-                                                  int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ibcast(void *buffer, int count, MPI_Datatype datatype,
+                                             int root, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ibcast(buffer, count, datatype, root, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallgather(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallgather(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                             recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallgatherv(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       const int *recvcounts, const int *displs,
-                                                       MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                       MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallgatherv(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  const int *recvcounts, const int *displs,
+                                                  MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                  MPI_Request * req)
 {
     return MPIDI_NM_native_func->iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                                              displs, recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iallreduce(const void *sendbuf, void *recvbuf, int count,
-                                                      MPI_Datatype datatype, MPI_Op op,
-                                                      MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iallreduce(const void *sendbuf, void *recvbuf, int count,
+                                                 MPI_Datatype datatype, MPI_Op op,
+                                                 MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->iallreduce(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoall(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype,
-                                                     MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoall(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                            recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoallv(const void *sendbuf, const int *sendcounts,
-                                                      const int *sdispls, MPI_Datatype sendtype,
-                                                      void *recvbuf, const int *recvcounts,
-                                                      const int *rdispls, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ialltoallv(const void *sendbuf, const int *sendcounts,
+                                                 const int *sdispls, MPI_Datatype sendtype,
+                                                 void *recvbuf, const int *recvcounts,
+                                                 const int *rdispls, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
                                             recvcounts, rdispls, recvtype, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
-                                                      MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_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[],
+                                                 MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf,
                                             recvcounts, rdispls, recvtypes, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iexscan(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op,
-                                                   MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iexscan(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op,
+                                              MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->iexscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_igather(const void *sendbuf, int sendcount,
-                                                   MPI_Datatype sendtype, void *recvbuf,
-                                                   int recvcount, MPI_Datatype recvtype, int root,
-                                                   MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_igather(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
                                          root, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_igatherv(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    const int *recvcounts, const int *displs,
-                                                    MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_igatherv(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               const int *recvcounts, const int *displs,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs,
                                           recvtype, root, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter_block(const void *sendbuf, void *recvbuf,
-                                                                 int recvcount,
-                                                                 MPI_Datatype datatype, MPI_Op op,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter_block(const void *sendbuf, void *recvbuf,
+                                                            int recvcount,
+                                                            MPI_Datatype datatype, MPI_Op op,
+                                                            MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op,
                                                        comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter(const void *sendbuf, void *recvbuf,
-                                                           const int *recvcounts,
-                                                           MPI_Datatype datatype, MPI_Op op,
-                                                           MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                      const int *recvcounts,
+                                                      MPI_Datatype datatype, MPI_Op op,
+                                                      MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm,
                                                  req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op, int root,
-                                                   MPIR_Comm * comm_ptr, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_ireduce(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op, int root,
+                                              MPIR_Comm * comm_ptr, MPI_Request * req)
 {
     return MPIDI_NM_native_func->ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr,
                                          req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscan(const void *sendbuf, void *recvbuf, int count,
-                                                 MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
-                                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscan(const void *sendbuf, void *recvbuf, int count,
+                                            MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm,
+                                            MPI_Request * req)
 {
     return MPIDI_NM_native_func->iscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscatter(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatter(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_NM_native_func->iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                           recvtype, root, comm, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *sendcounts,
-                                                     const int *displs, MPI_Datatype sendtype,
-                                                     void *recvbuf, int recvcount,
-                                                     MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm_ptr, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_NM_iscatterv(const void *sendbuf, const int *sendcounts,
+                                                const int *displs, MPI_Datatype sendtype,
+                                                void *recvbuf, int recvcount,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm_ptr, MPI_Request * req)
 {
     return MPIDI_NM_native_func->iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
                                            recvcount, recvtype, root, comm_ptr, req);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_commit(MPIR_Datatype * datatype_p)
 {
     return MPIDI_NM_native_func->datatype_commit(datatype_p);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
-                                                         MPIR_Datatype * new_datatype_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_dup(MPIR_Datatype * old_datatype_p,
+                                                    MPIR_Datatype * new_datatype_p)
 {
     return MPIDI_NM_native_func->datatype_dup(old_datatype_p, new_datatype_p);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_datatype_destroy(MPIR_Datatype * datatype_p)
 {
     return MPIDI_NM_native_func->datatype_destroy(datatype_p);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_commit(MPIR_Op * op_p)
 {
     return MPIDI_NM_native_func->op_commit(op_p);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op * op_p)
+MPL_STATIC_INLINE_PREFIX void MPIDI_NM_op_destroy(MPIR_Op * op_p)
 {
     return MPIDI_NM_native_func->op_destroy(op_p);
 };
diff --git a/src/mpid/ch4/shm/include/shm.h b/src/mpid/ch4/shm/include/shm.h
index 1fa4138..0ef4704 100644
--- a/src/mpid/ch4/shm/include/shm.h
+++ b/src/mpid/ch4/shm/include/shm.h
@@ -517,676 +517,549 @@ extern MPIDI_SHM_native_funcs_t *MPIDI_SHM_native_func;
 extern int MPIDI_num_shms;
 extern char MPIDI_SHM_strings[][MPIDI_MAX_SHM_STRING_LEN];
 
-#ifndef MPIDI_SHM_STATIC_INLINE_PREFIX
-#define MPIDI_SHM_STATIC_INLINE_PREFIX __attribute__((always_inline)) static inline
-#endif
-
-#ifndef MPIDI_SHM_STATIC_INLINE_SUFFIX
-#define MPIDI_SHM_STATIC_INLINE_SUFFIX __attribute__((always_inline))
-#endif
-
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_init(int rank,
-                                                  int size) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_finalize(void) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                                             MPIDI_SHM_am_origin_handler_fn
-                                                             origin_handler_fn,
-                                                             MPIDI_SHM_am_target_handler_fn
-                                                             target_handler_fn)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
-                                                          int root, MPIR_Comm * comm,
-                                                          MPIR_Comm **
-                                                          newcomm_ptr)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_disconnect(MPIR_Comm *
-                                                             comm_ptr)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_open_port(MPIR_Info * info_ptr,
-                                                       char *port_name)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_close_port(const char *port_name)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_Info * info,
-                                                         int root, MPIR_Comm * comm,
-                                                         MPIR_Comm **
-                                                         newcomm_ptr)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_init(int rank, int size) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_finalize(void) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
+                                                       MPIDI_SHM_am_origin_handler_fn
+                                                       origin_handler_fn,
+                                                       MPIDI_SHM_am_target_handler_fn
+                                                       target_handler_fn) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
+                                                    int root, MPIR_Comm * comm,
+                                                    MPIR_Comm **
+                                                    newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_disconnect(MPIR_Comm *
+                                                       comm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_open_port(MPIR_Info * info_ptr,
+                                                 char *port_name) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_close_port(const char *port_name) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_Info * info,
+                                                   int root, MPIR_Comm * comm,
+                                                   MPIR_Comm **
+                                                   newcomm_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                   const void *am_hdr, size_t am_hdr_sz,
+                                                   MPIR_Request * sreq,
+                                                   void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
+                                                     int handler_id, const void *am_hdr,
+                                                     size_t am_hdr_sz,
+                                                     void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+                                               const void *am_hdr, size_t am_hdr_sz,
+                                               const void *data, MPI_Count count,
+                                               MPI_Datatype datatype, MPIR_Request * sreq,
+                                               void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
+                                                 const void *am_hdr, size_t am_hdr_sz,
+                                                 const void *data, MPI_Count count,
+                                                 MPI_Datatype datatype,
+                                                 void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                                struct iovec *am_hdrs, size_t iov_len,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                                  struct iovec *am_hdrs, size_t iov_len,
+                                                  const void *data, MPI_Count count,
+                                                  MPI_Datatype datatype,
+                                                  void *shm_context) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                         int src_rank, int handler_id,
                                                          const void *am_hdr, size_t am_hdr_sz,
-                                                         MPIR_Request * sreq,
-                                                         void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
-                                                           int handler_id, const void *am_hdr,
-                                                           size_t am_hdr_sz,
-                                                           void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+                                                         MPIR_Request *
+                                                         sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                           int src_rank, int handler_id,
+                                                           const void *am_hdr,
+                                                           size_t am_hdr_sz)
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
+                                                     int src_rank, int handler_id,
                                                      const void *am_hdr, size_t am_hdr_sz,
                                                      const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype, MPIR_Request * sreq,
-                                                     void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
+                                                     MPI_Datatype datatype,
+                                                     MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
+                                                       int src_rank, int handler_id,
                                                        const void *am_hdr, size_t am_hdr_sz,
                                                        const void *data, MPI_Count count,
-                                                       MPI_Datatype datatype,
-                                                       void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
-                                                      struct iovec *am_hdrs, size_t iov_len,
+                                                       MPI_Datatype datatype)
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
+                                                      int src_rank, int handler_id,
+                                                      struct iovec *am_hdr, size_t iov_len,
                                                       const void *data, MPI_Count count,
-                                                      MPI_Datatype datatype, MPIR_Request * sreq,
-                                                      void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                                      MPI_Datatype datatype,
+                                                      MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
                                                         struct iovec *am_hdrs, size_t iov_len,
                                                         const void *data, MPI_Count count,
+                                                        MPI_Datatype datatype)
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_hdr_max_sz(void) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_inject_max_sz(void) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_recv(MPIR_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
+                                                     int *lpid_ptr,
+                                                     MPL_bool is_remote) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_get(MPIR_Comm * comm_ptr, int rank,
+                                                MPIR_Gpid * gpid) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_node_id(MPIR_Comm * comm, int rank,
+                                                   MPID_Node_id_t * id_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_max_node_id(MPIR_Comm * comm,
+                                                       MPID_Node_id_t *
+                                                       max_id_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
+                                                    MPIR_Gpid local_gpid[],
+                                                    int *singleAVT) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_tolpidarray(int size, MPIR_Gpid gpid[],
+                                                        int lpid[]) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
+                                                                   int size,
+                                                                   const int lpids[])
+    MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm * comm) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request *
+                                                        req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request *
+                                                            req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend(const void *buf, int count,
+                                             MPI_Datatype datatype, int rank, int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_startall(int count,
+                                                MPIR_Request * requests[]) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rsend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_bsend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_isend(const void *buf, int count,
+                                             MPI_Datatype datatype, int rank, int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_issend(const void *buf, int count,
+                                              MPI_Datatype datatype, int rank, int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_send(MPIR_Request * sreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_recv_init(void *buf, int count, MPI_Datatype datatype,
+                                                 int rank, int tag, MPIR_Comm * comm,
+                                                 int context_offset,
+                                                 MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_recv(void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPI_Status * status,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_irecv(void *buf, int count, MPI_Datatype datatype,
+                                             int rank, int tag, MPIR_Comm * comm,
+                                             int context_offset,
+                                             MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_imrecv(void *buf, int count, MPI_Datatype datatype,
+                                              MPIR_Request * message,
+                                              MPIR_Request ** rreqp) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_recv(MPIR_Request * rreq) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX void *MPIDI_SHM_alloc_mem(size_t size,
+                                                   MPIR_Info * info_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_free_mem(void *ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_improbe(int source, int tag, MPIR_Comm * comm,
+                                               int context_offset, int *flag,
+                                               MPIR_Request ** message,
+                                               MPI_Status * status) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iprobe(int source, int tag, MPIR_Comm * comm,
+                                              int context_offset, int *flag,
+                                              MPI_Status * status) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_set_info(MPIR_Win * win,
+                                                    MPIR_Info * info) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_shared_query(MPIR_Win * win, int rank,
+                                                        MPI_Aint * size, int *disp_unit,
+                                                        void *baseptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_start(MPIR_Group * group, int assert,
+                                                 MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_complete(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_post(MPIR_Group * group, int assert,
+                                                MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_wait(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_test(MPIR_Win * win, int *flag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock(int lock_type, int rank, int assert,
+                                                MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock(int rank,
+                                                  MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_get_info(MPIR_Win * win,
+                                                    MPIR_Info ** info_p_p) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_free(MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_fence(int assert,
+                                                 MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create(void *base, MPI_Aint length, int disp_unit,
+                                                  MPIR_Info * info, MPIR_Comm * comm_ptr,
+                                                  MPIR_Win ** win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_attach(MPIR_Win * win, void *base,
+                                                  MPI_Aint size) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate_shared(MPI_Aint size, int disp_unit,
+                                                           MPIR_Info * info_ptr,
+                                                           MPIR_Comm * comm_ptr,
+                                                           void **base_ptr,
+                                                           MPIR_Win **
+                                                           win_ptr) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local(int rank,
+                                                       MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_detach(MPIR_Win * win,
+                                                  const void *base) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_compare_and_swap(const void *origin_addr,
+                                                        const void *compare_addr,
+                                                        void *result_addr,
                                                         MPI_Datatype datatype,
-                                                        void *shm_context)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                               int src_rank, int handler_id,
-                                                               const void *am_hdr, size_t am_hdr_sz,
-                                                               MPIR_Request *
-                                                               sreq) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                                 int src_rank, int handler_id,
-                                                                 const void *am_hdr,
-                                                                 size_t am_hdr_sz)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
-                                                           int src_rank, int handler_id,
-                                                           const void *am_hdr, size_t am_hdr_sz,
-                                                           const void *data, MPI_Count count,
-                                                           MPI_Datatype datatype,
-                                                           MPIR_Request *
-                                                           sreq) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
-                                                             int src_rank, int handler_id,
-                                                             const void *am_hdr, size_t am_hdr_sz,
-                                                             const void *data, MPI_Count count,
-                                                             MPI_Datatype datatype)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
-                                                            int src_rank, int handler_id,
-                                                            struct iovec *am_hdr, size_t iov_len,
-                                                            const void *data, MPI_Count count,
-                                                            MPI_Datatype datatype,
-                                                            MPIR_Request *
-                                                            sreq) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
-                                                              int src_rank, int handler_id,
-                                                              struct iovec *am_hdrs, size_t iov_len,
-                                                              const void *data, MPI_Count count,
-                                                              MPI_Datatype datatype)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_hdr_max_sz(void) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_inject_max_sz(void)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_am_recv(MPIR_Request *
-                                                     req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
-                                                           int *lpid_ptr,
-                                                           MPL_bool is_remote)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_get(MPIR_Comm * comm_ptr, int rank,
-                                                      MPIR_Gpid *
-                                                      gpid) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_get_node_id(MPIR_Comm * comm, int rank,
-                                                         MPID_Node_id_t *
-                                                         id_p) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_get_max_node_id(MPIR_Comm * comm,
-                                                             MPID_Node_id_t *
-                                                             max_id_p)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
-                                                          MPIR_Gpid local_gpid[],
-                                                          int *singleAVT)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_tolpidarray(int size, MPIR_Gpid gpid[],
-                                                              int lpid[])
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
-                                                                         int size,
-                                                                         const int lpids[])
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm *
-                                                         comm) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm *
-                                                          comm) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request *
-                                                              req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request *
-                                                                  req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send(const void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset,
-                                                  MPIR_Request **
-                                                  request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend(const void *buf, int count,
-                                                   MPI_Datatype datatype, int rank, int tag,
-                                                   MPIR_Comm * comm, int context_offset,
-                                                   MPIR_Request **
-                                                   request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_startall(int count,
-                                                      MPIR_Request *
-                                                      requests[]) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_init(const void *buf, int count,
-                                                       MPI_Datatype datatype, int rank, int tag,
-                                                       MPIR_Comm * comm, int context_offset,
-                                                       MPIR_Request **
-                                                       request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request **
-                                                        request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_rsend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request **
-                                                        request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_bsend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request **
-                                                        request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_isend(const void *buf, int count,
-                                                   MPI_Datatype datatype, int rank, int tag,
-                                                   MPIR_Comm * comm, int context_offset,
+                                                        int target_rank, MPI_Aint target_disp,
+                                                        MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
                                                    MPIR_Request **
-                                                   request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_issend(const void *buf, int count,
-                                                    MPI_Datatype datatype, int rank, int tag,
-                                                    MPIR_Comm * comm, int context_offset,
-                                                    MPIR_Request **
-                                                    request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_send(MPIR_Request *
-                                                         sreq) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_recv_init(void *buf, int count, MPI_Datatype datatype,
-                                                       int rank, int tag, MPIR_Comm * comm,
-                                                       int context_offset,
+                                                   request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
                                                        MPIR_Request **
-                                                       request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_recv(void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset, MPI_Status * status,
-                                                  MPIR_Request **
-                                                  request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_irecv(void *buf, int count, MPI_Datatype datatype,
-                                                   int rank, int tag, MPIR_Comm * comm,
-                                                   int context_offset,
-                                                   MPIR_Request **
-                                                   request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_imrecv(void *buf, int count, MPI_Datatype datatype,
-                                                    MPIR_Request * message,
-                                                    MPIR_Request **
-                                                    rreqp) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_recv(MPIR_Request *
-                                                         rreq) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX void *MPIDI_SHM_alloc_mem(size_t size,
-                                                         MPIR_Info *
-                                                         info_ptr) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_free_mem(void *ptr) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_improbe(int source, int tag, MPIR_Comm * comm,
-                                                     int context_offset, int *flag,
-                                                     MPIR_Request ** message,
-                                                     MPI_Status *
-                                                     status) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iprobe(int source, int tag, MPIR_Comm * comm,
-                                                    int context_offset, int *flag,
-                                                    MPI_Status *
-                                                    status) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_set_info(MPIR_Win * win,
-                                                          MPIR_Info *
-                                                          info) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_shared_query(MPIR_Win * win, int rank,
-                                                              MPI_Aint * size, int *disp_unit,
-                                                              void *baseptr)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_start(MPIR_Group * group, int assert,
-                                                       MPIR_Win *
-                                                       win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_complete(MPIR_Win *
-                                                          win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_post(MPIR_Group * group, int assert,
-                                                      MPIR_Win *
-                                                      win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_wait(MPIR_Win *
-                                                      win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_test(MPIR_Win * win,
-                                                      int *flag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock(int lock_type, int rank, int assert,
-                                                      MPIR_Win *
-                                                      win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock(int rank,
-                                                        MPIR_Win *
-                                                        win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_get_info(MPIR_Win * win,
-                                                          MPIR_Info **
-                                                          info_p_p) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_free(MPIR_Win **
-                                                      win_ptr) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_fence(int assert,
-                                                       MPIR_Win *
-                                                       win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create(void *base, MPI_Aint length, int disp_unit,
-                                                        MPIR_Info * info, MPIR_Comm * comm_ptr,
-                                                        MPIR_Win **
-                                                        win_ptr) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_attach(MPIR_Win * win, void *base,
-                                                        MPI_Aint size)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate_shared(MPI_Aint size, int disp_unit,
-                                                                 MPIR_Info * info_ptr,
-                                                                 MPIR_Comm * comm_ptr,
-                                                                 void **base_ptr,
-                                                                 MPIR_Win **
-                                                                 win_ptr)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                  MPIR_Request **
-                                                  request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local(int rank,
-                                                             MPIR_Win *
-                                                             win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_detach(MPIR_Win * win,
-                                                        const void *base)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_compare_and_swap(const void *origin_addr,
-                                                              const void *compare_addr,
-                                                              void *result_addr,
-                                                              MPI_Datatype datatype,
-                                                              int target_rank, MPI_Aint target_disp,
-                                                              MPIR_Win *
-                                                              win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                         MPIR_Request **
-                                                         request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                             MPIR_Request **
-                                                             request)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_fetch_and_op(const void *origin_addr,
-                                                          void *result_addr, MPI_Datatype datatype,
-                                                          int target_rank, MPI_Aint target_disp,
-                                                          MPI_Op op,
-                                                          MPIR_Win *
-                                                          win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate(MPI_Aint size, int disp_unit,
-                                                          MPIR_Info * info, MPIR_Comm * comm,
-                                                          void *baseptr,
-                                                          MPIR_Win **
-                                                          win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush(int rank,
-                                                       MPIR_Win *
-                                                       win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local_all(MPIR_Win *
-                                                                 win)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock_all(MPIR_Win *
-                                                            win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
-                                                                MPIR_Win **
-                                                                win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                  MPIR_Request **
-                                                  request) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_sync(MPIR_Win *
-                                                      win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_all(MPIR_Win *
-                                                           win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock_all(int assert,
-                                                          MPIR_Win *
-                                                          win) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_barrier(MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_bcast(void *buffer, int count, MPI_Datatype datatype,
-                                                   int root, MPIR_Comm * comm,
-                                                   MPIR_Errflag_t *
-                                                   errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allreduce(const void *sendbuf, void *recvbuf,
-                                                       int count, MPI_Datatype datatype, MPI_Op op,
-                                                       MPIR_Comm * comm,
-                                                       MPIR_Errflag_t *
-                                                       errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allgather(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       int recvcount, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm,
-                                                       MPIR_Errflag_t *
-                                                       errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allgatherv(const void *sendbuf, int sendcount,
-                                                        MPI_Datatype sendtype, void *recvbuf,
-                                                        const int *recvcounts, const int *displs,
-                                                        MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                        MPIR_Errflag_t *
-                                                        errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scatter(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scatterv(const void *sendbuf, const int *sendcounts,
-                                                      const int *displs, MPI_Datatype sendtype,
-                                                      void *recvbuf, int recvcount,
-                                                      MPI_Datatype recvtype, int root,
+                                                       request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_fetch_and_op(const void *origin_addr,
+                                                    void *result_addr, MPI_Datatype datatype,
+                                                    int target_rank, MPI_Aint target_disp,
+                                                    MPI_Op op,
+                                                    MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate(MPI_Aint size, int disp_unit,
+                                                    MPIR_Info * info, MPIR_Comm * comm,
+                                                    void *baseptr,
+                                                    MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush(int rank, MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
+                                                          MPIR_Win ** win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
+                                            MPIR_Request ** request) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_sync(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_all(MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock_all(int assert,
+                                                    MPIR_Win * win) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_barrier(MPIR_Comm * comm,
+                                               MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_bcast(void *buffer, int count, MPI_Datatype datatype,
+                                             int root, MPIR_Comm * comm,
+                                             MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allreduce(const void *sendbuf, void *recvbuf,
+                                                 int count, MPI_Datatype datatype, MPI_Op op,
+                                                 MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allgather(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allgatherv(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  const int *recvcounts, const int *displs,
+                                                  MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                  MPIR_Errflag_t *
+                                                  errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scatter(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm,
+                                               MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scatterv(const void *sendbuf, const int *sendcounts,
+                                                const int *displs, MPI_Datatype sendtype,
+                                                void *recvbuf, int recvcount,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm_ptr,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gather(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gatherv(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               const int *recvcounts, const int *displs,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm,
+                                               MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoall(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm,
+                                                MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                 const int *sdispls, MPI_Datatype sendtype,
+                                                 void *recvbuf, const int *recvcounts,
+                                                 const int *rdispls, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
+                                                 MPIR_Comm * comm,
+                                                 MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op, int root,
+                                              MPIR_Comm * comm_ptr,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                      const int *recvcounts,
+                                                      MPI_Datatype datatype, MPI_Op op,
                                                       MPIR_Comm * comm_ptr,
                                                       MPIR_Errflag_t *
-                                                      errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gather(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm,
-                                                    MPIR_Errflag_t *
-                                                    errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gatherv(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     const int *recvcounts, const int *displs,
-                                                     MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm,
-                                                     MPIR_Errflag_t *
-                                                     errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoall(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm,
-                                                      MPIR_Errflag_t *
-                                                      errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoallv(const void *sendbuf, const int *sendcounts,
-                                                       const int *sdispls, MPI_Datatype sendtype,
-                                                       void *recvbuf, const int *recvcounts,
-                                                       const int *rdispls, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm,
-                                                       MPIR_Errflag_t *
-                                                       errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
-                                                       MPIR_Comm * comm,
-                                                       MPIR_Errflag_t *
-                                                       errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce(const void *sendbuf, void *recvbuf, int count,
-                                                    MPI_Datatype datatype, MPI_Op op, int root,
-                                                    MPIR_Comm * comm_ptr,
-                                                    MPIR_Errflag_t *
-                                                    errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter(const void *sendbuf, void *recvbuf,
-                                                            const int *recvcounts,
+                                                      errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter_block(const void *sendbuf,
+                                                            void *recvbuf, int recvcount,
                                                             MPI_Datatype datatype, MPI_Op op,
                                                             MPIR_Comm * comm_ptr,
                                                             MPIR_Errflag_t *
-                                                            errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter_block(const void *sendbuf,
-                                                                  void *recvbuf, int recvcount,
-                                                                  MPI_Datatype datatype, MPI_Op op,
-                                                                  MPIR_Comm * comm_ptr,
-                                                                  MPIR_Errflag_t *
-                                                                  errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scan(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op,
-                                                  MPIR_Comm * comm,
-                                                  MPIR_Errflag_t *
-                                                  errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_exscan(const void *sendbuf, void *recvbuf, int count,
-                                                    MPI_Datatype datatype, MPI_Op op,
-                                                    MPIR_Comm * comm,
-                                                    MPIR_Errflag_t *
-                                                    errflag) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgather(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf, int recvcount,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t *
-                                                                errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const int *displs,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPIR_Errflag_t *
-                                                                 errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallv(const void *sendbuf,
-                                                                const int *sendcounts,
-                                                                const int *sdispls,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const int *rdispls,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t *
-                                                                errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallw(const void *sendbuf,
-                                                                const int *sendcounts,
-                                                                const MPI_Aint * sdispls,
-                                                                const MPI_Datatype * sendtypes,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const MPI_Aint * rdispls,
-                                                                const MPI_Datatype * recvtypes,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t *
-                                                                errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoall(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               int recvcount, MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm,
-                                                               MPIR_Errflag_t *
-                                                               errflag)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgather(const void *sendbuf, int sendcount,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf, int recvcount,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request *
-                                                                 req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgatherv(const void *sendbuf,
-                                                                  int sendcount,
-                                                                  MPI_Datatype sendtype,
-                                                                  void *recvbuf,
-                                                                  const int *recvcounts,
-                                                                  const int *displs,
-                                                                  MPI_Datatype recvtype,
-                                                                  MPIR_Comm * comm,
-                                                                  MPI_Request *
-                                                                  req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoall(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf, int recvcount,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPI_Request *
-                                                                req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallv(const void *sendbuf,
-                                                                 const int *sendcounts,
-                                                                 const int *sdispls,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const int *rdispls,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request *
-                                                                 req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallw(const void *sendbuf,
-                                                                 const int *sendcounts,
-                                                                 const MPI_Aint * sdispls,
-                                                                 const MPI_Datatype * sendtypes,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const MPI_Aint * rdispls,
-                                                                 const MPI_Datatype * recvtypes,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request *
-                                                                 req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ibarrier(MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ibcast(void *buffer, int count, MPI_Datatype datatype,
-                                                    int root, MPIR_Comm * comm,
-                                                    MPI_Request *
-                                                    req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgather(const void *sendbuf, int sendcount,
-                                                        MPI_Datatype sendtype, void *recvbuf,
-                                                        int recvcount, MPI_Datatype recvtype,
-                                                        MPIR_Comm * comm,
-                                                        MPI_Request *
-                                                        req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgatherv(const void *sendbuf, int sendcount,
+                                                            errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scan(const void *sendbuf, void *recvbuf, int count,
+                                            MPI_Datatype datatype, MPI_Op op,
+                                            MPIR_Comm * comm,
+                                            MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_exscan(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op,
+                                              MPIR_Comm * comm,
+                                              MPIR_Errflag_t * errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgather(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf, int recvcount,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t *
+                                                          errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const int *displs,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm,
+                                                           MPIR_Errflag_t *
+                                                           errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallv(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const int *sdispls,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const int *rdispls,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t *
+                                                          errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallw(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const MPI_Aint * sdispls,
+                                                          const MPI_Datatype * sendtypes,
+                                                          void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const MPI_Aint * rdispls,
+                                                          const MPI_Datatype * recvtypes,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t *
+                                                          errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoall(const void *sendbuf, int sendcount,
                                                          MPI_Datatype sendtype, void *recvbuf,
-                                                         const int *recvcounts, const int *displs,
-                                                         MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                         MPI_Request *
-                                                         req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallreduce(const void *sendbuf, void *recvbuf,
-                                                        int count, MPI_Datatype datatype, MPI_Op op,
-                                                        MPIR_Comm * comm,
-                                                        MPI_Request *
-                                                        req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoall(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       int recvcount, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm,
-                                                       MPI_Request *
-                                                       req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoallv(const void *sendbuf, const int *sendcounts,
-                                                        const int *sdispls, MPI_Datatype sendtype,
-                                                        void *recvbuf, const int *recvcounts,
-                                                        const int *rdispls, MPI_Datatype recvtype,
-                                                        MPIR_Comm * comm,
-                                                        MPI_Request *
-                                                        req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
-                                                        MPIR_Comm * comm,
-                                                        MPI_Request *
-                                                        req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iexscan(const void *sendbuf, void *recvbuf, int count,
-                                                     MPI_Datatype datatype, MPI_Op op,
-                                                     MPIR_Comm * comm,
-                                                     MPI_Request *
-                                                     req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_igather(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm,
-                                                     MPI_Request *
-                                                     req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_igatherv(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      const int *recvcounts, const int *displs,
-                                                      MPI_Datatype recvtype, int root,
-                                                      MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter_block(const void *sendbuf,
-                                                                   void *recvbuf, int recvcount,
-                                                                   MPI_Datatype datatype, MPI_Op op,
-                                                                   MPIR_Comm * comm,
-                                                                   MPI_Request *
-                                                                   req)
-    MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter(const void *sendbuf, void *recvbuf,
-                                                             const int *recvcounts,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm,
+                                                         MPIR_Errflag_t *
+                                                         errflag) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgather(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf, int recvcount,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm,
+                                                           MPI_Request *
+                                                           req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgatherv(const void *sendbuf,
+                                                            int sendcount,
+                                                            MPI_Datatype sendtype,
+                                                            void *recvbuf,
+                                                            const int *recvcounts,
+                                                            const int *displs,
+                                                            MPI_Datatype recvtype,
+                                                            MPIR_Comm * comm,
+                                                            MPI_Request *
+                                                            req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoall(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf, int recvcount,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPI_Request *
+                                                          req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallv(const void *sendbuf,
+                                                           const int *sendcounts,
+                                                           const int *sdispls,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const int *rdispls,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm,
+                                                           MPI_Request *
+                                                           req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallw(const void *sendbuf,
+                                                           const int *sendcounts,
+                                                           const MPI_Aint * sdispls,
+                                                           const MPI_Datatype * sendtypes,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const MPI_Aint * rdispls,
+                                                           const MPI_Datatype * recvtypes,
+                                                           MPIR_Comm * comm,
+                                                           MPI_Request *
+                                                           req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ibarrier(MPIR_Comm * comm,
+                                                MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ibcast(void *buffer, int count, MPI_Datatype datatype,
+                                              int root, MPIR_Comm * comm,
+                                              MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgather(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  int recvcount, MPI_Datatype recvtype,
+                                                  MPIR_Comm * comm,
+                                                  MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgatherv(const void *sendbuf, int sendcount,
+                                                   MPI_Datatype sendtype, void *recvbuf,
+                                                   const int *recvcounts, const int *displs,
+                                                   MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                   MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallreduce(const void *sendbuf, void *recvbuf,
+                                                  int count, MPI_Datatype datatype, MPI_Op op,
+                                                  MPIR_Comm * comm,
+                                                  MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoall(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoallv(const void *sendbuf, const int *sendcounts,
+                                                  const int *sdispls, MPI_Datatype sendtype,
+                                                  void *recvbuf, const int *recvcounts,
+                                                  const int *rdispls, MPI_Datatype recvtype,
+                                                  MPIR_Comm * comm,
+                                                  MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
+                                                  MPIR_Comm * comm,
+                                                  MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iexscan(const void *sendbuf, void *recvbuf, int count,
+                                               MPI_Datatype datatype, MPI_Op op,
+                                               MPIR_Comm * comm,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_igather(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_igatherv(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                const int *recvcounts, const int *displs,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm,
+                                                MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter_block(const void *sendbuf,
+                                                             void *recvbuf, int recvcount,
                                                              MPI_Datatype datatype, MPI_Op op,
                                                              MPIR_Comm * comm,
                                                              MPI_Request *
-                                                             req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce(const void *sendbuf, void *recvbuf, int count,
-                                                     MPI_Datatype datatype, MPI_Op op, int root,
-                                                     MPIR_Comm * comm_ptr,
-                                                     MPI_Request *
-                                                     req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscan(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op,
-                                                   MPIR_Comm * comm,
-                                                   MPI_Request *
-                                                   req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatter(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      int root, MPIR_Comm * comm,
-                                                      MPI_Request *
-                                                      req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatterv(const void *sendbuf, const int *sendcounts,
-                                                       const int *displs, MPI_Datatype sendtype,
-                                                       void *recvbuf, int recvcount,
-                                                       MPI_Datatype recvtype, int root,
-                                                       MPIR_Comm * comm_ptr,
-                                                       MPI_Request *
-                                                       req) MPIDI_SHM_STATIC_INLINE_SUFFIX;
+                                                             req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                       const int *recvcounts,
+                                                       MPI_Datatype datatype, MPI_Op op,
+                                                       MPIR_Comm * comm,
+                                                       MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce(const void *sendbuf, void *recvbuf, int count,
+                                               MPI_Datatype datatype, MPI_Op op, int root,
+                                               MPIR_Comm * comm_ptr,
+                                               MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscan(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op,
+                                             MPIR_Comm * comm,
+                                             MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatter(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                int root, MPIR_Comm * comm,
+                                                MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatterv(const void *sendbuf, const int *sendcounts,
+                                                 const int *displs, MPI_Datatype sendtype,
+                                                 void *recvbuf, int recvcount,
+                                                 MPI_Datatype recvtype, int root,
+                                                 MPIR_Comm * comm_ptr,
+                                                 MPI_Request * req) MPL_STATIC_INLINE_SUFFIX;
 
 #endif /* SHM_PROTOTYPES_H_INCLUDED */
diff --git a/src/mpid/ch4/shm/include/shm_impl.h b/src/mpid/ch4/shm/include/shm_impl.h
index a6d0baa..34d6038 100644
--- a/src/mpid/ch4/shm/include/shm_impl.h
+++ b/src/mpid/ch4/shm/include/shm_impl.h
@@ -15,564 +15,548 @@
 #ifndef SHM_DIRECT
 #ifndef SHM_DISABLE_INLINES
 
-#ifndef MPIDI_SHM_STATIC_INLINE_PREFIX
-#define MPIDI_SHM_STATIC_INLINE_PREFIX __attribute__((always_inline)) static inline
-#endif
-
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_init(int rank, int size)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_init(int rank, int size)
 {
     return MPIDI_SHM_func->init(rank, size);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_finalize(void)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_finalize(void)
 {
     return MPIDI_SHM_func->finalize();
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_progress(int blocking)
 {
     return MPIDI_SHM_func->progress(blocking);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
-                                                             MPIDI_SHM_am_origin_handler_fn
-                                                             origin_handler_fn,
-                                                             MPIDI_SHM_am_target_handler_fn
-                                                             target_handler_fn)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reg_hdr_handler(int handler_id,
+                                                       MPIDI_SHM_am_origin_handler_fn
+                                                       origin_handler_fn,
+                                                       MPIDI_SHM_am_target_handler_fn
+                                                       target_handler_fn)
 {
     return MPIDI_SHM_func->reg_hdr_handler(handler_id, origin_handler_fn, target_handler_fn);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
-                                                          int root, MPIR_Comm * comm,
-                                                          MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_connect(const char *port_name, MPIR_Info * info,
+                                                    int root, MPIR_Comm * comm,
+                                                    MPIR_Comm ** newcomm_ptr)
 {
     return MPIDI_SHM_func->comm_connect(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_disconnect(MPIR_Comm * comm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_disconnect(MPIR_Comm * comm_ptr)
 {
     return MPIDI_SHM_func->comm_disconnect(comm_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_open_port(MPIR_Info * info_ptr, char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_open_port(MPIR_Info * info_ptr, char *port_name)
 {
     return MPIDI_SHM_func->open_port(info_ptr, port_name);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_close_port(const char *port_name)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_close_port(const char *port_name)
 {
     return MPIDI_SHM_func->close_port(port_name);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_Info * info,
-                                                         int root, MPIR_Comm * comm,
-                                                         MPIR_Comm ** newcomm_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_accept(const char *port_name, MPIR_Info * info,
+                                                   int root, MPIR_Comm * comm,
+                                                   MPIR_Comm ** newcomm_ptr)
 {
     return MPIDI_SHM_func->comm_accept(port_name, info, root, comm, newcomm_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
-                                                         const void *am_hdr, size_t am_hdr_sz,
-                                                         MPIR_Request * sreq, void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr(int rank, MPIR_Comm * comm, int handler_id,
+                                                   const void *am_hdr, size_t am_hdr_sz,
+                                                   MPIR_Request * sreq, void *shm_context)
 {
     return MPIDI_SHM_func->send_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, sreq,
                                        shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
-                                                           int handler_id, const void *am_hdr,
-                                                           size_t am_hdr_sz, void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr(int rank, MPIR_Comm * comm,
+                                                     int handler_id, const void *am_hdr,
+                                                     size_t am_hdr_sz, void *shm_context)
 {
     return MPIDI_SHM_func->inject_am_hdr(rank, comm, handler_id, am_hdr, am_hdr_sz, shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
-                                                     const void *am_hdr, size_t am_hdr_sz,
-                                                     const void *data, MPI_Count count,
-                                                     MPI_Datatype datatype, MPIR_Request * sreq,
-                                                     void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am(int rank, MPIR_Comm * comm, int handler_id,
+                                               const void *am_hdr, size_t am_hdr_sz,
+                                               const void *data, MPI_Count count,
+                                               MPI_Datatype datatype, MPIR_Request * sreq,
+                                               void *shm_context)
 {
     return MPIDI_SHM_func->send_am(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count, datatype,
                                    sreq, shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
-                                                       const void *am_hdr, size_t am_hdr_sz,
-                                                       const void *data, MPI_Count count,
-                                                       MPI_Datatype datatype, void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am(int rank, MPIR_Comm * comm, int handler_id,
+                                                 const void *am_hdr, size_t am_hdr_sz,
+                                                 const void *data, MPI_Count count,
+                                                 MPI_Datatype datatype, void *shm_context)
 {
     return MPIDI_SHM_func->inject_am(rank, comm, handler_id, am_hdr, am_hdr_sz, data, count,
                                      datatype, shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
-                                                      struct iovec *am_hdrs, size_t iov_len,
-                                                      const void *data, MPI_Count count,
-                                                      MPI_Datatype datatype, MPIR_Request * sreq,
-                                                      void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                                struct iovec *am_hdrs, size_t iov_len,
+                                                const void *data, MPI_Count count,
+                                                MPI_Datatype datatype, MPIR_Request * sreq,
+                                                void *shm_context)
 {
     return MPIDI_SHM_func->send_amv(rank, comm, handler_id, am_hdrs, iov_len, data, count, datatype,
                                     sreq, shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
-                                                        struct iovec *am_hdrs, size_t iov_len,
-                                                        const void *data, MPI_Count count,
-                                                        MPI_Datatype datatype, void *shm_context)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv(int rank, MPIR_Comm * comm, int handler_id,
+                                                  struct iovec *am_hdrs, size_t iov_len,
+                                                  const void *data, MPI_Count count,
+                                                  MPI_Datatype datatype, void *shm_context)
 {
     return MPIDI_SHM_func->inject_amv(rank, comm, handler_id, am_hdrs, iov_len, data, count,
                                       datatype, shm_context);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                               int src_rank, int handler_id,
-                                                               const void *am_hdr, size_t am_hdr_sz,
-                                                               MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                         int src_rank, int handler_id,
+                                                         const void *am_hdr, size_t am_hdr_sz,
+                                                         MPIR_Request * sreq)
 {
     return MPIDI_SHM_func->send_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
                                              sreq);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
-                                                                 int src_rank, int handler_id,
-                                                                 const void *am_hdr,
-                                                                 size_t am_hdr_sz)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
+                                                           int src_rank, int handler_id,
+                                                           const void *am_hdr, size_t am_hdr_sz)
 {
     return MPIDI_SHM_func->inject_am_hdr_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
-                                                           int src_rank, int handler_id,
-                                                           const void *am_hdr, size_t am_hdr_sz,
-                                                           const void *data, MPI_Count count,
-                                                           MPI_Datatype datatype,
-                                                           MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_am_reply(MPIR_Context_id_t context_id,
+                                                     int src_rank, int handler_id,
+                                                     const void *am_hdr, size_t am_hdr_sz,
+                                                     const void *data, MPI_Count count,
+                                                     MPI_Datatype datatype, MPIR_Request * sreq)
 {
     return MPIDI_SHM_func->send_am_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz, data,
                                          count, datatype, sreq);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
-                                                             int src_rank, int handler_id,
-                                                             const void *am_hdr, size_t am_hdr_sz,
-                                                             const void *data, MPI_Count count,
-                                                             MPI_Datatype datatype)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_am_reply(MPIR_Context_id_t context_id,
+                                                       int src_rank, int handler_id,
+                                                       const void *am_hdr, size_t am_hdr_sz,
+                                                       const void *data, MPI_Count count,
+                                                       MPI_Datatype datatype)
 {
     return MPIDI_SHM_func->inject_am_reply(context_id, src_rank, handler_id, am_hdr, am_hdr_sz,
                                            data, count, datatype);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
-                                                            int src_rank, int handler_id,
-                                                            struct iovec *am_hdr, size_t iov_len,
-                                                            const void *data, MPI_Count count,
-                                                            MPI_Datatype datatype,
-                                                            MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_amv_reply(MPIR_Context_id_t context_id,
+                                                      int src_rank, int handler_id,
+                                                      struct iovec *am_hdr, size_t iov_len,
+                                                      const void *data, MPI_Count count,
+                                                      MPI_Datatype datatype, MPIR_Request * sreq)
 {
     return MPIDI_SHM_func->send_amv_reply(context_id, src_rank, handler_id, am_hdr, iov_len, data,
                                           count, datatype, sreq);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
-                                                              int src_rank, int handler_id,
-                                                              struct iovec *am_hdrs, size_t iov_len,
-                                                              const void *data, MPI_Count count,
-                                                              MPI_Datatype datatype)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_inject_amv_reply(MPIR_Context_id_t context_id,
+                                                        int src_rank, int handler_id,
+                                                        struct iovec *am_hdrs, size_t iov_len,
+                                                        const void *data, MPI_Count count,
+                                                        MPI_Datatype datatype)
 {
     return MPIDI_SHM_func->inject_amv_reply(context_id, src_rank, handler_id, am_hdrs, iov_len,
                                             data, count, datatype);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_hdr_max_sz(void)
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_hdr_max_sz(void)
 {
     return MPIDI_SHM_func->am_hdr_max_sz();
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_inject_max_sz(void)
+MPL_STATIC_INLINE_PREFIX size_t MPIDI_SHM_am_inject_max_sz(void)
 {
     return MPIDI_SHM_func->am_inject_max_sz();
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_am_recv(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_am_recv(MPIR_Request * req)
 {
     return MPIDI_SHM_func->am_recv();
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
-                                                           int *lpid_ptr, MPL_bool is_remote)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
+                                                     int *lpid_ptr, MPL_bool is_remote)
 {
     return MPIDI_SHM_func->comm_get_lpid(comm_ptr, idx, lpid_ptr, is_remote);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_get(MPIR_Comm * comm_ptr, int rank,
-                                                      MPIR_Gpid * gpid)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gpid)
 {
     return MPIDI_SHM_func->gpid_get(comm_ptr, rank, gpid);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_get_node_id(MPIR_Comm * comm, int rank,
-                                                         MPID_Node_id_t * id_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_node_id(MPIR_Comm * comm, int rank,
+                                                   MPID_Node_id_t * id_p)
 {
     return MPIDI_SHM_func->get_node_id(comm, rank, id_p);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_get_max_node_id(MPIR_Comm * comm,
-                                                             MPID_Node_id_t * max_id_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
 {
     return MPIDI_SHM_func->get_max_node_id(comm, max_id_p);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
-                                                          MPIR_Gpid local_gpid[], int *singleAVT)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
+                                                    MPIR_Gpid local_gpid[], int *singleAVT)
 {
     return MPIDI_SHM_func->getallincomm(comm_ptr, local_size, local_gpid, singleAVT);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_tolpidarray(int size, MPIR_Gpid gpid[],
-                                                              int lpid[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gpid_tolpidarray(int size, MPIR_Gpid gpid[], int lpid[])
 {
     return MPIDI_SHM_func->gpid_tolpidarray(size, gpid, lpid);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
-                                                                         int size,
-                                                                         const int lpids[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr,
+                                                                   int size, const int lpids[])
 {
     return MPIDI_SHM_func->create_intercomm_from_lpids(newcomm_ptr, size, lpids);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_create(MPIR_Comm * comm)
 {
     return MPIDI_SHM_func->comm_create(comm);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm * comm)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_comm_destroy(MPIR_Comm * comm)
 {
     return MPIDI_SHM_func->comm_destroy(comm);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_init(MPIR_Request * req)
 {
     return MPIDI_SHM_func->am_request_init(req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request * req)
+MPL_STATIC_INLINE_PREFIX void MPIDI_SHM_am_request_finalize(MPIR_Request * req)
 {
     return MPIDI_SHM_func->am_request_finalize(req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send(const void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send(const void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->send(buf, count, datatype, rank, tag, comm, context_offset,
                                        request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend(const void *buf, int count,
-                                                   MPI_Datatype datatype, int rank, int tag,
-                                                   MPIR_Comm * comm, int context_offset,
-                                                   MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend(const void *buf, int count,
+                                             MPI_Datatype datatype, int rank, int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->ssend(buf, count, datatype, rank, tag, comm, context_offset,
                                         request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_startall(int count, MPIR_Request * requests[])
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_startall(int count, MPIR_Request * requests[])
 {
     return MPIDI_SHM_native_func->startall(count, requests);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_send_init(const void *buf, int count,
-                                                       MPI_Datatype datatype, int rank, int tag,
-                                                       MPIR_Comm * comm, int context_offset,
-                                                       MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_send_init(const void *buf, int count,
+                                                 MPI_Datatype datatype, int rank, int tag,
+                                                 MPIR_Comm * comm, int context_offset,
+                                                 MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->send_init(buf, count, datatype, rank, tag, comm, context_offset,
                                             request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ssend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->ssend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                              request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_rsend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_rsend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->rsend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                              request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_bsend_init(const void *buf, int count,
-                                                        MPI_Datatype datatype, int rank, int tag,
-                                                        MPIR_Comm * comm, int context_offset,
-                                                        MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_bsend_init(const void *buf, int count,
+                                                  MPI_Datatype datatype, int rank, int tag,
+                                                  MPIR_Comm * comm, int context_offset,
+                                                  MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->bsend_init(buf, count, datatype, rank, tag, comm, context_offset,
                                              request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_isend(const void *buf, int count,
-                                                   MPI_Datatype datatype, int rank, int tag,
-                                                   MPIR_Comm * comm, int context_offset,
-                                                   MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_isend(const void *buf, int count,
+                                             MPI_Datatype datatype, int rank, int tag,
+                                             MPIR_Comm * comm, int context_offset,
+                                             MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->isend(buf, count, datatype, rank, tag, comm, context_offset,
                                         request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_issend(const void *buf, int count,
-                                                    MPI_Datatype datatype, int rank, int tag,
-                                                    MPIR_Comm * comm, int context_offset,
-                                                    MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_issend(const void *buf, int count,
+                                              MPI_Datatype datatype, int rank, int tag,
+                                              MPIR_Comm * comm, int context_offset,
+                                              MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->issend(buf, count, datatype, rank, tag, comm, context_offset,
                                          request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_send(MPIR_Request * sreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_send(MPIR_Request * sreq)
 {
     return MPIDI_SHM_native_func->cancel_send(sreq);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_recv_init(void *buf, int count, MPI_Datatype datatype,
-                                                       int rank, int tag, MPIR_Comm * comm,
-                                                       int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_recv_init(void *buf, int count, MPI_Datatype datatype,
+                                                 int rank, int tag, MPIR_Comm * comm,
+                                                 int context_offset, MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->recv_init(buf, count, datatype, rank, tag, comm, context_offset,
                                             request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_recv(void *buf, int count, MPI_Datatype datatype,
-                                                  int rank, int tag, MPIR_Comm * comm,
-                                                  int context_offset, MPI_Status * status,
-                                                  MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_recv(void *buf, int count, MPI_Datatype datatype,
+                                            int rank, int tag, MPIR_Comm * comm,
+                                            int context_offset, MPI_Status * status,
+                                            MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->recv(buf, count, datatype, rank, tag, comm, context_offset,
                                        status, request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_irecv(void *buf, int count, MPI_Datatype datatype,
-                                                   int rank, int tag, MPIR_Comm * comm,
-                                                   int context_offset, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_irecv(void *buf, int count, MPI_Datatype datatype,
+                                             int rank, int tag, MPIR_Comm * comm,
+                                             int context_offset, MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->irecv(buf, count, datatype, rank, tag, comm, context_offset,
                                         request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_imrecv(void *buf, int count, MPI_Datatype datatype,
-                                                    MPIR_Request * message, MPIR_Request ** rreqp)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_imrecv(void *buf, int count, MPI_Datatype datatype,
+                                              MPIR_Request * message, MPIR_Request ** rreqp)
 {
     return MPIDI_SHM_native_func->imrecv(buf, count, datatype, message, rreqp);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_recv(MPIR_Request * rreq)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_cancel_recv(MPIR_Request * rreq)
 {
     return MPIDI_SHM_native_func->cancel_recv(rreq);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX void *MPIDI_SHM_alloc_mem(size_t size, MPIR_Info * info_ptr)
+MPL_STATIC_INLINE_PREFIX void *MPIDI_SHM_alloc_mem(size_t size, MPIR_Info * info_ptr)
 {
     return MPIDI_SHM_native_func->alloc_mem(size, info_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_free_mem(void *ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_free_mem(void *ptr)
 {
     return MPIDI_SHM_native_func->free_mem(ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_improbe(int source, int tag, MPIR_Comm * comm,
-                                                     int context_offset, int *flag,
-                                                     MPIR_Request ** message, MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_improbe(int source, int tag, MPIR_Comm * comm,
+                                               int context_offset, int *flag,
+                                               MPIR_Request ** message, MPI_Status * status)
 {
     return MPIDI_SHM_native_func->improbe(source, tag, comm, context_offset, flag, message, status);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iprobe(int source, int tag, MPIR_Comm * comm,
-                                                    int context_offset, int *flag,
-                                                    MPI_Status * status)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iprobe(int source, int tag, MPIR_Comm * comm,
+                                              int context_offset, int *flag, MPI_Status * status)
 {
     return MPIDI_SHM_native_func->iprobe(source, tag, comm, context_offset, flag, status);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_set_info(MPIR_Win * win, MPIR_Info * info)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_set_info(MPIR_Win * win, MPIR_Info * info)
 {
     return MPIDI_SHM_native_func->win_set_info(win, info);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_shared_query(MPIR_Win * win, int rank,
-                                                              MPI_Aint * size, int *disp_unit,
-                                                              void *baseptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_shared_query(MPIR_Win * win, int rank,
+                                                        MPI_Aint * size, int *disp_unit,
+                                                        void *baseptr)
 {
     return MPIDI_SHM_native_func->win_shared_query(win, rank, size, disp_unit, baseptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
 {
     return MPIDI_SHM_native_func->put(origin_addr, origin_count, origin_datatype, target_rank,
                                       target_disp, target_count, target_datatype, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_start(MPIR_Group * group, int assert,
-                                                       MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_start(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_start(group, assert, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_complete(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_complete(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_complete(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_post(MPIR_Group * group, int assert,
-                                                      MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_post(MPIR_Group * group, int assert, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_post(group, assert, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_wait(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_wait(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_wait(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_test(MPIR_Win * win, int *flag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_test(MPIR_Win * win, int *flag)
 {
     return MPIDI_SHM_native_func->win_test(win, flag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock(int lock_type, int rank, int assert,
-                                                      MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock(int lock_type, int rank, int assert, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_lock(lock_type, rank, assert, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock(int rank, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_unlock(rank, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_get_info(MPIR_Win * win, MPIR_Info ** info_p_p)
 {
     return MPIDI_SHM_native_func->win_get_info(win, info_p_p);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
 {
     return MPIDI_SHM_native_func->get(origin_addr, origin_count, origin_datatype, target_rank,
                                       target_disp, target_count, target_datatype, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_free(MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_free(MPIR_Win ** win_ptr)
 {
     return MPIDI_SHM_native_func->win_free(win_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_fence(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_fence(int assert, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_fence(assert, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create(void *base, MPI_Aint length, int disp_unit,
-                                                        MPIR_Info * info, MPIR_Comm * comm_ptr,
-                                                        MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create(void *base, MPI_Aint length, int disp_unit,
+                                                  MPIR_Info * info, MPIR_Comm * comm_ptr,
+                                                  MPIR_Win ** win_ptr)
 {
     return MPIDI_SHM_native_func->win_create(base, length, disp_unit, info, comm_ptr, win_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
 {
     return MPIDI_SHM_native_func->accumulate(origin_addr, origin_count, origin_datatype,
                                              target_rank, target_disp, target_count,
                                              target_datatype, op, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_attach(MPIR_Win * win, void *base, MPI_Aint size)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_attach(MPIR_Win * win, void *base, MPI_Aint size)
 {
     return MPIDI_SHM_native_func->win_attach(win, base, size);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate_shared(MPI_Aint size, int disp_unit,
-                                                                 MPIR_Info * info_ptr,
-                                                                 MPIR_Comm * comm_ptr,
-                                                                 void **base_ptr,
-                                                                 MPIR_Win ** win_ptr)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate_shared(MPI_Aint size, int disp_unit,
+                                                           MPIR_Info * info_ptr,
+                                                           MPIR_Comm * comm_ptr,
+                                                           void **base_ptr, MPIR_Win ** win_ptr)
 {
     return MPIDI_SHM_native_func->win_allocate_shared(size, disp_unit, info_ptr, comm_ptr, base_ptr,
                                                       win_ptr);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                  MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
+                                            MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->rput(origin_addr, origin_count, origin_datatype, target_rank,
                                        target_disp, target_count, target_datatype, win, request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local(int rank, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_flush_local(rank, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_detach(MPIR_Win * win, const void *base)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_detach(MPIR_Win * win, const void *base)
 {
     return MPIDI_SHM_native_func->win_detach(win, base);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_compare_and_swap(const void *origin_addr,
-                                                              const void *compare_addr,
-                                                              void *result_addr,
-                                                              MPI_Datatype datatype,
-                                                              int target_rank, MPI_Aint target_disp,
-                                                              MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_compare_and_swap(const void *origin_addr,
+                                                        const void *compare_addr,
+                                                        void *result_addr,
+                                                        MPI_Datatype datatype,
+                                                        int target_rank, MPI_Aint target_disp,
+                                                        MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->compare_and_swap(origin_addr, compare_addr, result_addr, datatype,
                                                    target_rank, target_disp, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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, MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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, MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->raccumulate(origin_addr, origin_count, origin_datatype,
                                               target_rank, target_disp, target_count,
                                               target_datatype, op, win, request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                             MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
+                                                       MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->rget_accumulate(origin_addr, origin_count, origin_datatype,
                                                   result_addr, result_count, result_datatype,
@@ -580,72 +564,72 @@ MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_rget_accumulate(const void *origin_
                                                   target_datatype, op, win, request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_fetch_and_op(const void *origin_addr,
-                                                          void *result_addr, MPI_Datatype datatype,
-                                                          int target_rank, MPI_Aint target_disp,
-                                                          MPI_Op op, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_fetch_and_op(const void *origin_addr,
+                                                    void *result_addr, MPI_Datatype datatype,
+                                                    int target_rank, MPI_Aint target_disp,
+                                                    MPI_Op op, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->fetch_and_op(origin_addr, result_addr, datatype, target_rank,
                                                target_disp, op, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate(MPI_Aint size, int disp_unit,
-                                                          MPIR_Info * info, MPIR_Comm * comm,
-                                                          void *baseptr, MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_allocate(MPI_Aint size, int disp_unit,
+                                                    MPIR_Info * info, MPIR_Comm * comm,
+                                                    void *baseptr, MPIR_Win ** win)
 {
     return MPIDI_SHM_native_func->win_allocate(size, disp_unit, info, comm, baseptr, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush(int rank, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush(int rank, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_flush(rank, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_local_all(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_flush_local_all(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_unlock_all(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_unlock_all(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
-                                                                MPIR_Win ** win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_create_dynamic(MPIR_Info * info, MPIR_Comm * comm,
+                                                          MPIR_Win ** win)
 {
     return MPIDI_SHM_native_func->win_create_dynamic(info, comm, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
-                                                  MPIR_Request ** request)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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,
+                                            MPIR_Request ** request)
 {
     return MPIDI_SHM_native_func->rget(origin_addr, origin_count, origin_datatype, target_rank,
                                        target_disp, target_count, target_datatype, win, request);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_sync(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_sync(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_sync(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_all(MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_flush_all(MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_flush_all(win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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)
 {
     return MPIDI_SHM_native_func->get_accumulate(origin_addr, origin_count, origin_datatype,
                                                  result_addr, result_count, result_datatype,
@@ -653,436 +637,428 @@ MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_get_accumulate(const void *origin_a
                                                  target_datatype, op, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock_all(int assert, MPIR_Win * win)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_win_lock_all(int assert, MPIR_Win * win)
 {
     return MPIDI_SHM_native_func->win_lock_all(assert, win);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->barrier(comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_bcast(void *buffer, int count, MPI_Datatype datatype,
-                                                   int root, MPIR_Comm * comm,
-                                                   MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_bcast(void *buffer, int count, MPI_Datatype datatype,
+                                             int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->bcast(buffer, count, datatype, root, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allreduce(const void *sendbuf, void *recvbuf,
-                                                       int count, MPI_Datatype datatype, MPI_Op op,
-                                                       MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allreduce(const void *sendbuf, void *recvbuf,
+                                                 int count, MPI_Datatype datatype, MPI_Op op,
+                                                 MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allgather(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       int recvcount, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allgather(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                             recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_allgatherv(const void *sendbuf, int sendcount,
-                                                        MPI_Datatype sendtype, void *recvbuf,
-                                                        const int *recvcounts, const int *displs,
-                                                        MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                        MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_allgatherv(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  const int *recvcounts, const int *displs,
+                                                  MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                  MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                                              displs, recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scatter(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scatter(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                           recvtype, root, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scatterv(const void *sendbuf, const int *sendcounts,
-                                                      const int *displs, MPI_Datatype sendtype,
-                                                      void *recvbuf, int recvcount,
-                                                      MPI_Datatype recvtype, int root,
-                                                      MPIR_Comm * comm_ptr,
-                                                      MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scatterv(const void *sendbuf, const int *sendcounts,
+                                                const int *displs, MPI_Datatype sendtype,
+                                                void *recvbuf, int recvcount,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
                                            recvcount, recvtype, root, comm_ptr, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gather(const void *sendbuf, int sendcount,
-                                                    MPI_Datatype sendtype, void *recvbuf,
-                                                    int recvcount, MPI_Datatype recvtype, int root,
-                                                    MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gather(const void *sendbuf, int sendcount,
+                                              MPI_Datatype sendtype, void *recvbuf,
+                                              int recvcount, MPI_Datatype recvtype, int root,
+                                              MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
                                          root, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_gatherv(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     const int *recvcounts, const int *displs,
-                                                     MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_gatherv(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               const int *recvcounts, const int *displs,
+                                               MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs,
                                           recvtype, root, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoall(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoall(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                            recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoallv(const void *sendbuf, const int *sendcounts,
-                                                       const int *sdispls, MPI_Datatype sendtype,
-                                                       void *recvbuf, const int *recvcounts,
-                                                       const int *rdispls, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_alltoallv(const void *sendbuf, const int *sendcounts,
+                                                 const int *sdispls, MPI_Datatype sendtype,
+                                                 void *recvbuf, const int *recvcounts,
+                                                 const int *rdispls, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
                                             recvcounts, rdispls, recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
-                                                       MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
+                                                 MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf,
                                             recvcounts, rdispls, recvtypes, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce(const void *sendbuf, void *recvbuf, int count,
-                                                    MPI_Datatype datatype, MPI_Op op, int root,
-                                                    MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op, int root,
+                                              MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr,
                                          errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter(const void *sendbuf, void *recvbuf,
-                                                            const int *recvcounts,
-                                                            MPI_Datatype datatype, MPI_Op op,
-                                                            MPIR_Comm * comm_ptr,
-                                                            MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter(const void *sendbuf, void *recvbuf,
+                                                      const int *recvcounts,
+                                                      MPI_Datatype datatype, MPI_Op op,
+                                                      MPIR_Comm * comm_ptr,
+                                                      MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op,
                                                  comm_ptr, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter_block(const void *sendbuf,
-                                                                  void *recvbuf, int recvcount,
-                                                                  MPI_Datatype datatype, MPI_Op op,
-                                                                  MPIR_Comm * comm_ptr,
-                                                                  MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_reduce_scatter_block(const void *sendbuf,
+                                                            void *recvbuf, int recvcount,
+                                                            MPI_Datatype datatype, MPI_Op op,
+                                                            MPIR_Comm * comm_ptr,
+                                                            MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op,
                                                        comm_ptr, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_scan(const void *sendbuf, void *recvbuf, int count,
-                                                  MPI_Datatype datatype, MPI_Op op,
-                                                  MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_scan(const void *sendbuf, void *recvbuf, int count,
+                                            MPI_Datatype datatype, MPI_Op op,
+                                            MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->scan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_exscan(const void *sendbuf, void *recvbuf, int count,
-                                                    MPI_Datatype datatype, MPI_Op op,
-                                                    MPIR_Comm * comm, MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_exscan(const void *sendbuf, void *recvbuf, int count,
+                                              MPI_Datatype datatype, MPI_Op op,
+                                              MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->exscan(sendbuf, recvbuf, count, datatype, op, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgather(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf, int recvcount,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgather(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf, int recvcount,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->neighbor_allgather(sendbuf, sendcount, sendtype, recvbuf,
                                                      recvcount, recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgatherv(const void *sendbuf, int sendcount,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const int *displs,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_allgatherv(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const int *displs,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm,
+                                                           MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->neighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                                       recvcounts, displs, recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallv(const void *sendbuf,
-                                                                const int *sendcounts,
-                                                                const int *sdispls,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const int *rdispls,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallv(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const int *sdispls,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const int *rdispls,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->neighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype,
                                                      recvbuf, recvcounts, rdispls, recvtype, comm,
                                                      errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallw(const void *sendbuf,
-                                                                const int *sendcounts,
-                                                                const MPI_Aint * sdispls,
-                                                                const MPI_Datatype * sendtypes,
-                                                                void *recvbuf,
-                                                                const int *recvcounts,
-                                                                const MPI_Aint * rdispls,
-                                                                const MPI_Datatype * recvtypes,
-                                                                MPIR_Comm * comm,
-                                                                MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoallw(const void *sendbuf,
+                                                          const int *sendcounts,
+                                                          const MPI_Aint * sdispls,
+                                                          const MPI_Datatype * sendtypes,
+                                                          void *recvbuf,
+                                                          const int *recvcounts,
+                                                          const MPI_Aint * rdispls,
+                                                          const MPI_Datatype * recvtypes,
+                                                          MPIR_Comm * comm,
+                                                          MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                                                      recvbuf, recvcounts, rdispls, recvtypes, comm,
                                                      errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoall(const void *sendbuf, int sendcount,
-                                                               MPI_Datatype sendtype, void *recvbuf,
-                                                               int recvcount, MPI_Datatype recvtype,
-                                                               MPIR_Comm * comm,
-                                                               MPIR_Errflag_t * errflag)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_neighbor_alltoall(const void *sendbuf, int sendcount,
+                                                         MPI_Datatype sendtype, void *recvbuf,
+                                                         int recvcount, MPI_Datatype recvtype,
+                                                         MPIR_Comm * comm, MPIR_Errflag_t * errflag)
 {
     return MPIDI_SHM_native_func->neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf,
                                                     recvcount, recvtype, comm, errflag);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgather(const void *sendbuf, int sendcount,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf, int recvcount,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgather(const void *sendbuf, int sendcount,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf, int recvcount,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ineighbor_allgather(sendbuf, sendcount, sendtype, recvbuf,
                                                       recvcount, recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgatherv(const void *sendbuf,
-                                                                  int sendcount,
-                                                                  MPI_Datatype sendtype,
-                                                                  void *recvbuf,
-                                                                  const int *recvcounts,
-                                                                  const int *displs,
-                                                                  MPI_Datatype recvtype,
-                                                                  MPIR_Comm * comm,
-                                                                  MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_allgatherv(const void *sendbuf,
+                                                            int sendcount,
+                                                            MPI_Datatype sendtype,
+                                                            void *recvbuf,
+                                                            const int *recvcounts,
+                                                            const int *displs,
+                                                            MPI_Datatype recvtype,
+                                                            MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ineighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf,
                                                        recvcounts, displs, recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoall(const void *sendbuf, int sendcount,
-                                                                MPI_Datatype sendtype,
-                                                                void *recvbuf, int recvcount,
-                                                                MPI_Datatype recvtype,
-                                                                MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoall(const void *sendbuf, int sendcount,
+                                                          MPI_Datatype sendtype,
+                                                          void *recvbuf, int recvcount,
+                                                          MPI_Datatype recvtype,
+                                                          MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf,
                                                      recvcount, recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallv(const void *sendbuf,
-                                                                 const int *sendcounts,
-                                                                 const int *sdispls,
-                                                                 MPI_Datatype sendtype,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const int *rdispls,
-                                                                 MPI_Datatype recvtype,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallv(const void *sendbuf,
+                                                           const int *sendcounts,
+                                                           const int *sdispls,
+                                                           MPI_Datatype sendtype,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const int *rdispls,
+                                                           MPI_Datatype recvtype,
+                                                           MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ineighbor_alltoallv(sendbuf, sendcounts, sdispls, sendtype,
                                                       recvbuf, recvcounts, rdispls, recvtype, comm,
                                                       req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallw(const void *sendbuf,
-                                                                 const int *sendcounts,
-                                                                 const MPI_Aint * sdispls,
-                                                                 const MPI_Datatype * sendtypes,
-                                                                 void *recvbuf,
-                                                                 const int *recvcounts,
-                                                                 const MPI_Aint * rdispls,
-                                                                 const MPI_Datatype * recvtypes,
-                                                                 MPIR_Comm * comm,
-                                                                 MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ineighbor_alltoallw(const void *sendbuf,
+                                                           const int *sendcounts,
+                                                           const MPI_Aint * sdispls,
+                                                           const MPI_Datatype * sendtypes,
+                                                           void *recvbuf,
+                                                           const int *recvcounts,
+                                                           const MPI_Aint * rdispls,
+                                                           const MPI_Datatype * recvtypes,
+                                                           MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes,
                                                       recvbuf, recvcounts, rdispls, recvtypes, comm,
                                                       req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ibarrier(MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ibarrier(MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ibarrier(comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ibcast(void *buffer, int count, MPI_Datatype datatype,
-                                                    int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ibcast(void *buffer, int count, MPI_Datatype datatype,
+                                              int root, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ibcast(buffer, count, datatype, root, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgather(const void *sendbuf, int sendcount,
-                                                        MPI_Datatype sendtype, void *recvbuf,
-                                                        int recvcount, MPI_Datatype recvtype,
-                                                        MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgather(const void *sendbuf, int sendcount,
+                                                  MPI_Datatype sendtype, void *recvbuf,
+                                                  int recvcount, MPI_Datatype recvtype,
+                                                  MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                              recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgatherv(const void *sendbuf, int sendcount,
-                                                         MPI_Datatype sendtype, void *recvbuf,
-                                                         const int *recvcounts, const int *displs,
-                                                         MPI_Datatype recvtype, MPIR_Comm * comm,
-                                                         MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallgatherv(const void *sendbuf, int sendcount,
+                                                   MPI_Datatype sendtype, void *recvbuf,
+                                                   const int *recvcounts, const int *displs,
+                                                   MPI_Datatype recvtype, MPIR_Comm * comm,
+                                                   MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                                               displs, recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iallreduce(const void *sendbuf, void *recvbuf,
-                                                        int count, MPI_Datatype datatype, MPI_Op op,
-                                                        MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iallreduce(const void *sendbuf, void *recvbuf,
+                                                  int count, MPI_Datatype datatype, MPI_Op op,
+                                                  MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iallreduce(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoall(const void *sendbuf, int sendcount,
-                                                       MPI_Datatype sendtype, void *recvbuf,
-                                                       int recvcount, MPI_Datatype recvtype,
-                                                       MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoall(const void *sendbuf, int sendcount,
+                                                 MPI_Datatype sendtype, void *recvbuf,
+                                                 int recvcount, MPI_Datatype recvtype,
+                                                 MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                             recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoallv(const void *sendbuf, const int *sendcounts,
-                                                        const int *sdispls, MPI_Datatype sendtype,
-                                                        void *recvbuf, const int *recvcounts,
-                                                        const int *rdispls, MPI_Datatype recvtype,
-                                                        MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ialltoallv(const void *sendbuf, const int *sendcounts,
+                                                  const int *sdispls, MPI_Datatype sendtype,
+                                                  void *recvbuf, const int *recvcounts,
+                                                  const int *rdispls, MPI_Datatype recvtype,
+                                                  MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
                                              recvcounts, rdispls, recvtype, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
-                                                        MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_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[],
+                                                  MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf,
                                              recvcounts, rdispls, recvtypes, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iexscan(const void *sendbuf, void *recvbuf, int count,
-                                                     MPI_Datatype datatype, MPI_Op op,
-                                                     MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iexscan(const void *sendbuf, void *recvbuf, int count,
+                                               MPI_Datatype datatype, MPI_Op op,
+                                               MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iexscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_igather(const void *sendbuf, int sendcount,
-                                                     MPI_Datatype sendtype, void *recvbuf,
-                                                     int recvcount, MPI_Datatype recvtype, int root,
-                                                     MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_igather(const void *sendbuf, int sendcount,
+                                               MPI_Datatype sendtype, void *recvbuf,
+                                               int recvcount, MPI_Datatype recvtype, int root,
+                                               MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->igather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                           recvtype, root, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_igatherv(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      const int *recvcounts, const int *displs,
-                                                      MPI_Datatype recvtype, int root,
-                                                      MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_igatherv(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                const int *recvcounts, const int *displs,
+                                                MPI_Datatype recvtype, int root,
+                                                MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                                            displs, recvtype, root, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter_block(const void *sendbuf,
-                                                                   void *recvbuf, int recvcount,
-                                                                   MPI_Datatype datatype, MPI_Op op,
-                                                                   MPIR_Comm * comm,
-                                                                   MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter_block(const void *sendbuf,
+                                                             void *recvbuf, int recvcount,
+                                                             MPI_Datatype datatype, MPI_Op op,
+                                                             MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op,
                                                         comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter(const void *sendbuf, void *recvbuf,
-                                                             const int *recvcounts,
-                                                             MPI_Datatype datatype, MPI_Op op,
-                                                             MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce_scatter(const void *sendbuf, void *recvbuf,
+                                                       const int *recvcounts,
+                                                       MPI_Datatype datatype, MPI_Op op,
+                                                       MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm,
                                                   req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce(const void *sendbuf, void *recvbuf, int count,
-                                                     MPI_Datatype datatype, MPI_Op op, int root,
-                                                     MPIR_Comm * comm_ptr, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_ireduce(const void *sendbuf, void *recvbuf, int count,
+                                               MPI_Datatype datatype, MPI_Op op, int root,
+                                               MPIR_Comm * comm_ptr, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr,
                                           req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscan(const void *sendbuf, void *recvbuf, int count,
-                                                   MPI_Datatype datatype, MPI_Op op,
-                                                   MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscan(const void *sendbuf, void *recvbuf, int count,
+                                             MPI_Datatype datatype, MPI_Op op,
+                                             MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iscan(sendbuf, recvbuf, count, datatype, op, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatter(const void *sendbuf, int sendcount,
-                                                      MPI_Datatype sendtype, void *recvbuf,
-                                                      int recvcount, MPI_Datatype recvtype,
-                                                      int root, MPIR_Comm * comm, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatter(const void *sendbuf, int sendcount,
+                                                MPI_Datatype sendtype, void *recvbuf,
+                                                int recvcount, MPI_Datatype recvtype,
+                                                int root, MPIR_Comm * comm, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                                            recvtype, root, comm, req);
 };
 
-MPIDI_SHM_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatterv(const void *sendbuf, const int *sendcounts,
-                                                       const int *displs, MPI_Datatype sendtype,
-                                                       void *recvbuf, int recvcount,
-                                                       MPI_Datatype recvtype, int root,
-                                                       MPIR_Comm * comm_ptr, MPI_Request * req)
+MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_iscatterv(const void *sendbuf, const int *sendcounts,
+                                                 const int *displs, MPI_Datatype sendtype,
+                                                 void *recvbuf, int recvcount,
+                                                 MPI_Datatype recvtype, int root,
+                                                 MPIR_Comm * comm_ptr, MPI_Request * req)
 {
     return MPIDI_SHM_native_func->iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
                                             recvcount, recvtype, root, comm_ptr, req);
diff --git a/src/mpl/include/mpl_base.h b/src/mpl/include/mpl_base.h
index 7718502..9194a10 100644
--- a/src/mpl/include/mpl_base.h
+++ b/src/mpl/include/mpl_base.h
@@ -52,6 +52,9 @@
 #  endif /* MPL_HAVE_GCC_ATTRIBUTE */
 #endif /* ATTRIBUTE */
 
+#define MPL_STATIC_INLINE_PREFIX ATTRIBUTE((always_inline)) static inline
+#define MPL_STATIC_INLINE_SUFFIX ATTRIBUTE((always_inline))
+
 /* These likely/unlikely macros provide static branch prediction hints to the
  * compiler, if such hints are available.  Simply wrap the relevant expression in
  * the macro, like this:

http://git.mpich.org/mpich.git/commitdiff/5d2ded70d81461d9db6661e2fb32c8a1b4e97db9

commit 5d2ded70d81461d9db6661e2fb32c8a1b4e97db9
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 09:01:51 2016 -0500

    CH4: Delete unused functions
    
    MPIDI_NM_am_inject_max_sz, MPIDI_NM_get_max_node_id,
    MPIDI_NM_get_node_id.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/include/netmod.h b/src/mpid/ch4/netmod/include/netmod.h
index bd33b0c..6b79d06 100644
--- a/src/mpid/ch4/netmod/include/netmod.h
+++ b/src/mpid/ch4/netmod/include/netmod.h
@@ -73,13 +73,10 @@ typedef int (*MPIDI_NM_send_amv_reply_t) (MPIR_Context_id_t context_id, int src_
                                           const void *data, MPI_Count count, MPI_Datatype datatype,
                                           MPIR_Request * sreq);
 typedef size_t(*MPIDI_NM_am_hdr_max_sz_t) (void);
-typedef size_t(*MPIDI_NM_am_inject_max_sz_t) (void);
 typedef int (*MPIDI_NM_am_recv_t) (MPIR_Request * req);
 typedef int (*MPIDI_NM_comm_get_lpid_t) (MPIR_Comm * comm_ptr, int idx, int *lpid_ptr,
                                          MPL_bool is_remote);
 typedef int (*MPIDI_NM_gpid_get_t) (MPIR_Comm * comm_ptr, int rank, MPIR_Gpid * gpid);
-typedef int (*MPIDI_NM_get_node_id_t) (MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p);
-typedef int (*MPIDI_NM_get_max_node_id_t) (MPIR_Comm * comm, MPID_Node_id_t * max_id_p);
 typedef int (*MPIDI_NM_getallincomm_t) (MPIR_Comm * comm_ptr, int local_size,
                                         MPIR_Gpid local_gpids[], int *singleAVT);
 typedef int (*MPIDI_NM_gpid_tolpidarray_t) (int size, MPIR_Gpid gpid[], int lpid[]);
@@ -372,8 +369,6 @@ typedef struct MPIDI_NM_funcs {
     /* Routines that handle addressing */
     MPIDI_NM_comm_get_lpid_t comm_get_lpid;
     MPIDI_NM_gpid_get_t gpid_get;
-    MPIDI_NM_get_node_id_t get_node_id;
-    MPIDI_NM_get_max_node_id_t get_max_node_id;
     MPIDI_NM_getallincomm_t getallincomm;
     MPIDI_NM_gpid_tolpidarray_t gpid_tolpidarray;
     MPIDI_NM_create_intercomm_from_lpids_t create_intercomm_from_lpids;
@@ -394,7 +389,6 @@ typedef struct MPIDI_NM_funcs {
     MPIDI_NM_send_am_reply_t send_am_reply;
     MPIDI_NM_send_amv_reply_t send_amv_reply;
     MPIDI_NM_am_hdr_max_sz_t am_hdr_max_sz;
-    MPIDI_NM_am_inject_max_sz_t am_inject_max_sz;
     MPIDI_NM_am_recv_t am_recv;
 } MPIDI_NM_funcs_t;
 
@@ -601,7 +595,6 @@ MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_send_amv_reply(MPIR_Context_id_t cont
                                                           MPIR_Request *
                                                           sreq) MPIDI_NM_STATIC_INLINE_SUFFIX;
 MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_inject_max_sz(void) MPIDI_NM_STATIC_INLINE_SUFFIX;
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request *
                                                    req) MPIDI_NM_STATIC_INLINE_SUFFIX;
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, int idx,
@@ -610,12 +603,6 @@ MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_comm_get_lpid(MPIR_Comm * comm_ptr, i
     MPIDI_NM_STATIC_INLINE_SUFFIX;
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank,
                                                     MPIR_Gpid * gpid) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank,
-                                                       MPID_Node_id_t *
-                                                       id_p) MPIDI_NM_STATIC_INLINE_SUFFIX;
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_get_max_node_id(MPIR_Comm * comm,
-                                                           MPID_Node_id_t *
-                                                           max_id_p) MPIDI_NM_STATIC_INLINE_SUFFIX;
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
                                                         MPIR_Gpid local_gpids[],
                                                         int *singleAVT)
diff --git a/src/mpid/ch4/netmod/include/netmod_impl.h b/src/mpid/ch4/netmod/include/netmod_impl.h
index 96cb922..4fba2a4 100644
--- a/src/mpid/ch4/netmod/include/netmod_impl.h
+++ b/src/mpid/ch4/netmod/include/netmod_impl.h
@@ -162,11 +162,6 @@ MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_hdr_max_sz(void)
     return MPIDI_NM_func->am_hdr_max_sz();
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX size_t MPIDI_NM_am_inject_max_sz(void)
-{
-    return MPIDI_NM_func->am_inject_max_sz();
-};
-
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     return MPIDI_NM_func->am_recv(req);
@@ -184,18 +179,6 @@ MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int ra
     return MPIDI_NM_func->gpid_get(comm_ptr, rank, gpid);
 };
 
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank,
-                                                       MPID_Node_id_t * id_p)
-{
-    return MPIDI_NM_func->get_node_id(comm, rank, id_p);
-};
-
-MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_get_max_node_id(MPIR_Comm * comm,
-                                                           MPID_Node_id_t * max_id_p)
-{
-    return MPIDI_NM_func->get_max_node_id(comm, max_id_p);
-};
-
 MPIDI_NM_STATIC_INLINE_PREFIX int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr, int local_size,
                                                         MPIR_Gpid local_gpid[], int *singleAVT)
 {
diff --git a/src/mpid/ch4/netmod/ofi/func_table.c b/src/mpid/ch4/netmod/ofi/func_table.c
index 777c73e..f8a54a4 100644
--- a/src/mpid/ch4/netmod/ofi/func_table.c
+++ b/src/mpid/ch4/netmod/ofi/func_table.c
@@ -24,8 +24,6 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_comm_accept,
     MPIDI_NM_comm_get_lpid,
     MPIDI_NM_gpid_get,
-    MPIDI_NM_get_node_id,
-    MPIDI_NM_get_max_node_id,
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
@@ -44,7 +42,6 @@ MPIDI_NM_funcs_t MPIDI_NM_ofi_funcs = {
     MPIDI_NM_send_am_reply,
     MPIDI_NM_send_amv_reply,
     MPIDI_NM_am_hdr_max_sz,
-    MPIDI_NM_am_inject_max_sz,
     MPIDI_NM_am_recv
 };
 
diff --git a/src/mpid/ch4/netmod/ofi/ofi_am.h b/src/mpid/ch4/netmod/ofi/ofi_am.h
index f3425dd..e3b6287 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_am.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_am.h
@@ -349,13 +349,6 @@ static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline size_t MPIDI_NM_am_inject_max_sz(void)
-{
-    if (unlikely(MPIDI_Global.max_buffered_send < sizeof(MPIDI_OFI_am_header_t)))
-        return 0;
-    return MPIDI_Global.max_buffered_send - sizeof(MPIDI_OFI_am_header_t);
-}
-
 static inline int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch4/netmod/ofi/ofi_init.h b/src/mpid/ch4/netmod/ofi/ofi_init.h
index 09e34d2..7b12704 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_init.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_init.h
@@ -643,18 +643,6 @@ static inline int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid *
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
-{
-    MPIDI_CH4U_get_node_id(comm, rank, id_p);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
-{
-    MPIDI_CH4U_get_max_node_id(comm, max_id_p);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr,
                                         int local_size, MPIR_Gpid local_gpids[], int *singleAVT)
 {
diff --git a/src/mpid/ch4/netmod/portals4/func_table.c b/src/mpid/ch4/netmod/portals4/func_table.c
index 1c123eb..c6e9334 100644
--- a/src/mpid/ch4/netmod/portals4/func_table.c
+++ b/src/mpid/ch4/netmod/portals4/func_table.c
@@ -24,8 +24,6 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_comm_accept,
     MPIDI_NM_comm_get_lpid,
     MPIDI_NM_gpid_get,
-    MPIDI_NM_get_node_id,
-    MPIDI_NM_get_max_node_id,
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
@@ -44,7 +42,6 @@ MPIDI_NM_funcs_t MPIDI_NM_portals4_funcs = {
     MPIDI_NM_send_am_reply,
     MPIDI_NM_send_amv_reply,
     MPIDI_NM_am_hdr_max_sz,
-    MPIDI_NM_am_inject_max_sz,
     MPIDI_NM_am_recv,
 };
 
diff --git a/src/mpid/ch4/netmod/portals4/ptl_am.h b/src/mpid/ch4/netmod/portals4/ptl_am.h
index 6b12443..de0e607 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_am.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_am.h
@@ -355,12 +355,6 @@ static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline size_t MPIDI_NM_am_inject_max_sz(void)
-{
-    MPIR_Assert(0);
-    return 0;
-}
-
 static inline int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/portals4/ptl_init.h b/src/mpid/ch4/netmod/portals4/ptl_init.h
index da36d4e..4f2d592 100644
--- a/src/mpid/ch4/netmod/portals4/ptl_init.h
+++ b/src/mpid/ch4/netmod/portals4/ptl_init.h
@@ -225,18 +225,6 @@ static inline int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid *
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
-{
-    *id_p = MPIDI_PTL_global.node_map[rank];
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
-{
-    *max_id_p = MPIDI_PTL_global.max_node_id;
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr,
                                         int local_size, MPIR_Gpid local_gpids[], int *singleAVT)
 {
diff --git a/src/mpid/ch4/netmod/stubnm/globals.c b/src/mpid/ch4/netmod/stubnm/globals.c
index b830d4b..9642082 100644
--- a/src/mpid/ch4/netmod/stubnm/globals.c
+++ b/src/mpid/ch4/netmod/stubnm/globals.c
@@ -24,8 +24,6 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_comm_accept,
     MPIDI_NM_comm_get_lpid,
     MPIDI_NM_gpid_get,
-    MPIDI_NM_get_node_id,
-    MPIDI_NM_get_max_node_id,
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
@@ -44,7 +42,6 @@ MPIDI_NM_funcs_t MPIDI_NM_stubnm_funcs = {
     MPIDI_NM_send_am_reply,
     MPIDI_NM_send_amv_reply,
     MPIDI_NM_am_hdr_max_sz,
-    MPIDI_NM_am_inject_max_sz,
     MPIDI_NM_am_recv,
 };
 
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_am.h b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
index 2d7d9f2..e3bcda3 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_am.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_am.h
@@ -123,12 +123,6 @@ static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id, int
     return MPI_SUCCESS;
 }
 
-static inline size_t MPIDI_NM_am_inject_max_sz(void)
-{
-    MPIR_Assert(0);
-    return 0;
-}
-
 static inline int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     MPIR_Assert(0);
diff --git a/src/mpid/ch4/netmod/stubnm/stubnm_init.h b/src/mpid/ch4/netmod/stubnm/stubnm_init.h
index 5f458a6..8b1a78d 100644
--- a/src/mpid/ch4/netmod/stubnm/stubnm_init.h
+++ b/src/mpid/ch4/netmod/stubnm/stubnm_init.h
@@ -49,18 +49,6 @@ static inline int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid *
     return MPI_SUCCESS;
 }
 
-static inline int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
-{
-    MPIR_Assert(0);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr,
                                         int local_size, MPIR_Gpid local_gpids[], int *singleAVT)
 {
diff --git a/src/mpid/ch4/netmod/ucx/func_table.c b/src/mpid/ch4/netmod/ucx/func_table.c
index 7e99f6d..4f60187 100644
--- a/src/mpid/ch4/netmod/ucx/func_table.c
+++ b/src/mpid/ch4/netmod/ucx/func_table.c
@@ -22,8 +22,6 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_comm_accept,
     MPIDI_NM_comm_get_lpid,
     MPIDI_NM_gpid_get,
-    MPIDI_NM_get_node_id,
-    MPIDI_NM_get_max_node_id,
     MPIDI_NM_getallincomm,
     MPIDI_NM_gpid_tolpidarray,
     MPIDI_NM_create_intercomm_from_lpids,
@@ -42,7 +40,6 @@ MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
     MPIDI_NM_send_am_reply,
     MPIDI_NM_send_amv_reply,
     MPIDI_NM_am_hdr_max_sz,
-    MPIDI_NM_am_inject_max_sz,
     MPIDI_NM_am_recv
 };
 
diff --git a/src/mpid/ch4/netmod/ucx/ucx_am.h b/src/mpid/ch4/netmod/ucx/ucx_am.h
index 992729d..1a4c595 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_am.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_am.h
@@ -582,11 +582,6 @@ static inline int MPIDI_NM_inject_am_hdr_reply(MPIR_Context_id_t context_id,
     goto fn_exit;
 }
 
-static inline size_t MPIDI_NM_am_inject_max_sz(void)
-{
-    return MPIDI_NM_am_hdr_max_sz();
-}
-
 static inline int MPIDI_NM_am_recv(MPIR_Request * req)
 {
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch4/netmod/ucx/ucx_init.h b/src/mpid/ch4/netmod/ucx/ucx_init.h
index 06b9e7e..52374b0 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_init.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_init.h
@@ -233,18 +233,6 @@ static inline int MPIDI_NM_gpid_get(MPIR_Comm * comm_ptr, int rank, MPIR_Gpid *
     goto fn_exit;
 }
 
-static inline int MPIDI_NM_get_node_id(MPIR_Comm * comm, int rank, MPID_Node_id_t * id_p)
-{
-    MPIDI_CH4U_get_node_id(comm, rank, id_p);
-    return MPI_SUCCESS;
-}
-
-static inline int MPIDI_NM_get_max_node_id(MPIR_Comm * comm, MPID_Node_id_t * max_id_p)
-{
-    MPIDI_CH4U_get_max_node_id(comm, max_id_p);
-    return MPI_SUCCESS;
-}
-
 static inline int MPIDI_NM_getallincomm(MPIR_Comm * comm_ptr,
                                         int local_size, MPIR_Gpid local_gpids[], int *singleAVT)
 {

http://git.mpich.org/mpich.git/commitdiff/7040a6289af4de7ace66ad71248c1ef01f411855

commit 7040a6289af4de7ace66ad71248c1ef01f411855
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Aug 18 11:36:13 2016 -0500

    CH4/UCX: Fix function name
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/ucx/ucx_request.h b/src/mpid/ch4/netmod/ucx/ucx_request.h
index 35779da..b0a2783 100644
--- a/src/mpid/ch4/netmod/ucx/ucx_request.h
+++ b/src/mpid/ch4/netmod/ucx/ucx_request.h
@@ -15,7 +15,7 @@
 #include "mpidch4r.h"
 
 #undef FUNCNAME
-#define FUNCNAME MPIDI_NM_request_release
+#define FUNCNAME MPIDI_NM_am_request_init
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void MPIDI_NM_am_request_init(MPIR_Request * req)

http://git.mpich.org/mpich.git/commitdiff/21dd483c6c5a075cbe86b0a979af481dfddf9329

commit 21dd483c6c5a075cbe86b0a979af481dfddf9329
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 09:15:05 2016 -0500

    CH4: Manually manage indentation for some code
    
    indent does not understand configure-filled strings, so we turn off
    indenting for those pieces of code.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/include/netmodpre.h.in b/src/mpid/ch4/include/netmodpre.h.in
index 086714e..9a4ffdf 100644
--- a/src/mpid/ch4/include/netmodpre.h.in
+++ b/src/mpid/ch4/include/netmodpre.h.in
@@ -11,7 +11,9 @@
 #ifndef NETMODPRE_H_INCLUDED
 #define NETMODPRE_H_INCLUDED
 
+/* *INDENT-OFF* */
 @ch4_netmod_pre_include@
+/* *INDENT-ON* */
 
 #define MPIDI_NM_REQUEST_AM_DECL @ch4_netmod_amrequest_decl@
 #define MPIDI_NM_REQUEST_DECL    @ch4_netmod_request_decl@
diff --git a/src/mpid/ch4/include/shmpre.h.in b/src/mpid/ch4/include/shmpre.h.in
index c6bcbdb..069de00 100644
--- a/src/mpid/ch4/include/shmpre.h.in
+++ b/src/mpid/ch4/include/shmpre.h.in
@@ -11,9 +11,10 @@
 #ifndef SHMPRE_H_INCLUDED
 #define SHMPRE_H_INCLUDED
 
+/* *INDENT-OFF* */
 @ch4_shm_pre_include@
+/* *INDENT-ON* */
 
 #define MPIDI_SHM_REQUEST_DECL       @ch4_shm_request_decl@
 #define MPIDI_SHM_COMM_DECL          @ch4_shm_comm_decl@
-
 #endif /* SHMPRE_H_INCLUDED */
diff --git a/src/mpid/ch4/src/mpid_ch4_net_array.c.in b/src/mpid/ch4/src/mpid_ch4_net_array.c.in
index 8765f39..c07b7a6 100644
--- a/src/mpid/ch4/src/mpid_ch4_net_array.c.in
+++ b/src/mpid/ch4/src/mpid_ch4_net_array.c.in
@@ -11,6 +11,7 @@
 
 #include <mpidimpl.h>
 
+/* *INDENT-OFF* */
 /* forward declaration of funcs structs defined in network modules */
 extern MPIDI_NM_funcs_t @ch4_nets_func_decl@;
 extern MPIDI_NM_native_funcs_t @ch4_nets_native_func_decl@;
@@ -26,3 +27,4 @@ MPIDI_NM_native_funcs_t *MPIDI_NM_native_funcs[@ch4_nets_array_sz@] = { 0 };
 int MPIDI_num_netmods = @ch4_nets_array_sz@;
 char MPIDI_NM_strings[@ch4_nets_array_sz@][MPIDI_MAX_NETMOD_STRING_LEN] =
     { @ch4_nets_strings@ };
+/* *INDENT-ON* */
diff --git a/src/mpid/ch4/src/mpid_ch4_shm_array.c.in b/src/mpid/ch4/src/mpid_ch4_shm_array.c.in
index 6bce704..3649d45 100644
--- a/src/mpid/ch4/src/mpid_ch4_shm_array.c.in
+++ b/src/mpid/ch4/src/mpid_ch4_shm_array.c.in
@@ -13,6 +13,7 @@
 
 #ifdef MPIDI_BUILD_CH4_SHM
 
+/* *INDENT-OFF* */
 /* forward declaration of funcs structs defined in network modules */
 extern MPIDI_SHM_funcs_t @ch4_shm_func_decl@;
 extern MPIDI_SHM_native_funcs_t @ch4_shm_native_func_decl@;
@@ -28,5 +29,6 @@ MPIDI_SHM_native_funcs_t *MPIDI_SHM_native_funcs[@ch4_shm_array_sz@] = { 0 };
 int MPIDI_num_shms = @ch4_shm_array_sz@;
 char MPIDI_SHM_strings[@ch4_shm_array_sz@][MPIDI_MAX_SHM_STRING_LEN] =
     { @ch4_shm_strings@ };
+/* *INDENT-ON* */
 
 #endif

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

commit 3dd1f56608e155242d8118cb2391d87f6bb33091
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 09:16:47 2016 -0500

    CH4: White-space cleanup
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h b/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h
index 36c039f..e40f7f1 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_iovec_util.h
@@ -203,9 +203,8 @@ static inline
                                    uintptr_t * target_addr_next, size_t * buf_len)
 {
     if ((iov_state->origin_size != 0) && (iov_state->target_size != 0)) {
-        uintptr_t buf_size =
-            MPL_MIN(MPL_MIN(iov_state->target_size, iov_state->origin_size),
-                    iov_state->buf_limit_left);
+        uintptr_t buf_size = MPL_MIN(MPL_MIN(iov_state->target_size, iov_state->origin_size),
+                                     iov_state->buf_limit_left);
         *buf_len = buf_size;
         MPIDI_OFI_NEXT_IOV_STATE(target);
         MPIDI_OFI_NEXT_IOV_STATE(origin);
diff --git a/src/mpid/ch4/src/ch4r_win.h b/src/mpid/ch4/src/ch4r_win.h
index 840f890..833066c 100644
--- a/src/mpid/ch4/src/ch4r_win.h
+++ b/src/mpid/ch4/src/ch4r_win.h
@@ -53,20 +53,20 @@ static inline int MPIDI_CH4R_win_set_info(MPIR_Win * win, MPIR_Info * info)
             while (token) {
                 if (!memcmp(token, "rar", 3))
                     MPIDI_CH4U_WIN(win, info_args).accumulate_ordering =
-                        (MPIDI_CH4U_WIN(win, info_args).
-                         accumulate_ordering | MPIDI_CH4I_ACCU_ORDER_RAR);
+                        (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering |
+                         MPIDI_CH4I_ACCU_ORDER_RAR);
                 else if (!memcmp(token, "raw", 3))
                     MPIDI_CH4U_WIN(win, info_args).accumulate_ordering =
-                        (MPIDI_CH4U_WIN(win, info_args).
-                         accumulate_ordering | MPIDI_CH4I_ACCU_ORDER_RAW);
+                        (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering |
+                         MPIDI_CH4I_ACCU_ORDER_RAW);
                 else if (!memcmp(token, "war", 3))
                     MPIDI_CH4U_WIN(win, info_args).accumulate_ordering =
-                        (MPIDI_CH4U_WIN(win, info_args).
-                         accumulate_ordering | MPIDI_CH4I_ACCU_ORDER_WAR);
+                        (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering |
+                         MPIDI_CH4I_ACCU_ORDER_WAR);
                 else if (!memcmp(token, "waw", 3))
                     MPIDI_CH4U_WIN(win, info_args).accumulate_ordering =
-                        (MPIDI_CH4U_WIN(win, info_args).
-                         accumulate_ordering | MPIDI_CH4I_ACCU_ORDER_WAW);
+                        (MPIDI_CH4U_WIN(win, info_args).accumulate_ordering |
+                         MPIDI_CH4I_ACCU_ORDER_WAW);
                 else
                     MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**info");
 

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

commit daa80957db99eea196c920bf465a67972ad5af9f
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Aug 18 12:23:14 2016 -0500

    maint: fixup mpich-replace
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/maint/mpich-replace.sh b/maint/mpich-replace.sh
index baba105..55e4e30 100755
--- a/maint/mpich-replace.sh
+++ b/maint/mpich-replace.sh
@@ -1,3 +1,3 @@
 #! /bin/bash
 
-git grep $1 * | cut -f1 -d':' | uniq | xargs sed -i "s/$1/$2/g"
+git grep $1 * | cut -f1 -d':' | uniq | xargs sed -i "s/\b$1\b/$2/g"

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

commit e22e938f22f4af2f432ca3011074c3e630922f2c
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 24 09:17:21 2016 -0500

    maint: fixup the code-cleanup script.
    
    Run the indent script twice.  The indent distributed on linux seems to
    be somewhat buggy in that it toggles the indentation each time you run
    it, thus flip-flopping between two indentations.  Running it twice
    will discard such issues.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/maint/code-cleanup.sh b/maint/code-cleanup.sh
index 01c12ac..413c5b4 100755
--- a/maint/code-cleanup.sh
+++ b/maint/code-cleanup.sh
@@ -73,12 +73,15 @@ if [ "$recursive" = "1" ]; then
     for i in `find . \! -type d | egrep '(\.c$|\.h$|\.c\.in$|\.h\.in$|\.cpp$|\.cpp.in$)' | \
 	egrep -v "($ignore_list)"` ; do
 	${debug} indent_code $i
+	${debug} indent_code $i
     done
 elif [ "$all" = "1" ]; then
     for i in `find . -maxdepth 1 \! -type d | egrep '(\.c$|\.h$|\.c\.in$|\.h\.in$|\.cpp$|\.cpp.in$)' | \
 	egrep -v "($ignore_list)"` ; do
 	${debug} indent_code $i
+	${debug} indent_code $i
     done
 else
     ${debug} indent_code $@
+    ${debug} indent_code $@
 fi

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

Summary of changes:
 maint/code-cleanup.sh                          |    3 +
 maint/mpich-replace.sh                         |    2 +-
 src/include/mpir_attr_generic.h                |    2 +-
 src/mpi/attr/comm_set_attr.c                   |    2 +-
 src/mpi/attr/type_set_attr.c                   |    2 +-
 src/mpi/attr/win_set_attr.c                    |    2 +-
 src/mpi/coll/op_create.c                       |    4 +-
 src/mpi/coll/op_free.c                         |    4 +-
 src/mpi/comm/commutil.c                        |    8 +-
 src/mpid/ch3/include/mpidpre.h                 |    4 +-
 src/mpid/ch3/src/ch3u_port.c                   |    2 +-
 src/mpid/ch4/include/mpidch4.h                 |   13 +-
 src/mpid/ch4/include/mpidpre.h                 |   12 +-
 src/mpid/ch4/include/netmodpre.h.in            |    2 +
 src/mpid/ch4/include/shmpre.h.in               |    3 +-
 src/mpid/ch4/netmod/include/netmod.h           | 1181 ++++++++++-------------
 src/mpid/ch4/netmod/include/netmod_impl.h      |  875 ++++++++---------
 src/mpid/ch4/netmod/ofi/func_table.c           |   33 +-
 src/mpid/ch4/netmod/ofi/ofi_am.h               |  256 ++----
 src/mpid/ch4/netmod/ofi/ofi_am_events.h        |    8 +-
 src/mpid/ch4/netmod/ofi/ofi_am_impl.h          |   78 +-
 src/mpid/ch4/netmod/ofi/ofi_comm.h             |    8 +-
 src/mpid/ch4/netmod/ofi/ofi_datatype.h         |   12 +-
 src/mpid/ch4/netmod/ofi/ofi_events.h           |    8 +-
 src/mpid/ch4/netmod/ofi/ofi_impl.h             |    2 +-
 src/mpid/ch4/netmod/ofi/ofi_init.h             |   16 +-
 src/mpid/ch4/netmod/ofi/ofi_iovec_util.h       |    5 +-
 src/mpid/ch4/netmod/ofi/ofi_op.h               |    8 +-
 src/mpid/ch4/netmod/ofi/ofi_recv.h             |    5 +
 src/mpid/ch4/netmod/ofi/ofi_types.h            |    4 +-
 src/mpid/ch4/netmod/ofi/util.c                 |    2 +-
 src/mpid/ch4/netmod/portals4/func_table.c      |   33 +-
 src/mpid/ch4/netmod/portals4/ptl_am.h          |  161 +--
 src/mpid/ch4/netmod/portals4/ptl_comm.h        |    8 +-
 src/mpid/ch4/netmod/portals4/ptl_datatype.h    |    8 +-
 src/mpid/ch4/netmod/portals4/ptl_init.h        |   12 -
 src/mpid/ch4/netmod/portals4/ptl_op.h          |    8 +-
 src/mpid/ch4/netmod/stubnm/globals.c           |   33 +-
 src/mpid/ch4/netmod/stubnm/stubnm_am.h         |   98 +--
 src/mpid/ch4/netmod/stubnm/stubnm_comm.h       |    8 +-
 src/mpid/ch4/netmod/stubnm/stubnm_datatype.h   |   12 +-
 src/mpid/ch4/netmod/stubnm/stubnm_init.h       |   12 -
 src/mpid/ch4/netmod/stubnm/stubnm_op.h         |    4 +-
 src/mpid/ch4/netmod/ucx/func_table.c           |   33 +-
 src/mpid/ch4/netmod/ucx/ucx_am.h               |  258 +----
 src/mpid/ch4/netmod/ucx/ucx_comm.h             |    8 +-
 src/mpid/ch4/netmod/ucx/ucx_datatype.h         |   12 +-
 src/mpid/ch4/netmod/ucx/ucx_init.h             |   12 -
 src/mpid/ch4/netmod/ucx/ucx_op.h               |    8 +-
 src/mpid/ch4/netmod/ucx/ucx_pre.h              |    4 +-
 src/mpid/ch4/netmod/ucx/ucx_progress.h         |    2 +-
 src/mpid/ch4/netmod/ucx/ucx_request.h          |    2 +-
 src/mpid/ch4/shm/include/shm.h                 | 1251 +++++++++++-------------
 src/mpid/ch4/shm/include/shm_impl.h            |  951 +++++++++----------
 src/mpid/ch4/shm/posix/func_table.c            |   23 +-
 src/mpid/ch4/shm/posix/posix_am.h              |   78 +-
 src/mpid/ch4/shm/posix/posix_comm.h            |    8 +-
 src/mpid/ch4/shm/posix/posix_init.h            |   56 ++
 src/mpid/ch4/shm/stubshm/func_table.c          |   23 +-
 src/mpid/ch4/shm/stubshm/stubshm_am.h          |   78 +-
 src/mpid/ch4/shm/stubshm/stubshm_comm.h        |    4 +-
 src/mpid/ch4/shm/stubshm/stubshm_init.h        |   56 ++
 src/mpid/ch4/src/ch4_coll.h                    |  328 ++++---
 src/mpid/ch4/src/ch4_comm.h                    |   46 +-
 src/mpid/ch4/src/ch4_impl.h                    |    4 +-
 src/mpid/ch4/src/ch4_init.h                    |  168 +++-
 src/mpid/ch4/src/ch4_probe.h                   |   32 +-
 src/mpid/ch4/src/ch4_proc.h                    |    2 +-
 src/mpid/ch4/src/ch4_progress.h                |   18 +-
 src/mpid/ch4/src/ch4_recv.h                    |   63 +-
 src/mpid/ch4/src/ch4_request.h                 |   12 +-
 src/mpid/ch4/src/ch4_rma.h                     |  152 ++--
 src/mpid/ch4/src/ch4_send.h                    |  134 ++--
 src/mpid/ch4/src/ch4_spawn.h                   |   35 +-
 src/mpid/ch4/src/ch4_types.h                   |   11 +-
 src/mpid/ch4/src/ch4_win.h                     |   75 +-
 src/mpid/ch4/src/ch4i_comm.h                   |    2 +-
 src/mpid/ch4/src/ch4r_callbacks.h              |  240 +++---
 src/mpid/ch4/src/ch4r_init.h                   |  176 +++--
 src/mpid/ch4/src/ch4r_probe.h                  |   36 +-
 src/mpid/ch4/src/ch4r_recv.h                   |   60 +-
 src/mpid/ch4/src/ch4r_recvq.h                  |   54 +-
 src/mpid/ch4/src/ch4r_request.h                |    2 +-
 src/mpid/ch4/src/ch4r_rma.h                    |  232 +++---
 src/mpid/ch4/src/ch4r_send.h                   |  148 ++--
 src/mpid/ch4/src/ch4r_win.h                    |   46 +-
 src/mpid/ch4/src/mpid_ch4_net_array.c.in       |    2 +
 src/mpid/ch4/src/mpid_ch4_shm_array.c.in       |    2 +
 src/mpid/common/datatype/mpidu_datatype_free.c |    6 +-
 src/mpid/common/datatype/mpidu_type_commit.c   |    6 +-
 src/mpid/common/datatype/mpidu_type_dup.c      |    6 +-
 src/mpid/pamid/include/mpidi_hooks.h           |    4 +-
 src/mpl/include/mpl_base.h                     |    3 +
 93 files changed, 3685 insertions(+), 4250 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list