Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the (unoticed) mess I made
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 24 Jul 2018 11:15:04 +0000 (13:15 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 24 Jul 2018 11:15:04 +0000 (13:15 +0200)
18 files changed:
examples/smpi/replay/replay.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed1.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_noise.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr.tesh
examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr_noise.tesh
include/simgrid/simix.h
src/instr/instr_resource_utilization.cpp
src/instr/instr_smpi.hpp
src/msg/msg_gos.cpp
src/s4u/s4u_Exec.cpp
src/simix/libsmx.cpp
src/simix/smx_host.cpp
src/simix/smx_host_private.hpp
src/smpi/bindings/smpi_pmpi.cpp
src/smpi/internals/instr_smpi.cpp
src/smpi/internals/smpi_bench.cpp

index a965790..49560a8 100644 (file)
@@ -215,8 +215,8 @@ p Another test of trace replay with SMPI (one trace per process)
 $ mkfile ./split_traces_tesh
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 2 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay ./split_traces_tesh --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Jupiter:1:(2) 0.167158] [smpi_replay/VERBOSE] 1 recv 0 0 1e6 0.167158
 > [Tremblay:0:(1) 0.167158] [smpi_replay/VERBOSE] 0 send 1 0 1e6 0.167158
+> [Jupiter:1:(2) 0.167158] [smpi_replay/VERBOSE] 1 recv 0 0 1e6 0.167158
 > [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
 > [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 isend 0 1 1e6 0.000000
 > [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 irecv 0 2 1e6 0.000000
@@ -233,8 +233,8 @@ p Test of barrier replay with SMPI (one trace for all processes)
 $ mkfile replay/one_trace
 
 $ ../../smpi_script/bin/smpirun -no-privatize -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
-> [Jupiter:1:(2) 1.518421] [smpi_replay/VERBOSE] 1 recv 0 0 1e7 1.518421
 > [Tremblay:0:(1) 1.518421] [smpi_replay/VERBOSE] 0 send 1 0 1e7 1.518421
+> [Jupiter:1:(2) 1.518421] [smpi_replay/VERBOSE] 1 recv 0 0 1e7 1.518421
 > [Tremblay:0:(1) 1.520397] [smpi_replay/VERBOSE] 0 barrier 0.001976
 > [Jupiter:1:(2) 1.521858] [smpi_replay/VERBOSE] 1 barrier 0.003438
 > [Fafard:2:(3) 1.522373] [smpi_replay/VERBOSE] 2 barrier 1.522373
index 5d5dd39..addb6cd 100644 (file)
@@ -13,8 +13,8 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml  ${srcdir
 > [   0.000000] (job_alone@Bourassa) Executing job 0 (smpi_app 'alone')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'alone')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'alone')
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'alone')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'alone')
 > [ 737.001374] (job_alone@Bourassa) Finished job 0 (smpi_app 'alone')
 > [ 737.001374] (maestro@) Simulation finished! Final time: 737.001
@@ -28,7 +28,7 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml  ${srcdir
 > [   0.000000] (job_alone@Bourassa) Executing job 0 (smpi_app 'alone')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'alone')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'alone')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'alone')
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'alone')
 > [ 737.001374] (job_alone@Bourassa) Finished job 0 (smpi_app 'alone')
index 505dcbc..a60551a 100644 (file)
@@ -15,16 +15,16 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml ${srcdir:
 > [   0.000000] (workload_executor@Bourassa) Sleeping 1000 seconds (waiting for job 1000, app 'job1')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'job0')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
 > [1000.000000] (workload_executor@Bourassa) Launching the job executor of job 1 (app 'job1')
 > [1000.000000] (job_job1@Ginette) Executing job 1 (smpi_app 'job1')
 > [1000.000000] (1_0@Ginette) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [1000.000000] (1_1@Jupiter) Replaying rank 1 of job 1 (smpi_app 'job1')
+> [1806.923160] (1_0@Ginette) Simulation time 806.923160
 > [1806.923160] (1_0@Ginette) Finished replaying rank 0 of job 1 (smpi_app 'job1')
-> [1806.923160] (1_1@Jupiter) Simulation time 806.923160
 > [1806.923160] (1_1@Jupiter) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [1806.923160] (job_job1@Ginette) Finished job 1 (smpi_app 'job1')
 > [1806.923160] (maestro@) Simulation finished! Final time: 1806.92
