Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

Unrecognized function using FFTW on Win XP 64-bit?

david_sallngc_com
459 Views

I have been using FFTW (not the MKL version but the files available from fftw.org) without difficulty on a Windows XP 32-bit OS but can not get it to work on a Windows XP 64-bit OS. I wrote the following small test program which works perfectly on the 32-bit OS. When I try to create a 64-bit version, I get a link error that tells me that the FFTW routine, dfftw_plan_dft_1d, is unrecognized. I used the following to compile,

ifort fftwtest.f90 libfftw3-3.lib

where libfftw3-3.lib (and libfftw3-3.dll)was created (as instructed on the FFTW website),

lib /def:libfftw3-3.def

We have MSVS 2005 on the 64-bit OS as well (installed the 64-bit version) and I made sure (hopefully!) that I used the lib.exe for 64-bit to create the fftw library. I have also been assured by Steven Johnson at FFTW that the Fortran interfaces have been included in the 64-bit binaries on their website. I should also note that we have Intel 10.1 Fortran, 64-bit installed on the computer as well.

Any help with this would be greatly appreciated!

Thank you very much for your help.

Sincerely,

David

IMPLICIT none
INTERFACE
SUBROUTINE dfftw_plan_dft_1d(plan, N, in, out, FFTW_FORWARD, FFTW_ESTIMATE)
!DEC$ ATTRIBUTES C, REFERENCE, ALIAS : '_dfftw_plan_dft_1d__':: dfftw_plan_dft_1d
INTEGER*8 plan
INTEGER N, FFTW_FORWARD, FFTW_ESTIMATE
COMPLEX*16 in(N), out(N)
end SUBROUTINE
end INTERFACE
INTEGER, PARAMETER :: fftw_forward = -1
INTEGER, PARAMETER :: fftw_estimate = 64
INTEGER, PARAMETER :: n = 10
INTEGER*8 plan
COMPLEX*16 in(n), out(n)
call dfftw_plan_dft_1d(plan, n, in, out, fftw_forward, fftw_estimate)
write(*,*) plan
END

0 Kudos
2 Replies
Kevin_D_Intel
Employee
459 Views

Have you tried removing the leading underscore from the routine's name in the !DEC$ ALIAS ?

The IA-32 convention is to prepend an underscore, the Intel 64 convention is to not.
0 Kudos
david_sallngc_com
459 Views

Have you tried removing the leading underscore from the routine's name in the !DEC$ ALIAS ?

The IA-32 convention is to prepend an underscore, the Intel 64 convention is to not.

Thanks Kevin ... that was the problem!!!

David
0 Kudos
Reply