This guide is intended to help Intel® C++ Compiler customers build the FFTW* library on Linux*. The FFTW library is used for high performance computation of the Discrete Fourier Transform (DFT).Version Information
This guide applies to FFTW version 3.1.2 and the Intel C++ Compiler version 10.0 for Linux.Application Notes
FFTW is a portable open source library for computing DFTs and is one of the fastest such libraries available. In addition to the library, FFTW also includes a benchmark application. FFTW can be used on many platforms, but this particular guide is intended for Linux* only. FFTW can compute DFTs in multiple dimensions and with arbitrary sizes, using either real or complex data. More information about FFTW can be found at:Obtaining the Source Code
The source code can be found at:
Currently, the most recent stable version of FFTW is 3.1.2. Here is a direct link to that version:
Obtaining the latest version of the Intel® C++ Compiler
Licensed users of the Intel® compilers may download the most recent versions of the compiler from the Intel® Download Center which is accessed by logging into your account at the Intel® Registration Center.
Evaluation versions of the Intel compilers may be found at the Intel® Evaluation Software Center.Prerequisites
Hardware: This note has been tested on Intel® Pentium® D processors.
Software: This note applies to use of version 10.0 of the Intel C++ Compiler for Linux.Configuration and Set-up Information
In order to use this guide, you will need to have the Intel C++ Compiler installed. After installing the compiler, you will need to execute one of the following commands, depending on your architecture, to set the environment variables.
source /opt/intel/cc/10.0. xxx/bin/iccvars.sh
source /opt/intel/cce/10.0. xxx/bin/iccvars.sh
You will need to replace “ xxx” in the above commands with the three digit build number of your compiler.
Source Code Changes
No source code changes are required to build FFTW with the Intel compiler.Building FFTW
After you download the source code, use the following commands to extract the archive:
tar –zxvf fftw-3.1.2.tar.gz
Now, use the following commands to build the FFTW library and benchmark executable:
./configure CC=icc --with-our-malloc16 --enable-threads
The resulting library will be called libfftw3.la and will be placed in the current directory. The benchmark executable will be called bench and will be placed in the tests directory. Optionally, you can also run make install to copy some of the output files to your /usr/local directory.Running FFTW
Since FFTW is a library, it cannot be run independently. It must be linked with an executable. However, there is a benchmark executable that uses FFTW which can be used for testing. Here is an example of how to use the benchmark:
./bench -opatient 512 1024 2048 4096
The –opatient switch is recommended for benchmarking. The numbers listed are the problem sizes that should be run in each trial. In the example shown, we are running four problems of sizes 512, 1024, 2048, and 4096. The number of trials and problem sizes chosen in this example are arbitrary. Also, problem sizes can be repeated in the list for multiple trials of the same problem size.Verifying Correctness
To verify that the results are being computed correctly, you can use the benchmark executable as you normally would, but with the --verify switch. For example, you could execute the following command from the fftw-3.1.2/tests directory:
./bench --verify 4096
If the results were correct, no output will be shown. Otherwise, there will be an error message.
This note demonstrates the use of FFTW with the latest version 10.0 Intel C++ Compiler technology. Following this method will produce object files and libraries that are compatible with the latest Intel compilers.Known Issues and Limitations
There are no known issues or limitations with building FFTW with the Intel C++ Compiler 10.0.
† This link will take you off of the Intel Web site. Intel does not control the content of the destination Web Site.
For more complete information about compiler optimizations, see our Optimization Notice.