@@ -41,16 +41,16 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml ${srcdir:
 > [   0.000000] (workload_executor@Bourassa) Sleeping 1000 seconds (waiting for job 1000, app 'job1')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'job0')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
 > [1000.000000] (workload_executor@Bourassa) Launching the job executor of job 1 (app 'job1')
 > [1000.000000] (job_job1@Ginette) Executing job 1 (smpi_app 'job1')
 > [1000.000000] (1_0@Ginette) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [1000.000000] (1_1@Jupiter) Replaying rank 1 of job 1 (smpi_app 'job1')
+> [1806.923160] (1_0@Ginette) Simulation time 806.923160
 > [1806.923160] (1_0@Ginette) Finished replaying rank 0 of job 1 (smpi_app 'job1')
-> [1806.923160] (1_1@Jupiter) Simulation time 806.923160
 > [1806.923160] (1_1@Jupiter) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [1806.923160] (job_job1@Ginette) Finished job 1 (smpi_app 'job1')
 > [1806.923160] (maestro@) Simulation finished! Final time: 1806.92
@@ -75,16 +75,16 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml ${srcdir:
 > [   0.000000] (workload_executor@Bourassa) Sleeping 1000 seconds (waiting for job 1000, app 'job1')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'job0')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
 > [1000.000000] (workload_executor@Bourassa) Launching the job executor of job 1 (app 'job1')
 > [1000.000000] (job_job1@Bourassa) Executing job 1 (smpi_app 'job1')
 > [1000.000000] (1_0@Bourassa) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [1000.000000] (1_1@Fafard) Replaying rank 1 of job 1 (smpi_app 'job1')
+> [1737.001374] (1_0@Bourassa) Simulation time 737.001374
 > [1737.001374] (1_0@Bourassa) Finished replaying rank 0 of job 1 (smpi_app 'job1')
-> [1737.001374] (1_1@Fafard) Simulation time 737.001374
 > [1737.001374] (1_1@Fafard) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [1737.001374] (job_job1@Bourassa) Finished job 1 (smpi_app 'job1')
 > [1737.001374] (maestro@) Simulation finished! Final time: 1737
