Unverified Commit ec381964 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into remove-txt-files

# Conflicts:
#	doc/src/Build_settings.rst
parents 0302c0ba 4134d7fd
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -739,4 +739,20 @@ if(PKG_KSPACE)
  else()
    message(STATUS "Using double precision FFTs")
  endif()
  if(FFT_FFTW_THREADS)
    message(STATUS "Using threaded FFTs")
  else()
    message(STATUS "Using non-threaded FFTs")
  endif()
  if(PKG_KOKKOS)
    if(KOKKOS_ENABLE_CUDA)
      if (${FFT} STREQUAL "KISS")
        message(STATUS "Kokkos FFT: KISS")
      else()
        message(STATUS "Kokkos FFT: cuFFT")
      endif()
    else()
      message(STATUS "Kokkos FFT: ${FFT}")
    endif()
  endif()
endif()
+9 −7
Original line number Diff line number Diff line
# - Find fftw3
# Find the native FFTW3 headers and libraries.
# Find the native double precision FFTW3 headers and libraries.
#
#  FFTW3_INCLUDE_DIRS  - where to find fftw3.h, etc.
#  FFTW3_LIBRARIES     - List of libraries when using fftw3.
#  FFTW3_OMP_LIBRARIES - List of libraries when using fftw3.
#  FFTW3_FOUND         - True if fftw3 found.
#

@@ -10,11 +11,12 @@ find_package(PkgConfig)

pkg_check_modules(PC_FFTW3 fftw3)
find_path(FFTW3_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3_INCLUDE_DIRS})

find_library(FFTW3_LIBRARY NAMES fftw3 HINTS ${PC_FFTW3_LIBRARY_DIRS})
find_library(FFTW3_OMP_LIBRARY NAMES fftw3_omp HINTS ${PC_FFTW3_LIBRARY_DIRS})

set(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
set(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
set(FFTW3_OMP_LIBRARIES ${FFTW3_OMP_LIBRARY})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE
@@ -22,4 +24,4 @@ include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(FFTW3 DEFAULT_MSG FFTW3_LIBRARY FFTW3_INCLUDE_DIR)

mark_as_advanced(FFTW3_INCLUDE_DIR FFTW3_LIBRARY )
mark_as_advanced(FFTW3_INCLUDE_DIR FFTW3_LIBRARY FFTW3_OMP_LIBRARY)
+6 −5
Original line number Diff line number Diff line
# - Find fftw3f
# Find the native FFTW3F headers and libraries.
# Find the native single precision FFTW3 headers and libraries.
#
#  FFTW3F_INCLUDE_DIRS - where to find fftw3f.h, etc.
#  FFTW3F_LIBRARIES    - List of libraries when using fftw3f.
#  FFTW3F_OMP_LIBRARIES - List of libraries when using fftw3.
#  FFTW3F_FOUND        - True if fftw3f found.
#

@@ -10,11 +10,12 @@ find_package(PkgConfig)

pkg_check_modules(PC_FFTW3F fftw3f)
find_path(FFTW3F_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3F_INCLUDE_DIRS})

find_library(FFTW3F_LIBRARY NAMES fftw3f HINTS ${PC_FFTW3F_LIBRARY_DIRS})
find_library(FFTW3F_OMP_LIBRARY NAMES fftw3f_omp HINTS ${PC_FFTW3F_LIBRARY_DIRS})

set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY})
set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR})
set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY})
set(FFTW3F_OMP_LIBRARIES ${FFTW3F_OMP_LIBRARY})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set FFTW3F_FOUND to TRUE
+10 −2
Original line number Diff line number Diff line
@@ -39,7 +39,15 @@ if(PKG_KOKKOS)
                         ${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp)

  if(PKG_KSPACE)
    list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp)
    list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
                                   ${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp
                                   ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
    if(KOKKOS_ENABLE_CUDA)
      if(NOT ${FFT} STREQUAL "KISS")
        add_definitions(-DFFT_CUFFT)
        list(APPEND LAMMPS_LINK_LIBS cufft)
      endif()
    endif()
  endif()

  set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
+14 −0
Original line number Diff line number Diff line
@@ -21,6 +21,20 @@ if(PKG_KSPACE)
    add_definitions(-DFFT_FFTW3)
    include_directories(${${FFTW}_INCLUDE_DIRS})
    list(APPEND LAMMPS_LINK_LIBS ${${FFTW}_LIBRARIES})
    if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY)
      option(FFT_FFTW_THREADS "Use threaded FFT library" ON)
    else()
      option(FFT_FFTW_THREADS "Use threaded FFT library" OFF)
    endif()

    if(FFT_FFTW_THREADS)
      if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY)
        add_definitions(-DFFT_FFTW_THREADS)
        list(APPEND LAMMPS_LINK_LIBS ${${FFTW}_OMP_LIBRARIES})
      else()
        message(FATAL_ERROR "Need OpenMP enabled FFTW3 library for FFT_THREADS")
      endif()
    endif()
  elseif(FFT STREQUAL "MKL")
    find_package(MKL REQUIRED)
    add_definitions(-DFFT_MKL)
Loading