Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The creation of the pimpl needs no simcall
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 1 Mar 2019 17:52:08 +0000 (18:52 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 1 Mar 2019 17:57:12 +0000 (18:57 +0100)
Now that init and start are split, creating the ExecImpl in init (the
constructor) has no impact on the simulation kernel. The action is
created by start().

This slightly modifies the ordering of the output in one tesh file

examples/s4u/exec-monitor/s4u-exec-monitor.tesh
src/s4u/s4u_Exec.cpp

index eb63d1e..45de5dd 100644 (file)
@@ -9,8 +9,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-exec-monitor$EXEEXT ${platfdir}/small_platform
 > [Tremblay:monitor 1:(2) 10.000000] [s4u_test/INFO] activity remaining duration: 2.3704e+08 (24%)
 > [Fafard:executor:(1) 13.106847] [s4u_test/INFO] The monitored task is over. Let's start 3 of them now.
 > [Jupiter:monitor 2:(3) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%)
-> [Ginette:monitor 3:(4) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%)
 > [Fafard:executor:(1) 13.106847] [s4u_test/INFO] All activities are started; finish now
+> [Ginette:monitor 3:(4) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%)
 > [Bourassa:monitor 4:(5) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%)
 > [Tremblay:monitor 1:(2) 15.000000] [s4u_test/INFO] My task is over.
 > [Bourassa:monitor 4:(5) 18.106847] [s4u_test/INFO] activity remaining duration: 8.7284e+08 (87%)
index d75abb1..300a12e 100644 (file)
@@ -18,9 +18,7 @@ simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> s4u::Exec::on_completion;
 Exec::Exec(sg_host_t host, double flops_amount) : Activity(), host_(host), flops_amount_(flops_amount)
 {
   Activity::set_remaining(flops_amount_);
-  pimpl_ = simix::simcall([this] {
-    return kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, host_));
-  });
+  pimpl_ = kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, host_));
 }
 
 Exec* Exec::start()