Skip to content

Pytest hangs at a barrier if one rank hits an exception #12

@jwallwork23

Description

@jwallwork23

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions