Including FFTW3 in a Project

FFTW (Fastest Fourier Transform in the West) 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. For more info, visit http://fftw.org.

Audience: Faculty, Researchers and Staff

This KB Article References: High Performance Computing
This Information is Intended for: Faculty, Researchers, Staff
Last Updated: December 13, 2023
Average Rating: Not Rated
Your feedback is important to us, help us by logging in to rate this article and provide feedback.

FFTW version 3.3.7 is available for use with both intel and gcc compilers.  Two environment variables are created upon loading the fftw3/openmpi/gcc/64/3.3.7 module.  $FFTWINCLUDE stores the include path for the headers.  $FFTWDIR stores the linked library path.

Whether compiling for intel, pass the appropriate flags:

mpiicc my_project.c –o my_project –l fftw3 –I $FFTWINCLUDE –L $FFTWDIR

This will make sure that your program finds the fftw3.h header and the linked library.

The same can be done with gcc, but libm must also be linked:

mpicc my_project.c –o my_project –l fftw3 –I $FFTWINCLUDE –L $FFTWDIR -lm

 

submit a ticket

Additional Information


There are no additional resources available for this article.

Provide Feedback


Your feedback is important to us, help us by logging in to rate this article and provide feedback.

Sign in with NetID

Getting Help


The Division of Information Technology provides support on all of our services. If you require assistance please submit a support ticket through the IT Service Management system.

Submit A Quick Ticket

For More Information Contact


IACS Support System