diff --git a/src/madness/world/safempi.h b/src/madness/world/safempi.h index c48e310f37e..7f8c12dabda 100644 --- a/src/madness/world/safempi.h +++ b/src/madness/world/safempi.h @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -792,7 +793,15 @@ namespace SafeMPI { // if SIGABRT has a handler, call std::abort to allow it be caught, // else call MPI_Abort which does not seem to call abort at all, // instead sends SIGTERM followed by SIGKILL - MPI_Abort(pimpl->comm, code); + // if have a custom signal handler for SIGABRT (i.e. we are running under a + // debugger) then call abort() + struct sigaction sa; + auto rc = sigaction(SIGABRT, NULL, &sa); + if (rc == 0 && sa.sa_handler != SIG_DFL) { + abort(); + } else { + MPI_Abort(pimpl->comm, code); + } } void Barrier() const { diff --git a/src/madness/world/test_world.cc b/src/madness/world/test_world.cc index 00a8eff2271..775561abd39 100644 --- a/src/madness/world/test_world.cc +++ b/src/madness/world/test_world.cc @@ -505,9 +505,9 @@ void test6(World& world) { world.gop.fence(); #ifdef MADNESS_WORLDOBJECT_FUTURE_TRACE - MADNESS_CHECK(a.trace_status_nfuture_registered() == a.trace_futures() ? nproc : 0); + MADNESS_CHECK(a.trace_status_nfuture_registered() == (a.trace_futures() ? nproc : 0)); MADNESS_CHECK(decltype(a)::trace_status_nfuture_assigned(a.id()) == - decltype(a)::trace_futures(a.id()) ? nproc : 0); + (decltype(a)::trace_futures(a.id()) ? nproc : 0)); #endif // stress the large message protocol ... off by default diff --git a/src/madness/world/world_object.h b/src/madness/world/world_object.h index 6d72998a713..a19607bf65e 100644 --- a/src/madness/world/world_object.h +++ b/src/madness/world/world_object.h @@ -638,7 +638,7 @@ namespace madness { typename taskT::futureT result; detail::info info(objid, me, memfn, result.remote_ref(world), attr); world.am.send(dest, & objT::template spawn_remote_task_handler, - new_am_arg(info, a1, a2, a3, a4, a5, a6, a7, a8, a9)); + new_am_arg(info, a1, a2, a3, a4, a5, a6, a7, a8, a9), RMI::ATTR_UNORDERED); return result; } diff --git a/src/madness/world/world_task_queue.h b/src/madness/world/world_task_queue.h index 00e245ab195..a0252d7a4a8 100644 --- a/src/madness/world/world_task_queue.h +++ b/src/madness/world/world_task_queue.h @@ -433,7 +433,7 @@ namespace madness { typedef detail::TaskHandlerInfo infoT; world.am.send(where, & WorldTaskQueue::template remote_task_handler, new_am_arg(infoT(result.remote_ref(world), fn, attr), - a1, a2, a3, a4, a5, a6, a7, a8, a9)); + a1, a2, a3, a4, a5, a6, a7, a8, a9), RMI::ATTR_UNORDERED); return result; } diff --git a/src/madness/world/worldgop.h b/src/madness/world/worldgop.h index 00fbd65ee4a..134074b3417 100644 --- a/src/madness/world/worldgop.h +++ b/src/madness/world/worldgop.h @@ -410,9 +410,9 @@ namespace madness { // Send active message to children if(child1 != -1) { AmArg* const args1 = copy_am_arg(*args0); - world_.am.send(child1, handler, args1); + world_.am.send(child1, handler, args1, RMI::ATTR_UNORDERED); } - world_.am.send(child0, handler, args0); + world_.am.send(child0, handler, args0, RMI::ATTR_UNORDERED); } } @@ -445,9 +445,9 @@ namespace madness { // Send active message to children if(child1 != -1) { AmArg* const args1 = copy_am_arg(*args0); - world_.am.send(child1, handler, args1); + world_.am.send(child1, handler, args1, RMI::ATTR_UNORDERED); } - world_.am.send(child0, handler, args0); + world_.am.send(child0, handler, args0, RMI::ATTR_UNORDERED); } }