Ø  You need to also set the MPI::ERRORS_THROW_EXCEPTIONS error handler in your 
MPI application.


Thanks Jeff.   I double-checked, and yes, I’m calling 
MPI_Comm_set_errhandler(com , MPI::ERRORS_THROW_EXCEPTIONS) for every intra- 
and inter-communicator in the parent and child processes.  Could it be 
something else?

Kurt

From: Jeff Squyres (jsquyres) <jsquy...@cisco.com>
Subject: [EXTERNAL] Re: [OMPI users] OpenMpi not throwing C++ exceptions

On Nov 7, 2019, at 3:02 PM, Mccall, Kurt E. (MSFC-EV41) via users 
<users@lists.open-mpi.org<mailto:users@lists.open-mpi.org>> wrote:

My program is failing in MPI_Comm_spawn, but it seems to simply terminate the 
job rather than throwing an exception that I can catch.   Here is the 
abbreviated error message:

[n001:32127] *** An error occurred in MPI_Comm_spawn
[n001:32127] *** reported by process [1679884289,1]
[n001:32127] *** on communicator MPI_COMM_SELF
[n001:32127] *** MPI_ERR_SPAWN: could not spawn processes
[n001:32127] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now 
abort,
[n001:32127] ***    and potentially your MPI job)
[n002.cluster.com:21375<https://urldefense.proofpoint.com/v2/url?u=http-3A__n002.cluster.com-3A21375_&d=DwMGaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=6cP1IfXu3IZOHSDh_vBqciYiIh4uuVgs1MSi5K7l5fQ&m=Rbo2632nQpfH9XERgZXFuZFa2OsovVqiYTpPgXZ7P8E&s=Tt-_cxUJ6VJQdnFlu38vRNoRXWK0G7EM4oPOH_Ye88Q&e=>]
 PMIX ERROR: BAD-PARAM in file event/pmix_event_notification.c at line 923
[n001.cluster.com:32115<https://urldefense.proofpoint.com/v2/url?u=http-3A__n001.cluster.com-3A32115_&d=DwMGaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=6cP1IfXu3IZOHSDh_vBqciYiIh4uuVgs1MSi5K7l5fQ&m=Rbo2632nQpfH9XERgZXFuZFa2OsovVqiYTpPgXZ7P8E&s=OZlYpmZ-vgd-OFvXlbtacOk8WFZUTOSSACtPAYbXJlg&e=>]
 PMIX ERROR: BAD-PARAM in file event/pmix_event_notification.c at line 923

When I compiled OpenMpi, I used the following flags:

./configure --prefix=/opt/openmpi_pgc --enable-mpi-cxx  --enable-cxx-exceptions 
 --with-tm

Is --enable-cxx-exceptions  not sufficient by itself to enable exceptions?  I’m 
using the Portland Group Compiler pgc++ 19.5-0 and OpenMpi 4.0.2.

You need to also set the MPI::ERRORS_THROW_EXCEPTIONS error handler in your MPI 
application.

--
Jeff Squyres
jsquy...@cisco.com<mailto:jsquy...@cisco.com>

Reply via email to