Fixes the clang-tidy error in the OpenCL build and disables the listed
forces tests when compiling with intel to avoid the test failures only
showing up there.
Refs #3083
Change-Id: Ie8d437b00cb9376d9eb7f8ac2d3402dee2152948
//! PBC values for testing
std::vector<int> c_pbcForTests = { epbcNONE, epbcXY, epbcXYZ };
//! PBC values for testing
std::vector<int> c_pbcForTests = { epbcNONE, epbcXY, epbcXYZ };
+// Those tests give errors with the intel compiler and nothing else, so we disable them only there.
+#ifndef __INTEL_COMPILER
INSTANTIATE_TEST_CASE_P(Bond, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputBonds), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Angle, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputAngles), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Bond, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputBonds), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Angle, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputAngles), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Polarize, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputPols), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Restraints, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputRestraints), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Polarize, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputPols), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
INSTANTIATE_TEST_CASE_P(Restraints, ListedForcesTest, ::testing::Combine(::testing::ValuesIn(c_InputRestraints), ::testing::ValuesIn(c_coordinatesForTests), ::testing::ValuesIn(c_pbcForTests)));
} // namespace
} // namespace gmx
} // namespace
} // namespace gmx
// The OpenCL kernel takes int as second to last argument because bool is
// not supported as a kernel argument type (sizeof(bool) is implementation defined).
// The OpenCL kernel takes int as second to last argument because bool is
// not supported as a kernel argument type (sizeof(bool) is implementation defined).
- const int computeFshift = forceFlags.computeVirial;
+ const int computeFshift = static_cast<int>(forceFlags.computeVirial);
if (useLjCombRule(nb->nbparam->vdwtype))
{
const auto kernelArgs = prepareGpuKernelArguments(kernel, config,
if (useLjCombRule(nb->nbparam->vdwtype))
{
const auto kernelArgs = prepareGpuKernelArguments(kernel, config,