X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2db3de1844e7f297bbec1eb481f4a0122fc8d444..262ef6e7f7f0eadfeba8293fd4d5925c75d834ed:/src/smpi/bindings/smpi_pmpi.cpp diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 53fb39410b..99501be932 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -128,8 +128,13 @@ int PMPI_Abort(MPI_Comm comm, int /*errorcode*/) { smpi_bench_end(); CHECK_COMM(1) - // Should kill all processes in comm instead.. but most real implementations also kill everything at this point - XBT_WARN("MPI_Abort was called, something went probably wrong in this simulation ! Killing this process"); + XBT_WARN("MPI_Abort was called, something went probably wrong in this simulation ! Killing all processes sharing the same MPI_COMM_WORLD"); + for (int i = 0; i < comm->size(); i++){ + smx_actor_t actor = comm->group()->actor(i)->get_impl(); + if(actor != SIMIX_process_self()) + simgrid::kernel::actor::simcall([actor] { actor->exit(); }); + } + // now ourself smx_actor_t actor = SIMIX_process_self(); simgrid::kernel::actor::simcall([actor] { actor->exit(); }); return MPI_SUCCESS;