[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-215-g658531a

Service Account noreply at mpich.org
Fri Feb 19 17:50:53 CST 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  658531a076a1586bf1b49c4809162c693a714e14 (commit)
       via  70a1c55b1f3ad139d4d610884753fe95cf3c749b (commit)
       via  0033218398605329f246480b4130bef6ed1015f7 (commit)
      from  b406734328a0e11abe988edd390cc7654f4e7d81 (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/658531a076a1586bf1b49c4809162c693a714e14

commit 658531a076a1586bf1b49c4809162c693a714e14
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Feb 19 15:11:48 2016 -0600

    Add ATTRIBUTE((unused)) to global pvar variables
    
    Depending on if corresponding pvar module is enabled or not, pvar
    variables may be used or not used in the code. Here we add
    ATTRIBUTE((unused)) to the declaration of those pvars so that
    compiler can optimize them.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index 0cb117d..5162deb 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -14,7 +14,7 @@
 #define MPIDI_CH3_PAGESIZE_MASK (~(MPIDI_CH3_PAGESIZE-1))
 #define MPIDI_CH3_ROUND_UP_PAGESIZE(x) ((((MPI_Aint)x)+(~MPIDI_CH3_PAGESIZE_MASK)) & MPIDI_CH3_PAGESIZE_MASK)
 
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused));
 
 MPIDI_SHM_Wins_list_t shm_wins_list;
 
diff --git a/src/mpid/ch3/include/mpid_rma_lockqueue.h b/src/mpid/ch3/include/mpid_rma_lockqueue.h
index c8831cf..3a18053 100644
--- a/src/mpid/ch3/include/mpid_rma_lockqueue.h
+++ b/src/mpid/ch3/include/mpid_rma_lockqueue.h
@@ -10,8 +10,8 @@
 #include "mpl_utlist.h"
 #include "mpid_rma_types.h"
 
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc;
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc ATTRIBUTE((unused));
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock ATTRIBUTE((unused));
 
 /* MPIDI_CH3I_Win_target_lock_entry_alloc(): return a new lock queue entry and
  * initialize it. If we cannot get one, return NULL. */
diff --git a/src/mpid/ch3/include/mpid_rma_oplist.h b/src/mpid/ch3/include/mpid_rma_oplist.h
index c131f63..712bff1 100644
--- a/src/mpid/ch3/include/mpid_rma_oplist.h
+++ b/src/mpid/ch3/include/mpid_rma_oplist.h
@@ -18,7 +18,7 @@ int MPIDI_CH3I_RMA_Make_progress_win(MPID_Win * win_ptr, int *made_progress);
 extern MPIDI_RMA_Op_t *global_rma_op_pool_head, *global_rma_op_pool_start;
 extern MPIDI_RMA_Target_t *global_rma_target_pool_head, *global_rma_target_pool_start;
 
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc ATTRIBUTE((unused));
 
 /* This macro returns two flags: local_completed and remote_completed,
  * to indicate if the completion is reached on this target. */
diff --git a/src/mpid/ch3/include/mpidi_recvq_statistics.h b/src/mpid/ch3/include/mpidi_recvq_statistics.h
index b81c7f4..3202d81 100644
--- a/src/mpid/ch3/include/mpidi_recvq_statistics.h
+++ b/src/mpid/ch3/include/mpidi_recvq_statistics.h
@@ -10,6 +10,6 @@
 #include "mpit.h"
 
 /* from ch3u_recvq.c */
-extern unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size;
+extern unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size ATTRIBUTE((unused));
 
 #endif  /* _MPIDI_RECVQ_STATISTICS_H_ */
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 5b5700c..717fa27 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -92,15 +92,15 @@ MPID_Request ** const MPID_Recvq_unexpected_head_ptr = &recvq_unexpected_head;
       ((match1).parts.context_id == (match2).parts.context_id)))
 
 
-static unsigned PVAR_LEVEL_posted_recvq_length;
-static unsigned PVAR_LEVEL_unexpected_recvq_length;
-static unsigned long long PVAR_COUNTER_posted_recvq_match_attempts;
-static unsigned long long PVAR_COUNTER_unexpected_recvq_match_attempts;
-static MPIR_T_pvar_timer_t PVAR_TIMER_time_failed_matching_postedq;
-static MPIR_T_pvar_timer_t PVAR_TIMER_time_matching_unexpectedq;
+static unsigned PVAR_LEVEL_posted_recvq_length ATTRIBUTE((unused));
+static unsigned PVAR_LEVEL_unexpected_recvq_length ATTRIBUTE((unused));
+static unsigned long long PVAR_COUNTER_posted_recvq_match_attempts ATTRIBUTE((unused));
+static unsigned long long PVAR_COUNTER_unexpected_recvq_match_attempts ATTRIBUTE((unused));
+static MPIR_T_pvar_timer_t PVAR_TIMER_time_failed_matching_postedq ATTRIBUTE((unused));
+static MPIR_T_pvar_timer_t PVAR_TIMER_time_matching_unexpectedq ATTRIBUTE((unused));
 
 /* used in ch3u_eager.c and ch3u_handle_recv_pkt.c */
-unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size;
+unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size ATTRIBUTE((unused));
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_CH3U_Recvq_init
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index f31fe33..a989988 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -6,7 +6,7 @@
 
 #include "mpidrma.h"
 
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set ATTRIBUTE((unused));
 
 /*
 === BEGIN_MPI_T_CVAR_INFO_BLOCK ===
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 51a3cfb..7aed6dc 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -7,22 +7,22 @@
 #include "mpidimpl.h"
 #include "mpidrma.h"
 
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_put;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_acc;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_resp;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum_resp;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas_resp;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop_resp;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock_ack;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_unlock;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_flush;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_ack;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_decr_at_cnt;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_put ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_acc ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_resp ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum_resp ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas_resp ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop_resp ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock_ack ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_unlock ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_flush ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_ack ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_decr_at_cnt ATTRIBUTE((unused));
 
 void MPIDI_CH3_RMA_Init_pkthandler_pvars(void)
 {
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 4479cf2..5c68197 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -256,12 +256,12 @@ cvars:
 === END_MPI_T_CVAR_INFO_BLOCK ===
 */
 
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused));
 
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc;
-MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc ATTRIBUTE((unused));
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set ATTRIBUTE((unused));
 
 void MPIDI_CH3_RMA_Init_sync_pvars(void)
 {
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index a9f27df..5f69346 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -8,7 +8,7 @@
 #include "mpiinfo.h"
 #include "mpidrma.h"
 
-extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather ATTRIBUTE((unused));
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_Win_fns_init

http://git.mpich.org/mpich.git/commitdiff/70a1c55b1f3ad139d4d610884753fe95cf3c749b

commit 70a1c55b1f3ad139d4d610884753fe95cf3c749b
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Feb 19 14:34:13 2016 -0600

    Avoid using macro for declaring global variables.
    
    Originally some global variables are declared via macros as follows:
    
    " #define VAR      \
         int var_1;    \
         int var_2;    \
         int var_3; "
    
    and it is used in the code as follows:
    
    " VAR; "
    
    This causes additional semicolon at the end of global variable
    declaration, which makes suncc compiler throws warnings.
    
    In this patch, we avoid using marcro for declaring global variables,
    but directly declare them in the code.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/include/mpit.h b/src/include/mpit.h
index 1a87f56..8f6ee20 100644
--- a/src/include/mpit.h
+++ b/src/include/mpit.h
@@ -132,15 +132,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
  */
 
 /* STATE */
-#define MPIR_T_PVAR_INT_STATE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_impl(name_))
-
-#define MPIR_T_PVAR_INT_STATE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_INT_STATE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_INT_STATE_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_STATE_SET_VAR(MODULE, ptr_, val_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_))
 /* Not gated by MODULE, since it is supposed to be a rvalue */
@@ -163,33 +154,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
 
 /* LEVEL */
-#define MPIR_T_PVAR_UINT_LEVEL_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_LEVEL_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LEVEL_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LEVEL_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LEVEL_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_LEVEL_SET_VAR(MODULE, ptr_, val_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_))
 #define MPIR_T_PVAR_LEVEL_GET_VAR(ptr_) \
@@ -219,33 +183,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))
 
 /* SIZE */
-#define MPIR_T_PVAR_UINT_SIZE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_SIZE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_SIZE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_SIZE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_SIZE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_SIZE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_SIZE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_SIZE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_SIZE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_SIZE_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_SIZE_SET_VAR(MODULE, ptr_, val_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_))
 #define MPIR_T_PVAR_SIZE_GET_VAR(ptr_) \
@@ -267,15 +204,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))
 
 /* PERCENTAGE */
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_impl(name_))
-
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_PERCENTAGE_SET_VAR(MODULE, ptr_, val_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(ptr_, val_))
 #define MPIR_T_PVAR_PERCENTAGE_GET_VAR(MODULE, ptr_) \
@@ -297,27 +225,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_))
 
 /* COUNTER */
-#define MPIR_T_PVAR_UINT_COUNTER_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_COUNTER_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_COUNTER_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_COUNTER_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_COUNTER_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_COUNTER_INIT_VAR(MODULE, ptr_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_VAR_impl(ptr_))
 #define MPIR_T_PVAR_COUNTER_GET_VAR(ptr_) \
@@ -345,27 +252,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
 
 /* COUNTER ARRAY for user's convenience */
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_impl(name_, len_))
-
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_STATIC(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_))
-
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_EXTERN(MODULE, name_, len_) \
-    PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_))
-
 #define MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR(MODULE, ptr_, count_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(ptr_, count_))
 #define MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR(ptr_, idx_) \
@@ -386,33 +272,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             verb_, bind_, flags_, cat_, desc_))
 
 /* ARRGEGATE */
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_AGGREGATE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_AGGREGATE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_AGGREGATE_INIT_VAR(MODULE, ptr_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(ptr_))
 #define MPIR_T_PVAR_AGGREGATE_GET_VAR(ptr_) \
@@ -445,15 +304,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
  same name, but in two MPI_T_PVAR classes (timer and counter) and two data types
  (double and unsigned long long) respectively.
 */
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_impl(name_))
-
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_TIMER_INIT_VAR(MODULE, ptr_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_INIT_VAR_impl(ptr_))
 #define MPIR_T_PVAR_TIMER_GET_VAR(MODULE, ptr_, buf) \
@@ -481,32 +331,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             verb_, bind_, flags_, cat_, desc_))
 
 /* HIGHWATERMARK */
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_EXTERN_impl(name_))
 
 /* Embed type names in watermark operations because these operations need to
    know types of watermark to work, however we can't use typeof(ptr_) in C.
@@ -558,33 +382,6 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
             addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
 
 /* LOWWATERMARK */
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_impl(name_))
-
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_STATIC_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_STATIC(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_STATIC_impl(name_))
-
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_EXTERN_impl(name_))
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_EXTERN(MODULE, name_) \
-    PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_EXTERN_impl(name_))
-
 #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
     PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(ptr_, val_))
 #define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index 2045bff..2182751 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -215,11 +215,6 @@ typedef struct {
             action_; \
         #endif \
     } while (0)
-
-#define PVAR_GATED_DECL(MODULE, declaration_) \
-    #ifdef ENABLE_PVAR_##MODULE \
-        declaration_; \
-    #endif
 */
 
 /* ENABLE_PVAR_##MODULE must be defined by configure script either to 0 or 1 */
@@ -230,11 +225,6 @@ typedef struct {
         } \
     } while (0)
 
-/* The declaration is not gated. But any compiler should optimize it away if
- * there are no references to the declared varaible */
-#define PVAR_GATED_DECL(MODULE_, declaration_) \
-    declaration_
-
 /* For some classes of pvars, internally we can not represent them
  * in basic data types. So come the following typedefs.
  */
@@ -365,14 +355,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_STATE (continuous only)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_INT_STATE_DECL_impl(name_) \
-    int PVAR_STATE_##name_;
-#define MPIR_T_PVAR_INT_STATE_DECL_STATIC_impl(name_) \
-    static int PVAR_STATE_##name_;
-#define MPIR_T_PVAR_INT_STATE_DECL_EXTERN_impl(name_) \
-    extern int PVAR_STATE_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_) \
     do { *(ptr_) = (val_); } while (0)
