diff --git a/mpiP-stats.c b/mpiP-stats.c index c5fd38b..85369b2 100644 --- a/mpiP-stats.c +++ b/mpiP-stats.c @@ -160,6 +160,11 @@ mpiPi_stats_thr_cs_upd (mpiPi_thread_stat_t *stat, assert (dur >= 0); + + /* Check for the nested calls */ + if (!mpiPi_stats_thr_is_on(stat)) + return; + key.op = op; key.rank = rank; key.cookie = MPIP_CALLSITE_STATS_COOKIE; @@ -346,6 +351,10 @@ void mpiPi_stats_thr_coll_upd (mpiPi_thread_stat_t *stat, int op, double dur, double size, MPI_Comm * comm) { + /* Check for the nested calls */ + if (!mpiPi_stats_thr_is_on(stat)) + return; + _update_msize_stat(&stat->coll, op, dur, size, comm, "collectives"); } @@ -367,6 +376,10 @@ void mpiPi_stats_thr_pt2pt_upd (mpiPi_thread_stat_t *stat, int op, double dur, double size, MPI_Comm * comm) { + /* Check for the nested calls */ + if (!mpiPi_stats_thr_is_on(stat)) + return; + _update_msize_stat(&stat->pt2pt, op, dur, size, comm, "point-to-point"); } diff --git a/mpiPi.c b/mpiPi.c index a5048f6..a60247d 100644 --- a/mpiPi.c +++ b/mpiPi.c @@ -1085,9 +1085,6 @@ mpiPi_update_callsite_stats (unsigned op, unsigned rank, void **pc, callsite_stats_t *csp = NULL; callsite_stats_t key; - if (!mpiPi_stats_mt_is_on(&mpiPi.task_stats)) - return; - mpiPi_stats_mt_cs_upd(&mpiPi.task_stats, op, rank, pc, dur, sendSize, ioSize, rmaSize); }