Separate management of GPU contexts from modules
commit8b644f19cacb59fe17d1876436a60f3d02839b8c
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 3 Nov 2017 01:33:01 +0000 (3 02:33 +0100)
committerAleksei Iupinov <a.yupinov@gmail.com>
Fri, 24 Nov 2017 14:16:05 +0000 (24 15:16 +0100)
tree64a79a50fb1da56f6871b627eee000f462ce69f1
parentc6ce8efc35a5073d096aa2043136d0fc50d639a4
Separate management of GPU contexts from modules

Tasks from modules might share GPU contexts across either tasks, or
thread-MPI ranks, so init and free operations can't be the
responsibility of the modules themselves.

Simplified the error reporting for init and free. Knowledge of the
rank ID might help in diagnosing issues in some cases, but should
(later) be the responsibility of a proper framework to catch errors
during initialization across MPI ranks.

Moved the GPU profiling cleanup back to where it was intended to be,
before some earlier refactoring had left it somewhere not-quite-right.

Change-Id: I682a1b1c7058cbebb41805dba05e688cbee18c2a
12 files changed:
src/gromacs/ewald/pme-gpu-internal.cpp
src/gromacs/ewald/pme-gpu-internal.h
src/gromacs/ewald/pme.cpp
src/gromacs/ewald/tests/pmetestcommon.cpp
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/gpu_utils/gpu_utils.h
src/gromacs/gpu_utils/gpu_utils_ocl.cpp
src/gromacs/mdlib/force.h
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/taskassignment/taskassignment.h
src/programs/mdrun/runner.cpp