Skip to content
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

run pytest in parallel #744

Open
shimwell opened this issue Feb 24, 2021 · 2 comments
Open

run pytest in parallel #744

shimwell opened this issue Feb 24, 2021 · 2 comments

Comments

@shimwell
Copy link
Collaborator

Pytest can be run in parallel with another package.

I think the github actions CI has 2 cores

So we could potentially half our CI testing time and reduce local testing time also

pip install pytest-xdist
pytest -n 3

However when running this currently 28 test fail as we have a few race conditions in the tests.

Particular tests look for files while other tests are deleting files.

We have a few cases where a test will do rm *.stp while another test is checking if a stp file exists.

So this is something that we can fix but we need to work through the errors and fix the tests so that they can run in parallel without interfering with each other.

ps on 64 cores the 500 odd tests take about 2 mins :-)

@shimwell
Copy link
Collaborator Author

Here are the tests that fail.
produced with pytest tests -n 63 >tests.txt
tests.txt

@shimwell
Copy link
Collaborator Author

Perhaps the threads argument on the NeutronicsModel.simulate could also be useful

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

1 participant