From 5348c1c70fe7d5009dbc95274b9a435a84987068 Mon Sep 17 00:00:00 2001 From: stamoor <stamoor@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Fri, 26 Aug 2016 18:37:44 +0000 Subject: [PATCH] Adding Kokkos warning git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15506 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/accelerator_kokkos.h | 1 + src/finish.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 0c9c121568..ecba20da65 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -43,6 +43,7 @@ class KokkosLMP { public: int kokkos_exists; int num_threads; + int ngpu; int numa; KokkosLMP(class LAMMPS *, int, char **) {kokkos_exists = 0;} diff --git a/src/finish.cpp b/src/finish.cpp index 8670987573..3ab4fd0cb7 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -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"); -- GitLab