When mpirun receives a Ctrl-C, it hits each of its processes with a SIGTERM, followed a little later by SIGKILL if the proc didn’t terminate.
> On May 7, 2015, at 2:31 PM, Seth Axen <seth.a...@gmail.com> wrote: > > Hello, > How does mpirun or mpiexec handle Ctrl+C? I noticed when I use Ctrl+C on a > running python script (without MPI), this generates a KeyboardInterrupt > exception which I can catch and do something with, but when I use mpirun to > run the python script, so far as I can tell, no exception is generated; the > script just dies. I'd like to be able to catch an exception within my script > and do some cleaning up before killing the script, but I can't figure out how > to do this. I've already posted on the mpi4py message board > (https://groups.google.com/forum/#!topic/mpi4py/x8tloLNGWTk > <https://groups.google.com/forum/#!topic/mpi4py/x8tloLNGWTk>) and was > referred here. > Thanks! > Seth > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2015/05/26848.php