From: Frederic Suter Date: Fri, 2 Sep 2016 10:24:45 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_14~443 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/55311bd63d3b77f71f141b26eca381941ec3da15?hp=32b1c23f269a976f8d5df332e1e48be5cb07d535 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 465cfe4bdc..d283b1e794 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -972,12 +972,8 @@ smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer) { SIMIX_process_kill(process, issuer); //start the new process - if (simix_global->create_process_function) - return simix_global->create_process_function(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname, - arg.kill_time, arg.properties, arg.auto_restart, nullptr); - else - return simcall_process_create(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname, arg.kill_time, - arg.properties, arg.auto_restart); + return simix_global->create_process_function(arg.name.c_str(), std::move(arg.code), arg.data, arg.hostname, + arg.kill_time, arg.properties, arg.auto_restart, nullptr); } void SIMIX_segment_index_set(smx_actor_t proc, int index){ diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 3eb47dcbf0..a835e87bd2 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -61,25 +61,14 @@ namespace simgrid { smx_process_arg_t arg; xbt_dynar_foreach(boot_processes,cpt,arg) { XBT_DEBUG("Booting Process %s(%s) right now", arg->name.c_str(), arg->hostname); - // FIXME: factorize this code by registering the simcall as default function - if (simix_global->create_process_function) { - simix_global->create_process_function(arg->name.c_str(), - arg->code, - nullptr, - arg->hostname, - arg->kill_time, - arg->properties, - arg->auto_restart, - nullptr); - } else { - simcall_process_create(arg->name.c_str(), - arg->code, - nullptr, - arg->hostname, - arg->kill_time, - arg->properties, - arg->auto_restart); - } + simix_global->create_process_function(arg->name.c_str(), + arg->code, + nullptr, + arg->hostname, + arg->kill_time, + arg->properties, + arg->auto_restart, + nullptr); } } @@ -174,13 +163,8 @@ void SIMIX_host_autorestart(sg_host_t host) xbt_dynar_foreach (process_list, cpt, arg) { XBT_DEBUG("Restarting Process %s(%s) right now", arg->name.c_str(), arg->hostname); - if (simix_global->create_process_function) { - simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time, - arg->properties, arg->auto_restart, nullptr); - } else { - simcall_process_create(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time, arg->properties, - arg->auto_restart); - } + simix_global->create_process_function(arg->name.c_str(), arg->code, nullptr, arg->hostname, arg->kill_time, + arg->properties, arg->auto_restart, nullptr); } xbt_dynar_reset(process_list); } diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index a10715025d..5bfa669fe3 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -628,15 +628,10 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process) XBT_DEBUG("Starting Process %s(%s) right now", arg->name.c_str(), sg_host_get_name(host)); - if (simix_global->create_process_function) - process_created = simix_global->create_process_function( - arg->name.c_str(), std::move(code), nullptr, - sg_host_get_name(host), kill_time, - current_property_set, auto_restart, nullptr); - else - process_created = simcall_process_create( - arg->name.c_str(), std::move(code), nullptr, sg_host_get_name(host), kill_time, - current_property_set,auto_restart); + process_created = simix_global->create_process_function( + arg->name.c_str(), std::move(code), nullptr, + sg_host_get_name(host), kill_time, + current_property_set, auto_restart, nullptr); /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */ if (!process_created) { diff --git a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh index 309b105e6d..1422a25597 100644 --- a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh +++ b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh @@ -6,6 +6,11 @@ p generate a trace with pingpong, and replay itself, then check that output trac ! setenv LD_LIBRARY_PATH=../../lib ! output sort $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=smpi/simulate-computation:no -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning +> +> +> +> +> > *** Ping-pong test (MPI_Send/MPI_Recv) *** > == pivot=0 : pingpong [0] <--> [1] > == pivot=1 : pingpong [1] <--> [2] @@ -112,6 +117,11 @@ p Same test, but only using one output file for all processes p generate a trace with pingpong, and replay itself, then check that output trace of the second run is the same as in the first (once sorted) ! output sort $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=tracing/smpi/format/ti-one-file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning +> +> +> +> +> > *** Ping-pong test (MPI_Send/MPI_Recv) *** > == pivot=0 : pingpong [0] <--> [1] > == pivot=1 : pingpong [1] <--> [2]