@@ -419,34 +401,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_LEVEL (continuous only)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_UINT_LEVEL_DECL_impl(name_) \
-    unsigned int PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL_impl(name_) \
-    unsigned long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_impl(name_) \
-    unsigned long long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_impl(name_) \
-    double PVAR_LEVEL_##name_;
-
-#define MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC_impl(name_) \
-    static unsigned PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL_STATIC_impl(name_) \
-    static unsigned long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_STATIC_impl(name_) \
-    static unsigned long long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_STATIC_impl(name_) \
-    static double PVAR_LEVEL_##name_;
-
-#define MPIR_T_PVAR_UINT_LEVEL_DECL_EXTERN_impl(name_) \
-    extern unsigned PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG_LEVEL_DECL_EXTERN_impl(name_) \
-    extern unsigned long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN_impl(name_) \
-    extern unsigned long long PVAR_LEVEL_##name_;
-#define MPIR_T_PVAR_DOUBLE_LEVEL_DECL_EXTERN_impl(name_) \
-    extern double PVAR_LEVEL_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_) \
     do { *(ptr_) = (val_); } while (0)
@@ -501,34 +455,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_SIZE (continuous only)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_UINT_SIZE_DECL_impl(name_) \
-    unsigned PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG_SIZE_DECL_impl(name_) \
-    unsigned long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL_impl(name_) \
-    unsigned long long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_impl(name_) \
-    double PVAR_SIZE_##name_;
-
-#define MPIR_T_PVAR_UINT_SIZE_DECL_STATIC_impl(name_) \
-    static unsigned PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG_SIZE_DECL_STATIC_impl(name_) \
-    static unsigned long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL_STATIC_impl(name_) \
-    static unsigned long long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_STATIC_impl(name_) \
-    static double PVAR_SIZE_##name_;
-
-#define MPIR_T_PVAR_UINT_SIZE_DECL_EXTERN_impl(name_) \
-    extern unsigned PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG_SIZE_DECL_EXTERN_impl(name_) \
-    extern unsigned long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_ULONG2_SIZE_DECL_EXTERN_impl(name_) \
-    extern unsigned long long PVAR_SIZE_##name_;
-#define MPIR_T_PVAR_DOUBLE_SIZE_DECL_EXTERN_impl(name_) \
-    extern double PVAR_SIZE_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_) \
     do { *(ptr_) = (val_); } while (0)
@@ -575,16 +501,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_PERCENTAGE (continuous only)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_impl(name_) \
-    double PVAR_PERCENTAGE_##name_;
-
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_STATIC_impl(name_) \
-    static double PVAR_PERCENTAGE_##name_;
-
-#define MPIR_T_PVAR_DOUBLE_PERCENTAGE_DECL_EXTERN_impl(name_) \
-    extern double PVAR_PERCENTAGE_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(ptr_, val_) \
     do { \
@@ -632,28 +548,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_COUNTER (continuous or not)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_UINT_COUNTER_DECL_impl(name_) \
-    unsigned PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL_impl(name_) \
-    unsigned long PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_impl(name_) \
-    unsigned long long PVAR_COUNTER_##name_;
-
-#define MPIR_T_PVAR_UINT_COUNTER_DECL_STATIC_impl(name_) \
-    static unsigned PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL_STATIC_impl(name_) \
-    static unsigned long PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC_impl(name_) \
-    static unsigned long long PVAR_COUNTER_##name_;
-
-#define MPIR_T_PVAR_UINT_COUNTER_DECL_EXTERN_impl(name_) \
-    extern unsigned PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG_COUNTER_DECL_EXTERN_impl(name_) \
-    extern unsigned long PVAR_COUNTER_##name_;
-#define MPIR_T_PVAR_ULONG2_COUNTER_DECL_EXTERN_impl(name_) \
-    extern unsigned long long PVAR_COUNTER_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_COUNTER_INIT_VAR_impl(ptr_) \
     do { *(ptr_) = 0; } while (0)
@@ -701,28 +595,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
             get_count_, cat_, desc_); \
     } while (0)
 
-/* Declaration of a counter array -- static pvar */
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_impl(name_, len_) \
-    unsigned PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_impl(name_, len_) \
-    unsigned long PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_impl(name_, len_) \
-    unsigned long long PVAR_COUNTER_##name_[len_];
-
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_) \
-    static unsigned PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_) \
-    static unsigned long PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_STATIC_impl(name_, len_) \
-    static unsigned long long PVAR_COUNTER_##name_[len_];
-
-#define MPIR_T_PVAR_UINT_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_) \
-    extern unsigned PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_) \
-    extern unsigned long PVAR_COUNTER_##name_[len_];
-#define MPIR_T_PVAR_ULONG2_COUNTER_ARRAY_DECL_EXTERN_impl(name_, len_) \
-    extern unsigned long long PVAR_COUNTER_##name_[len_];
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(ptr_, count_) \
     do { \
@@ -770,34 +642,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_AGGREGATE (continuous or not)
  */
 
-/* Declaration -- static aggregate */
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_impl(name_) \
-    unsigned PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_impl(name_) \
-    unsigned long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_impl(name_) \
-    unsigned long long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_DOUBLE_AGGREGATE_DECL_impl(name_) \
-    double PVAR_AGGREGATE_##name_;
-
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_STATIC_impl(name_) \
-    static unsigned PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_STATIC_impl(name_) \
-    static unsigned long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_STATIC_impl(name_) \
-    static unsigned long long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_DOUBLE_AGGREGATE_DECL_STATIC_impl(name_) \
-    static double PVAR_AGGREGATE_##name_;
-
-#define MPIR_T_PVAR_UINT_AGGREGATE_DECL_EXTERN_impl(name_) \
-    extern unsigned PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG_AGGREGATE_DECL_EXTERN_impl(name_) \
-    extern unsigned long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_ULONG2_AGGREGATE_DECL_EXTERN_impl(name_) \
-    extern unsigned long long PVAR_AGGREGATE_##name_;
-#define MPIR_T_PVAR_DOUBLE_AGGREGATE_DECL_EXTERN_impl(name_) \
-    extern double PVAR_AGGREGATE_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(ptr_) \
     do { *(ptr_) = 0; } while (0)
@@ -847,16 +691,6 @@ extern void MPIR_T_PVAR_REGISTER_impl(
 /* MPI_T_PVAR_CLASS_TIMER (continuous or not)
  */
 
-/* Declaration -- static timer */
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_impl(name_) \
-    MPIR_T_pvar_timer_t PVAR_TIMER_##name_;
-
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_timer_t PVAR_TIMER_##name_;
-
-#define MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_timer_t PVAR_TIMER_##name_;
-
 /* Interfaces through pointer or name */
 #define MPIR_T_PVAR_TIMER_INIT_VAR_impl(ptr_) \
     do { \
@@ -923,34 +757,6 @@ void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
 /* MPI_T_PVAR_CLASS_HIGHWATERMARK (continuous or not)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-
-#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_HIGHWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_HIGHWATERMARK_##name_;
-
 /* Interfaces through pointer or name.
  * In contrast to previous pvar classes, for each type we create a set
  * of interfaces. That is because we have a pointer and a union in the
@@ -1120,34 +926,6 @@ void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
 /* MPI_T_PVAR_CLASS_LOWWATERMARK (continuous or not)
  */
 
-/* Declaration -- static pvar */
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_impl(name_) \
-    MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_STATIC_impl(name_) \
-    static MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-
-#define MPIR_T_PVAR_UINT_LOWWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG_LOWWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_ULONG2_LOWWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-#define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_DECL_EXTERN_impl(name_) \
-    extern MPIR_T_pvar_watermark_t PVAR_LOWWATERMARK_##name_;
-
 #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(ptr_, val_) \
     do { \
         (ptr_)->datatype = MPI_UNSIGNED; \
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index 38700ed..0cb117d 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -14,7 +14,7 @@
 #define MPIDI_CH3_PAGESIZE_MASK (~(MPIDI_CH3_PAGESIZE-1))
 #define MPIDI_CH3_ROUND_UP_PAGESIZE(x) ((((MPI_Aint)x)+(~MPIDI_CH3_PAGESIZE_MASK)) & MPIDI_CH3_PAGESIZE_MASK)
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
 
 MPIDI_SHM_Wins_list_t shm_wins_list;
 
diff --git a/src/mpid/ch3/include/mpid_rma_lockqueue.h b/src/mpid/ch3/include/mpid_rma_lockqueue.h
index 2fa6f3b..c8831cf 100644
--- a/src/mpid/ch3/include/mpid_rma_lockqueue.h
+++ b/src/mpid/ch3/include/mpid_rma_lockqueue.h
@@ -10,8 +10,8 @@
 #include "mpl_utlist.h"
 #include "mpid_rma_types.h"
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_lockqueue_alloc);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winlock_getlocallock);
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc;
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock;
 
 /* MPIDI_CH3I_Win_target_lock_entry_alloc(): return a new lock queue entry and
  * initialize it. If we cannot get one, return NULL. */
diff --git a/src/mpid/ch3/include/mpid_rma_oplist.h b/src/mpid/ch3/include/mpid_rma_oplist.h
index 3755546..c131f63 100644
--- a/src/mpid/ch3/include/mpid_rma_oplist.h
+++ b/src/mpid/ch3/include/mpid_rma_oplist.h
@@ -18,7 +18,7 @@ int MPIDI_CH3I_RMA_Make_progress_win(MPID_Win * win_ptr, int *made_progress);
 extern MPIDI_RMA_Op_t *global_rma_op_pool_head, *global_rma_op_pool_start;
 extern MPIDI_RMA_Target_t *global_rma_target_pool_head, *global_rma_target_pool_start;
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc;
 
 /* This macro returns two flags: local_completed and remote_completed,
  * to indicate if the completion is reached on this target. */
diff --git a/src/mpid/ch3/include/mpidi_recvq_statistics.h b/src/mpid/ch3/include/mpidi_recvq_statistics.h
index d1d83f6..b81c7f4 100644
--- a/src/mpid/ch3/include/mpidi_recvq_statistics.h
+++ b/src/mpid/ch3/include/mpidi_recvq_statistics.h
@@ -10,6 +10,6 @@
 #include "mpit.h"
 
 /* from ch3u_recvq.c */
-MPIR_T_PVAR_ULONG2_LEVEL_DECL_EXTERN(RECVQ, unexpected_recvq_buffer_size);
+extern unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size;
 
 #endif  /* _MPIDI_RECVQ_STATISTICS_H_ */
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 2dbe272..5b5700c 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -92,15 +92,15 @@ MPID_Request ** const MPID_Recvq_unexpected_head_ptr = &recvq_unexpected_head;
       ((match1).parts.context_id == (match2).parts.context_id)))
 
 
-MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC(RECVQ, posted_recvq_length);
-MPIR_T_PVAR_UINT_LEVEL_DECL_STATIC(RECVQ, unexpected_recvq_length);
-MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC(RECVQ, posted_recvq_match_attempts);
-MPIR_T_PVAR_ULONG2_COUNTER_DECL_STATIC(RECVQ, unexpected_recvq_match_attempts);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC(RECVQ, time_failed_matching_postedq);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_STATIC(RECVQ, time_matching_unexpectedq);
+static unsigned PVAR_LEVEL_posted_recvq_length;
+static unsigned PVAR_LEVEL_unexpected_recvq_length;
+static unsigned long long PVAR_COUNTER_posted_recvq_match_attempts;
+static unsigned long long PVAR_COUNTER_unexpected_recvq_match_attempts;
+static MPIR_T_pvar_timer_t PVAR_TIMER_time_failed_matching_postedq;
+static MPIR_T_pvar_timer_t PVAR_TIMER_time_matching_unexpectedq;
 
 /* used in ch3u_eager.c and ch3u_handle_recv_pkt.c */
