set(FFT_WARNING_MESSAGE "The FFTW library was compiled with neither --enable-sse nor --enable-sse2; those would have enabled SSE(2) SIMD instructions. This will give suboptimal performance. You should (re)compile the FFTW library with --enable-sse2 and --enable-avx (and --enable-avx2 or --enable-avx512 if supported).")
endif()
endif()
- set(FFT_STATUS_MESSAGE "Using external FFT library - FFTW3")
+
+ find_path(ARMPL_INCLUDE_DIR "armpl.h" HINTS ${${FFTW}_INCLUDE_DIRS}
+ NO_DEFAULT_PATH
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_CMAKE_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ NO_CMAKE_SYSTEM_PATH)
+ if (ARMPL_INCLUDE_DIR)
+ set(GMX_FFT_ARMPL_FFTW3 1)
+ set(FFT_STATUS_MESSAGE "Using external FFT library - ARM Performance Library (FFTW3 compatibility mode)")
+ else()
+ set(GMX_FFT_FFTW3 1)
+ set(FFT_STATUS_MESSAGE "Using external FFT library - FFTW3")
+ endif()
endif()
set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})
- set(GMX_FFT_FFTW3 1)
elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
# Intel 11 and up makes life somewhat easy if you just want to use
# all their stuff. It's not easy if you only want some of their
The full list and order(!) of libraries you require are found in Intel's MKL documentation for your system.
+Using ARM Performance Libraries
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ARM Performance Libraries provides FFT transforms implementation for ARM
+architectures.
+Preliminary support is provided for ARMPL in |Gromacs| through its FFTW-compatible API.
+Assuming that the ARM HPC toolchain environment including the ARMPL paths
+are set up (e.g. through loading the appropriate modules like
+``module load Module-Prefix/arm-hpc-compiler-X.Y/armpl/X.Y``) use the following cmake
+options:
+
+::
+
+ cmake -DGMX_FFT_LIBRARY=fftw3 \
+ -DFFTWF_LIBRARY="${ARMPL_DIR}/lib/libarmpl_lp64.so" \
+ -DFFTWF_INCLUDE_DIR=${ARMPL_DIR}/include
+
+
Other optional build components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
accordingly. The internal versions are fine for normal use. If you
need to specify a non-standard path to search, use
``-DCMAKE_PREFIX_PATH=/path/to/search``. If you need to specify a
-library with a non-standard name (e.g. ESSL on Power machines), then
+library with a non-standard name (e.g. ESSL on Power machines
+or ARMPL on ARM machines), then
set ``-DGMX_BLAS_USER=/path/to/reach/lib/libwhatever.a``.
If you are using Intel MKL_ for FFT, then the BLAS and
We now require at least OpenCL version 1.2 both for API and kernels. All
currently targeted vendors' libraries do support it, so this is not a
restriction in any way.
+
+Preliminary support for ARM Performance Libraries
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+The ARM Performance Libraries can now be used for FFT transforms through
+the FFTW compatiblity layer. This can provide performance benefits over using
+a vanilla FFTW3 on recent ARMv8 architectures.
/* Use FFTW3 FFT library */
#cmakedefine01 GMX_FFT_FFTW3
+/* Use the ARM Performance library with FFTW3 compatibility */
+#cmakedefine01 GMX_FFT_ARMPL_FFTW3
+
/* Use MKL FFT library */
#cmakedefine01 GMX_FFT_MKL
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
fft_fftpack.cpp
${CMAKE_SOURCE_DIR}/src/external/fftpack/fftpack.c)
endif()
-if (GMX_FFT_FFTW3)
+if (GMX_FFT_FFTW3 OR GMX_FFT_ARMPL_FFTW3)
gmx_add_libgromacs_sources(fft_fftw3.cpp)
endif()
if (GMX_FFT_MKL)
* files like fft_fftw3.c or fft_mkl.c for that.
*/
-#if !GMX_FFT_FFTW3
+#if !GMX_FFT_FFTW3 && !GMX_FFT_ARMPL_FFTW3
struct gmx_many_fft {
int howmany;
#include "config.h"
-#if GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3 || GMX_FFT_ARMPL_FFTW3
// Needed for construction of the FFT library description string
#include <fftw3.h>
#endif
const char *getFftDescriptionString()
{
// Define the FFT description string
-#if GMX_FFT_FFTW3
+#if GMX_FFT_FFTW3 || GMX_FFT_ARMPL_FFTW3
# if GMX_NATIVE_WINDOWS
// Don't buy trouble
return "fftw3";