A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
MPI_Abort : try to kill other processes from the communicator.
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi.cpp
b/src/smpi/bindings/smpi_pmpi.cpp
index
53fb394
..
99501be
100644
(file)
--- 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;