Fix OpenCL compilation errors.
authorSzilard Pall <pall.szilard@gmail.com>
Wed, 1 Jul 2015 14:49:09 +0000 (16:49 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 2 Jul 2015 12:29:46 +0000 (14:29 +0200)
Fixes a typo in a structure. Also fixes an incorrect
variable name only visible on OS X.

Fixes #1765

Change-Id: I0ee0f61da1f036163aa85f719ef9ceb0dab06868

src/gromacs/gmxlib/gpu_utils/ocl_compiler.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_types.h

index 783016de1a7766766a1568d8020df9a2c996b025..4e43fd0e1c634829241bb7bb1edc454953260c3b 100644 (file)
@@ -750,7 +750,7 @@ ocl_get_build_options_string(cl_context           context,
 
         for (std::string::size_type i = 0; i < unescaped_ocl_root_path.length(); i++)
         {
-            if (inputStr[i] == ' ')
+            if (unescaped_ocl_root_path[i] == ' ')
             {
                 ocl_root_path.push_back('\\');
             }
index f6ee45829229e765c638bc25ddce8074884db7bb..e09de482f9e9d3dd0291780243b03a242a3111f1 100644 (file)
@@ -297,16 +297,16 @@ struct gmx_nbnxn_ocl_t
     cl_command_queue    stream[2];      /**< local and non-local GPU queues                             */
 
     /** events used for synchronization */
-    cl_event nonlocal_done;              /**< event triggered when the non-local non-bonded kernel
-                                            is done (and the local transfer can proceed) */
-    cl_event isc_ops_and_local_H2D_done; /**< event triggered when the tasks issued in
-                                            the local stream that need to precede the
-                                            non-local force calculations are done
-                                            (e.g. f buffer 0-ing, local x/q H2D) */
-
-    cl_bool                     bDoTime; /**< True if event-based timing is enabled.                     */
-    cl_timers_t                *timers;  /**< OpenCL event-based timers.                                 */
-    struct gmx_wallclock_gpu_t *timings; /**< Timing data.                                               */
+    cl_event nonlocal_done;               /**< event triggered when the non-local non-bonded kernel
+                                             is done (and the local transfer can proceed) */
+    cl_event misc_ops_and_local_H2D_done; /**< event triggered when the tasks issued in
+                                             the local stream that need to precede the
+                                             non-local force calculations are done
+                                             (e.g. f buffer 0-ing, local x/q H2D) */
+
+    cl_bool                     bDoTime;  /**< True if event-based timing is enabled.                     */
+    cl_timers_t                *timers;   /**< OpenCL event-based timers.                                 */
+    struct gmx_wallclock_gpu_t *timings;  /**< Timing data.                                               */
 };
 
 #ifdef __cplusplus