Skip to content

Should detect MPI library and fail gracefully when forking is not possible #13

Closed
@connorjward

Description

@connorjward

Currently running parallel tests in 'forking' mode (i.e. mpiexec on the inside) gives a cryptic error for non-MPICH MPI:

E               subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/home/sa/M4R/ven4r/bin/pytest', '--runxfail', '-s', '-q', '/home/sa/firedrake/tests/firedrake/vertexonly/test_vertex_only_mesh_generation.py::test_generate_cell_midpoints_parallel[interval-redundant]', ':', '-n', '2', '/home/sa/M4R/ven4r/bin/pytest', '--runxfail', '-s', '-q', '/home/sa/firedrake/tests/firedrake/vertexonly/test_vertex_only_mesh_generation.py::test_generate_cell_midpoints_parallel[interval-redundant]', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 1.

/usr/lib/python3.10/subprocess.py:526: CalledProcessError
---------------------------------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------------------------------
mpiexec: Error: unknown option "-genv"
Type 'mpiexec --help' for usage.

We really want to have something like

Your MPI implementation does not support running mpi-pytest in 'forking' mode. Use mpiexec -n # ... -m parallel[#] instead...

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