Gromacs
2024.3
|
#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"
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.
Functions | |
static unsigned long int | gmx::test::getRequiredNumberOfDevices () |