/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
namespace
{
-//! A basic PME runner
+/*! \brief A basic PME runner
+ *
+ * \todo Consider also using GpuTest class. */
class PmeTest : public MdrunTestFixture
{
public:
void PmeTest::SetUpTestCase()
{
gmx_gpu_info_t gpuInfo {};
- char detection_error[STRLEN];
- GMX_UNUSED_VALUE(detection_error); //TODO
// It would be nicer to do this detection once and have mdrun
// re-use it, but this is OK. Note that this also caters for when
// there is no GPU support in the build.
+ //
+ // TODO report any error messages gracefully.
if (GMX_GPU == GMX_GPU_CUDA &&
- (detect_gpus(&gpuInfo, detection_error) >= 0) &&
- gpuInfo.n_dev_compatible > 0)
+ canDetectGpus(nullptr))
{
- s_hasCompatibleCudaGpus = true;
+ findGpus(&gpuInfo);
+ s_hasCompatibleCudaGpus = (gpuInfo.n_dev_compatible > 0);
}
free_gpu_info(&gpuInfo);
}