boost::mpi 阻塞 IO 未被 linux 信号中断

boost::mpi blocking IO not interrupted by linux signals

我使用 boost::mpi,OpenMPI。 boost::mpi::communicator::recv(阻塞版本)不会被 Linux 信号中断。如何使用 SIGTERM 信号以正确的方式终止我的程序?

问题已解决: 1.除master外的所有节点都忽略信号。 2.主节点忽略除一个线程之外的信号(该线程调用POSIX暂停函数)。 pause中断时,向所有节点发送mpi"stop"消息。 因此所有节点都停止工作。