InstallingFFTW3 - adda-team/adda GitHub Wiki

FFTW3 library provides the default way to perform the FFTs in ADDA, significantly outperforming alternative built-in algorithm. Its installation is straightforward and therefore is highly recommended. The following guidelines are bases on FFTW version 3.2.2.

Unix

The easiest is to install a package, available in many Unix/Linux distributions (be sure to also install development package, which includes headers). On Ubuntu install the package libfftw3-dev.

Alternatively, you may compile it yourself. You may install FFTW3 for the entire system, using the root account. Alternatively, if root is unavailable, FFTW3 can be installed under any user account (in $HOME directory) as follows:

  • Download the latest version of FFTW3
  • Unpack it, cd into its directory, and type
    ./configure --prefix=$HOME [--enable-sse2]
    
    where '--enable' option allows effective use of modern processors. You may also look through the whole list of configuration options. Then type
    make
    make install
    
  • Modify the initialization of internal variables FFTW3_INC_PATH and FFTW3_LIB_PATH in the Makefile, as described in CompilingADDA.

macOS

Windows

If you just want to use [ADDA executables for 64-bit Windows]((../releases), do not worry about FFTW3 at all. An appropriate DLL is included in the corresponding package.

If you want to compile ADDA on Windows yourself, install FFTW3 on Windows. Although building FFTW3 from source is possible, a recommended simpler way is the following:

  • Download a [precompiled package]((http://www.fftw.org/install/windows.html), containing DLLs and header files. It contains a lot of files, some of which are needed for compilation in, e.g., Microsoft Visual Studio. However, we discuss below compilation by GNU compilers using the MinGW environment. For that you need only fftw3.h and libfftw3-3.dll.
  • If you are setting up the MinGW/MSYS environment with advanced instructions, keep the whole package and follow those instructions.
  • Alternatively, do the following:
    • Create a copy of libfftw3-3.dll and rename it to libfftw3.dll. On Windows Vista and newer you may instead create a symbolic link (administrator privileges may be required for that)
      mklink libfftw3.dll libfftw3-3.dll
      
      This is required because the FFTW3 DLL package does not contain appropriate import-library file to use during linking. The DLL itself can be used for that, but it needs to be named a little bit differently to be automatically found by the linker.
    • Modify the initialization of internal variables FFTW3_INC_PATH and FFTW3_LIB_PATH in the Makefile to point to the directory(ies) contating fftw3.h and libfftw3.dll respectively (see CompilingADDA).
    • To avoid need to move libfftw3-3.dll together with ADDA executables add the corresponding folder with to environmental variable PATH.
⚠️ **GitHub.com Fallback** ⚠️