linking FFTW DLLs when compiling Fortran with PVF


I recently purchased and installed PGI Visual Fortran 2010 (for 64-bit Windows machine), and have been able to successfully compile and run some legacy Fortran code that I am in the process of updating. I am currently using an explicit FFT routine without any problem. I have also modified the code to utilize the IMSL FFT routines without any problem.

However, colleagues have convinced me that I can get a significant improvement in performance by utilizing the FFTW routines. I downloaded the 64-bit DLLs, altered the code to call the routines, but cannot seem to get the compiler to properly link to the DLLs. I even downloaded the full source code from FFTW and tried building my own FFTW library, but still can’t seem to get the compiler to link to it properly.

Can anyone help? Thanks!

You need to link to the .lib files, which are converted from .def files included in the FFTW package ( it is explained on the FFTW website).

Hi KB Smith,

What errors are you seeing?

While I haven’t built FFTW on Windows myself, my guess is that you need to either configure the existing Fortran interfaces, or create them. It might be able as simple as adding the Fortran interface files into your PVF project.

Do you have access to the PGI Workstation product on Windows? It might be easier to build FFTW using make from the CYGWIN command line. This will also allow you to mix the C and Fortran portions into a single library. One thing I don’t like about Visual Studio is that you can’t mix languages into the same project.

  • Mat