pytest-mpi
pytest-mpi copied to clipboard
Pytest hangs at a barrier if one rank hits an exception
Hi, thanks very much for your work on pytest-mpi - we've found it really useful!
I think we might have come across a bug where Pytest hangs upon reaching an MPI barrier if one of the MPI ranks hits an exception - see code snippet below. Is this a known issue? cc @stephankramer @ddundo
Minimal failing example:
from mpi4py import MPI
import pytest
@pytest.mark.parallel(nprocs=2)
def test_mine():
if MPI.COMM_WORLD.rank == 0:
raise ValueError("Test")
MPI.COMM_WORLD.barrier() # it hangs here if there is a barrier