#include "pme_spline_work.h"
#include "pme_spread.h"
+//NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
+bool g_allowPmeWithSyclForTesting = false;
+
bool pme_gpu_supports_build(std::string* error)
{
gmx::MessageStringCollector errorReasons;
errorReasons.startContext("PME GPU does not support:");
errorReasons.appendIf(GMX_DOUBLE, "Double-precision build of GROMACS.");
errorReasons.appendIf(!GMX_GPU, "Non-GPU build of GROMACS.");
- errorReasons.appendIf(GMX_GPU_SYCL, "SYCL build."); // SYCL-TODO
+ errorReasons.appendIf(GMX_GPU_SYCL && !g_allowPmeWithSyclForTesting, "SYCL build."); // SYCL-TODO
errorReasons.finishContext();
if (error != nullptr)
{
return errorReasons.isEmpty();
}
+bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error)
+{
+ gmx::MessageStringCollector errorReasons;
+ // Before changing the prefix string, make sure that it is not searched for in regression tests.
+ errorReasons.startContext("PME GPU in Mixed mode does not support:");
+ errorReasons.appendIf(ir.efep != FreeEnergyPerturbationType::No, "Free Energy Perturbation.");
+ errorReasons.finishContext();
+ if (error != nullptr)
+ {
+ *error = errorReasons.toString();
+ }
+ return errorReasons.isEmpty();
+}
+
/*! \brief \libinternal
* Finds out if PME with given inputs is possible to run on GPU.
* This function is an internal final check, validating the whole PME structure on creation,
errorReasons.appendIf(pme->doLJ, "Lennard-Jones PME.");
errorReasons.appendIf(GMX_DOUBLE, "Double precision build of GROMACS.");
errorReasons.appendIf(!GMX_GPU, "Non-GPU build of GROMACS.");
- errorReasons.appendIf(GMX_GPU_SYCL, "SYCL build of GROMACS."); // SYCL-TODO
+ errorReasons.appendIf(GMX_GPU_SYCL && !g_allowPmeWithSyclForTesting, "SYCL build of GROMACS."); // SYCL-TODO
errorReasons.finishContext();
if (error != nullptr)
{
{
forcesRef = pme->atc[d + 1].f;
}
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
dd_pmeredist_f(pme, &pme->atc[d], forcesRef, d == pme->ndecompdim - 1 && pme->bPPnode);
}