From: suter Date: Thu, 22 Nov 2012 17:24:04 +0000 (+0100) Subject: some things do not have to be done by each process X-Git-Tag: v3_9_rc1~91^2~51 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b4f5f7b99f3d61a9b5fc838e514179290b213548?ds=sidebyside some things do not have to be done by each process --- diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 636a46effa..7214b99498 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -341,25 +341,28 @@ static void action_allReduce(const char *const *action) { void smpi_replay_init(int *argc, char***argv){ PMPI_Init(argc, argv); - _xbt_replay_action_init(); - - xbt_replay_action_register("init", action_init); - xbt_replay_action_register("finalize", action_finalize); - xbt_replay_action_register("comm_size",action_comm_size); - xbt_replay_action_register("send", action_send); - xbt_replay_action_register("Isend", action_Isend); - xbt_replay_action_register("recv", action_recv); - xbt_replay_action_register("Irecv", action_Irecv); - xbt_replay_action_register("wait", action_wait); - xbt_replay_action_register("barrier", action_barrier); - xbt_replay_action_register("bcast", action_bcast); - xbt_replay_action_register("reduce", action_reduce); - xbt_replay_action_register("allReduce",action_allReduce); - xbt_replay_action_register("compute", action_compute); + if (!smpi_process_index()){ + _xbt_replay_action_init(); + xbt_replay_action_register("init", action_init); + xbt_replay_action_register("finalize", action_finalize); + xbt_replay_action_register("comm_size",action_comm_size); + xbt_replay_action_register("send", action_send); + xbt_replay_action_register("Isend", action_Isend); + xbt_replay_action_register("recv", action_recv); + xbt_replay_action_register("Irecv", action_Irecv); + xbt_replay_action_register("wait", action_wait); + xbt_replay_action_register("barrier", action_barrier); + xbt_replay_action_register("bcast", action_bcast); + xbt_replay_action_register("reduce", action_reduce); + xbt_replay_action_register("allReduce",action_allReduce); + xbt_replay_action_register("compute", action_compute); + } xbt_replay_action_runner(*argc, *argv); } int smpi_replay_finalize(){ + if(!smpi_process_index()) + _xbt_replay_action_exit(); return PMPI_Finalize(); }