out of memory errors cause abort during GPU detection
Report from user of an issue where the GPU detection / sanity checks abort mdrun due to out-of-memory error, instead of just marking the device not available:
Avoid mdrun terminate due to GPU sanity check errors
When a GPU is a exclusive or prohibited mode, early detection calls can
fail and as a result an mdrun run abort with an error, even if all GPU
offload is explicitly disabled by the user.
This change adds a status code to handle the case of devices being
Additionally, other errors may be encountered during the dummy kernel
sanity check (e.g. out of memory), but since the change that switches
to using launchGpuKernel() wrapper did not handle the exception in the
sanity checking, this can also abort a run even if the GPU in question
is not selected to be used.
This change adds code to catch the exception this and report the error
and avoid abort the run.