Clean up library context management.
Reconcile discrepancies MPI vs. tMPI initialization, acquisition, and finalization. Unify other similar resource management, such as GPU device contexts, thread pool, cpuset, etc.
Follow up from #3644 (closed)
Relates to #3650
-
Merge gmxapi::MpiContextManager
andgmx::init
/gmx::finalize
-
Improve RAII semantics for "MpiContext". Either find a way to join the initialization of thread-MPI context with its acquisition or consider alternatives to using such an object in the corresponding tMPI program scope. -
Clarify the SimulationContext
invariant(s). Encode the invariant(s) with strong typing to improve readability across tMPI vs. MPI builds. -
Encapsulate the libraryCommunicator
from the MPISimulationContext
into a PhysicalNodeCommunicator. (tMPI can have an unsetstd::optional
or similar if such resources cannot be provided through SimulationContext on this code path.) -
Python bindings for gmxapi::ResourceAssignment
; Allow gmxapi to re-wrap an mpi4py communicator forgmxapi::createContext()
(#4422 (closed))
Still deferred
#3644 (closed) notes that multisim is reasonably a higher-level detail that can be separated into layers, such that SimultionContext
can abstractly present the simulator with a single communicator or abstract communication resources. We should reserve such discussions for separately tracked issues.
Edited by M. Eric Irrgang