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
Define class SmpiBenchGuard, and use RAII to handle smpi_bench_end()/smpi_bench_begin().
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi.cpp
b/src/smpi/bindings/smpi_pmpi.cpp
index
ffe62aa
..
400df13
100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi.cpp
+++ b/
src/smpi/bindings/smpi_pmpi.cpp
@@
-21,14
+21,13
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_pmpi, smpi, "Logging specific to SMPI (pmpi
void TRACE_smpi_set_category(const char *category)
{
//need to end bench otherwise categories for execution tasks are wrong
void TRACE_smpi_set_category(const char *category)
{
//need to end bench otherwise categories for execution tasks are wrong
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
+
if (category != nullptr) {
// declare category
TRACE_category(category);
smpi_process()->set_tracing_category(category);
}
if (category != nullptr) {
// declare category
TRACE_category(category);
smpi_process()->set_tracing_category(category);
}
- //begin bench after changing process's category
- smpi_bench_begin();
}
/* PMPI User level calls */
}
/* PMPI User level calls */