From 56628fe2b6438327cec6b928f6b0c8fc6fc1a141 Mon Sep 17 00:00:00 2001 From: stamoor <stamoor@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Fri, 26 Aug 2016 18:17:16 +0000 Subject: [PATCH] Adding Kokkos warning git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15505 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/finish.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/finish.cpp b/src/finish.cpp index 8fff3a8a54..8670987573 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -33,6 +33,7 @@ #include "neigh_request.h" #include "output.h" #include "memory.h" +#include "error.h" #ifdef LMP_USER_OMP #include "modify.h" @@ -515,6 +516,13 @@ void Finish::end(int flag) } #endif + if (lmp->kokkos && lmp->kokkos->ngpu > 0) + if (const char* env_clb = std::getenv("CUDA_LAUNCH_BLOCKING")) + if (!(strcmp(env_clb,"1") == 0)) { + error->warning(FLERR,"Timing breakdown may not be accurate since GPU/CPU overlap is enabled. " + "Using 'export CUDA_LAUNCH_BLOCKING=1' will give an accurate timing breakdown but will reduce performance"); + } + // FFT timing statistics // time3d,time1d = total time during run for 3d and 1d FFTs // loop on timing() until nsample FFTs require at least 1.0 CPU sec -- GitLab