Adding Kokkos warning

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15506 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
stamoor
2016-08-26 18:37:44 +00:00
parent 56628fe2b6
commit 5348c1c70f
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
#include <mpi.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "finish.h"
@ -517,7 +518,7 @@ void Finish::end(int flag)
#endif
if (lmp->kokkos && lmp->kokkos->ngpu > 0)
if (const char* env_clb = std::getenv("CUDA_LAUNCH_BLOCKING"))
if (const char* env_clb = 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");