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

Calling FFTW library

Alessandro
Beginner
1,971 Views
Hi, I'm using the FFTW routines in my code (Fastest Fourier Transform in the West, www.fftw.org). They provide compiled dll for windows, so that you create your .lib file and link to your code. They provide the library both for win32 and win64. Here is my problem: I can compile my project both for win32 and win64, but when I launch the 64-bit executable everything works fine, when I try to use the 32-bit executable it always gives me the following error:

The procedure entry point DFFTW_EXECUTE_DFT could not be located in the dynamic link library libfftw3-3.dll.

I created the lib file with the command:
lib /def:libfftw3-3.def /machine:x86 for 32bit version
lib /def:libfftw3-3.def /machine:x64 for 64bit version

The source code is obviously the same, to which I link the 2 different .lib files situated in 2 different folders, and I copy the correct dll in the same folder where I put the executable. I'm working under Windows XP 64bit, with Visual Studio 2008 and Intel Fortran Compiler 11.0.074.

Could someone help me? Thank you.
0 Kudos
5 Replies
TimP
Honored Contributor III
1,971 Views
Did you check their documentation, or use a Microsoft tool such as dumpbin, to see whether the 32-bit library uses an obsolete ABI such as Compaq Fortran or VC6 compatible? Do you have the 32-bit library on PATH? Current Intel compilers include a compiled FFTW which is compatible with current conventions.
0 Kudos
Alessandro
Beginner
1,971 Views
Quoting - tim18
Did you check their documentation, or use a Microsoft tool such as dumpbin, to see whether the 32-bit library uses an obsolete ABI such as Compaq Fortran or VC6 compatible? Do you have the 32-bit library on PATH? Current Intel compilers include a compiled FFTW which is compatible with current conventions.

Could you please explain me how to check whether the 32-bit library uses an obsolet API?
The path should be configured correctly, I have two different folders for the 32-bit and 64-bit libraries, and I set the correct one in both projects.
The reason why I don't use the MKL routines for FFTW is because I was not able to make them work, do you know if there is some example code out there with Fortran calling these routines?

Thank you,
Alessandro
0 Kudos
TimP
Honored Contributor III
1,971 Views

There are several alternatives to dumpbin; it should be fairly obvious how to use any of them. If you've come this far without awareness of dumpbin, the Microsoft documentation of it is easily accessible.
If you run dumpbin /symbols on your .obj or .lib file, you should be able to see whether the spellings of the linker symbols match up. The stdcall version, obsolete for 8 years, but still favored by some, where the number of bytes of stack used in the call is appended to the linker symbol, after the @ symbol, won't work with the current cdecl system. Recompilation from source code would avoid this problem.
The MKL forum is the place to ask about that subject.
0 Kudos
Alessandro
Beginner
1,971 Views
Quoting - tim18

There are several alternatives to dumpbin; it should be fairly obvious how to use any of them. If you've come this far without awareness of dumpbin, the Microsoft documentation of it is easily accessible.
If you run dumpbin /symbols on your .obj or .lib file, you should be able to see whether the spellings of the linker symbols match up. The stdcall version, obsolete for 8 years, but still favored by some, where the number of bytes of stack used in the call is appended to the linker symbol, after the @ symbol, won't work with the current cdecl system. Recompilation from source code would avoid this problem.
The MKL forum is the place to ask about that subject.

I tried the command dumpbin /symbols, but I cannot find the spellings of the routines. Here is the output of the command, is it ok?



Microsoft COFF/PE Dumper Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.


Dump of file libfftw3-3.lib

File Type: LIBRARY

COFF SYMBOL TABLE
000 0093521E ABS notype Static | @comp.id
001 00000000 SECT2 notype External | __IMPORT_DESCRIPTOR_libfftw3-3
002 C0000040 SECT2 notype Section | .idata$2
003 00000000 SECT3 notype Static | .idata$6
004 C0000040 UNDEF notype Section | .idata$4
005 C0000040 UNDEF notype Section | .idata$5
006 00000000 UNDEF notype External | __NULL_IMPORT_DESCRIPTOR
007 00000000 UNDEF notype External | libfftw3-3_NULL_THUNK_DATA

String Table Size = 0x58 bytes

COFF SYMBOL TABLE
000 0093521E ABS notype Static | @comp.id
001 00000000 SECT2 notype External | __NULL_IMPORT_DESCRIPTOR

String Table Size = 0x1D bytes

COFF SYMBOL TABLE
000 0093521E ABS notype Static | @comp.id
001 00000000 SECT2 notype External | libfftw3-3_NULL_THUNK_DATA

String Table Size = 0x20 bytes

Summary

CC .debug$S
14 .idata$2
14 .idata$3
4 .idata$4
4 .idata$5
10 .idata$6

0 Kudos
jzz108
Beginner
1,971 Views
Dear Alessandro,

I hope you have the solution of the problem now, as I have the same problem. I did the following:
1)down the zip file form FFTW
2)lib /def:libfftw3-3.def /machine:x86
3) complile: ifort test.f libfftw3-3.lib
4) get error message: unsolved external symbol _DFFTW_EXECUTE_DFT ....

Could you give me any advice?

Thank
Quoting - Alessandro
Hi, I'm using the FFTW routines in my code (Fastest Fourier Transform in the West, www.fftw.org). They provide compiled dll for windows, so that you create your .lib file and link to your code. They provide the library both for win32 and win64. Here is my problem: I can compile my project both for win32 and win64, but when I launch the 64-bit executable everything works fine, when I try to use the 32-bit executable it always gives me the following error:

The procedure entry point DFFTW_EXECUTE_DFT could not be located in the dynamic link library libfftw3-3.dll.

I created the lib file with the command:
lib /def:libfftw3-3.def /machine:x86 for 32bit version
lib /def:libfftw3-3.def /machine:x64 for 64bit version

The source code is obviously the same, to which I link the 2 different .lib files situated in 2 different folders, and I copy the correct dll in the same folder where I put the executable. I'm working under Windows XP 64bit, with Visual Studio 2008 and Intel Fortran Compiler 11.0.074.

Could someone help me? Thank you.

0 Kudos
Reply