From: Frederic Suter Date: Sat, 21 Jul 2018 15:03:49 +0000 (+0200) Subject: remove direct call to simcall X-Git-Tag: v3_21~368 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/58ff959662ba6ebb02d3099d43de773b955eb698 remove direct call to simcall 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. --- diff --git a/examples/smpi/replay/replay.tesh b/examples/smpi/replay/replay.tesh index 49560a8dae..a965790f6a 100644 --- a/examples/smpi/replay/replay.tesh +++ b/examples/smpi/replay/replay.tesh @@ -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 diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed1.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed1.tesh index addb6cd840..5d5dd39ae3 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed1.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed1.tesh @@ -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') diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2.tesh index a60551a108..505dcbcc18 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2.tesh @@ -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 diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st.tesh index 69e1982fea..f9835a6b6d 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st.tesh @@ -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') diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_noise.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_noise.tesh index a67cc85d00..4773fcea81 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_noise.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_noise.tesh @@ -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') diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr.tesh index ee80ed9214..f712309401 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr.tesh @@ -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') diff --git a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr_noise.tesh b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr_noise.tesh index 17b383efbb..fa3f782483 100644 --- a/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr_noise.tesh +++ b/examples/smpi/replay_multiple_manual_deploy/replay_multiple_manual_mixed2_st_sr_noise.tesh @@ -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') diff --git a/src/smpi/internals/instr_smpi.cpp b/src/smpi/internals/instr_smpi.cpp index c5a65d81c8..def0effed4 100644 --- a/src/smpi/internals/instr_smpi.cpp +++ b/src/smpi/internals/instr_smpi.cpp @@ -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) diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index 5f9532ba29..fa2331253b 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -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 @@ -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()); }