Including FFTW3 in a Project

Audience: Faculty, Researchers and Staff

This KB Article References:
This Information is Intended for: Faculty, Researchers, Staff
Last Updated: October 13, 2017

FFTW version 3.3.4 is available for use with both intel and gcc compilers.  Two environment variables are created upon loading the fftw3/openmpi/gcc/64/3.3.4 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

Additional Information

There are no additional resources available for this article.

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 Ticket

For More Information Contact

IACS Support System