Skip to content

unknown error with scheduler=shell #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Thomas-Bontemps opened this issue Mar 24, 2025 · 2 comments
Open

unknown error with scheduler=shell #17

Thomas-Bontemps opened this issue Mar 24, 2025 · 2 comments

Comments

@Thomas-Bontemps
Copy link

Thomas-Bontemps commented Mar 24, 2025

I use the option --scheduler=shell to run the tests defined in the following test file named test.py :

import time
import pytest_parallel

@pytest_parallel.mark.parallel(1)
def test_1(comm):
    time.sleep(3)

@pytest_parallel.mark.parallel(1)
def test_2(comm):
    time.sleep(3)

@pytest_parallel.mark.parallel(1)
def test_3(comm):
    time.sleep(3)

Then I run the following command in the terminal :
pytest --n-workers=3 --scheduler=shell test.py

I tried to do it on two linux machines. It works well on the first one but returns the following error on the other one (my onera local machine):

Image

I checked the log files like .pytest_parallel/tmpmt02m8c4/test.py__test_1 but they are all empty.

@BerengerBerthoul
Copy link
Member

BerengerBerthoul commented Mar 24, 2025

It seems to come from OpenMPI 4.0.5

Reproducer :

from mpi4py import MPI
import subprocess
p = subprocess.run('mpirun -np 1 echo hello', shell=True)
print('p.returncode = ',p.returncode)

Prints hello and returns 0 with OpenMPI 5.0.2, but prints nothing and returns 1 with OpenMPI 4.0.5

@BerengerBerthoul
Copy link
Member

Not a complete fix, but #18 allows for a better reporting of the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants