diff --git a/src/KOKKOS/fftdata_kokkos.h b/src/KOKKOS/fftdata_kokkos.h index 15dca33bcc..7f900002e5 100644 --- a/src/KOKKOS/fftdata_kokkos.h +++ b/src/KOKKOS/fftdata_kokkos.h @@ -12,30 +12,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +// data types for 2d/3d FFTs + +#ifndef LMP_FFT_DATA_KOKKOS_H +#define LMP_FFT_DATA_KOKKOS_H + #include "kokkos_type.h" #ifndef MAX #define MAX(A,B) ((A) > (B) ? (A) : (B)) #endif -// data types for 2d/3d FFTs - -#ifndef LMP_FFT_DATA_KOKKOS_H -#define LMP_FFT_DATA_KOKKOS_H - -#include "lmpfftsettings_kokkos.h" +#include "lmpfftsettings.h" // ------------------------------------------------------------------------- -// Data types for single-precision complex - -#if FFT_PRECISION == 1 -#elif FFT_PRECISION == 2 -#else -#error "FFT_PRECISION needs to be either 1 (=single) or 2 (=double)" -#endif - - // with KOKKOS in CUDA or HIP mode we can only have // CUFFT/HIPFFT or KISSFFT, thus undefine all other // FFTs here, since they may be valid in fft3d.cpp diff --git a/src/KOKKOS/lmpfftsettings_kokkos.h b/src/KOKKOS/lmpfftsettings_kokkos.h deleted file mode 100644 index 6cea9bb63a..0000000000 --- a/src/KOKKOS/lmpfftsettings_kokkos.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - LAMMPS development team: developers@lammps.org - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. -------------------------------------------------------------------------- */ - -// common FFT library related defines and compilation settings - -#ifndef LMP_FFT_KOKKOS_SETTINGS_H -#define LMP_FFT_KOKKOS_SETTINGS_H - -#include "lmpfftsettings.h" - -// if user set FFTW, it means FFTW3 - -#ifdef FFT_KOKKOS_FFTW -#ifndef FFT_KOKKOS_FFTW3 -#define FFT_KOKKOS_FFTW3 -#endif -#endif - -// set strings for library info output - -#if defined(FFT_KOKKOS_FFTW3) -#define LMP_FFT_KOKKOS_LIB "FFTW3" -#elif defined(FFT_KOKKOS_MKL) -#define LMP_FFT_KOKKOS_LIB "MKL FFT" -#elif defined(FFT_KOKKOS_CUFFT) -#define LMP_FFT_KOKKOS_LIB "cuFFT" -#elif defined(FFT_KOKKOS_HIPFFT) -#define LMP_FFT_KOKKOS_LIB "hipFFT" -#else -#define LMP_FFT_KOKKOS_LIB "KISS FFT" -#endif - -#endif diff --git a/src/lmpfftsettings.h b/src/lmpfftsettings.h index 7fad0de8c7..426726440e 100644 --- a/src/lmpfftsettings.h +++ b/src/lmpfftsettings.h @@ -16,7 +16,7 @@ #ifndef LMP_FFT_SETTINGS_H #define LMP_FFT_SETTINGS_H -// if user set FFTW, it means FFTW3 +// if a user sets FFTW, it means FFTW3 #ifdef FFT_FFTW #ifndef FFT_FFTW3 @@ -24,6 +24,14 @@ #endif #endif +#ifdef LMP_KOKKOS +#ifdef FFT_KOKKOS_FFTW +#ifndef FFT_KOKKOS_FFTW3 +#define FFT_KOKKOS_FFTW3 +#endif +#endif +#endif + // set strings for library info output #if defined(FFT_FFTW3) @@ -38,6 +46,20 @@ #define LMP_FFT_LIB "KISS FFT" #endif +#ifdef LMP_KOKKOS +#if defined(FFT_KOKKOS_FFTW3) +#define LMP_FFT_KOKKOS_LIB "FFTW3" +#elif defined(FFT_KOKKOS_MKL) +#define LMP_FFT_KOKKOS_LIB "MKL FFT" +#elif defined(FFT_KOKKOS_CUFFT) +#define LMP_FFT_KOKKOS_LIB "cuFFT" +#elif defined(FFT_KOKKOS_HIPFFT) +#define LMP_FFT_KOKKOS_LIB "hipFFT" +#else +#define LMP_FFT_KOKKOS_LIB "KISS FFT" +#endif +#endif + #ifdef FFT_SINGLE typedef float FFT_SCALAR; #define FFT_PRECISION 1