3

I use boost::mpi, OpenMPI. boost::mpi::communicator::recv (blocking version) is not interrupted by Linux signals. How can my program can be terminated in the right way with SIGTERM signal?

gavv
  • 4,649
  • 1
  • 23
  • 40
Alex
  • 1,047
  • 8
  • 21
  • AFAIK, OpenMPI sets its own ```SIGTERM``` handler. It probably receives the signal but waits for something in signal handler. Quick seacrh gives this: http://users.open-mpi.narkive.com/CjD2wZP6/ompi-users-proper-use-of-sigaction-in-open-mpi You should be able to kill any process with ```SIGKILL``` anyway. – gavv Sep 19 '15 at 19:15

1 Answers1

0

Problem was resolved: 1. All node except master ignore signals. 2. Master node ignore signals except one thread(this thread calls POSIX pause function). When pause is interrupted, mpi "stop" messages are sent to all nodes. Thus all nodes stop their work.

Alex
  • 1,047
  • 8
  • 21