pytest-dev / pytest-dev/pytest-xdist

using xdist with mpi4py

Open
#457 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
287
Avg merge
9h 30m
Merged PRs (30d)
2

Description

I have some tests that use mpi4py, but I get an error when trying to run my test suite with MPI.

> mpirun -n 1 pytest -n 1 -q test_thing.py
bringing up nodes...
[gw0] node down: Not properly terminated
[gw1] node down: Not properly terminated
[gw2] node down: Not properly terminated
[gw3] node down: Not properly terminated
[gw4] node down: Not properly terminated

no tests ran in 3.24 seconds

Minimal reproducible example:

from mpi4py import MPI
import time

class TestThing(object):
    def test_one(self):
        time.sleep(1)
        assert False

    def test_two(self):
        time.sleep(5)
        assert True

I do not see this behavior with either

pytest -n 1 -q test_thing.py

or

mpirun -n 1 pytest -q test_thing.py

Does xdist support mpi4py?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal mpi4py example and reproduce the behavior using mpirun -n 1 pytest -n 1 -q test_thing.py, then compare it with the two commands that work without combining MPI and xdist. Determine whether the reported node shutdown is supported behavior or a defect; done means the compatibility outcome is established and reflected in the project’s behavior or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.