-MPIR_T_PVAR_ULONG2_LEVEL_DECL(RECVQ, unexpected_recvq_buffer_size);
+unsigned long long PVAR_LEVEL_unexpected_recvq_buffer_size;
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_CH3U_Recvq_init
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 514672b..f31fe33 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -6,7 +6,7 @@
 
 #include "mpidrma.h"
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_set);
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set;
 
 /*
 === BEGIN_MPI_T_CVAR_INFO_BLOCK ===
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index b571027..51a3cfb 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -7,22 +7,22 @@
 #include "mpidimpl.h"
 #include "mpidrma.h"
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_put);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_get);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_acc);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_get_accum);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_cas);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_fop);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_get_resp);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_get_accum_resp);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_cas_resp);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_fop_resp);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_lock);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_lock_ack);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_unlock);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_flush);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_ack);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_decr_at_cnt);
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_put;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_acc;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_resp;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_get_accum_resp;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_cas_resp;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_fop_resp;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_lock_ack;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_unlock;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_flush;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_ack;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmapkt_decr_at_cnt;
 
 void MPIDI_CH3_RMA_Init_pkthandler_pvars(void)
 {
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index c4195d4..4479cf2 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -256,12 +256,12 @@ cvars:
 === END_MPI_T_CVAR_INFO_BLOCK ===
 */
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_lockqueue_alloc);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winlock_getlocallock);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincreate_allgather);
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_lockqueue_alloc;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_winlock_getlocallock;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmaqueue_alloc);
-MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmaqueue_set);
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_alloc;
+MPIR_T_pvar_timer_t PVAR_TIMER_rma_rmaqueue_set;
 
 void MPIDI_CH3_RMA_Init_sync_pvars(void)
 {
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index f35cb59..a9f27df 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -8,7 +8,7 @@
 #include "mpiinfo.h"
 #include "mpidrma.h"
 
-MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
+extern MPIR_T_pvar_timer_t PVAR_TIMER_rma_wincreate_allgather;
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_Win_fns_init

http://git.mpich.org/mpich.git/commitdiff/0033218398605329f246480b4130bef6ed1015f7

commit 0033218398605329f246480b4130bef6ed1015f7
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Feb 19 14:37:18 2016 -0600

    Simplify struct MPID_nem_pkt_t
    
    Originally MPID_nem_pkt_t is defined as a union of MPID_nem_pkt_header_t
    and MPID_nem_pkt_mpich_t. However, those two structs are mostly the
    same exept for the payload part in the end of MPID_nem_pkt_mpich_t.
    MPID_nem_pkt_mpich_t essentially equals to MPID_nem_pkt_t.
    
    In this patch, we directly define MPID_nem_pkt_t as a struct composed
    of MPID_nem_pkt_header_t and payload.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
index a38417e..acb9840 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
@@ -135,40 +135,33 @@
 #define MPID_NEM_PKT_MPICH      1
 #define MPID_NEM_PKT_MPICH_HEAD 2
 
-#define MPID_NEM_FBOX_SOURCE(cell) (MPID_nem_mem_region.local_procs[(cell)->pkt.mpich.source])
-#define MPID_NEM_CELL_SOURCE(cell) ((cell)->pkt.mpich.source)
-#define MPID_NEM_CELL_DEST(cell)   ((cell)->pkt.mpich.dest)
-#define MPID_NEM_CELL_DLEN(cell)   ((cell)->pkt.mpich.datalen)
-#define MPID_NEM_CELL_SEQN(cell)   ((cell)->pkt.mpich.seqno)
+#define MPID_NEM_FBOX_SOURCE(cell) (MPID_nem_mem_region.local_procs[(cell)->pkt.header.source])
+#define MPID_NEM_CELL_SOURCE(cell) ((cell)->pkt.header.source)
+#define MPID_NEM_CELL_DEST(cell)   ((cell)->pkt.header.dest)
+#define MPID_NEM_CELL_DLEN(cell)   ((cell)->pkt.header.datalen)
+#define MPID_NEM_CELL_SEQN(cell)   ((cell)->pkt.header.seqno)
 
 #define MPID_NEM_MPICH_HEAD_LEN sizeof(MPID_nem_pkt_header_t)
 #define MPID_NEM_MPICH_DATA_LEN (MPID_NEM_CELL_PAYLOAD_LEN - MPID_NEM_MPICH_HEAD_LEN)
 
 #define MPID_NEM_PKT_HEADER_FIELDS   	    \
-    int source;                             \
-    int dest;                               \
-    intptr_t datalen;                      \
-    unsigned short seqno;                   \
-    unsigned short type; /* currently used only with checkpointing */
 
 typedef struct MPID_nem_pkt_header
 {
-    MPID_NEM_PKT_HEADER_FIELDS;
+    int source;
+    int dest;
+    intptr_t datalen;
+    unsigned short seqno;
+    unsigned short type; /* currently used only with checkpointing */
 } MPID_nem_pkt_header_t;
 
-typedef struct MPID_nem_pkt_mpich
+typedef struct MPID_nem_pkt
 {
-    MPID_NEM_PKT_HEADER_FIELDS;
+    MPID_nem_pkt_header_t header;
     union {
         char payload[MPID_NEM_MPICH_DATA_LEN];
         double dummy; /* align paylod to double */
     } p;
-} MPID_nem_pkt_mpich_t;
-
-typedef union
-{
-    MPID_nem_pkt_header_t      header;
-    MPID_nem_pkt_mpich_t      mpich;
 } MPID_nem_pkt_t;
 
 /* Nemesis cells which are to be used in shared memory need to use
@@ -217,16 +210,16 @@ typedef MPID_nem_abs_cell_t *MPID_nem_abs_cell_ptr_t;
     ((MPID_nem_cell_ptr_t) ((char*)(packetp) - (char *)MPID_NEM_CELL_TO_PACKET((MPID_nem_cell_ptr_t)0)))
 #define MPID_NEM_MIN_PACKET_LEN (sizeof (MPID_nem_pkt_header_t))
 #define MPID_NEM_MAX_PACKET_LEN (sizeof (MPID_nem_pkt_t))
-#define MPID_NEM_PACKET_LEN(pkt) ((pkt)->mpich.datalen + MPID_NEM_MPICH_HEAD_LEN)
+#define MPID_NEM_PACKET_LEN(pkt) ((pkt)->header.datalen + MPID_NEM_MPICH_HEAD_LEN)
 
 #define MPID_NEM_OPT_LOAD     16 
 #define MPID_NEM_OPT_SIZE     ((sizeof(MPIDI_CH3_Pkt_t)) + (MPID_NEM_OPT_LOAD))
 #define MPID_NEM_OPT_HEAD_LEN ((MPID_NEM_MPICH_HEAD_LEN) + (MPID_NEM_OPT_SIZE))
 
 #define MPID_NEM_PACKET_OPT_LEN(pkt) \
-    (((pkt)->mpich.datalen < MPID_NEM_OPT_SIZE) ? (MPID_NEM_OPT_HEAD_LEN) : (MPID_NEM_PACKET_LEN(pkt)))
+    (((pkt)->header.datalen < MPID_NEM_OPT_SIZE) ? (MPID_NEM_OPT_HEAD_LEN) : (MPID_NEM_PACKET_LEN(pkt)))
 
-#define MPID_NEM_PACKET_PAYLOAD(pkt) ((pkt)->mpich.payload)
+#define MPID_NEM_PACKET_PAYLOAD(pkt) ((pkt)->header.payload)
 
 typedef struct MPID_nem_queue
 {
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h
index 613275e..d6ed5d0 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_fbox.h
@@ -41,7 +41,7 @@ static inline int poll_active_fboxes(MPID_nem_cell_ptr_t *cell)
             fbox = MPID_nem_curr_fboxq_elem->fbox;
             MPIU_Assert(fbox != NULL);
             if (OPA_load_acquire_int(&fbox->flag.value) &&
-                fbox->cell.pkt.mpich.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fboxq_elem->grank])
+                fbox->cell.pkt.header.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fboxq_elem->grank])
             {
                 ++MPID_nem_recv_seqno[MPID_nem_curr_fboxq_elem->grank];
                 *cell = &fbox->cell;
@@ -69,7 +69,7 @@ static inline int poll_every_fbox(MPID_nem_cell_ptr_t *cell)
     do {
         fbox = MPID_nem_curr_fbox_all_poll->fbox;
         if (fbox && OPA_load_acquire_int(&fbox->flag.value) &&
-            fbox->cell.pkt.mpich.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank]) {
+            fbox->cell.pkt.header.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank]) {
             ++MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank];
             *cell = &fbox->cell;
             found = TRUE;
@@ -90,7 +90,7 @@ static inline int poll_every_fbox(MPID_nem_cell_ptr_t *cell)
                                                                                                     \
         fbox = MPID_nem_curr_fbox_all_poll->fbox;                                                   \
         if (fbox && OPA_load_acquire_int(&fbox->flag.value) &&                                      \
-            fbox->cell.pkt.mpich.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank]) \
+            fbox->cell.pkt.header.seqno == MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank]) \
         {                                                                                           \
             ++MPID_nem_recv_seqno[MPID_nem_curr_fbox_all_poll->grank];                              \
             *(_cell) = &fbox->cell;                                                                 \
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index 5ceddf0..0b64cf5 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -39,7 +39,7 @@ int MPID_nem_lmt_RndvRecv(struct MPIDI_VC *vc, MPID_Request *rreq);
 
 #define MPID_nem_mpich_release_fbox(cell)                               \
     do {                                                                \
-        OPA_store_release_int(&MPID_nem_mem_region.mailboxes.in[(cell)->pkt.mpich.source]->mpich.flag.value, 0); \
+        OPA_store_release_int(&MPID_nem_mem_region.mailboxes.in[(cell)->pkt.header.source]->mpich.flag.value, 0); \
     } while (0)
 
 /* initialize shared-memory MPI_Barrier variables */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
index 84e4be2..6d38028 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -119,13 +119,13 @@ MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again)
         if (MPID_nem_fbox_is_full((MPID_nem_fbox_common_ptr_t)pbox))
             goto usequeue_l;
 
