Avoid aborting mdrun when GPU sanity check detects errors
authorSzilárd Páll <pall.szilard@gmail.com>
Fri, 16 Feb 2018 18:48:46 +0000 (19:48 +0100)
committerSzilárd Páll <pall.szilard@gmail.com>
Tue, 20 Feb 2018 00:20:50 +0000 (01:20 +0100)
commit74400c159757f63b2fb7ace7a16428afec7bf456
treee8061142daf43af252024c79d0cd1877fb09afd2
parent76f6995465b91d71668d590860c305acb21897bc
Avoid aborting mdrun when GPU sanity check detects errors

A release assertion was added which assumed that the GPU
compatibility/sanity checks return with a clean CUDA API state.
Consequently, any run that encountered a non-success return value from
the CUDA API would abort the run instead of continuing the run without
using the GPU in question.
This change adds code to handle and issue a note on the error
encountered as well as ensures that the CUDA API error state cleared
at the return of the GPU detection.

Fixes #2415

Change-Id: I5d7ed59ef8e4052a75b51c9a526b8dcb465ff611
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/gpu_utils/gpu_utils.h