Skip to content

Conversation

@ddundo
Copy link
Member

@ddundo ddundo commented Mar 28, 2025

Closes #97. See discussion there.

Opening this to discuss/debug more easily.

Ideally we'd mark tests with mpi-pytest's parallel marker: for example, a test marked with parallel(nprocs=[1, 2, 3]) would be run in serial, as well as with 2 and 3 processes in parallel. But passing multiple values to nprocs like this doesn't seem to work for unittest-based tests. So here I have a workaround, where I mark tests with a new parallel_dynamic marker, which then gets replaced by parallel(nprocs=N), where N is whatever is passed to mpiexec -n N. This works well, but it's probably better to be explicit, so it's just a temporary solution.

@ddundo ddundo self-assigned this Mar 28, 2025
@ddundo ddundo added testing Extensions and improvements to the testing infrastructure PRIORITY We should address this ASAP labels Mar 28, 2025
@ddundo
Copy link
Member Author

ddundo commented Mar 28, 2025

@stephankramer @jwallwork23 here's what I mentioned on the meeting today. I commented out the parallel_dynamic marker from tests that hang.

Based on the discussion in firedrakeproject/mpi-pytest#12, I tried installing pytest-timeout and then running mpiexec -n 2 python3 -m coverage run --parallel-mode --source=movement -m pytest -v -m parallel[2] --timeout=60 --timeout-method=thread --session-timeout=1200 test but the same tests still continued to hang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PRIORITY We should address this ASAP testing Extensions and improvements to the testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MPI parallel tests

2 participants