-        pbox->cell.pkt.mpich.source  = MPID_nem_mem_region.local_rank;
-        pbox->cell.pkt.mpich.datalen = size;
-        pbox->cell.pkt.mpich.seqno   = vc_ch->send_seqno++;
+        pbox->cell.pkt.header.source  = MPID_nem_mem_region.local_rank;
+        pbox->cell.pkt.header.datalen = size;
+        pbox->cell.pkt.header.seqno   = vc_ch->send_seqno++;
         
-        MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+        MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
         
-        MPIU_Memcpy((void *)pbox->cell.pkt.mpich.p.payload, buf, size);
+        MPIU_Memcpy((void *)pbox->cell.pkt.p.payload, buf, size);
 
         OPA_store_release_int(&pbox->flag.value, 1);
 
@@ -165,13 +165,13 @@ MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again)
 #endif /* PREFETCH_CELL */
 
     DO_PAPI (PAPI_reset (PAPI_EventSet));
-    el->pkt.mpich.source  = my_rank;
-    el->pkt.mpich.dest    = vc->lpid;
-    el->pkt.mpich.datalen = size;
-    el->pkt.mpich.seqno   = vc_ch->send_seqno++;
-    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+    el->pkt.header.source  = my_rank;
+    el->pkt.header.dest    = vc->lpid;
+    el->pkt.header.datalen = size;
+    el->pkt.header.seqno   = vc_ch->send_seqno++;
+    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
     
-    MPIU_Memcpy((void *)el->pkt.mpich.p.payload, buf, size);
+    MPIU_Memcpy((void *)el->pkt.p.payload, buf, size);
     DO_PAPI (PAPI_accum_var (PAPI_EventSet, PAPI_vvalues11));
 
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent queue");
@@ -264,7 +264,7 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
 #endif /*PREFETCH_CELL     */
 
     payload_len = MPID_NEM_MPICH_DATA_LEN;
-    cell_buf    = (char *) el->pkt.mpich.p.payload; /* cast away volatile */
+    cell_buf    = (char *) el->pkt.p.payload; /* cast away volatile */
     
     while (*n_iov && payload_len >= (*iov)->MPL_IOV_LEN)
     {
@@ -284,11 +284,11 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
  	payload_len = 0;
     }
 
-    el->pkt.mpich.source  = my_rank;
-    el->pkt.mpich.dest    = vc->lpid;
-    el->pkt.mpich.datalen = MPID_NEM_MPICH_DATA_LEN - payload_len;
-    el->pkt.mpich.seqno   = vc_ch->send_seqno++;
-    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.mpich.type = MPID_NEM_PKT_MPICH);
+    el->pkt.header.source  = my_rank;
+    el->pkt.header.dest    = vc->lpid;
+    el->pkt.header.datalen = MPID_NEM_MPICH_DATA_LEN - payload_len;
+    el->pkt.header.seqno   = vc_ch->send_seqno++;
+    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.header.type = MPID_NEM_PKT_MPICH);
 
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent queue");
     MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPID_nem_dbg_dump_cell (el));
@@ -354,13 +354,13 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
         if (MPID_nem_fbox_is_full((MPID_nem_fbox_common_ptr_t)pbox))
             goto usequeue_l;
 
-        pbox->cell.pkt.mpich.source  = MPID_nem_mem_region.local_rank;
-        pbox->cell.pkt.mpich.datalen = (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t);
-        pbox->cell.pkt.mpich.seqno   = vc_ch->send_seqno++;
-        MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+        pbox->cell.pkt.header.source  = MPID_nem_mem_region.local_rank;
+        pbox->cell.pkt.header.datalen = (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t);
+        pbox->cell.pkt.header.seqno   = vc_ch->send_seqno++;
+        MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
         
