openmmtools icon indicating copy to clipboard operation
openmmtools copied to clipboard

Resuming and basic tests with MPI context

Open ijpulidos opened this issue 2 years ago • 2 comments

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.

ijpulidos avatar Jul 13 '22 17:07 ijpulidos

This looks useful as well https://github.com/mpi4py/setup-mpi

mikemhenry avatar Jul 13 '22 19:07 mikemhenry

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.

jchodera avatar Jul 16 '22 22:07 jchodera