Separated responsibility for consistency checking
Printing reports about GPU usage can and should happen before
checking for consistency. Note change to triggering logic - it should
be printed when GPUs are used, not when compatible GPUs are detected.
Moved the point of call for the notes about user-selected GPU sharing,
and under-use of GPUs to be part of the GPU usage report. This is a
cleaner implementation, makes sense whether or not the intervening
code will issue a warning or error, and removes the temptation to
repeat aspects of the GPU usage report.
Removed verbose catching of exceptions. Only std::bad_alloc can
throw, and it's a lesser evil to use the std:: functionality and catch
at a high level than to uglify the code at the point of call to denote
where exception-safe boundaries exist.
Our error handling on multiple MPI ranks is currently crude, and in
the hope that the MPI runtime will help out, we use a barrier. The
barrier helps to cater to lots of previous code where gmx_fatal()
might be called on any rank in the simulation, so moved it up to the
runner level. Also used the correct communicator (so that PME-only
ranks will also participate in the barrier). Note that
gmx_fatal_collective() exists, but is only suitable for coordinating
the output in the case where all ranks are known to have observed the
same error condition.
Converted some comments to Doxygen.
Change-Id: Ia4cfd69aa6e3b158244ae8da44317adf8257739b