GPU detection handling and related MPI should move to higher level
The following discussion from !447 (merged) should be addressed:
I anyway think we should move all the MPI-dependent stuff here to higher-level modules, so the hardware module is only about low-level detection of individual nodes, while the decisions that might require knowledge of simulation setups, etc., are handled elsewhere.
Elsewhere in the thread I suggested moving detection handling (and thus related MPI) up to somewhere around SimulationContext, so that mdrunner starts with const resources ready to use.
Decide which module should do the MPI communication associated with hardware detection
Follow-up tasks observed during the work:
Hardware detection should stop using
MPI_COMM_WORLDand instead use
Hardware printing should use
DeviceInfoList should either grow into a class with copy semantics or become something copyable like
- gmx_hw_info_t can become trivially copyable once DeviceInfoList can be copied, which smooths several aspects
- the lifetime of CUDA and MPI resources may be coupled (see #3952) and this aspect should be considered also