Remove unused results of cudaStreamQuery()
authorAleksei Iupinov <a.yupinov@gmail.com>
Tue, 22 May 2018 09:05:03 +0000 (11:05 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 22 May 2018 15:18:55 +0000 (17:18 +0200)
Coincidentally fixes #2509 (Windows + CUDA compilation)

Change-Id: I032c5fab53bf83cf0ea8c0299d8752b10d1f6c0e

docs/release-notes/2018/2018.2.rst
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu

index 9d2c915723f354ba8aaac72032bd1c90efea3186..d817c55f05310d2a43a0cc5f3806ad3130cce612 100644 (file)
@@ -30,6 +30,11 @@ during make check/test.
 Fixes to improve portability
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+Fixed CUDA compilation on Windows.
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+:issue:`2509`
+
 Miscellaneous
 ^^^^^^^^^^^^^
 
index 1bca13b767d5d98a2f7bcb124521f514bbe889b2..85d0feb35502a7e6d05bd93ba53fe66595779d79 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,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.
@@ -482,10 +482,11 @@ void nbnxn_gpu_launch_kernel(gmx_nbnxn_cuda_t       *nb,
         t->nb_k[iloc].closeTimingRegion(stream);
     }
 
-#if (defined(WIN32) || defined( _WIN32 ))
-    /* Windows: force flushing WDDM queue */
-    stat = cudaStreamQuery(stream);
-#endif
+    if (GMX_NATIVE_WINDOWS)
+    {
+        /* Windows: force flushing WDDM queue */
+        cudaStreamQuery(stream);
+    }
 }
 
 /*! Calculates the amount of shared memory required by the CUDA kernel in use. */
@@ -641,10 +642,11 @@ void nbnxn_gpu_launch_kernel_pruneonly(gmx_nbnxn_cuda_t       *nb,
         timer->closeTimingRegion(stream);
     }
 
-#if (defined(WIN32) || defined( _WIN32 ))
-    /* Windows: force flushing WDDM queue */
-    stat = cudaStreamQuery(stream);
-#endif
+    if (GMX_NATIVE_WINDOWS)
+    {
+        /* Windows: force flushing WDDM queue */
+        cudaStreamQuery(stream);
+    }
 }
 
 void nbnxn_gpu_launch_cpyback(gmx_nbnxn_cuda_t       *nb,