Disabled CUDA timings
[alexxy/gromacs.git] / src / gromacs / ewald / pme.cu
index c7e3bc71a41a98647e456a9d67b784a217555566..63f3fc40c97a7e23e5831f5029cf1057905f71e7 100644 (file)
@@ -441,11 +441,11 @@ void pme_gpu_init_internal(PmeGpu *pmeGPU)
      * TODO: PME could also try to pick up nice grid sizes (with factors of 2, 3, 5, 7).
      */
 
-    pmeGPU->archSpecific->useTiming = (getenv("GMX_DISABLE_CUDA_TIMING") == nullptr) &&
-        (getenv("GMX_DISABLE_GPU_TIMING") == nullptr);
-    /* TODO: multiple CUDA streams on same GPU cause nonsense cudaEvent_t timings.
-     * This should probably also check for gpuId exclusivity?
+    /* WARNING: CUDA timings are incorrect with multiple streams.
+     *          This is the main reason why they are disabled by default.
      */
+    // TODO: Consider turning on by default when we can detect nr of streams.
+    pmeGPU->archSpecific->useTiming = (getenv("GMX_ENABLE_GPU_TIMING") != nullptr);
 
     /* Creating a PME CUDA stream */
     cudaError_t stat;