openmmtools
openmmtools copied to clipboard
Resuming and basic tests with MPI context
While working on #602 it was noted that the issue is only relevant when the simulations are run using 2 or more MPI processes (multiple GPUs). Therefore, we need a way to test similar scenarios in our software, since some of these bugs are MPI-specific.
mpiplus
is what we are using for creating and handling MPI contexts, it has a Dummy MPI object here that can be useful for the tests.
This looks useful as well https://github.com/mpi4py/setup-mpi
If we are already installing mpiplus
as part of openmmtools
dependencies (which in turn installs mpi4py
), we shouldn't need to do anything special to test on MPI other than to run mpirun -np 2 <our normal python CLI here>
. The question is how we can have pytest
launch MPI tests.
Perhaps the pytest-mpi
plugin is needed here? It seems to enable us to mark specific tests to be run inside processes launched by mpirun
. See usage here
.