Fix OpenCL mdrun from installed path
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_ocl / nbnxn_ocl_jit_support.cpp
index 155cd325895f5ce0ae5d0bc73f6c03982f0c0a24..14328f0b74c2aef52d08e7416e4ac03890b2c9e0 100644 (file)
@@ -192,24 +192,23 @@ nbnxn_gpu_compile_kernels(gmx_nbnxn_ocl_t *nb)
                                                              nb->nbparam->eeltype,
                                                              nb->nbparam->vdwtype);
 
-        /* Here we pass macros and static const int variables defined in include
-         * files outside the nbnxn_ocl as macros, to avoid including those files
-         * in the JIT compilation that happens at runtime.
-         */
-
+        /* Here we pass macros and static const int variables defined
+         * in include files outside the nbnxn_ocl as macros, to avoid
+         * including those files in the JIT compilation that happens
+         * at runtime. This is particularly a problem for headers that
+         * depend on config.h, such as nbnxn_pairlist.h. */
         extraDefines += gmx::formatString(
                     " -DNBNXN_GPU_CLUSTER_SIZE=%d "
                     "%s",
                     c_nbnxnGpuClusterSize,                                  /* Defined in nbnxn_pairlist.h */
                     (nb->bPrefetchLjParam) ? "-DIATYPE_SHMEM" : ""
                     );
-
         try
         {
             /* TODO when we have a proper MPI-aware logging module,
                the log output here should be written there */
             program = gmx::ocl::compileProgram(stderr,
-                                               "src/gromacs/mdlib/nbnxn_ocl",
+                                               "gromacs/mdlib/nbnxn_ocl",
                                                "nbnxn_ocl_kernels.cl",
                                                extraDefines,
                                                nb->dev_rundata->context,