@@ -101,16 +101,16 @@ $ ./replay_multiple_manual ${platfdir}/small_platform_with_routers.xml ${srcdir:
 > [   0.000000] (workload_executor@Bourassa) Sleeping 1000 seconds (waiting for job 1000, app 'job1')
 > [   0.000000] (0_0@Bourassa) Replaying rank 0 of job 0 (smpi_app 'job0')
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
+> [ 737.001374] (0_0@Bourassa) Simulation time 737.001374
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
-> [ 737.001374] (0_1@Fafard) Simulation time 737.001374
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
 > [1000.000000] (workload_executor@Bourassa) Launching the job executor of job 1 (app 'job1')
 > [1000.000000] (job_job1@Bourassa) Executing job 1 (smpi_app 'job1')
 > [1000.000000] (1_0@Bourassa) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [1000.000000] (1_1@Fafard) Replaying rank 1 of job 1 (smpi_app 'job1')
+> [1737.001374] (1_0@Bourassa) Simulation time 737.001374
 > [1737.001374] (1_0@Bourassa) Finished replaying rank 0 of job 1 (smpi_app 'job1')
-> [1737.001374] (1_1@Fafard) Simulation time 737.001374
 > [1737.001374] (1_1@Fafard) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [1737.001374] (job_job1@Bourassa) Finished job 1 (smpi_app 'job1')
 > [1737.001374] (maestro@) Simulation finished! Final time: 1737
index f9835a6..69e1982 100644 (file)
@@ -16,7 +16,7 @@ $ ./replay_multiple_manual ${srcdir:=.}/../../platforms/small_platform_with_rout
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
-> [ 806.923160] (1_1@Jupiter) Simulation time 806.923160
+> [ 806.923160] (1_0@Ginette) Simulation time 806.923160
 > [ 806.923160] (1_0@Ginette) Finished replaying rank 0 of job 1 (smpi_app 'job1')
 > [ 806.923160] (1_1@Jupiter) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [ 806.923160] (job_job1@Ginette) Finished job 1 (smpi_app 'job1')
index 4773fce..a67cc85 100644 (file)
@@ -16,7 +16,7 @@ $ ./replay_multiple_manual ${srcdir:=.}/../../platforms/small_platform_with_rout
 > [ 737.001374] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
 > [ 737.001374] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [ 737.001374] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
-> [ 806.923160] (1_1@Jupiter) Simulation time 806.923160
+> [ 806.923160] (1_0@Ginette) Simulation time 806.923160
 > [ 806.923160] (1_0@Ginette) Finished replaying rank 0 of job 1 (smpi_app 'job1')
 > [ 806.923160] (1_1@Jupiter) Finished replaying rank 1 of job 1 (smpi_app 'job1')
 > [ 806.923160] (job_job1@Ginette) Finished job 1 (smpi_app 'job1')
index f712309..ee80ed9 100644 (file)
@@ -13,7 +13,7 @@ $ ./replay_multiple_manual ${srcdir:=.}/../../platforms/small_platform_with_rout
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
 > [   0.000000] (1_0@Bourassa) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [   0.000000] (1_1@Fafard) Replaying rank 1 of job 1 (smpi_app 'job1')
-> [1473.975664] (1_1@Fafard) Simulation time 1473.975664
+> [1473.975664] (1_0@Bourassa) Simulation time 1473.975664
 > [1473.975664] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
 > [1473.975664] (1_0@Bourassa) Finished replaying rank 0 of job 1 (smpi_app 'job1')
 > [1473.975664] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
index fa3f782..17b383e 100644 (file)
@@ -13,9 +13,9 @@ $ ./replay_multiple_manual ${srcdir:=.}/../../platforms/small_platform_with_rout
 > [   0.000000] (0_1@Fafard) Replaying rank 1 of job 0 (smpi_app 'job0')
 > [   0.000000] (1_0@Bourassa) Replaying rank 0 of job 1 (smpi_app 'job1')
 > [   0.000000] (1_1@Fafard) Replaying rank 1 of job 1 (smpi_app 'job1')
+> [1473.975664] (1_0@Bourassa) Simulation time 1473.975664
 > [1473.975664] (0_0@Bourassa) Finished replaying rank 0 of job 0 (smpi_app 'job0')
 > [1473.975664] (1_0@Bourassa) Finished replaying rank 0 of job 1 (smpi_app 'job1')
-> [1473.975664] (1_1@Fafard) Simulation time 1473.975664
 > [1473.975664] (0_1@Fafard) Finished replaying rank 1 of job 0 (smpi_app 'job0')
 > [1473.975664] (job_job0@Bourassa) Finished job 0 (smpi_app 'job0')
 > [1473.975664] (1_1@Fafard) Finished replaying rank 1 of job 1 (smpi_app 'job1')
index d2eeb7b..ea767d0 100644 (file)
@@ -12,6 +12,7 @@
 #include <xbt/parmap.h>
 #ifdef __cplusplus
 #include <functional>
+#include <string>
 #include <unordered_map>
 #endif
 
@@ -263,7 +264,9 @@ XBT_PUBLIC int simcall_comm_test(smx_activity_t comm);
 XBT_PUBLIC int simcall_comm_testany(smx_activity_t* comms, size_t count);
 
 /************************** Tracing handling **********************************/
-XBT_PUBLIC void simcall_set_category(smx_activity_t synchro, const char* category);
+#ifdef __cplusplus
+XBT_PUBLIC void simcall_set_category(smx_activity_t synchro, std::string category);
+#endif
 
 /************************** Synchro simcalls **********************************/
 SG_BEGIN_DECL()
index d9d96fc..d8b2487 100644 (file)
@@ -24,7 +24,7 @@ void TRACE_surf_resource_set_utilization(const char* type, const char* name, con
   }
 
   // trace categorized resource utilization
-  if (TRACE_categorized() && !category.empty()) {
+  if (TRACE_categorized() && not category.empty()) {
     std::string category_type = name[0] + category;
     XBT_DEBUG("CAT %s [%f - %f] %s %s %f", type, now, now + delta, resource, category_type.c_str(), value);
     container->get_variable(name)->instr_event(now, delta, resource, value);
index 5ad0e94..4a7130a 100644 (file)
@@ -14,8 +14,8 @@
 XBT_PRIVATE container_t smpi_container(int rank);
 XBT_PRIVATE void TRACE_smpi_setup_container(int rank, sg_host_t host);
 
-XBT_PRIVATE void TRACE_internal_smpi_set_category(const char* category);
-XBT_PRIVATE const char* TRACE_internal_smpi_get_category();
+XBT_PRIVATE void TRACE_internal_smpi_set_category(std::string category);
+XBT_PRIVATE std::string TRACE_internal_smpi_get_category();
 XBT_PRIVATE void TRACE_smpi_computing_init(int rank);
 XBT_PRIVATE void TRACE_smpi_computing_out(int rank);
 XBT_PRIVATE void TRACE_smpi_computing_in(int rank, double amount);
index b7429cb..62bed03 100644 (file)
@@ -70,7 +70,8 @@ msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeo
           simcall_execution_start(task->name ?: "", simdata->flops_amount, simdata->priority, simdata->bound,
                                   MSG_process_get_host(MSG_process_self())));
     }
-    simcall_set_category(simdata->compute, task->category);
+    if (task->category != nullptr)
+      simcall_set_category(simdata->compute, task->category);
     comp_state = simcall_execution_wait(simdata->compute);
 
     simdata->setNotUsed();
@@ -792,7 +793,7 @@ msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, doubl
     smx_activity_t comm = nullptr; /* MC needs the comm to be set to nullptr during the simix call  */
     comm = simcall_comm_isend(SIMIX_process_self(), mailbox->get_impl(), t_simdata->bytes_amount, t_simdata->rate, task,
                               sizeof(void*), nullptr, nullptr, nullptr, nullptr, 0);
-    if (TRACE_is_enabled())
+    if (TRACE_is_enabled() && task->category != nullptr)
       simcall_set_category(comm, task->category);
     t_simdata->comm = boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(comm);
     simcall_comm_wait(comm, timeout);
index a61217d..4d6ec06 100644 (file)
@@ -98,7 +98,6 @@ ExecPtr Exec::set_name(std::string name)
 
 ExecPtr Exec::set_tracing_category(std::string category)
 {
-  xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start");
   if (category.empty())
     return this;
 
index 9c1a73d..cab0bf8 100644 (file)
@@ -362,9 +362,9 @@ void simcall_comm_wait(smx_activity_t comm, double timeout)
  * @param synchro The execution synchro
  * @param category The tracing category
  */
-void simcall_set_category(smx_activity_t synchro, const char *category)
+void simcall_set_category(smx_activity_t synchro, std::string category)
 {
-  if (category == nullptr) {
+  if (category.empty()) {
     return;
   }
   simgrid::simix::simcall([synchro, category] { SIMIX_set_category(synchro, category); });
index 9f317fb..f9bbc48 100644 (file)
@@ -189,7 +189,7 @@ void SIMIX_execution_finish(smx_activity_t synchro)
   }
 }
 
-void SIMIX_set_category(smx_activity_t synchro, const char *category)
+void SIMIX_set_category(smx_activity_t synchro, std::string category)
 {
   if (synchro->state_ != SIMIX_RUNNING)
     return;
index 734921a..91f84ab 100644 (file)
@@ -15,7 +15,7 @@ XBT_PRIVATE void SIMIX_host_autorestart(sg_host_t host);
 
 XBT_PRIVATE void SIMIX_execution_finish(smx_activity_t synchro);
 
-XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char* category);
+XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, std::string category);
 
 XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
 SIMIX_execution_start(std::string name, double flops_amount, double priority, double bound, sg_host_t host);
index b50e9e3..1a44473 100644 (file)
@@ -19,7 +19,8 @@ void TRACE_smpi_set_category(const char *category)
 {
   //need to end bench otherwise categories for execution tasks are wrong
   smpi_bench_end();
-  TRACE_internal_smpi_set_category (category);
+  if (category != nullptr)
+    TRACE_internal_smpi_set_category(category);
   //begin bench after changing process's category
   smpi_bench_begin();
 }
index def0eff..9bacf19 100644 (file)
@@ -136,19 +136,19 @@ static std::string TRACE_smpi_get_key(int src, int dst, int tag, int send)
 
 static std::unordered_map<smx_actor_t, std::string> process_category;
 
-void TRACE_internal_smpi_set_category (const char *category)
+void TRACE_internal_smpi_set_category(std::string category)
 {
   if (not TRACE_smpi_is_enabled())
     return;
 
   //declare category
-  TRACE_category (category);
+  TRACE_category(category.c_str());
 
-  if (category != nullptr)
+  if (not category.empty())
     process_category[SIMIX_process_self()] = category;
 }
 
-const char *TRACE_internal_smpi_get_category ()
+std::string TRACE_internal_smpi_get_category()
 {
   if (not TRACE_smpi_is_enabled())
     return "";
index fa23312..bc55483 100644 (file)
@@ -49,8 +49,10 @@ void smpi_execute_(double *duration)
 void smpi_execute_flops(double flops) {
   xbt_assert(flops >= 0, "You're trying to execute a negative amount of flops (%f)!", flops);
   XBT_DEBUG("Handle real computation time: %f flops", flops);
-  simgrid::s4u::this_actor::exec_init(flops)->set_name("computation")->start()->wait();
-  // FIXME adding this break smpi/tracing example... ->set_tracing_category(TRACE_internal_smpi_get_category())
+  simgrid::s4u::ExecPtr e = simgrid::s4u::this_actor::exec_init(flops)->set_name("computation");
+  e->start();
+  e->set_tracing_category(TRACE_internal_smpi_get_category());
+  e->wait();
   smpi_switch_data_segment(simgrid::s4u::Actor::self());
 }