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

Evaluate Python MPI testing strategy #3193

Open
heplesser opened this issue Apr 23, 2024 · 1 comment
Open

Evaluate Python MPI testing strategy #3193

heplesser opened this issue Apr 23, 2024 · 1 comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority stale Automatic marker for inactivity, please have another look here T: Enhancement New functionality, model or documentation

Comments

@heplesser
Copy link
Contributor

We currently perform MPI-based tests under Python in two different ways

  • running mpirun -np N python -m pytest ... on the pytest/mpi/{2,3,4} directories (direct approach)
  • running PyNEST indirectly from pytest as in the tests in sli2py_mpi (indirect approach)

Direct approach

  • In some of these tests, ranks test assertions independently of each other, in other tests they use mpi4py to collect and test results.
  • The approach is not fully robust, in some cases we have observed that output written by junitxml resulted in corrupt XML files, likely because all ranks write and might interfere
  • For some tests (eg test_issue_3108.py), the number of threads used can become large an execution slow. Correct errors in slicing of node collections #3132 provides rough filtering for this, but more fine-grained filtering (e.g. skip tests with more than 6 threads in total) could be useful.

Indirect approach

  • Here, the test script first creates a temporary runner file with some restrictions on test content and structure, then executes the test via mpirun -np N python test_... and collects results from files afterwards.
  • This supports the logic of SLI-based MPI tests which execute a fixed number of VPs with different Rank-Thread splits and check for consistent results.

We should see if both approaches can be integrated, simplified and made more robust. Code from the following two projects may be useful to consider:

For selective test skipping/marking, material from the following page may be useful

@heplesser heplesser added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Apr 23, 2024
Copy link

Issue automatically marked stale!

@github-actions github-actions bot added the stale Automatic marker for inactivity, please have another look here label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority stale Automatic marker for inactivity, please have another look here T: Enhancement New functionality, model or documentation
Projects
None yet
Development

No branches or pull requests

1 participant