Overview

How to build FFTW with Arm Compiler.

FFTW is a library for computing real and complex discrete Fourier transforms (DFT) in one or more dimensions. For more information, see the FFTW website.

For the purposes of this build, the following components are used:

Component Form
FFTW Version 3.3.8
Arm Compiler
Version 19.1
Operating system RHEL 7.5
Hardware
Cavium ThunderX2

Procedure

  1. Download and unpack the application source code:

    wget http://www.fftw.org/fftw-3.3.8.tar.gz
    tar -zxvf fftw-3.3.8.tar.gz
  2. Change into the unpacked directory:

    cd fftw-3.3.8
  3. Set an install location, INSTALL_DIR, where the FFTW will be installed to. For example:

    export INSTALL_DIR=/path/to/FFTW_install

    replacing /path/to/FFTW_install with the path to your installation.

    Note: This recipe will install both the single and double precision FFTW builds to this install location.

  4. Build, test, and install separate double precision and single precision FFTW builds:

    1. First, build for double precision:

      1. Run the configure script:

        ./configure --enable-neon --enable-shared --enable-openmp --enable-mpi CC=armclang CXX=armclang++ FC=armflang F77=armflang --prefix=$INSTALL_DIR

        Where:

        • --enable-neon: enables the set of NEON SIMD instructions.

        • --enable-shared: builds shared libraries.

        • --enable-openmp: builds threaded, OpenMP libraries.

        • --enable-mpi: builds MPI-enabled libraries.

      2. To ensure libtool uses the correct linker flags with armflang, it must be patched, post-configure, using:

        sed -i -e 's#wl=""#wl="-Wl,"#g' libtool
        sed -i -e 's#pic_flag=""#pic_flag=" -fPIC -DPIC"#g' libtool
      3. Make, test, and install the double precision build:

        make -j
        make check
        make install

        Note: Running make check may be time-consuming.

    2. Second, build for single precision:

      1. Clean the double precision build using:

        make clean
      2. Run the configure script specifying --enable-float:

        ./configure --enable-float --enable-neon --enable-shared --enable-openmp --enable-mpi CC=armclang CXX=armclang++ FC=armflang F77=armflang --prefix=$INSTALL_DIR
      3. To ensure libtool uses the correct linker flags with armflang, it must be patched, post-configure, using:

        sed -i -e 's#wl=""#wl="-Wl,"#g' libtool
        sed -i -e 's#pic_flag=""#pic_flag=" -fPIC -DPIC"#g' libtool
      4. Make, test, and install the single precision build:

        make -j
        make check
        make install

        Note: Running make check may be time-consuming.