- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use vs2013+ivf2013 program my fortran code, The FFTW2 wrappers to Intel MKL provide the following subroutines for calling from Fortran:
call fftw_f77_create_plan(plan, n, dir, flags)
call fftw_f77(plan, howmany, in, istride, idist, out, ostride, odist)
call fftw_f77_one(plan, in, out)
call fftw_f77_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist)
call fftw_f77_threads_one(nthreads, plan, in, out)
call fftw_f77_destroy_plan(plan)
call fftwnd_f77_create_plan(plan, rank, n, dir, flags)
call fftw2d_f77_create_plan(plan, nx, ny, dir, flags)
call fftw3d_f77_create_plan(plan, nx, ny, nz, dir, flags)
call fftwnd_f77(plan, howmany, in, istride, idist, out, ostride, odist)
call fftwnd_f77_one(plan, in, out)
call fftwnd_f77_threads(nthreads, plan, howmany, in, istride, idist, out, ostride,odist)
call fftwnd_f77_threads_one(nthreads, plan, in, out)
According to the 'FFTW Interface to Intel® Math Kernel Library', just provide the method in Linux like this:make libintel64,,,Any one know how to do in windows? Anyone could tell me the detials of using above subroutines?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the similar with Windows. You may look at mklroot/interfaces\fftw2xf\ makefile --
@type <<
Usage: nmake {libia32|libintel64}
[PRECISION=MKL_DOUBLE|MKL_SINGLE]
[compiler=compiler_name]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gennady F. (Intel) wrote:Thank you very much for you reply!I know the mklroot/interfaces\fftw2xf\ makefile --the similar with Windows. You may look at mklroot/interfaces\fftw2xf\ makefile --
@type <<
Usage: nmake {libia32|libintel64}
[PRECISION=MKL_DOUBLE|MKL_SINGLE]
[compiler=compiler_name]
@type <<
Usage: nmake {libia32|libintel64}
[PRECISION=MKL_DOUBLE|MKL_SINGLE]
[compiler=compiler_name]
But I don't know what should I input in the command window!According to other's command :nmake libia32 compiler=msvs ,After compiling, I can see that lib\intel64 under MKL directory has one more lib file: fftw2xf_double_msvs.lib. Unfortunately,the test still failed.Below is my test code:
program main
integer :: N
parameter (N=5)
real in, var
real out
dimension in(N), out(N)
dimension var(N)
integer :: plan,plan2
integer :: i
do i=1,N
in(i) = i + 1
end do
call rfftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE)
call rfftw_f77_one(plan,in,var)
call rfftw_f77_destroy_plan(plan)
call rfftw_f77_create_plan(plan2,N,FFTW_BACKWARD,FFTW_ESTIMATE)
call rfftw_f77_one(plan2,var,out)
call rfftw_f77_destroy_plan(plan2)
do i=1,N
write(*,*) i,real(in(i)),real(out(i))
end do
end program main
The error message is :
error 5 error LNK2001: An external symbol that cannot be resolved _fltused Source1.obj
error 6 error LNK2001: An external symbol that cannot be resolved mainCRTStartup LINK
error 4 error LNK2019: An external symbol that cannot be resolved _RTC_CheckStackVars,该符号在函数 MAIN__ 中被引用 Source1.obj
error 1 error LNK2019: An external symbol that cannot be resolved RFFTW_F77_CREATE_PLAN,该符号在函数 MAIN__ 中被引用 Source1.obj
error 3 error LNK2019: An external symbol that cannot be resolved RFFTW_F77_DESTROY_PLAN,该符号在函数 MAIN__ 中被引用 Source1.obj
error 2 error LNK2019:An external symbol that cannot be resolved RFFTW_F77_ONE,该符号在函数 MAIN__ 中被引用 Source1.obj
error 7 fatal error LNK1120: 6 个无法解析的外部命令 x64\Debug\tiaoshifftw2.exe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
everything works on my part:
1. Building fftw2 wrappers:
cd mkl2019_root\windows\mkl\interfaces\fftw2xf\
nmake libintel64
......
rfftwnd_threads_real_to_complex.c
lib -out:"..\..\lib\intel64\fftw2xf_double_intel.lib" obj_double_intel\*.obj
Microsoft (R) Library Manager Version 14.00.24215.1
2. linking you example like as follow:
ifort /w /Fo /I"mkl_install_directory\include" test_fftw2.f /Fe_test.exe mkl_core.lib mkl_intel_lp64.lib mkl_sequential.lib fftw2xf_double_intel.lib

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page