Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gpu_testutils.cpp File Reference
#include "gmxpre.h"
#include "gpu_testutils.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/hardware/gpu_hw_info.h"
+ Include dependency graph for gpu_testutils.cpp:

Description

Function definitions for GPU detection, specific for tests.

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