From 5adbc09b71f285d7781906cd2a540c19a4c1cc10 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Tue, 6 Feb 2024 12:33:01 -0700 Subject: [PATCH] Move warning to avoid multiple instances --- src/KOKKOS/fft3d_kokkos.cpp | 7 ------- src/KOKKOS/pppm_kokkos.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index e9ab095de9..1f39e17326 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -69,13 +69,6 @@ FFT3dKokkos::FFT3dKokkos(LAMMPS *lmp, MPI_Comm comm, int nfast, int if (stack_size < 2048) cudaDeviceSetLimit(cudaLimitStackSize,2048); #endif - - #if defined (LMP_KOKKOS_GPU) - int me; - MPI_Comm_rank(comm,&me); - if (me == 0) - lmp->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); - #endif #endif plan = fft_3d_create_plan_kokkos(comm,nfast,nmid,nslow, diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index b83c7e0313..6a2618642b 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -20,6 +20,7 @@ #include "atom_kokkos.h" #include "atom_masks.h" +#include "comm.h" #include "domain.h" #include "error.h" #include "fft3d_kokkos.h" @@ -105,6 +106,13 @@ PPPMKokkos::PPPMKokkos(LAMMPS *lmp) : PPPM(lmp) fft1 = nullptr; fft2 = nullptr; remap = nullptr; + +#if defined (LMP_KOKKOS_GPU) + #if defined(FFT_KOKKOS_KISSFFT) + if (comm->me == 0) + error->warning(FLERR,"Using default KISS FFT with Kokkos GPU backends may give suboptimal performance"); + #endif +#endif } /* ----------------------------------------------------------------------