From bcabe51bb078bb4da5eba9e2d0bed6e4dd8c062c Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Tue, 10 Sep 2019 10:28:30 +0200 Subject: [PATCH] Fix nightly build 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 --- src/gromacs/listed_forces/tests/bonded.cpp | 4 +++- src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gromacs/listed_forces/tests/bonded.cpp b/src/gromacs/listed_forces/tests/bonded.cpp index cb62be3610..7037cfb57b 100644 --- a/src/gromacs/listed_forces/tests/bonded.cpp +++ b/src/gromacs/listed_forces/tests/bonded.cpp @@ -677,6 +677,8 @@ std::vector > c_coordinatesForTests = //! PBC values for testing std::vector 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))); @@ -686,7 +688,7 @@ INSTANTIATE_TEST_CASE_P(Dihedral, ListedForcesTest, ::testing::Combine(::testing 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))); - +#endif } // namespace } // namespace gmx diff --git a/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp b/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp index 365b404ad6..1a0fbd7705 100644 --- a/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp +++ b/src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp @@ -552,7 +552,7 @@ void gpu_launch_kernel(gmx_nbnxn_ocl_t *nb, // 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(forceFlags.computeVirial); if (useLjCombRule(nb->nbparam->vdwtype)) { const auto kernelArgs = prepareGpuKernelArguments(kernel, config, -- 2.22.0