Gromacs  2020.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gpu_testutils.h File Reference

Description

Declare functions for detection of GPU devices, specific for tests.

Todo:
This should eventually go to src/testutils
Author
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com

Functions

bool canComputeOnGpu ()
 Checks if there is a compatible GPU to run the computations on. More...
 

Function Documentation

bool canComputeOnGpu ( )

Checks if there is a compatible GPU to run the computations on.

There are several reasons why code can not rune on the GPU:

  1. The GPU can not be detected, because there is none in the system.
  2. GPU detection is disabled by GMX_DISABLE_GPU_DETECTION environmental variable.
  3. GPUs are detected, but none of them is compatible. This function checks all these conditions and returns true only if there at least one GPU that can be used for computations.
Returns
True, if there a GPU that can be used for computations