A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix mess between smx_activity_t and ActivityImplPtr.
[simgrid.git]
/
src
/
smpi
/
internals
/
instr_smpi.cpp
diff --git
a/src/smpi/internals/instr_smpi.cpp
b/src/smpi/internals/instr_smpi.cpp
index
50112e0
..
4c27a61
100644
(file)
--- a/
src/smpi/internals/instr_smpi.cpp
+++ b/
src/smpi/internals/instr_smpi.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2010-20
19
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-20
20
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-136,7
+136,7
@@
static std::string TRACE_smpi_get_key(int src, int dst, int tag, int send)
return key;
}
return key;
}
-void TRACE_smpi_setup_container(int rank, sg_host_t host)
+void TRACE_smpi_setup_container(int rank,
const_
sg_host_t host)
{
container_t father = simgrid::instr::Container::get_root();
if (TRACE_smpi_is_grouped()) {
{
container_t father = simgrid::instr::Container::get_root();
if (TRACE_smpi_is_grouped()) {
@@
-151,9
+151,12
@@
void TRACE_smpi_init(int rank)
if (not TRACE_smpi_is_enabled())
return;
if (not TRACE_smpi_is_enabled())
return;
+ auto self = simgrid::s4u::Actor::self();
+
TRACE_smpi_setup_container(rank, sg_host_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
#if HAVE_PAPI
- con
tainer_t container
= smpi_container(rank);
+ con
st simgrid::instr::Container* container
= smpi_container(rank);
papi_counter_t counters = smpi_process()->papi_counters();
for (auto const& it : counters) {
papi_counter_t counters = smpi_process()->papi_counters();
for (auto const& it : counters) {
@@
-166,14
+169,6
@@
void TRACE_smpi_init(int rank)
#endif
}
#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
void TRACE_smpi_computing_init(int rank)
{
//first use, initialize the color in the trace
@@
-257,7
+252,7
@@
void TRACE_smpi_recv(int src, int dst, int tag)
}
/**************** Functions to trace the migration of tasks. *****************/
}
/**************** Functions to trace the migration of tasks. *****************/
-void TRACE_smpi_process_change_host(int rank, sg_host_t new_host)
+void TRACE_smpi_process_change_host(int rank,
const_
sg_host_t new_host)
{
if (not TRACE_smpi_is_enabled()) return;
{
if (not TRACE_smpi_is_enabled()) return;