Gromacs  2024.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
device_availability.cpp File Reference
#include "gmxpre.h"
#include "config.h"
#include <string>
#include <gtest/gtest.h>
#include "gromacs/hardware/device_management.h"
#include "gromacs/utility/baseversion.h"
#include "testutils/test_hardware_environment.h"
+ Include dependency graph for device_availability.cpp:

Description

Check if GPUs are available when they should be.

This is to test that CI can detect and use GPUs, when they are available. Driver and CUDA mismatch can lead to the tests falling back to the CPU code path quietly, leaving the GPU path untested. This is designed to fail when GPUs should be available, indicated by setting the environment variable GMX_TEST_REQUIRED_NUMBER_OF_DEVICES to 1 or greater.

Author
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com
Andrey Alekseenko al42a.nosp@m.nd@g.nosp@m.mail..nosp@m.com

Functions

static unsigned long int gmx::test::getRequiredNumberOfDevices ()