-        MPIU_Memcpy((void *)pbox->cell.pkt.mpich.p.payload, (*iov)[0].MPL_IOV_BUF, (*iov)[0].MPL_IOV_LEN);
-        MPIU_Memcpy ((char *)pbox->cell.pkt.mpich.p.payload + (*iov)[0].MPL_IOV_LEN, (*iov)[1].MPL_IOV_BUF, (*iov)[1].MPL_IOV_LEN);
+        MPIU_Memcpy((void *)pbox->cell.pkt.p.payload, (*iov)[0].MPL_IOV_BUF, (*iov)[0].MPL_IOV_LEN);
+        MPIU_Memcpy ((char *)pbox->cell.pkt.p.payload + (*iov)[0].MPL_IOV_LEN, (*iov)[1].MPL_IOV_BUF, (*iov)[1].MPL_IOV_LEN);
         
         OPA_store_release_int(&pbox->flag.value, 1);
         *n_iov = 0;
@@ -398,7 +398,7 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
     MPID_nem_queue_dequeue (MPID_nem_mem_region.my_freeQ, &el);
 #endif /*PREFETCH_CELL */
 
-    MPIU_Memcpy((void *)el->pkt.mpich.p.payload, (*iov)->MPL_IOV_BUF, sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Memcpy((void *)el->pkt.p.payload, (*iov)->MPL_IOV_BUF, sizeof(MPIDI_CH3_Pkt_t));
     buf_offset += sizeof(MPIDI_CH3_Pkt_t);
 
     if (ext_hdr_sz > 0) {
@@ -406,11 +406,11 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
         MPIU_Assert(MPID_NEM_MPICH_DATA_LEN - buf_offset >= ext_hdr_sz);
 
         /* when extended packet header exists, copy it */
-        MPIU_Memcpy((void *)((char *)(el->pkt.mpich.p.payload) + buf_offset), ext_hdr_ptr, ext_hdr_sz);
+        MPIU_Memcpy((void *)((char *)(el->pkt.p.payload) + buf_offset), ext_hdr_ptr, ext_hdr_sz);
         buf_offset += ext_hdr_sz;
     }
 
-    cell_buf = (char *)(el->pkt.mpich.p.payload) + buf_offset;
+    cell_buf = (char *)(el->pkt.p.payload) + buf_offset;
     ++(*iov);
     --(*n_iov);
 
@@ -433,11 +433,11 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
 	payload_len = 0;
     }
 
-    el->pkt.mpich.source  = my_rank;
-    el->pkt.mpich.dest    = vc->lpid;
-    el->pkt.mpich.datalen = MPID_NEM_MPICH_DATA_LEN - payload_len;
-    el->pkt.mpich.seqno   = vc_ch->send_seqno++;
-    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+    el->pkt.header.source  = my_rank;
+    el->pkt.header.dest    = vc->lpid;
+    el->pkt.header.datalen = MPID_NEM_MPICH_DATA_LEN - payload_len;
+    el->pkt.header.seqno   = vc_ch->send_seqno++;
+    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
 
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent queue");
     MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPID_nem_dbg_dump_cell (el));
@@ -522,17 +522,17 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
             goto usequeue_l;
 
 	{
-	    pbox->cell.pkt.mpich.source  = MPID_nem_mem_region.local_rank;
-	    pbox->cell.pkt.mpich.datalen = sizeof(MPIDI_CH3_Pkt_t) + segment_size;
-	    pbox->cell.pkt.mpich.seqno   = vc_ch->send_seqno++;
-            MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+	    pbox->cell.pkt.header.source  = MPID_nem_mem_region.local_rank;
+	    pbox->cell.pkt.header.datalen = sizeof(MPIDI_CH3_Pkt_t) + segment_size;
+	    pbox->cell.pkt.header.seqno   = vc_ch->send_seqno++;
+            MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, pbox->cell.pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
 
             /* copy header */
-            MPIU_Memcpy((void *)pbox->cell.pkt.mpich.p.payload, header, header_sz);
+            MPIU_Memcpy((void *)pbox->cell.pkt.p.payload, header, header_sz);
             
             /* copy data */
             last = segment_size;
-            MPID_Segment_pack(segment, *segment_first, &last, (char *)pbox->cell.pkt.mpich.p.payload + sizeof(MPIDI_CH3_Pkt_t));
+            MPID_Segment_pack(segment, *segment_first, &last, (char *)pbox->cell.pkt.p.payload + sizeof(MPIDI_CH3_Pkt_t));
             MPIU_Assert(last == segment_size);
 
             OPA_store_release_int(&pbox->flag.value, 1);
@@ -574,13 +574,13 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
 #endif /*PREFETCH_CELL */
 
     /* copy header */
-    MPIU_Memcpy((void *)el->pkt.mpich.p.payload, header, header_sz);
+    MPIU_Memcpy((void *)el->pkt.p.payload, header, header_sz);
     
     buf_offset += sizeof(MPIDI_CH3_Pkt_t);
 
     if (ext_header_sz > 0) {
         /* when extended packet header exists, copy it */
-        MPIU_Memcpy((void *)((char *)(el->pkt.mpich.p.payload) + buf_offset), ext_header, ext_header_sz);
+        MPIU_Memcpy((void *)((char *)(el->pkt.p.payload) + buf_offset), ext_header, ext_header_sz);
         buf_offset += ext_header_sz;
     }
 
@@ -590,15 +590,15 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
     else
         last = *segment_first + MPID_NEM_MPICH_DATA_LEN - buf_offset;
 
-    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.mpich.p.payload + buf_offset);
+    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload + buf_offset);
     datalen = buf_offset + last - *segment_first;
     *segment_first = last;
     
-    el->pkt.mpich.source  = my_rank;
-    el->pkt.mpich.dest    = vc->lpid;
-    el->pkt.mpich.datalen = datalen;
-    el->pkt.mpich.seqno   = vc_ch->send_seqno++;
-    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+    el->pkt.header.source  = my_rank;
+    el->pkt.header.dest    = vc->lpid;
+    el->pkt.header.datalen = datalen;
+    el->pkt.header.seqno   = vc_ch->send_seqno++;
+    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
 
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent queue");
     MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPID_nem_dbg_dump_cell (el));
@@ -673,15 +673,15 @@ MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_
     else
         last = *segment_first + MPID_NEM_MPICH_DATA_LEN;
     
-    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.mpich.p.payload);
+    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload);
     datalen = last - *segment_first;
     *segment_first = last;
     
