[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-65-g1ecfc4f
mysql vizuser
noreply at mpich.org
Tue Dec 17 10:51:28 CST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 1ecfc4ffbe8e45f6e449a555520c7b4eb31c9347 (commit)
via d78f8310643c94bea4a04dc0ee670872024c0d9d (commit)
via fb4c0182d92c2780bbd554b3ef126f1a244dd0ed (commit)
via 379fcf521f16cb906d42c2d8c1c97c23ed9a98b5 (commit)
via a2299cd54c4893262bbf1a77da0b3198865650e4 (commit)
via c12bbcd87d8d1ecd62fb4f37f5de95a76ea2d87d (commit)
via fd2ac8b5fdc4e16c67affdd1acd811db239310fe (commit)
via 4c784c5d2bb41eb069df5d338a1ca025651a12e9 (commit)
via f8501113cb31e6f4a8120d3fd03f51e99a21ec3a (commit)
from 82e2a8221f2bb6f5e13329d59f0aca443b16ae70 (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/1ecfc4ffbe8e45f6e449a555520c7b4eb31c9347
commit 1ecfc4ffbe8e45f6e449a555520c7b4eb31c9347
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Dec 5 12:34:05 2013 -0600
Use if (ENABLE_PVAR_NEM) instead of #ifdef
Since ENABLE_PVAR_NEM is always defined as 0 or 1.
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
index a5c636a..ebd2792 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
@@ -56,9 +56,9 @@ int MPID_nem_finalize(void)
my_papi_close();
#endif /*PAPI_MONITOR */
-#if ENABLE_PVAR_NEM
- MPIU_Free(MPID_nem_fbox_fall_back_to_queue_count);
-#endif
+ if (ENABLE_PVAR_NEM) {
+ MPIU_Free(MPID_nem_fbox_fall_back_to_queue_count);
+ }
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_FINALIZE);
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 2ba0960..5aa1f06 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
@@ -49,9 +49,9 @@ static int MPID_nem_init_stats(int n_local_ranks)
{
int mpi_errno = MPI_SUCCESS;
-#ifdef ENABLE_PVAR_NEM
- MPID_nem_fbox_fall_back_to_queue_count = MPIU_Calloc(n_local_ranks, sizeof(unsigned long long));
-#endif
+ if (ENABLE_PVAR_NEM) {
+ MPID_nem_fbox_fall_back_to_queue_count = MPIU_Calloc(n_local_ranks, sizeof(unsigned long long));
+ }
MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC(
NEM,
http://git.mpich.org/mpich.git/commitdiff/d78f8310643c94bea4a04dc0ee670872024c0d9d
commit d78f8310643c94bea4a04dc0ee670872024c0d9d
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 16:54:48 2013 -0600
Port instr variables in rma code to MPI_T pvars
Fixes #1962
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
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 cdec858..fc70901 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -14,9 +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)
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_EXTERN_DECL(wincreate_allgather);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *info, MPID_Comm *comm_ptr,
void *base_ptr, MPID_Win **win_ptr);
@@ -113,7 +111,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
node_size = node_comm_ptr->local_size;
node_rank = node_comm_ptr->rank;
- MPIU_INSTR_DURATION_START(wincreate_allgather);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_wincreate_allgather);
/* allocate memory for the base addresses, disp_units, and
completion counters of all processes */
MPIU_CHKPMEM_MALLOC((*win_ptr)->base_addrs, void **,
@@ -151,7 +149,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
mpi_errno = MPIR_Allgather_impl(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
tmp_buf, 3 * sizeof(MPI_Aint), MPI_BYTE,
(*win_ptr)->comm_ptr, &errflag);
- MPIU_INSTR_DURATION_END(wincreate_allgather);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_wincreate_allgather);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index bceb847..84bac45 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -9,11 +9,9 @@
#include "mpl_utlist.h"
#include "mpidi_ch3_impl.h"
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_EXTERN_DECL(wincreate_allgather);
-MPIU_INSTR_DURATION_EXTERN_DECL(winfree_rs);
-MPIU_INSTR_DURATION_EXTERN_DECL(winfree_complete);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winfree_rs);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winfree_complete);
typedef enum MPIDI_RMA_Op_type {
MPIDI_RMA_PUT = 23,
@@ -1062,20 +1060,20 @@ static inline int MPIDI_CH3I_Wait_for_pt_ops_finish(MPID_Win *win_ptr)
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_WAIT_FOR_PT_OPS_FINISH);
comm_ptr = win_ptr->comm_ptr;
- MPIU_INSTR_DURATION_START(winfree_rs);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfree_rs);
mpi_errno = MPIR_Reduce_scatter_block_impl(win_ptr->pt_rma_puts_accs,
&total_pt_rma_puts_accs, 1,
MPI_INT, MPI_SUM, comm_ptr, &errflag);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
- MPIU_INSTR_DURATION_END(winfree_rs);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfree_rs);
if (total_pt_rma_puts_accs != win_ptr->my_pt_rma_puts_accs)
{
MPID_Progress_state progress_state;
/* poke the progress engine until the two are equal */
- MPIU_INSTR_DURATION_START(winfree_complete);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfree_complete);
MPID_Progress_start(&progress_state);
while (total_pt_rma_puts_accs != win_ptr->my_pt_rma_puts_accs)
{
@@ -1089,7 +1087,7 @@ static inline int MPIDI_CH3I_Wait_for_pt_ops_finish(MPID_Win *win_ptr)
/* --END ERROR HANDLING-- */
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winfree_complete);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfree_complete);
}
fn_exit:
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index ea6eb50..5e8005e 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -6,11 +6,9 @@
#include "mpidrma.h"
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_alloc);
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_set);
-extern void MPIDI_CH3_RMA_InitInstr(void);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_set);
+extern void MPIDI_CH3_RMA_Init_Pvars(void);
#undef FUNCNAME
#define FUNCNAME MPIDI_Get_accumulate
@@ -82,14 +80,14 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
MPIDI_RMA_Op_t *new_ptr = NULL;
/* Append the operation to the window's RMA ops queue */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* TODO: Can we use the MPIDI_RMA_ACC_CONTIG optimization? */
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->type = MPIDI_RMA_GET_ACCUMULATE;
/* Cast away const'ness for origin_address as MPIDI_RMA_Op_t
* contain both PUT and GET like ops */
@@ -104,7 +102,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
new_ptr->target_count = target_count;
new_ptr->target_datatype = target_datatype;
new_ptr->op = op;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
/* if source or target datatypes are derived, increment their
reference counts */
@@ -194,12 +192,12 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
MPIDI_RMA_Op_t *new_ptr = NULL;
/* Append this operation to the RMA ops queue */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->type = MPIDI_RMA_COMPARE_AND_SWAP;
new_ptr->origin_addr = (void *) origin_addr;
new_ptr->origin_count = 1;
@@ -214,7 +212,7 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
new_ptr->compare_addr = (void *) compare_addr;
new_ptr->compare_count = 1;
new_ptr->compare_datatype = datatype;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
}
fn_exit:
@@ -286,12 +284,12 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
MPIDI_RMA_Op_t *new_ptr = NULL;
/* Append this operation to the RMA ops queue */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->type = MPIDI_RMA_FETCH_AND_OP;
new_ptr->origin_addr = (void *) origin_addr;
new_ptr->origin_count = 1;
@@ -304,7 +302,7 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
new_ptr->result_count = 1;
new_ptr->result_datatype = datatype;
new_ptr->op = op;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
}
fn_exit:
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 6c2a83c..64dc836 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -8,11 +8,9 @@
static int enableShortACC=1;
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_alloc);
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_set);
-extern void MPIDI_CH3_RMA_InitInstr(void);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_set);
+extern void MPIDI_CH3_RMA_Init_Pvars(void);
#define MPIDI_PASSIVE_TARGET_DONE_TAG 348297
#define MPIDI_PASSIVE_TARGET_RMA_TAG 563924
@@ -177,12 +175,12 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_Op_t *new_ptr = NULL;
/* queue it up */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
/* FIXME: For contig and very short operations, use a streamlined op */
new_ptr->type = MPIDI_RMA_PUT;
/* Cast away const'ness for the origin address, as the
@@ -195,7 +193,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_disp = target_disp;
new_ptr->target_count = target_count;
new_ptr->target_datatype = target_datatype;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
/* if source or target datatypes are derived, increment their
reference counts */
@@ -289,12 +287,12 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_Op_t *new_ptr = NULL;
/* queue it up */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
/* FIXME: For contig and very short operations, use a streamlined op */
new_ptr->type = MPIDI_RMA_GET;
new_ptr->origin_addr = origin_addr;
@@ -304,7 +302,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_disp = target_disp;
new_ptr->target_count = target_count;
new_ptr->target_datatype = target_datatype;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
/* if source or target datatypes are derived, increment their
reference counts */
@@ -401,15 +399,15 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_RMA_Op_t *new_ptr = NULL;
/* queue it up */
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* If predefined and contiguous, use a simplified element */
if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
MPIR_DATATYPE_IS_PREDEFINED(target_datatype) && enableShortACC) {
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->type = MPIDI_RMA_ACC_CONTIG;
/* Only the information needed for the contig/predefined acc */
/* Cast away const'ness for origin_address as
@@ -422,11 +420,11 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_count = target_count;
new_ptr->target_datatype = target_datatype;
new_ptr->op = op;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
goto fn_exit;
}
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->type = MPIDI_RMA_ACCUMULATE;
/* Cast away const'ness for origin_address as MPIDI_RMA_Op_t
* contain both PUT and GET like ops */
@@ -438,7 +436,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
new_ptr->target_count = target_count;
new_ptr->target_datatype = target_datatype;
new_ptr->op = op;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
/* if source or target datatypes are derived, increment their
reference counts */
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 732b0da..fe65823 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -7,73 +7,663 @@
#include "mpidimpl.h"
#include "mpidrma.h"
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_DECL(winfence_clearlock);
-MPIU_INSTR_DURATION_DECL(winfence_rs);
-MPIU_INSTR_DURATION_DECL(winfence_issue);
-MPIU_INSTR_DURATION_DECL(winfence_complete);
-MPIU_INSTR_DURATION_DECL(winfence_wait);
-MPIU_INSTR_DURATION_DECL(winfence_block);
-MPIU_INSTR_COUNTER_DECL(winfence_reqs);
-MPIU_INSTR_COUNTER_DECL(winunlock_reqs);
-MPIU_INSTR_COUNTER_DECL(wincomplete_reqs);
-MPIU_INSTR_DURATION_DECL(winpost_clearlock);
-MPIU_INSTR_DURATION_DECL(winpost_sendsync);
-MPIU_INSTR_DURATION_DECL(winstart_clearlock);
-MPIU_INSTR_DURATION_DECL(wincomplete_issue);
-MPIU_INSTR_DURATION_DECL(wincomplete_complete);
-MPIU_INSTR_DURATION_DECL(wincomplete_recvsync);
-MPIU_INSTR_DURATION_DECL(wincomplete_block);
-MPIU_INSTR_DURATION_DECL(winwait_wait);
-MPIU_INSTR_DURATION_DECL(winlock_getlocallock);
-MPIU_INSTR_DURATION_DECL(winunlock_getlock);
-MPIU_INSTR_DURATION_DECL(winunlock_issue);
-MPIU_INSTR_DURATION_DECL(winunlock_complete);
-MPIU_INSTR_DURATION_DECL(winunlock_block);
-MPIU_INSTR_DURATION_DECL(lockqueue_alloc);
-MPIU_INSTR_DURATION_DECL(rmapkt_acc);
-MPIU_INSTR_DURATION_DECL(rmapkt_acc_predef);
-MPIU_INSTR_DURATION_DECL(rmapkt_acc_immed);
-MPIU_INSTR_DURATION_DECL(rmapkt_acc_immed_op);
-MPIU_INSTR_DURATION_DECL(rmapkt_cas);
-MPIU_INSTR_DURATION_DECL(rmapkt_fop);
-MPIU_INSTR_DURATION_DECL(rmapkt_get_accum);
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_alloc);
-MPIU_INSTR_DURATION_EXTERN_DECL(rmaqueue_set);
-void MPIDI_CH3_RMA_InitInstr(void);
-
-void MPIDI_CH3_RMA_InitInstr(void)
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_lockqueue_alloc);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_clearlock);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_clearlock_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_rs);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_issue);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_issue_aux);
+MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL(RMA, rma_winfence_issue_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_complete);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_complete_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_wait);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_wait_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfence_block);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_block_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winpost_clearlock);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winpost_clearlock_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winpost_sendsync);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winpost_sendsync_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winstart_clearlock);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winstart_clearlock_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincomplete_issue);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_wincomplete_issue_aux);
+MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL(RMA, rma_wincomplete_issue_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincomplete_complete);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_wincomplete_complete_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincomplete_recvsync);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_wincomplete_recvsync_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincomplete_block);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_wincomplete_block_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winwait_wait);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winwait_wait_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winlock_getlocallock);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winunlock_getlock);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winunlock_issue);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winunlock_complete);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winunlock_complete_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winunlock_block);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winunlock_block_aux);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_acc);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_acc_predef);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_acc_immed);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmapkt_acc_immed_op);
+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_accum);
+
+MPIR_T_PVAR_ULONG2_LEVEL_DECL(RMA, rma_winfence_reqs);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winfence_reqs);
+MPIR_T_PVAR_ULONG2_HIGHWATERMARK_DECL(RMA, rma_winfence_reqs);
+
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_winunlock_reqs);
+MPIR_T_PVAR_ULONG2_COUNTER_DECL(RMA, rma_wincomplete_reqs);
+
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_wincreate_allgather);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfree_rs);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_winfree_complete);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmaqueue_alloc);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL(RMA, rma_rmaqueue_set);
+
+void MPIDI_CH3_RMA_Init_Pvars(void)
{
- MPIU_INSTR_DURATION_INIT(lockqueue_alloc,0,"Allocate Lock Queue element");
- MPIU_INSTR_DURATION_INIT(winfence_clearlock,1,"WIN_FENCE:Clear prior lock");
- MPIU_INSTR_DURATION_INIT(winfence_rs,0,"WIN_FENCE:ReduceScatterBlock");
- MPIU_INSTR_DURATION_INIT(winfence_issue,2,"WIN_FENCE:Issue RMA ops");
- MPIU_INSTR_DURATION_INIT(winfence_complete,1,"WIN_FENCE:Complete RMA ops");
- MPIU_INSTR_DURATION_INIT(winfence_wait,1,"WIN_FENCE:Wait for ops from other processes");
- MPIU_INSTR_DURATION_INIT(winfence_block,0,"WIN_FENCE:Wait for any progress");
- MPIU_INSTR_COUNTER_INIT(winfence_reqs,"WIN_FENCE:Pending requests");
- MPIU_INSTR_COUNTER_INIT(winunlock_reqs,"WIN_UNLOCK:Pending requests");
- MPIU_INSTR_COUNTER_INIT(wincomplete_reqs,"WIN_COMPLETE:Pending requests");
- MPIU_INSTR_DURATION_INIT(winpost_clearlock,1,"WIN_POST:Clear prior lock");
- MPIU_INSTR_DURATION_INIT(winpost_sendsync,1,"WIN_POST:Senc sync messages");
- MPIU_INSTR_DURATION_INIT(winstart_clearlock,1,"WIN_START:Clear prior lock");
- MPIU_INSTR_DURATION_INIT(wincomplete_recvsync,1,"WIN_COMPLETE:Recv sync messages");
- MPIU_INSTR_DURATION_INIT(wincomplete_issue,2,"WIN_COMPLETE:Issue RMA ops");
- MPIU_INSTR_DURATION_INIT(wincomplete_complete,1,"WIN_COMPLETE:Complete RMA ops");
- MPIU_INSTR_DURATION_INIT(wincomplete_block,0,"WIN_COMPLETE:Wait for any progress");
- MPIU_INSTR_DURATION_INIT(winwait_wait,1,"WIN_WAIT:Wait for ops from other processes");
- MPIU_INSTR_DURATION_INIT(winlock_getlocallock,0,"WIN_LOCK:Get local lock");
- MPIU_INSTR_DURATION_INIT(winunlock_issue,2,"WIN_UNLOCK:Issue RMA ops");
- MPIU_INSTR_DURATION_INIT(winunlock_complete,1,"WIN_UNLOCK:Complete RMA ops");
- MPIU_INSTR_DURATION_INIT(winunlock_getlock,0,"WIN_UNLOCK:Acquire lock");
- MPIU_INSTR_DURATION_INIT(winunlock_block,0,"WIN_UNLOCK:Wait for any progress");
- MPIU_INSTR_DURATION_INIT(rmapkt_acc,0,"RMA:PKTHANDLER for Accumulate");
- MPIU_INSTR_DURATION_INIT(rmapkt_acc_predef,0,"RMA:PKTHANDLER for Accumulate: predef dtype");
- MPIU_INSTR_DURATION_INIT(rmapkt_acc_immed,0,"RMA:PKTHANDLER for Accum immed");
- MPIU_INSTR_DURATION_INIT(rmapkt_acc_immed_op,0,"RMA:PKTHANDLER for Accum immed operation");
- MPIU_INSTR_DURATION_INIT(rmapkt_cas,0,"RMA:PKTHANDLER for Compare-and-swap");
- MPIU_INSTR_DURATION_INIT(rmapkt_fop,0,"RMA:PKTHANDLER for Fetch-and-op");
- MPIU_INSTR_DURATION_INIT(rmapkt_get_accum,0,"RMA:PKTHANDLER for Get-Accumulate");
+ /* rma_lockqueue_alloc */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_lockqueue_alloc,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "Allocate Lock Queue element (in seconds)");
+
+ /* rma_winfence_clearlock */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_clearlock,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Clear prior lock (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_clearlock_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Clear prior lock");
+
+ /* rma_winfence_rs */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_rs,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:ReduceScatterBlock (in seconds)");
+
+ /* rma_winfence_issue and auxiliaries */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_issue,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Issue RMA ops (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_issue_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Issue RMA ops");
+
+ MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_issue_aux,
+ 0, /* init value */
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Issue RMA ops");
+
+ /* rma_winfence_complete */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_complete,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Complete RMA ops (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_complete_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Complete RMA ops");
+
+ /* rma_winfence_wait */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_wait,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Wait for ops from other processes (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_wait_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Wait for ops from other processes");
+
+ /* rma_winfence_block */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfence_block,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Wait for any progress (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_block_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Wait for any progress");
+
+
+ /* rma_winpost_clearlock */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winpost_clearlock,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_POST:Clear prior lock (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winpost_clearlock_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_POST:Clear prior lock");
+
+ /* rma_winpost_sendsync */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winpost_sendsync,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_POST:Senc sync messages (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winpost_sendsync_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_POST:Senc sync messages");
+
+ /* rma_winstart_clearlock */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winstart_clearlock,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_START:Clear prior lock (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winstart_clearlock_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_START:Clear prior lock");
+
+ /* rma_wincomplete_issue and auxiliaries */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_wincomplete_issue,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Issue RMA ops (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_issue_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Issue RMA ops");
+
+ MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_issue_aux,
+ 0, /* init value */
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Issue RMA ops");
+
+ /* rma_wincomplete_complete */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_wincomplete_complete,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Complete RMA ops (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_complete_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Complete RMA ops");
+
+ /* rma_wincomplete_recvsync */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_wincomplete_recvsync,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Recv sync messages (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_recvsync_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Recv sync messages");
+
+ /* rma_wincomplete_block */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_wincomplete_block,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Wait for any progress (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_block_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Wait for any progress");
+
+ /* rma_winwait_wait */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winwait_wait,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_WAIT:Wait for ops from other processes (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winwait_wait_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_WAIT:Wait for ops from other processes");
+
+ /* rma_winlock_getlocallock */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winlock_getlocallock,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_LOCK:Get local lock (in seconds)");
+
+ /* rma_winunlock_getlock */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winunlock_getlock,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Acquire lock (in seconds)");
+
+ /* rma_winunlock_issue */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winunlock_issue,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Issue RMA ops (in seconds)");
+
+ /* rma_winunlock_complete */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winunlock_complete,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Complete RMA ops (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winunlock_complete_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Complete RMA ops (in seconds)");
+
+ /* rma_winunlock_block */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winunlock_block,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Wait for any progress (in seconds)");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winunlock_block_aux,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Wait for any progress");
+
+ /* rma_rmapkt_acc */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_acc,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Accumulate (in seconds)");
+
+ /* rma_rmapkt_acc_predef */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_acc_predef,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Accumulate: predef dtype (in seconds)");
+
+ /* rma_rmapkt_acc_immed */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_acc_immed,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Accum immed (in seconds)");
+
+ /* rma_rmapkt_acc_immed_op */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_acc_immed_op,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Accum immed operation (in seconds)");
+
+ /* rma_rmapkt_cas */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_cas,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Compare-and-swap (in seconds)");
+
+ /* rma_rmapkt_fop */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_fop,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Fetch-and-op (in seconds)");
+
+ /* rma_rmapkt_get_accum */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmapkt_get_accum,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "RMA:PKTHANDLER for Get-Accumulate (in seconds)");
+
+ /* Level, counter and highwatermark for rma_winfence_reqs */
+ MPIR_T_PVAR_LEVEL_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_reqs,
+ 0, /* init value */
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY | MPIR_T_PVAR_FLAG_CONTINUOUS,
+ "RMA",
+ "WIN_FENCE:Pending requests");
+
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_reqs,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Pending requests");
+
+ MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winfence_reqs,
+ 0, /* init value */
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FENCE:Pending requests");
+
+ /* rma_winunlock_reqs */
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_winunlock_reqs,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_UNLOCK:Pending requests");
+
+ /* rma_wincomplete_reqs */
+ MPIR_T_PVAR_COUNTER_REGISTER_STATIC(
+ RMA,
+ MPI_UNSIGNED_LONG_LONG,
+ rma_wincomplete_reqs,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_COMPLETE:Pending requests");
+
+ /* rma_wincreate_allgather */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_wincreate_allgather,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_CREATE:Allgather (in seconds)");
+
+ /* rma_winfree_rs */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfree_rs,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FREE:ReduceScatterBlock (in seconds)");
+
+ /* rma_winfree_complete */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_winfree_complete,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "WIN_FREE:Complete (in seconds)");
+
+ /* rma_rmaqueue_alloc */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmaqueue_alloc,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "Allocate RMA Queue element (in seconds)");
+
+ /* rma_rmaqueue_set */
+ MPIR_T_PVAR_TIMER_REGISTER_STATIC(
+ RMA,
+ MPI_DOUBLE,
+ rma_rmaqueue_set,
+ MPI_T_VERBOSITY_MPIDEV_DETAIL,
+ MPI_T_BIND_NO_OBJECT,
+ MPIR_T_PVAR_FLAG_READONLY,
+ "RMA",
+ "Set fields in RMA Queue element (in seconds)");
}
/* These are used to use a common routine to complete lists of RMA
@@ -82,10 +672,9 @@ void MPIDI_CH3_RMA_InitInstr(void)
thread-safe; the best choice for thread-safety is to eliminate this
ability to discriminate between the different types of RMA synchronization.
*/
-static MPIU_INSTR_Duration_count *list_complete; /* outer */
-static MPIU_INSTR_Duration_count *list_block; /* Inner; while waiting */
-
-#endif
+static MPIR_T_pvar_timer_t *list_complete_timer; /* outer */
+static unsigned long long *list_complete_counter;
+static MPIR_T_pvar_timer_t *list_block_timer; /* Inner; while waiting */
/*
* These routines provide a default implementation of the MPI RMA operations
@@ -235,7 +824,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
* have completed and the lock is released. */
if (win_ptr->current_lock_type != MPID_LOCK_NONE)
{
- MPIU_INSTR_DURATION_START(winfence_clearlock);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfence_clearlock);
MPID_Progress_start(&progress_state);
while (win_ptr->current_lock_type != MPID_LOCK_NONE)
{
@@ -247,10 +836,10 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winnoprogress");
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_INCR(winfence_clearlock,0,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winfence_clearlock_aux, 1);
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winfence_clearlock);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfence_clearlock);
}
/* Note that the NOPRECEDE and NOSUCCEED must be specified by all processes
@@ -286,7 +875,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
OPA_read_write_barrier();
}
- MPIU_INSTR_DURATION_START(winfence_rs);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfence_rs);
/* This is the second or later fence. Do all the preceding RMA ops. */
comm_ptr = win_ptr->comm_ptr;
/* First inform every process whether it is a target of RMA
@@ -334,7 +923,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
mpi_errno = MPIR_Reduce_scatter_block_impl(MPI_IN_PLACE, rma_target_proc, 1,
MPI_INT, MPI_SUM, comm_ptr, &errflag);
- MPIU_INSTR_DURATION_END(winfence_rs);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfence_rs);
/* result is stored in rma_target_proc[0] */
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
@@ -345,10 +934,14 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
win_ptr->my_counter = win_ptr->my_counter - comm_size +
rma_target_proc[0];
- MPIU_INSTR_DURATION_START(winfence_issue);
- MPIU_INSTR_DURATION_INCR(winfence_issue,0,total_op_count);
- MPIU_INSTR_DURATION_MAX(winfence_issue,1,total_op_count);
- MPIU_INSTR_COUNTER_RESET(winfence_reqs);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfence_issue);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winfence_issue_aux, total_op_count);
+ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE(RMA, rma_winfence_issue_aux, total_op_count);
+
+ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE(RMA, rma_winfence_reqs, MPIR_T_PVAR_LEVEL_GET(rma_winfence_reqs));
+ MPIR_T_PVAR_LEVEL_SET(RMA, rma_winfence_reqs, 0); /* reset the level */
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winfence_reqs, 1);
+
i = 0;
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
while (curr_ptr != NULL)
@@ -378,7 +971,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
}
else {
nRequest++;
- MPIU_INSTR_COUNTER_INCR(winfence_reqs,1);
+ MPIR_T_PVAR_LEVEL_INC(RMA, rma_winfence_reqs, 1);
curr_ptr = curr_ptr->next;
/* The test on the difference is to reduce the number
of times the partial complete routine is called. Without
@@ -388,7 +981,9 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
if (nRequest > MPIR_CVAR_CH3_RMA_NREQUEST_THRESHOLD &&
nRequest - nRequestNew > MPIR_CVAR_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
int nDone = 0;
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(winfence_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winfence_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_winfence_complete_aux));
+
MPIDI_CH3I_RMAListPartialComplete(win_ptr, ops_list, curr_ptr, &nDone);
/* if (nDone > 0) printf( "nDone = %d\n", nDone ); */
nRequest -= nDone;
@@ -396,7 +991,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
}
}
}
- MPIU_INSTR_DURATION_END(winfence_issue);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfence_issue);
/* We replaced a loop over an array of requests with a list of the
incomplete requests. The reason to do
@@ -411,8 +1006,9 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
*/
if (total_op_count)
{
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(winfence_complete));
- MPIU_INSTR_STMT(list_block=MPIU_INSTR_GET_VAR(winfence_block));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winfence_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_winfence_complete_aux));
+ MPIR_T_PVAR_STMT(RMA, list_block_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winfence_block));
mpi_errno = MPIDI_CH3I_RMAListComplete(win_ptr, ops_list);
}
@@ -421,7 +1017,7 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
/* wait for all operations from other processes to finish */
if (win_ptr->my_counter)
{
- MPIU_INSTR_DURATION_START(winfence_wait);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winfence_wait);
MPID_Progress_start(&progress_state);
while (win_ptr->my_counter)
{
@@ -432,10 +1028,10 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winnoprogress");
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_INCR(winfence_wait,0,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winfence_wait_aux, 1);
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winfence_wait);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winfence_wait);
}
if (assert & MPI_MODE_NOSUCCEED)
@@ -1310,7 +1906,7 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
{
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START(winpost_clearlock);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winpost_clearlock);
/* poke the progress engine */
MPID_Progress_start(&progress_state);
while (win_ptr->current_lock_type != MPID_LOCK_NONE)
@@ -1322,10 +1918,10 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winnoprogress");
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_INCR(winpost_clearlock,0,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winpost_clearlock_aux, 1);
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winpost_clearlock);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winpost_clearlock);
}
post_grp_size = post_grp_ptr->size;
@@ -1338,7 +1934,7 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
MPI_Request *req;
MPI_Status *status;
- MPIU_INSTR_DURATION_START(winpost_sendsync);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winpost_sendsync);
/* NOCHECK not specified. We need to notify the source
processes that Post has been called. */
@@ -1375,7 +1971,7 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
MPIU_CHKLMEM_MALLOC(status, MPI_Status *, post_grp_size*sizeof(MPI_Status), mpi_errno, "status");
/* Send a 0-byte message to the source processes */
- MPIU_INSTR_DURATION_INCR(winpost_sendsync,0,post_grp_size);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winpost_sendsync_aux, post_grp_size);
for (i = 0; i < post_grp_size; i++) {
dst = ranks_in_win_grp[i];
@@ -1409,7 +2005,7 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
mpi_errno = MPIR_Group_free_impl(win_grp_ptr);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
- MPIU_INSTR_DURATION_END(winpost_sendsync);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winpost_sendsync);
}
fn_exit:
@@ -1462,7 +2058,7 @@ int MPIDI_Win_start(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr)
{
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START(winstart_clearlock);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winstart_clearlock);
/* poke the progress engine */
MPID_Progress_start(&progress_state);
while (win_ptr->current_lock_type != MPID_LOCK_NONE)
@@ -1474,10 +2070,10 @@ int MPIDI_Win_start(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr)
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winnoprogress");
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_INCR(winstart_clearlock,0,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winstart_clearlock_aux, 1);
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winstart_clearlock);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winstart_clearlock);
}
win_ptr->start_group_ptr = group_ptr;
@@ -1536,7 +2132,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
start_grp_size = win_ptr->start_group_ptr->size;
- MPIU_INSTR_DURATION_START(wincomplete_recvsync);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_wincomplete_recvsync);
MPIU_CHKLMEM_MALLOC(ranks_in_start_grp, int *, start_grp_size*sizeof(int),
mpi_errno, "ranks_in_start_grp");
@@ -1569,7 +2165,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
MPIU_CHKLMEM_MALLOC(req, MPI_Request *, start_grp_size*sizeof(MPI_Request), mpi_errno, "req");
MPIU_CHKLMEM_MALLOC(status, MPI_Status *, start_grp_size*sizeof(MPI_Status), mpi_errno, "status");
- MPIU_INSTR_DURATION_INCR(wincomplete_recvsync,0,start_grp_size);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_wincomplete_recvsync_aux, start_grp_size);
for (i = 0; i < start_grp_size; i++) {
src = ranks_in_win_grp[i];
if (src != rank) {
@@ -1601,14 +2197,14 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
}
/* --END ERROR HANDLING-- */
}
- MPIU_INSTR_DURATION_END(wincomplete_recvsync);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_wincomplete_recvsync);
/* keep track of no. of ops to each proc. Needed for knowing
whether or not to decrement the completion counter. The
completion counter is decremented only on the last
operation. */
- MPIU_INSTR_DURATION_START(wincomplete_issue);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_wincomplete_issue);
/* Note, active target uses the following ops list, and passive
target uses win_ptr->targets[..] */
@@ -1627,8 +2223,8 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
curr_ptr = curr_ptr->next;
}
- MPIU_INSTR_DURATION_INCR(wincomplete_issue,0,total_op_count);
- MPIU_INSTR_DURATION_MAX(wincomplete_issue,1,total_op_count);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_wincomplete_issue_aux, total_op_count);
+ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE(RMA, rma_wincomplete_issue_aux, total_op_count);
/* We allocate a few extra requests because if there are no RMA
ops to a target process, we need to send a 0-byte message just
@@ -1667,19 +2263,20 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
}
else {
nRequest++;
- MPIU_INSTR_COUNTER_INCR(wincomplete_reqs,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_wincomplete_reqs, 1);
curr_ptr = curr_ptr->next;
if (nRequest > MPIR_CVAR_CH3_RMA_NREQUEST_THRESHOLD &&
nRequest - nRequestNew > MPIR_CVAR_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
int nDone = 0;
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(wincomplete_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_wincomplete_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_wincomplete_complete_aux));
MPIDI_CH3I_RMAListPartialComplete(win_ptr, ops_list, curr_ptr, &nDone);
nRequest -= nDone;
nRequestNew = nRequest;
}
}
}
- MPIU_INSTR_DURATION_END(wincomplete_issue);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_wincomplete_issue);
/* If the start_group included some processes that did not end up
becoming targets of RMA operations from this process, we need
@@ -1723,14 +2320,14 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
if (request) {
MPIDI_RMA_Op_t *new_ptr = NULL;
- MPIU_INSTR_DURATION_START(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_alloc);
mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- MPIU_INSTR_DURATION_END(rmaqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_alloc);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
- MPIU_INSTR_DURATION_START(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmaqueue_set);
new_ptr->request = request;
- MPIU_INSTR_DURATION_END(rmaqueue_set);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmaqueue_set);
}
j++;
new_total_op_count++;
@@ -1739,8 +2336,9 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
if (new_total_op_count)
{
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(wincomplete_complete));
- MPIU_INSTR_STMT(list_block=MPIU_INSTR_GET_VAR(wincomplete_block));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_wincomplete_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_wincomplete_complete_aux));
+ MPIR_T_PVAR_STMT(RMA, list_block_timer=MPIR_T_PVAR_TIMER_ADDR(rma_wincomplete_block));
mpi_errno = MPIDI_CH3I_RMAListComplete(win_ptr, ops_list);
}
@@ -1792,7 +2390,7 @@ int MPIDI_Win_wait(MPID_Win *win_ptr)
{
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START(winwait_wait);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winwait_wait);
MPID_Progress_start(&progress_state);
while (win_ptr->my_counter)
{
@@ -1805,10 +2403,10 @@ int MPIDI_Win_wait(MPID_Win *win_ptr)
return mpi_errno;
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_INCR(winwait_wait,0,1)
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winwait_wait_aux, 1);
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winwait_wait);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winwait_wait);
}
/* Ensure ordering of load/store operations. */
@@ -2614,7 +3212,7 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
curr_ptr = curr_ptr->next;
}
- MPIU_INSTR_DURATION_START(winunlock_issue);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winunlock_issue);
curr_ptr = MPIDI_CH3I_RMA_Ops_head(&win_ptr->targets[target_rank].rma_ops_list);
@@ -2687,12 +3285,13 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
}
else {
nRequest++;
- MPIU_INSTR_COUNTER_INCR(winunlock_reqs,1);
+ MPIR_T_PVAR_COUNTER_INC(RMA, rma_winunlock_reqs, 1);
curr_ptr = curr_ptr->next;
if (nRequest > MPIR_CVAR_CH3_RMA_NREQUEST_THRESHOLD &&
nRequest - nRequestNew > MPIR_CVAR_CH3_RMA_NREQUEST_NEW_THRESHOLD) {
int nDone = 0;
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(winunlock_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winunlock_complete));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_winunlock_complete_aux));
MPIDI_CH3I_RMAListPartialComplete(win_ptr,
&win_ptr->targets[target_rank].rma_ops_list,
curr_ptr, &nDone);
@@ -2702,12 +3301,13 @@ static int MPIDI_CH3I_Do_passive_target_rma(MPID_Win *win_ptr, int target_rank,
}
}
}
- MPIU_INSTR_DURATION_END(winunlock_issue);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winunlock_issue);
if (nops)
{
- MPIU_INSTR_STMT(list_complete=MPIU_INSTR_GET_VAR(winunlock_complete));
- MPIU_INSTR_STMT(list_block=MPIU_INSTR_GET_VAR(winunlock_block));
+ MPIR_T_PVAR_STMT(RMA, list_complete_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winunlock_complete));
+ MPIR_T_PVAR_STMT(RMA, list_block_timer=MPIR_T_PVAR_TIMER_ADDR(rma_winunlock_block));
+ MPIR_T_PVAR_STMT(RMA, list_complete_counter=MPIR_T_PVAR_COUNTER_ADDR(rma_winunlock_complete_aux));
mpi_errno = MPIDI_CH3I_RMAListComplete(win_ptr, &win_ptr->targets[target_rank].rma_ops_list);
}
else if (sync_flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK) {
@@ -2791,7 +3391,7 @@ static int MPIDI_CH3I_Acquire_local_lock(MPID_Win *win_ptr, int lock_type) {
{
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START(winlock_getlocallock);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winlock_getlocallock);
MPID_Progress_start(&progress_state);
while (MPIDI_CH3I_Try_acquire_win_lock(win_ptr, lock_type) == 0)
{
@@ -2804,7 +3404,7 @@ static int MPIDI_CH3I_Acquire_local_lock(MPID_Win *win_ptr, int lock_type) {
/* --END ERROR HANDLING-- */
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winlock_getlocallock);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winlock_getlocallock);
}
win_ptr->targets[win_ptr->comm_ptr->rank].remote_lock_state = MPIDI_CH3_WIN_LOCK_GRANTED;
@@ -2841,7 +3441,7 @@ static int MPIDI_CH3I_Wait_for_lock_granted(MPID_Win *win_ptr, int target_rank)
if (win_ptr->targets[target_rank].remote_lock_state != MPIDI_CH3_WIN_LOCK_GRANTED) {
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START(winunlock_getlock);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_winunlock_getlock);
MPID_Progress_start(&progress_state);
while (win_ptr->targets[target_rank].remote_lock_state != MPIDI_CH3_WIN_LOCK_GRANTED) {
mpi_errno = MPID_Progress_wait(&progress_state);
@@ -2853,7 +3453,7 @@ static int MPIDI_CH3I_Wait_for_lock_granted(MPID_Win *win_ptr, int target_rank)
/* --END ERROR HANDLING-- */
}
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_END(winunlock_getlock);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_winunlock_getlock);
}
fn_exit:
@@ -3648,7 +4248,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received accumulate pkt");
- MPIU_INSTR_DURATION_START(rmapkt_acc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_acc);
MPIU_Assert(accum_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, accum_pkt->flags);
@@ -3675,7 +4275,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype))
{
- MPIU_INSTR_DURATION_START(rmapkt_acc_predef);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_acc_predef);
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RESP);
req->dev.datatype = accum_pkt->datatype;
@@ -3717,11 +4317,11 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (complete)
{
*rreqp = NULL;
- MPIU_INSTR_DURATION_END(rmapkt_acc_predef);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_acc_predef);
goto fn_exit;
}
}
- MPIU_INSTR_DURATION_END(rmapkt_acc_predef);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_acc_predef);
}
else
{
@@ -3778,7 +4378,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
}
fn_exit:
- MPIU_INSTR_DURATION_END(rmapkt_acc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_acc);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACCUMULATE);
return mpi_errno;
fn_fail:
@@ -3805,7 +4405,7 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received accumulate immedidate pkt");
- MPIU_INSTR_DURATION_START(rmapkt_acc_immed);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_acc_immed);
MPIU_Assert(accum_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, accum_pkt->flags);
@@ -3817,7 +4417,7 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPID_Datatype_get_extent_macro(accum_pkt->datatype, extent);
- MPIU_INSTR_DURATION_START(rmapkt_acc_immed_op);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_acc_immed_op);
if (win_ptr->shm_allocated == TRUE)
MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr);
/* Data is already present */
@@ -3843,7 +4443,7 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
}
if (win_ptr->shm_allocated == TRUE)
MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr);
- MPIU_INSTR_DURATION_END(rmapkt_acc_immed_op);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_acc_immed_op);
/* There are additional steps to take if this is a passive
target RMA or the last operation from the source */
@@ -3858,7 +4458,7 @@ int MPIDI_CH3_PktHandler_Accumulate_Immed( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
fn_exit:
- MPIU_INSTR_DURATION_END(rmapkt_acc_immed);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_acc_immed);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_ACCUMULATE_IMMED);
return mpi_errno;
fn_fail:
@@ -3887,7 +4487,7 @@ int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received CAS pkt");
- MPIU_INSTR_DURATION_START(rmapkt_cas);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_cas);
MPIU_Assert(cas_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(cas_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, cas_pkt->flags);
@@ -3938,7 +4538,7 @@ int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
fn_exit:
- MPIU_INSTR_DURATION_END(rmapkt_cas);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_cas);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_CAS);
return mpi_errno;
fn_fail:
@@ -4002,7 +4602,7 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received FOP pkt");
- MPIU_INSTR_DURATION_START(rmapkt_fop);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_fop);
MPIU_Assert(fop_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(fop_pkt->target_win_handle, win_ptr);
mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, fop_pkt->flags);
@@ -4064,7 +4664,7 @@ int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
fn_exit:
MPIU_CHKPMEM_COMMIT();
- MPIU_INSTR_DURATION_END(rmapkt_fop);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_fop);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_FOP);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -4156,7 +4756,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_GET_ACCUM_RESP);
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received Get-Accumulate response pkt");
- MPIU_INSTR_DURATION_START(rmapkt_get_accum);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_rmapkt_get_accum);
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *)pkt + sizeof(MPIDI_CH3_Pkt_t);
@@ -4178,7 +4778,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
*buflen = data_len + sizeof(MPIDI_CH3_Pkt_t);
fn_exit:
- MPIU_INSTR_DURATION_END(rmapkt_get_accum);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_rmapkt_get_accum);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PKTHANDLER_GET_ACCUM_RESP);
return mpi_errno;
fn_fail:
@@ -4232,9 +4832,9 @@ int MPIDI_CH3_PktHandler_Lock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
curr_ptr = curr_ptr->next;
}
- MPIU_INSTR_DURATION_START(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_lockqueue_alloc);
new_ptr = (MPIDI_Win_lock_queue *) MPIU_Malloc(sizeof(MPIDI_Win_lock_queue));
- MPIU_INSTR_DURATION_END(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_lockqueue_alloc);
if (!new_ptr) {
MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,"**nomem","**nomem %s",
"MPIDI_Win_lock_queue");
@@ -4308,9 +4908,9 @@ int MPIDI_CH3_PktHandler_LockPutUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* queue the information */
MPIDI_Win_lock_queue *curr_ptr, *prev_ptr, *new_ptr;
- MPIU_INSTR_DURATION_START(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_lockqueue_alloc);
new_ptr = (MPIDI_Win_lock_queue *) MPIU_Malloc(sizeof(MPIDI_Win_lock_queue));
- MPIU_INSTR_DURATION_END(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_lockqueue_alloc);
if (!new_ptr) {
MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,"**nomem","**nomem %s",
"MPIDI_Win_lock_queue");
@@ -4473,9 +5073,9 @@ int MPIDI_CH3_PktHandler_LockGetUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
curr_ptr = curr_ptr->next;
}
- MPIU_INSTR_DURATION_START(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_lockqueue_alloc);
new_ptr = (MPIDI_Win_lock_queue *) MPIU_Malloc(sizeof(MPIDI_Win_lock_queue));
- MPIU_INSTR_DURATION_END(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_lockqueue_alloc);
if (!new_ptr) {
MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,"**nomem","**nomem %s",
"MPIDI_Win_lock_queue");
@@ -4555,9 +5155,9 @@ int MPIDI_CH3_PktHandler_LockAccumUnlock( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* queue the information */
- MPIU_INSTR_DURATION_START(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_lockqueue_alloc);
new_ptr = (MPIDI_Win_lock_queue *) MPIU_Malloc(sizeof(MPIDI_Win_lock_queue));
- MPIU_INSTR_DURATION_END(lockqueue_alloc);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_lockqueue_alloc);
if (!new_ptr) {
MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,"**nomem","**nomem %s",
"MPIDI_Win_lock_queue");
@@ -4839,7 +5439,7 @@ int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* ------------------------------------------------------------------------ */
-/* list_complete and list_block defined above */
+/* list_complete_timer/counter and list_block_timer defined above */
static int MPIDI_CH3I_RMAListComplete( MPID_Win *win_ptr,
MPIDI_RMA_Ops_list_t *ops_list )
@@ -4848,7 +5448,7 @@ static int MPIDI_CH3I_RMAListComplete( MPID_Win *win_ptr,
MPIDI_RMA_Op_t *curr_ptr;
MPID_Progress_state progress_state;
- MPIU_INSTR_DURATION_START_VAR(list_complete);
+ MPIR_T_PVAR_TIMER_START_VAR(RMA, list_complete_timer);
MPID_Progress_start(&progress_state);
/* Process all operations until they are complete */
while (!MPIDI_CH3I_RMA_Ops_isempty(ops_list)) {
@@ -4893,7 +5493,7 @@ static int MPIDI_CH3I_RMAListComplete( MPID_Win *win_ptr,
there was an incomplete request. */
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
if (curr_ptr && !MPID_Request_is_complete(curr_ptr->request) ) {
- MPIU_INSTR_DURATION_START_VAR(list_block);
+ MPIR_T_PVAR_TIMER_START_VAR(RMA, list_block_timer);
mpi_errno = MPID_Progress_wait(&progress_state);
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno != MPI_SUCCESS) {
@@ -4901,12 +5501,12 @@ static int MPIDI_CH3I_RMAListComplete( MPID_Win *win_ptr,
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**winnoprogress");
}
/* --END ERROR HANDLING-- */
- MPIU_INSTR_DURATION_END_VAR(list_block);
+ MPIR_T_PVAR_TIMER_END_VAR(RMA, list_block_timer);
}
} /* While list of rma operation is non-empty */
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_INCR_VAR(list_complete,0,ntimes);
- MPIU_INSTR_DURATION_END_VAR(list_complete);
+ MPIR_T_PVAR_COUNTER_INC_VAR(RMA, list_complete_counter, ntimes);
+ MPIR_T_PVAR_TIMER_END_VAR(RMA, list_complete_timer);
fn_fail:
return mpi_errno;
@@ -4932,7 +5532,7 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
MPID_Progress_state progress_state;
int nComplete = 0;
- MPIU_INSTR_DURATION_START_VAR(list_complete);
+ MPIR_T_PVAR_TIMER_START_VAR(RMA, list_complete_timer);
MPID_Progress_start(&progress_state);
curr_ptr = MPIDI_CH3I_RMA_Ops_head(ops_list);
@@ -4969,8 +5569,8 @@ static int MPIDI_CH3I_RMAListPartialComplete( MPID_Win *win_ptr,
/* if (nComplete) printf( "Completed %d requests\n", nComplete ); */
MPID_Progress_end(&progress_state);
- MPIU_INSTR_DURATION_INCR_VAR(list_complete,0,1);
- MPIU_INSTR_DURATION_END_VAR(list_complete);
+ MPIR_T_PVAR_COUNTER_INC_VAR(RMA, list_complete_counter, 1);
+ MPIR_T_PVAR_TIMER_END_VAR(RMA, list_complete_timer);
*nDone = nComplete;
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 66329cf..06ab46a 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -8,9 +8,7 @@
#include "mpiinfo.h"
#include "mpidrma.h"
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_EXTERN_DECL(wincreate_allgather);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
#undef FUNCNAME
#define FUNCNAME MPIDI_Win_fns_init
@@ -56,7 +54,7 @@ int MPIDI_CH3U_Win_create_gather( void *base, MPI_Aint size, int disp_unit,
/* RMA handlers should be set before calling this function */
mpi_errno = (*win_ptr)->RMAFns.Win_set_info(*win_ptr, info);
- MPIU_INSTR_DURATION_START(wincreate_allgather);
+ MPIR_T_PVAR_TIMER_START(RMA, rma_wincreate_allgather);
/* allocate memory for the base addresses, disp_units, and
completion counters of all processes */
MPIU_CHKPMEM_MALLOC((*win_ptr)->base_addrs, void **,
@@ -94,7 +92,7 @@ int MPIDI_CH3U_Win_create_gather( void *base, MPI_Aint size, int disp_unit,
mpi_errno = MPIR_Allgather_impl(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL,
tmp_buf, 4, MPI_AINT,
(*win_ptr)->comm_ptr, &errflag);
- MPIU_INSTR_DURATION_END(wincreate_allgather);
+ MPIR_T_PVAR_TIMER_END(RMA, rma_wincreate_allgather);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 3c0e86c..69d20aa 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -9,15 +9,14 @@
MPIU_THREADSAFE_INIT_DECL(initRMAoptions);
-#ifdef USE_MPIU_INSTR
-MPIU_INSTR_DURATION_DECL(wincreate_allgather);
-MPIU_INSTR_DURATION_DECL(winfree_rs);
-MPIU_INSTR_DURATION_DECL(winfree_complete);
-MPIU_INSTR_DURATION_DECL(rmaqueue_alloc);
-MPIU_INSTR_DURATION_DECL(rmaqueue_set);
-extern void MPIDI_CH3_RMA_InitInstr(void);
-#endif
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_wincreate_allgather);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winfree_rs);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winfree_complete);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
+MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_set);
+
+extern void MPIDI_CH3_RMA_Init_Pvars(void);
static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPID_Comm *comm_ptr, MPID_Win **win_ptr);
@@ -255,15 +254,8 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
if(initRMAoptions) {
MPIU_THREADSAFE_INIT_BLOCK_BEGIN(initRMAoptions);
-#ifdef USE_MPIU_INSTR
- /* Define all instrumentation handles used in the CH3 RMA here*/
- MPIU_INSTR_DURATION_INIT(wincreate_allgather,0,"WIN_CREATE:Allgather");
- MPIU_INSTR_DURATION_INIT(winfree_rs,0,"WIN_FREE:ReduceScatterBlock");
- MPIU_INSTR_DURATION_INIT(winfree_complete,0,"WIN_FREE:Complete");
- MPIU_INSTR_DURATION_INIT(rmaqueue_alloc,0,"Allocate RMA Queue element");
- MPIU_INSTR_DURATION_INIT(rmaqueue_set,0,"Set fields in RMA Queue element");
- MPIDI_CH3_RMA_InitInstr();
-#endif
+
+ MPIDI_CH3_RMA_Init_Pvars();
MPIU_THREADSAFE_INIT_CLEAR(initRMAoptions);
MPIU_THREADSAFE_INIT_BLOCK_END(initRMAoptions);
http://git.mpich.org/mpich.git/commitdiff/fb4c0182d92c2780bbd554b3ef126f1a244dd0ed
commit fb4c0182d92c2780bbd554b3ef126f1a244dd0ed
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 16:22:19 2013 -0600
Fix a bug in MPI_T watermark pvar registeration
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index 47ac6c7..e799e0c 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -1083,7 +1083,7 @@ void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
}; \
void *addr_ = &PVAR_HIGHWATERMARK_##name_; \
MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_HIGHWATERMARK, dtype_, #name_, \
- addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, cat_, desc_); \
+ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \
} while (0)
/* Registration for dynamic pvar w/ or w/o callback. Init is left to users */
@@ -1271,7 +1271,7 @@ void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
}; \
void *addr_ = &PVAR_LOWWATERMARK_##name_; \
MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_LOWWATERMARK, dtype_, #name_, \
- addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, cat_, desc_); \
+ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \
} while (0)
/* Registration for dynamic pvar w/ or w/o callback. Init is left to users */
http://git.mpich.org/mpich.git/commitdiff/379fcf521f16cb906d42c2d8c1c97c23ed9a98b5
commit 379fcf521f16cb906d42c2d8c1c97c23ed9a98b5
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 16:16:10 2013 -0600
Add macro MPIR_T_PVAR_{COUNTER, TIMER}_ADDR
With the macro, we can get pointers on counter/timer pvars.
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/include/mpit.h b/src/include/mpit.h
index a3887c1..549ae46 100644
--- a/src/include/mpit.h
+++ b/src/include/mpit.h
@@ -330,6 +330,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
MPIR_T_PVAR_COUNTER_GET_impl(name_)
#define MPIR_T_PVAR_COUNTER_INC(MODULE, name_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_))
+#define MPIR_T_PVAR_COUNTER_ADDR(name_) \
+ MPIR_T_PVAR_COUNTER_ADDR_impl(name_)
#define MPIR_T_PVAR_COUNTER_REGISTER_STATIC(MODULE, dtype_, name_, \
verb_, bind_, flags_, cat_, desc_) \
@@ -468,6 +470,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_impl(name_))
#define MPIR_T_PVAR_TIMER_END(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_impl(name_))
+#define MPIR_T_PVAR_TIMER_ADDR(name_) \
+ MPIR_T_PVAR_TIMER_ADDR_impl(name_)
/* This macro actually register twins of a timer and a counter to MPIR_T */
#define MPIR_T_PVAR_TIMER_REGISTER_STATIC(MODULE, dtype_, name_, \
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index 0ec700b..47ac6c7 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -665,6 +665,8 @@ extern void MPIR_T_PVAR_REGISTER_impl(
MPIR_T_PVAR_COUNTER_GET_VAR_impl(&PVAR_COUNTER_##name_)
#define MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_) \
MPIR_T_PVAR_COUNTER_INC_VAR_impl(&PVAR_COUNTER_##name_, inc_)
+#define MPIR_T_PVAR_COUNTER_ADDR_impl(name_) \
+ (&PVAR_COUNTER_##name_)
/* Registration AND initialization to zero for static pvar. */
#define MPIR_T_PVAR_COUNTER_REGISTER_STATIC_impl(dtype_, name_, \
@@ -875,6 +877,8 @@ extern void MPIR_T_PVAR_REGISTER_impl(
MPIR_T_PVAR_TIMER_START_VAR_impl(&PVAR_TIMER_##name_)
#define MPIR_T_PVAR_TIMER_END_impl(name_) \
MPIR_T_PVAR_TIMER_END_VAR_impl(&PVAR_TIMER_##name_)
+#define MPIR_T_PVAR_TIMER_ADDR_impl(name_) \
+ (&PVAR_TIMER_##name_)
/* Customized get_value() for MPIR_T_pvar_timer_t */
static inline
http://git.mpich.org/mpich.git/commitdiff/a2299cd54c4893262bbf1a77da0b3198865650e4
commit a2299cd54c4893262bbf1a77da0b3198865650e4
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 16:07:55 2013 -0600
Add a counter into structure MPIR_T_pvar_timer_t
To record how many times a timer is started, so we can easily
calculate the average time of events.
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/include/mpit.h b/src/include/mpit.h
index a6478a8..a3887c1 100644
--- a/src/include/mpit.h
+++ b/src/include/mpit.h
@@ -435,6 +435,13 @@ 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_))
/* TIMER */
+
+/* A timer actually has a twin, i.e., a counter, which counts how many times
+ the timer is started/stopped so that we could know the average time
+ for events measured. In our impl, the twins are exposed to MPI_T through the
+ 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_))
@@ -462,16 +469,12 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
#define MPIR_T_PVAR_TIMER_END(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_impl(name_))
+/* This macro actually register twins of a timer and a counter to MPIR_T */
#define MPIR_T_PVAR_TIMER_REGISTER_STATIC(MODULE, dtype_, name_, \
verb_, bind_, flags_, cat_, desc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_REGISTER_STATIC_impl(dtype_, name_, \
verb_, bind_, flags_, cat_, desc_))
-#define MPIR_T_PVAR_TIMER_REGISTER_DYNAMIC(MODULE, dtype_, name_, \
- addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_REGISTER_DYNAMIC_impl(dtype_, name_, \
- addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
-
/* HIGHWATERMARK */
#define MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL(MODULE, name_) \
PVAR_GATED_DECL(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_DECL_impl(name_))
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index d4b66cb..0ec700b 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -241,8 +241,14 @@ typedef struct {
/* Timer type */
typedef struct {
+ /* Accumulated time */
MPID_Time_t total;
+
+ /* Time when the timer was started recently */
MPID_Time_t curstart;
+
+ /* A counter recording how many times the timer is started */
+ unsigned long long count;
} MPIR_T_pvar_timer_t;
/* An union to represent a watermark value */
@@ -852,6 +858,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
#define MPIR_T_PVAR_TIMER_START_VAR_impl(ptr_) \
do { \
MPID_Wtime(&((ptr_)->curstart)); \
+ (ptr_)->count++; \
} while (0)
#define MPIR_T_PVAR_TIMER_END_VAR_impl(ptr_) \
do { \
@@ -871,7 +878,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
/* Customized get_value() for MPIR_T_pvar_timer_t */
static inline
-void get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
+void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
int count, double *buf)
{
int i;
@@ -887,23 +894,13 @@ void get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
MPIU_Assert(dtype_ == MPI_DOUBLE); \
MPIR_T_PVAR_TIMER_INIT_impl(name_); \
void *addr_ = &PVAR_TIMER_##name_; \
+ void *count_addr_ = &(PVAR_TIMER_##name_.count); \
MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_TIMER, dtype_, #name_, \
addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, \
- (MPIR_T_pvar_get_value_cb *)&get_timer_in_double, NULL, cat_, desc_); \
- } while (0)
-
-/* Registration for dynamic pvar w/ or w/o callback. Init is left to users.
- * (Probably, the callback still is get_timer_in_double)
- */
-#define MPIR_T_PVAR_TIMER_REGISTER_DYNAMIC_impl(dtype_, name_, \
- addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \
- do { \
- /* Allowable datatypes only */ \
- MPIU_Assert(dtype_ == MPI_DOUBLE); \
- MPIU_Assert(addr_ != NULL || get_value_ != NULL); \
- MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_TIMER, dtype_, #name_, \
- addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, \
- get_value_, get_count_, cat_, desc_); \
+ (MPIR_T_pvar_get_value_cb *)&get_timer_time_in_double, NULL, cat_, desc_); \
+ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_COUNTER, MPI_UNSIGNED_LONG_LONG, #name_, \
+ count_addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, \
+ NULL, NULL, cat_, desc_); \
} while (0)
http://git.mpich.org/mpich.git/commitdiff/c12bbcd87d8d1ecd62fb4f37f5de95a76ea2d87d
commit c12bbcd87d8d1ecd62fb4f37f5de95a76ea2d87d
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 15:49:02 2013 -0600
Let MPIR_T_PVAR_*_GET_VAR() act as a rvalue
Removed the gate surrounding this macro.
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/include/mpit.h b/src/include/mpit.h
index 68d67af..a6478a8 100644
--- a/src/include/mpit.h
+++ b/src/include/mpit.h
@@ -122,6 +122,9 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
verb_, bind_, scope_, get_addr_, get_count_, default_, cat_, desc_); \
} while (0)
+/* stmt_ is executed only when ENABLE_PVAR_#MODULE is defined as 1 */
+#define MPIR_T_PVAR_STMT(MODULE, stmt_) \
+ PVAR_GATED_ACTION(MODULE, stmt_)
/* The following are interfaces for each pvar classe,
* basically including delcaration, access and registeration.
@@ -139,13 +142,14 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
#define MPIR_T_PVAR_STATE_SET_VAR(MODULE, ptr_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_))
-#define MPIR_T_PVAR_STATE_GET_VAR(MODULE, ptr_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_))
+/* Not gated by MODULE, since it is supposed to be a rvalue */
+#define MPIR_T_PVAR_STATE_GET_VAR(ptr_) \
+ MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_STATE_SET(MODULE, name_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_impl(name_, val_))
-#define MPIR_T_PVAR_STATE_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_GET_impl(name_))
+#define MPIR_T_PVAR_STATE_GET(name_) \
+ MPIR_T_PVAR_STATE_GET_impl(name_)
#define MPIR_T_PVAR_STATE_REGISTER_STATIC(MODULE, dtype_, name_, \
initval_, etype_, verb_, bind_, flags_, cat_, desc_) \
@@ -187,8 +191,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_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(MODULE, ptr_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_))
+#define MPIR_T_PVAR_LEVEL_GET_VAR(ptr_) \
+ MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_LEVEL_INC_VAR(MODULE, ptr_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_VAR_impl(ptr_, val_))
#define MPIR_T_PVAR_LEVEL_DEC_VAR(MODULE, ptr_, val_) \
@@ -196,8 +200,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
#define MPIR_T_PVAR_LEVEL_SET(MODULE, name_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_impl(name_, val_))
-#define MPIR_T_PVAR_LEVEL_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_GET_impl(name_))
+#define MPIR_T_PVAR_LEVEL_GET(name_) \
+ MPIR_T_PVAR_LEVEL_GET_impl(name_)
#define MPIR_T_PVAR_LEVEL_INC(MODULE, name_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_impl(name_, val_))
#define MPIR_T_PVAR_LEVEL_DEC(MODULE, name_, val_) \
@@ -243,13 +247,13 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_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(MODULE, ptr_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_))
+#define MPIR_T_PVAR_SIZE_GET_VAR(ptr_) \
+ MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_SIZE_SET(MODULE, name_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_impl(name_, val_))
-#define MPIR_T_PVAR_SIZE_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_GET_impl(name_))
+#define MPIR_T_PVAR_SIZE_GET(name_) \
+ MPIR_T_PVAR_SIZE_GET_impl(name_)
#define MPIR_T_PVAR_SIZE_REGISTER_STATIC(MODULE, dtype_, name_, \
initval_, verb_, bind_, flags_, cat_, desc_) \
@@ -274,12 +278,12 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_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_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_))
+ MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_PERCENTAGE_SET(MODULE, name_, val_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_impl(name_, val_))
#define MPIR_T_PVAR_PERCENTAGE_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_GET_impl(name_))
+ MPIR_T_PVAR_PERCENTAGE_GET_impl(name_)
#define MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC(MODULE, dtype_, name_, \
initval_, verb_, bind_, flags_, cat_, desc_) \
@@ -315,15 +319,15 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_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(MODULE, ptr_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_))
+#define MPIR_T_PVAR_COUNTER_GET_VAR(ptr_) \
+ MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_COUNTER_INC_VAR(MODULE, ptr_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_VAR_impl(ptr_, inc_))
#define MPIR_T_PVAR_COUNTER_INIT(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_impl(name_))
-#define MPIR_T_PVAR_COUNTER_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_GET_impl(name_))
+#define MPIR_T_PVAR_COUNTER_GET(name_) \
+ MPIR_T_PVAR_COUNTER_GET_impl(name_)
#define MPIR_T_PVAR_COUNTER_INC(MODULE, name_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_))
@@ -361,15 +365,15 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
#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(MODULE, ptr_, idx_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(ptr_, idx_))
+#define MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR(ptr_, idx_) \
+ MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(ptr_, idx_)
#define MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR(MODULE, ptr_, idx_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR_impl(ptr_, idx_, inc_))
#define MPIR_T_PVAR_COUNTER_ARRAY_INIT(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_impl(name_))
-#define MPIR_T_PVAR_COUNTER_ARRAY_GET(MODULE, name_, idx_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_GET_impl(name_, idx_))
+#define MPIR_T_PVAR_COUNTER_ARRAY_GET(name_, idx_) \
+ MPIR_T_PVAR_COUNTER_ARRAY_GET_impl(name_, idx_)
#define MPIR_T_PVAR_COUNTER_ARRAY_INC(MODULE, ptr_, idx_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_impl(ptr_, idx_, inc_))
@@ -408,15 +412,15 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_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(MODULE, ptr_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_))
+#define MPIR_T_PVAR_AGGREGATE_GET_VAR(ptr_) \
+ MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_)
#define MPIR_T_PVAR_AGGREGATE_INC_VAR(MODULE, ptr_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(ptr_, inc_))
#define MPIR_T_PVAR_AGGREGATE_INIT(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_impl(name_))
-#define MPIR_T_PVAR_AGGREGATE_GET(MODULE, name_) \
- PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_GET_impl(name_))
+#define MPIR_T_PVAR_AGGREGATE_GET(name_) \
+ MPIR_T_PVAR_AGGREGATE_GET_impl(name_)
#define MPIR_T_PVAR_AGGREGATE_INC(MODULE, name_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_impl(name_, inc_))
@@ -618,5 +622,4 @@ 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_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \
addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_))
-
#endif
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index dd63b71..d4b66cb 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -371,7 +371,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
#define MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_) \
do { *ptr_ = val_; } while (0)
#define MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_) \
- *(ptr_)
+ (*(ptr_))
#define MPIR_T_PVAR_STATE_SET_impl(name_, val_) \
MPIR_T_PVAR_STATE_SET_VAR_impl(&PVAR_STATE_##name_, val_)
@@ -444,7 +444,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
#define MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_) \
do { *(ptr_) = val_; } while (0)
#define MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_) \
- *(ptr)
+ (*(ptr_))
#define MPIR_T_PVAR_LEVEL_INC_VAR_impl(ptr_, val_) \
do { *(ptr_) += val_; } while (0)
#define MPIR_T_PVAR_LEVEL_DEC_VAR_impl(ptr_, val_) \
@@ -525,7 +525,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
#define MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_) \
do { *(ptr_) = val_; } while (0)
#define MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_) \
- *(ptr_)
+ (*(ptr_))
#define MPIR_T_PVAR_SIZE_SET_impl(name_, val_) \
MPIR_T_PVAR_SIZE_SET_VAR_impl(&PVAR_SIZE_##name_, val_)
@@ -583,7 +583,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
*ptr_ = val_; \
} while (0)
#define MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_) \
- *(ptr_)
+ (*(ptr_))
#define MPIR_T_PVAR_PERCENTAGE_SET_impl(name_, val_) \
MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(&PVAR_PERCENTAGE_##name_, val_)
@@ -649,7 +649,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
do { *(ptr_) = 0; } while (0)
/* _COUNTER_SET is intentionally not provided. Users should only INC counters */
#define MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_) \
- *(ptr_)
+ (*(ptr_))
#define MPIR_T_PVAR_COUNTER_INC_VAR_impl(ptr_, inc_) \
do { *(ptr_) += inc_; } while (0)
@@ -786,7 +786,7 @@ extern void MPIR_T_PVAR_REGISTER_impl(
do { *(ptr_) = 0; } while (0)
/* _AGGREGATE_SET is intentionally not provided as for counters */
#define MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_) \
- *(ptr_)
+ (*(ptr_))
#define MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(ptr_, inc_) \
do { *(ptr_) += inc_; } while (0)
http://git.mpich.org/mpich.git/commitdiff/fd2ac8b5fdc4e16c67affdd1acd811db239310fe
commit fd2ac8b5fdc4e16c67affdd1acd811db239310fe
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 15:08:13 2013 -0600
Change prototype of MPIR_T_pvar_get_value_cb etc
The return value of the callbacks is of less value.
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/src/include/mpitimpl.h b/src/include/mpitimpl.h
index 9763e6f..dd63b71 100644
--- a/src/include/mpitimpl.h
+++ b/src/include/mpitimpl.h
@@ -142,8 +142,8 @@ void MPIR_T_CVAR_REGISTER_impl(
struct MPIR_T_pvar_handle_s;
struct MPIR_T_pvar_session_s;
-typedef int MPIR_T_pvar_get_value_cb(void *addr, void *obj_handle, int count, void *buf);
-typedef int MPIR_T_pvar_get_count_cb(void *addr, void *obj_handle, int *count);
+typedef void MPIR_T_pvar_get_value_cb(void *addr, void *obj_handle, int count, void *buf);
+typedef void MPIR_T_pvar_get_count_cb(void *addr, void *obj_handle, int *count);
/* Basic pvar flags defined by MPI_T standard */
#define MPIR_T_PVAR_FLAG_READONLY 0x01
@@ -871,15 +871,12 @@ extern void MPIR_T_PVAR_REGISTER_impl(
/* Customized get_value() for MPIR_T_pvar_timer_t */
static inline
-int get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
+void get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
int count, double *buf)
{
- int i, mpi_errno = MPI_SUCCESS;
-
+ int i;
for (i = 0; i < count; i++)
MPID_Wtime_todouble(&(timer[i].total), &buf[i]);
-
- return mpi_errno;
}
/* Registration for static storage */
diff --git a/src/mpi_t/pvar_handle_alloc.c b/src/mpi_t/pvar_handle_alloc.c
index e3bdc07..ec1883a 100644
--- a/src/mpi_t/pvar_handle_alloc.c
+++ b/src/mpi_t/pvar_handle_alloc.c
@@ -55,8 +55,7 @@ int MPIR_T_pvar_handle_alloc_impl(MPI_T_pvar_session session, int pvar_index,
if (info->get_count == NULL) {
cnt = info->count;
} else {
- mpi_errno = info->get_count(info->addr, obj_handle, &cnt);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ info->get_count(info->addr, obj_handle, &cnt);
}
bytes = MPID_Datatype_get_basic_size(info->datatype);
http://git.mpich.org/mpich.git/commitdiff/4c784c5d2bb41eb069df5d338a1ca025651a12e9
commit 4c784c5d2bb41eb069df5d338a1ca025651a12e9
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 14:49:14 2013 -0600
Add rma to option --enable-mpit-pvars=list
Make the default of --enable-mpit-pvars= be 'none' instead of 'all'
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/configure.ac b/configure.ac
index 5e70cd5..3c27a6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,12 +375,13 @@ AC_ARG_ENABLE(g,
AC_ARG_ENABLE([mpit_pvars],
[ --enable-mpit-pvars=list - Selectively enable MPI_T performance variables in
modules. list is a comma-separated module names,
- including (Default is "all"):
+ including (Default is "none"):
none - No performance info recorded
recvq - All message queue-related
nem - All nemesis-related
+ rma - All rma-related
all - All variables above
-],[],[enable_mpit_pvars=all])
+],[],[enable_mpit_pvars=none])
dnl We may want to force MPI_Aint to be the same size as MPI_Offset,
dnl particularly on 32 bit systems with large (64 bit) file systems.
@@ -1833,9 +1834,11 @@ for var in $enable_mpit_pvars ; do
AS_CASE(["$var"],
[nem],[enable_pvar_nem=yes],
[recvq],[enable_pvar_recvq=yes],
+ [rma],[enable_pvar_rma=yes],
[all|yes],
[enable_pvar_nem=yes
- enable_pvar_recvq=yes],
+ enable_pvar_recvq=yes
+ enable_pvar_rma=yes],
[no|none],[],
[IFS=$save_IFS
AC_MSG_WARN([Unknown value ($option) for enable-mpit-pvars])
@@ -1859,6 +1862,13 @@ fi
AC_DEFINE_UNQUOTED(ENABLE_PVAR_RECVQ,$status_recvq_pvars,
[Define to 1 to enable message receive queue-related MPI_T performance variables])
+if test -n "$enable_pvar_rma" ; then
+ status_rma_pvars=1
+else
+ status_rma_pvars=0
+fi
+AC_DEFINE_UNQUOTED(ENABLE_PVAR_RMA,$status_rma_pvars,
+ [Define to 1 to enable rma-related MPI_T performance variables])
# ---------------------------------------------------------------------------
# Support for the language bindings: Fortran 77, Fortran 90, and C++
#
http://git.mpich.org/mpich.git/commitdiff/f8501113cb31e6f4a8120d3fd03f51e99a21ec3a
commit f8501113cb31e6f4a8120d3fd03f51e99a21ec3a
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date: Thu Nov 7 14:42:58 2013 -0600
Delete mpiinstr.h since it is superceeded by MPI_T
Also deleted instr option in configure.ac
Signed-off-by: Junchao Zhang<jczhang at mcs.anl.gov> (Reviewed by Bill Gropp)
diff --git a/configure.ac b/configure.ac
index a3971c6..5e70cd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,7 +359,6 @@ AC_ARG_ENABLE(g,
compiler flags, i.e. MPICHLIB_CFLAGS, MPICHLIB_CXXFLAGS,
MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS.
debug - Synonym for dbg
- instr - Enable instrumentation
log - Enable debug event logging
mem - Memory usage tracing
meminit - Preinitialize memory associated structures and unions to
@@ -1442,9 +1441,6 @@ for option in $enable_g ; do
handle)
perform_handle=yes
;;
- instr)
- perform_instr=yes
- ;;
meminit)
perform_meminit=yes
;;
@@ -1469,7 +1465,6 @@ for option in $enable_g ; do
perform_dbglog=yes
enable_append_g=yes
perform_meminit=yes
- perform_instr=yes
perform_dbgmutex=yes
perform_mutexnesting=yes
perform_handlealloc=yes
@@ -1481,7 +1476,6 @@ for option in $enable_g ; do
perform_dbglog=yes
enable_append_g=yes
perform_meminit=yes
- perform_instr=yes
perform_dbgmutex=yes
perform_mutexnesting=yes
perform_handlealloc=yes
@@ -1515,9 +1509,6 @@ fi
if test "$perform_handlealloc" = yes ; then
AC_DEFINE(MPICH_DEBUG_HANDLEALLOC,1,[Define to enable checking of handles still allocated at MPI_Finalize])
fi
-if test "$perform_instr" = yes ; then
- AC_DEFINE(USE_MPIU_INSTR,1,[Define this to enable internal instrumentation] )
-fi
AS_IF([test "X$perform_handle" = "Xyes"],
[AC_DEFINE(MPICH_DEBUG_HANDLES,1,[Define to enable handle checking])])
diff --git a/src/include/Makefile.mk b/src/include/Makefile.mk
index 3ff7407..6aa9bf2 100644
--- a/src/include/Makefile.mk
+++ b/src/include/Makefile.mk
@@ -45,7 +45,6 @@ noinst_HEADERS += \
src/include/mpiimpl.h \
src/include/mpiimplthread.h \
src/include/mpiimplthreadpost.h \
- src/include/mpiinstr.h \
src/include/mpiiov.h \
src/include/mpimem.h \
src/include/mpir_nbc.h \
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 4987129..9716a70 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2277,9 +2277,6 @@ extern MPICH_PerProcess_t MPIR_Process;
#include "mpierror.h"
#include "mpierrs.h"
-/* Definitions for instrumentation (currently used within RMA code) */
-#include "mpiinstr.h"
-
/* FIXME: This routine is only used within mpi/src/err/errutil.c and
smpd. We may not want to export it. */
void MPIR_Err_print_stack(FILE *, int);
diff --git a/src/include/mpiinstr.h b/src/include/mpiinstr.h
deleted file mode 100644
index 8789b1e..0000000
--- a/src/include/mpiinstr.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2010 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-#ifndef MPIINSTR_H_INCLUDED
-#define MPIINSTR_H_INCLUDED
-
-#ifdef USE_MPIU_INSTR
-/*
- * These instrumentation macros provide easy, lightweight instrumentation
- *
- * Thread-safety: These are not thread-safe. They should either be used
- * only in single-threaded code or in code where single-threadedness is
- * assured. This is by design to keep the overhead low. Should a thread-safe
- * version be desired, specific thread-safe interfaces should be added.
- * These should have _MT_ in the name (for multi-threaded).
- */
-
-/*
- * TODO: Add a connection to the MPI-3 MPIT interface.
- */
-
-#define MPIU_INSTR_TYPE_DURATION 1
-#define MPIU_INSTR_TYPE_COUNTER 2
-
-typedef struct MPIU_INSTR_Generic_t {
- int instrType;
- void *next;
- int count;
- const char *desc;
- int (*toStr)( char *buf, size_t maxlen, void *handlePtr );
-} MPIU_INSTR_Generic_t;
-
-#define MPIU_INSTR_MAX_DATA 8
-typedef struct MPIU_INSTR_Duration_count_t {
- int instrType;
- void *next;
- int count; /* Number of times in duration */
- const char *desc; /* Character string describing duration */
- int (*toStr)( char *buf, size_t maxlen, void *handlePtr );
- MPID_Time_t ttime, /* Time in duration */
- curstart; /* Time of entry into current duration */
- int nitems; /* Number of items in data */
- int data[MPIU_INSTR_MAX_DATA]; /* Used to hold additional data */
- } MPIU_INSTR_Duration_count;
-
-typedef struct MPIU_INSTR_Counter_t {
- int instrType;
- void *next;
- int count;
- const char *desc; /* Character string describing duration */
- int (*toStr)( char *buf, size_t maxlen, void *handlePtr );
- int curcount;
- int totalcount;
- int maxcount;
-} MPIU_INSTR_Counter;
-
-/* Prototypes for visible routines */
-int MPIU_INSTR_AddHandle( void * );
-int MPIU_INSTR_ToStr_Duration_Count( char *, size_t, void * );
-int MPIU_INSTR_ToStr_Counter( char *, size_t, void * );
-
-/* Definitions for including instrumentation in files*/
-
-#define MPIU_INSTR_GET_VAR(name_) \
- &MPIU_INSTR_HANDLE_##name_
-#define MPIU_INSTR_STMT( stmt_ ) stmt_
-
-/* Durations: These measure the time for an operation. In addition to
- the elapsed time, additional data can be stored.
- */
-#define MPIU_INSTR_DURATION_DECL(name_) \
- struct MPIU_INSTR_Duration_count_t MPIU_INSTR_HANDLE_##name_ = { 0 };
-#define MPIU_INSTR_DURATION_EXTERN_DECL(name_) \
- extern struct MPIU_INSTR_Duration_count_t MPIU_INSTR_HANDLE_##name_;
-/* FIXME: Need a generic way to zero the time */
-#define MPIU_INSTR_DURATION_INIT(name_,nitems_,desc_) \
- MPIU_INSTR_HANDLE_##name_.count = 0; \
- MPIU_INSTR_HANDLE_##name_.desc = (const char *)MPIU_Strdup( desc_ ); \
- memset( &MPIU_INSTR_HANDLE_##name_.ttime,0,sizeof(MPID_Time_t));\
- MPIU_INSTR_HANDLE_##name_.toStr = MPIU_INSTR_ToStr_Duration_Count;\
- MPIU_INSTR_HANDLE_##name_.nitems = nitems_;\
- memset( MPIU_INSTR_HANDLE_##name_.data,0,MPIU_INSTR_MAX_DATA*sizeof(int));\
- MPIU_INSTR_AddHandle( &MPIU_INSTR_HANDLE_##name_ );
-
-#define MPIU_INSTR_DURATION_START_VAR(ptr_) \
- MPID_Wtime( &ptr_->curstart )
-#define MPIU_INSTR_DURATION_END_VAR(ptr_) \
- do { \
- MPID_Time_t curend; MPID_Wtime( &curend );\
- MPID_Wtime_acc( &ptr_->curstart, &curend, &ptr_->ttime );\
- ptr_->count++; } while(0)
-#define MPIU_INSTR_DURATION_INCR_VAR(ptr_,idx_,incr_) \
- ptr_->data[idx_] += incr_;
-
-#define MPIU_INSTR_DURATION_START(name_) \
- MPID_Wtime( &MPIU_INSTR_HANDLE_##name_.curstart )
-#define MPIU_INSTR_DURATION_END(name_) \
- do { \
- MPID_Time_t curend; MPID_Wtime( &curend );\
- MPID_Wtime_acc( &MPIU_INSTR_HANDLE_##name_.curstart, \
- &curend, \
- &MPIU_INSTR_HANDLE_##name_.ttime );\
- MPIU_INSTR_HANDLE_##name_.count++; } while(0)
-
-#define MPIU_INSTR_DURATION_INCR(name_,idx_,incr_) \
- MPIU_INSTR_HANDLE_##name_.data[idx_] += incr_;
-#define MPIU_INSTR_DURATION_MAX(name_,idx_,incr_) \
- MPIU_INSTR_HANDLE_##name_.data[idx_] = \
- incr_ > MPIU_INSTR_HANDLE_##name_.data[idx_] ? \
- incr_ : MPIU_INSTR_HANDLE_##name_.data[idx_];
-
-/* Counters: Maintain total count, maximum, and number of times used */
-#define MPIU_INSTR_COUNTER_DECL(name_) \
- struct MPIU_INSTR_Counter_t MPIU_INSTR_HANDLE_##name_ = { 0 };
-#define MPIU_INSTR_COUNTER_INIT(name_,desc_) \
- MPIU_INSTR_HANDLE_##name_.curcount = 0; \
- MPIU_INSTR_HANDLE_##name_.maxcount = 0; \
- MPIU_INSTR_HANDLE_##name_.totalcount = 0; \
- MPIU_INSTR_HANDLE_##name_.desc = (const char *)MPIU_Strdup( desc_ ); \
- MPIU_INSTR_HANDLE_##name_.toStr = MPIU_INSTR_ToStr_Counter;\
- MPIU_INSTR_AddHandle( &MPIU_INSTR_HANDLE_##name_ );
-
-#define MPIU_INSTR_COUNTER_INCR(name_,incr_) \
- MPIU_INSTR_HANDLE_##name_.curcount += incr_;
-#define MPIU_INSTR_COUNTER_RESET(name_) \
- do { MPIU_INSTR_Counter *p_ = &MPIU_INSTR_HANDLE_##name_;\
- p_->count++; \
- p_->totalcount += p_->curcount; \
- if (p_->curcount > p_->maxcount) p_->maxcount = p_->curcount; \
- p_->curcount = 0;} while(0)
-
-#else
-/* Define null versions of macros (these are empty statements) */
-
-#define MPIU_INSTR_GET_VAR(name_)
-#define MPIU_INSTR_STMT(stmt_)
-
-#define MPIU_INSTR_DURATION_DECL(name_)
-#define MPIU_INSTR_DURATION_EXTERN_DECL(name_)
-#define MPIU_INSTR_DURATION_INIT(name_,nitems_,desc_)
-#define MPIU_INSTR_DURATION_START(name_)
-#define MPIU_INSTR_DURATION_END(name_)
-#define MPIU_INSTR_DURATION_INCR(name_,idx_,incr_)
-#define MPIU_INSTR_DURATION_MAX(name_,idx_,incr_)
-#define MPIU_INSTR_DURATION_START_VAR(ptr_)
-#define MPIU_INSTR_DURATION_END_VAR(ptr_)
-#define MPIU_INSTR_DURATION_INCR_VAR(ptr_,idx_,incr_)
-
-#define MPIU_INSTR_COUNTER_DECL(name_)
-#define MPIU_INSTR_COUNTER_INIT(name_,desc_)
-#define MPIU_INSTR_COUNTER_INCR(name_,incr_)
-#define MPIU_INSTR_COUNTER_RESET(name_)
-
-#endif /* USE_MPIU_INSTR */
-
-#endif
diff --git a/src/include/mpitimerimpl.h b/src/include/mpitimerimpl.h
index b261ddc..ea6eae3 100644
--- a/src/include/mpitimerimpl.h
+++ b/src/include/mpitimerimpl.h
@@ -162,7 +162,7 @@ int MPIU_Timer_finalize(void);
int MPIR_Describe_timer_states(void);
/* The original statistics macros (see the design documentation)
- have been superceeded by the instrumentation macros (see mpiinstr.h) */
+ have been superceeded by the MPIR_T_PVAR_* macros (see mpit.h) */
#else /* HAVE_TIMING and doing logging */
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 25 +-
src/include/Makefile.mk | 1 -
src/include/mpiimpl.h | 3 -
src/include/mpiinstr.h | 158 ----
src/include/mpit.h | 74 +-
src/include/mpitimerimpl.h | 2 +-
src/include/mpitimpl.h | 58 +-
src/mpi_t/pvar_handle_alloc.c | 3 +-
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c | 8 +-
.../ch3/channels/nemesis/src/mpid_nem_finalize.c | 6 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c | 6 +-
src/mpid/ch3/include/mpidrma.h | 16 +-
src/mpid/ch3/src/ch3u_rma_acc_ops.c | 32 +-
src/mpid/ch3/src/ch3u_rma_ops.c | 36 +-
src/mpid/ch3/src/ch3u_rma_sync.c | 912 ++++++++++++++++----
src/mpid/ch3/src/ch3u_win_fns.c | 8 +-
src/mpid/ch3/src/mpid_rma.c | 26 +-
17 files changed, 901 insertions(+), 473 deletions(-)
delete mode 100644 src/include/mpiinstr.h
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list