Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove direct call to simcall
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 21 Jul 2018 15:03:49 +0000 (17:03 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 21 Jul 2018 15:03:49 +0000 (17:03 +0200)
modify order in replay example
set the tracing category breaks examples/smpi/tracing but do not seem
to be needed so comment it for now. Further simplifications in tracing
may help to understand and/or fix.

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
src/smpi/internals/instr_smpi.cpp
src/smpi/internals/smpi_bench.cpp

index 49560a8..a965790 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
-> [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
+> [Tremblay:0:(1) 0.167158] [smpi_replay/VERBOSE] 0 send 1 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
-> [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.518421] [smpi_replay/VERBOSE] 0 send 1 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 addb6cd..5d5dd39 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_0@Bourassa) Simulation time 737.001374
+> [ 737.001374] (0_1@Fafard) 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 a60551a..505dcbc 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 69e1982..f9835a6 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_0@Ginette) Simulation time 806.923160
+> [ 806.923160] (1_1@Jupiter) 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 a67cc85..4773fce 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_0@Ginette) Simulation time 806.923160
+> [ 806.923160] (1_1@Jupiter) 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 ee80ed9..f712309 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_0@Bourassa) Simulation time 1473.975664
+> [1473.975664] (1_1@Fafard) 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 17b383e..fa3f782 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 c5a65d8..def0eff 100644 (file)
@@ -151,10 +151,10 @@ void TRACE_internal_smpi_set_category (const char *category)
 const char *TRACE_internal_smpi_get_category ()
 {
   if (not TRACE_smpi_is_enabled())
-    return nullptr;
+    return "";
 
   auto it = process_category.find(SIMIX_process_self());
-  return (it == process_category.end()) ? nullptr : it->second.c_str();
+  return (it == process_category.end()) ? "" : it->second.c_str();
 }
 
 void TRACE_smpi_setup_container(int rank, sg_host_t host)
index 5f9532b..fa23312 100644 (file)
@@ -3,15 +3,16 @@
 /* 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. */
 
+#include "getopt.h"
 #include "private.hpp"
 #include "simgrid/host.h"
 #include "simgrid/modelchecker.h"
+#include "simgrid/s4u/Exec.hpp"
 #include "smpi_comm.hpp"
 #include "src/internal_config.h"
 #include "src/mc/mc_replay.hpp"
 #include "src/simix/ActorImpl.hpp"
 #include "xbt/config.hpp"
-#include "getopt.h"
 
 #include "src/smpi/include/smpi_actor.hpp"
 #include <unordered_map>
@@ -48,9 +49,8 @@ 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);
-  smx_activity_t action = simcall_execution_start("computation", flops, 1, 0, smpi_process()->get_actor()->get_host());
-  simcall_set_category (action, TRACE_internal_smpi_get_category());
-  simcall_execution_wait(action);
+  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())
   smpi_switch_data_segment(simgrid::s4u::Actor::self());
 }