Fix nightly build
authorPaul Bauer <paul.bauer.q@gmail.com>
Tue, 10 Sep 2019 08:28:30 +0000 (10:28 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 10 Sep 2019 20:01:09 +0000 (22:01 +0200)
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
src/gromacs/nbnxm/opencl/nbnxm_ocl.cpp

index cb62be3610cdcd081891dc686e2961c47a3d242c..7037cfb57ba35c9ef2d653fa2baf850342d8c904 100644 (file)
@@ -677,6 +677,8 @@ std::vector<std::vector<gmx::RVec> > c_coordinatesForTests =
 //! 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)));
@@ -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
index 365b404ad60aeb135838d9b7f77a5bc80d9ac2a0..1a0fbd77051b01efd2e51cc8865385366c76093d 100644 (file)
@@ -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<int>(forceFlags.computeVirial);
     if (useLjCombRule(nb->nbparam->vdwtype))
     {
         const auto kernelArgs = prepareGpuKernelArguments(kernel, config,