-    el->pkt.mpich.source  = my_rank;
-    el->pkt.mpich.dest    = vc->lpid;
-    el->pkt.mpich.datalen = datalen;
-    el->pkt.mpich.seqno   = vc_ch->send_seqno++;
-    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
+    el->pkt.header.source  = my_rank;
+    el->pkt.header.dest    = vc->lpid;
+    el->pkt.header.datalen = datalen;
+    el->pkt.header.seqno   = vc_ch->send_seqno++;
+    MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, el->pkt.header.type = MPID_NEM_PKT_MPICH_HEAD);
 
     MPL_DBG_MSG (MPIDI_CH3_DBG_CHANNEL, VERBOSE, "--> Sent queue");
     MPL_DBG_STMT (MPIDI_CH3_DBG_CHANNEL, VERBOSE, MPID_nem_dbg_dump_cell (el));
@@ -806,9 +806,9 @@ MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead)
 {
     int source;
     MPID_nem_cell_ptr_t cell = MPID_nem_queue_head(qhead);
-    source = cell->pkt.mpich.source;
+    source = cell->pkt.header.source;
     
-    return (cell->pkt.mpich.seqno == MPID_nem_recv_seqno[source]);
+    return (cell->pkt.header.seqno == MPID_nem_recv_seqno[source]);
 }
 
 /*
@@ -861,7 +861,7 @@ MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blockin
     
     MPID_nem_queue_dequeue (MPID_nem_mem_region.my_recvQ, cell);
 
-    ++MPID_nem_recv_seqno[(*cell)->pkt.mpich.source];
+    ++MPID_nem_recv_seqno[(*cell)->pkt.header.source];
     *in_fbox = 0;
 
  fn_exit:
@@ -922,7 +922,7 @@ MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int time
     
     MPID_nem_queue_dequeue (MPID_nem_mem_region.my_recvQ, cell);
 
-    ++MPID_nem_recv_seqno[(*cell)->pkt.mpich.source];
+    ++MPID_nem_recv_seqno[(*cell)->pkt.header.source];
     *in_fbox = 0;
  exit_l:
     
@@ -1007,7 +1007,7 @@ MPID_nem_mpich_blocking_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int comple
 
     MPID_nem_queue_dequeue (MPID_nem_mem_region.my_recvQ, cell);
 
-    ++MPID_nem_recv_seqno[(*cell)->pkt.mpich.source];
+    ++MPID_nem_recv_seqno[(*cell)->pkt.header.source];
     *in_fbox = 0;
 
  exit_l:    
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index 99b57af..d02089b 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -513,8 +513,8 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
 
             if (cell)
             {
-                char            *cell_buf    = (char *)cell->pkt.mpich.p.payload;
-                intptr_t   payload_len = cell->pkt.mpich.datalen;
+                char            *cell_buf    = (char *)cell->pkt.p.payload;
+                intptr_t   payload_len = cell->pkt.header.datalen;
                 MPIDI_CH3_Pkt_t *pkt         = (MPIDI_CH3_Pkt_t *)cell_buf;
 
                 /* Empty packets are not allowed */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
index fafce67..318c6a2 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
@@ -18,11 +18,11 @@ void MPID_nem_dbg_dump_cell (volatile struct MPID_nem_cell *cell)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_DBG_DUMP_CELL);
 
-    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  src = %6d", cell->pkt.mpich.source);
-    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  dst = %6d", cell->pkt.mpich.dest);
-    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  len = %6d", (int)cell->pkt.mpich.datalen);
-    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  sqn = %6d", cell->pkt.mpich.seqno);
-    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  typ = %6d", cell->pkt.mpich.type);
+    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  src = %6d", cell->pkt.header.source);
+    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  dst = %6d", cell->pkt.header.dest);
+    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  len = %6d", (int)cell->pkt.header.datalen);
+    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  sqn = %6d", cell->pkt.header.seqno);
+    MPL_DBG_MSG_D (MPIR_DBG_OTHER, TERSE, "  typ = %6d", cell->pkt.header.type);
 
     MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_DBG_DUMP_CELL);
 }
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
index 504e124..ba4a20c 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
@@ -147,7 +147,7 @@ MPID_nem_init(int pg_rank, MPIDI_PG_t *pg_p, int has_parent ATTRIBUTE((unused)))
     MPIU_Assert(MPID_NEM_CELL_PAYLOAD_LEN + MPID_NEM_CELL_HEAD_LEN == sizeof(MPID_nem_cell_t));
     MPIU_Assert(sizeof(MPID_nem_cell_t) == sizeof(MPID_nem_abs_cell_t));
     /* Make sure payload is aligned on a double */
-    MPIU_Assert(MPID_NEM_ALIGNED(&((MPID_nem_cell_t*)0)->pkt.mpich.p.payload[0], sizeof(double)));
+    MPIU_Assert(MPID_NEM_ALIGNED(&((MPID_nem_cell_t*)0)->pkt.p.payload[0], sizeof(double)));
 
     /* Initialize the business card */
     mpi_errno = MPIDI_CH3I_BCInit( &bc_val, &val_max_remaining );

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

Summary of changes:
 src/include/mpit.h                                 |  203 ------------------
 src/include/mpitimpl.h                             |  222 --------------------
 .../channels/nemesis/include/mpid_nem_datatypes.h  |   37 ++--
 .../ch3/channels/nemesis/include/mpid_nem_fbox.h   |    6 +-
 .../ch3/channels/nemesis/include/mpid_nem_impl.h   |    2 +-
 .../ch3/channels/nemesis/include/mpid_nem_inline.h |  112 +++++-----
 src/mpid/ch3/channels/nemesis/src/ch3_progress.c   |    4 +-
 src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c    |    2 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c |   10 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c  |    2 +-
 src/mpid/ch3/include/mpid_rma_lockqueue.h          |    4 +-
 src/mpid/ch3/include/mpid_rma_oplist.h             |    2 +-
 src/mpid/ch3/include/mpidi_recvq_statistics.h      |    2 +-
 src/mpid/ch3/src/ch3u_recvq.c                      |   14 +-
 src/mpid/ch3/src/ch3u_rma_ops.c                    |    2 +-
 src/mpid/ch3/src/ch3u_rma_pkthandler.c             |   32 ++--
 src/mpid/ch3/src/ch3u_rma_sync.c                   |   10 +-
 src/mpid/ch3/src/ch3u_win_fns.c                    |    2 +-
 18 files changed, 118 insertions(+), 550 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list