Only stop the CUDA profiler if there are devices
authorSzilárd Páll <pall.szilard@gmail.com>
Mon, 15 Jul 2019 15:46:20 +0000 (17:46 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 25 Jul 2019 12:55:13 +0000 (14:55 +0200)
commitfa960d5b36b514b627613dbe2f37bb5bac036ce3
tree88b002b799b390f9dba848377d456c0c0ac23a2c
parent6941eb5a942716770ef2b27dade706951b3405a1
Only stop the CUDA profiler if there are devices

If there are no CUDA devices the unconditionally called cudaProfilerStop
returns with an error. This change makes the the stop API call
conditional to avoid the corner-case assertion error in a profiler run
with no GPUs.

Change-Id: Ife306c927d163163511a2ebf06a7efe6d4122490
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdrun/runner.cpp