Introduce function that checks if the computations can be done on a GPU
authorArtem Zhmurov <zhmurov@gmail.com>
Tue, 23 Jul 2019 13:54:53 +0000 (15:54 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 31 Jul 2019 12:02:00 +0000 (14:02 +0200)
commite171ead07f17a4fcb237b1713396930d4737a422
tree4e099721cff8074526830ff47701cbfdf716fae0
parentccc02b1e9bcfabd1fdf983f14accf949e47adb61
Introduce function that checks if the computations can be done on a GPU

The following conditions should be fulfilled in order to compute on a GPU:
1. The code should be compiled with GPU support.
2. There should be compatible GPUs installed in the system.
3. These GPUs shuold be detectible from the code.
4. Environmental variable GMX_DISABLE_GPU_DETECTION should not be set.

TODO: This function is used in tests, so it should be eventually moved
      to src/testutils.

Change-Id: I40ce381b68fcebcfab330db4b48a1bec2a2b7a57
src/gromacs/gpu_utils/CMakeLists.txt
src/gromacs/gpu_utils/gpu_testutils.cpp [new file with mode: 0644]
src/gromacs/gpu_utils/gpu_testutils.h [new file with mode: 0644]
src/gromacs/mdlib/tests/constr.cpp
src/gromacs/mdlib/tests/constr_impl.h
src/gromacs/mdlib/tests/leapfrog.cpp
src/gromacs/mdlib/tests/settle.cpp
src/programs/mdrun/tests/pmetest.cpp