> 4 4 0 1 1 MIGRATE_LINK
> 2 5 1 MIGRATE_STATE
> 6 0.000000 1 1 0 "rank-0"
-> 5 6 2 computing "0 1 1"
-> 5 7 2 smpi_replay_run_init "0 1 0"
> 6 0.000000 2 1 0 "rank-1"
> 6 0.000000 3 1 0 "rank-2"
+> 5 6 2 computing "0 1 1"
+> 5 7 2 smpi_replay_run_init "0 1 0"
> 5 8 2 action_bcast "0 0.78 0.39"
> 12 0.000000 2 1 7
> 13 0.000000 2 1
> 4 4 0 1 1 MIGRATE_LINK
> 2 5 1 MIGRATE_STATE
> 6 0.000000 1 1 0 "rank-0"
-> 5 6 2 computing "0 1 1"
-> 5 7 2 smpi_replay_run_init "0 1 0"
> 6 0.000000 2 1 0 "rank-1"
> 6 0.000000 3 1 0 "rank-2"
+> 5 6 2 computing "0 1 1"
+> 5 7 2 smpi_replay_run_init "0 1 0"
> 5 8 2 action_bcast "0 0.78 0.39"
> 12 0.000000 2 1 7
> 13 0.000000 2 1
> 13 11.906032 2 3
> 12 11.906032 2 3 18
> 13 11.906032 2 3
-> 7 11.906032 1 1
-> 7 11.906032 1 2
+> 7 11.904056 1 1
+> 7 11.905518 1 2
> 7 11.906032 1 3
$ rm -f ${bindir:=.}/smpi_trace.trace
XBT_PRIVATE void TRACE_smpi_send(int rank, int src, int dst, int tag, int size);
XBT_PRIVATE void TRACE_smpi_recv(int src, int dst, int tag);
XBT_PRIVATE void TRACE_smpi_init(int rank);
-XBT_PRIVATE void TRACE_smpi_finalize(int rank);
/* SMPI + LB (load balancer) */
XBT_PRIVATE void TRACE_smpi_process_change_host(int rank, sg_host_t new_host);
if (not TRACE_smpi_is_enabled())
return;
+ auto self = simgrid::s4u::Actor::self();
+
TRACE_smpi_setup_container(rank, sg_host_self());
+ simgrid::s4u::this_actor::on_exit([self](bool) { smpi_container(self->get_pid())->remove_from_parent(); });
#if HAVE_PAPI
container_t container = smpi_container(rank);
papi_counter_t counters = smpi_process()->papi_counters();
#endif
}
-void TRACE_smpi_finalize(int rank)
-{
- if (not TRACE_smpi_is_enabled())
- return;
-
- smpi_container(rank)->remove_from_parent();
-}
-
void TRACE_smpi_computing_init(int rank)
{
//first use, initialize the color in the trace
smpi_process()->finalize();
TRACE_smpi_comm_out(simgrid::s4u::this_actor::get_pid());
- TRACE_smpi_finalize(simgrid::s4u::this_actor::get_pid());
}
/** @brief chain a replay initialization and a replay start */