FFTW
FFTW
Documentation for this package can be found at: http://www.fftw.org/#documentation
From ( http://www.fftw.org/#features ):
"FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). We believe that FFTW, which is free software, should become the FFT library of choice for most applications.."
Using FFTW on RCC Resources
On HPC fftw3 libraries can be accessed and used for such purposes. We will consider an example from the webpage of Dr. John Burkhardt who has compiled a group of example and test files (Dr. Burkardt's Test Code). To download, compile and run this example using the fftw3 libraries on HPC using the gnu compiler one can use the following commands (lines beginning with a "#" symbol are comments to indicate what each command directly below it does),
# Download the Test File to the Current Directory
wget https://people.sc.fsu.edu/~jburkardt/c_src/fftw_test/fftw_test.c
# Load the GNU Module
module load gnu
# Compile the Code with the Include Path set to include the directory with fftw.h
gcc -c fftw_test.c -I/opt/rcc/gnu/include/
# Link the Compiled code with the Link Path set to include the directory with fftw3
gcc -o fftw_test fftw_test.o -L/opt/rcc/gnu/lib64/ -lfftw3
# Run the test code
./fftw_test
Using gnu is not necessary. These libraries are also available to other compilers. Using a different compiler will simply mean linking and including a different path, for example:
module load COMPILER # Will either be intel or pgi
-I/opt/rcc/<compiler>/include/
-L/opt/rcc/<compiler>/lib64/