Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
mckinlk
Total Points:
50
Status Points:
0
Green Belt
July 7, 2009 11:38 AM PDT
Using FFTW Wrapper - fftw_plan_many_dft
I was hoping someone could shed some light...

I have inherited an application which originally uses FFTW and has been compiled to work with MKL.

There are calls to fftw_plan_many_dft, and I am having difficultly on what is actually being calculated.

The call is the following:

fftw_plan_many_dft(rank, *n, howmany, inembed, istride, idist, onembed, ostride, odist, sign)

rank = 1 (1D FFT)
*n = n[0] = 4096
howmany = 64
inembed = onembed = NULL (default to n[0])
istride = ostride = 64
idist = odist = 1
sign = 1 or -1 (INVERSE or FORWARD)

What confuses me is the stride != 1, any help would be greatly appreciated.
Kazik
Total Points:
150
Status Points:
100
Green Belt
July 8, 2009 4:16 AM PDT
Rate
 
#1
Hi mckinlk,
unfortunately I cannot answer your question but maybe you could help me.
I'm also struggling with the FFTW wrapper library. Please, tell me is there any specific way you link your program? Or do you include some specific libraries (apart from #include "fftw3.h" directly in your code of course)? Or is it only
icpc Project.cpp -lfftw3
?
I would be very grateful for any comments. Now, I'm not sure if the "installation" of the wrapper library went wrong or is there some other reason (using standard g++ compiler with "pure" FFTW everything works perfect).
Thank you and I'm sorry I cannot help you.
--
Kind regards,
Kazik


mckinlk
Total Points:
50
Status Points:
0
Green Belt
July 8, 2009 6:40 AM PDT
Rate
 
#2 Reply to #1
Quoting - Kazik
Hi mckinlk,
unfortunately I cannot answer your question but maybe you could help me.
I'm also struggling with the FFTW wrapper library. Please, tell me is there any specific way you link your program? Or do you include some specific libraries (apart from #include "fftw3.h" directly in your code of course)? Or is it only
icpc Project.cpp -lfftw3
?
I would be very grateful for any comments. Now, I'm not sure if the "installation" of the wrapper library went wrong or is there some other reason (using standard g++ compiler with "pure" FFTW everything works perfect).
Thank you and I'm sorry I cannot help you.
--
Kind regards,
Kazik

When I compile for MKL, I have the following in my Makefile

LIB_DIRS += -L/opt/intel/mkl/$(MKL_VER)/lib/$(MKL_ARCH)
INC_DIRS += -I/opt/intel/mkl/$(MKL_VER)/include
INC_DIRS += -I/opt/intel/mkl/$(MKL_VER)/include/fftw
LIB_FILES += -lpthread -lfftw3xc_intel -lmkl -lm

My include remains as #include <fftw3.h> but due to the new directory paths, it gets pointed to the Intel wrapper header.


Kazik
Total Points:
150
Status Points:
100
Green Belt
July 8, 2009 8:36 AM PDT
Rate
 
#3 Reply to #2
Quoting - mckinlk
When I compile for MKL, I have the following in my Makefile

LIB_DIRS += -L/opt/intel/mkl/$(MKL_VER)/lib/$(MKL_ARCH)
INC_DIRS += -I/opt/intel/mkl/$(MKL_VER)/include
INC_DIRS += -I/opt/intel/mkl/$(MKL_VER)/include/fftw
LIB_FILES += -lpthread -lfftw3xc_intel -lmkl -lm

My include remains as #include <fftw3.h> but due to the new directory paths, it gets pointed to the Intel wrapper header.

Thank you man,
I have nearly the same makefile. The only difference is that I have
LIB_FILES += -lfftw3 -lmkl -lm
but even when I've change into
-lfftw3xc_intel, still didn't work. I have something like this:
-------------------------------------------------------------------------------------------------
icpc -m64 -O3 -openmp -parallel FFT.cpp -L/local/intel/Compiler/11.0/081/mkl/lib/em64t -I. -I/local/intel/Compiler
/11.0/081/mkl/include -I/local/intel/Compiler/11.0/081/mkl/include/fftw -lfftw3xc_intel -lmkl -lm

FFT.cpp(32): error: identifier "FFTW_IN_PLACE" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(32): error: identifier "FFTW_USE_WISDOM" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(32): error: identifier "fftw_create_plan" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(46): error: expression must have class type
in[i].re = real(fu_in[i]);
^
FFT.cpp(47): error: expression must have class type
in[i].im = imag(fu_in[i]);
^
FFT.cpp(49): error: identifier "fftw_one" is undefined
fftw_one(pl_forward, in, out);
^
FFT.cpp(53): error: expression must have class type
out_re_robo[i] = out[i].re;
^
FFT.cpp(54): error: expression must have class type
out_im_robo[i] = out[i].im;
^
compilation aborted for FFT.cpp (code 2)
make: *** [FFT] Error 2
-------------------------------------------------------------------------------------------------

Thank you for your help.
Still, any ideas would be greatly appreciated.
--
Kind regards,
Kazik



mckinlk
Total Points:
50
Status Points:
0
Green Belt
July 8, 2009 12:45 PM PDT
Rate
 
#4 Reply to #3
Quoting - Kazik

Thank you man,
I have nearly the same makefile. The only difference is that I have
LIB_FILES += -lfftw3 -lmkl -lm
but even when I've change into
-lfftw3xc_intel, still didn't work. I have something like this:
-------------------------------------------------------------------------------------------------
icpc -m64 -O3 -openmp -parallel FFT.cpp -L/local/intel/Compiler/11.0/081/mkl/lib/em64t -I. -I/local/intel/Compiler
/11.0/081/mkl/include -I/local/intel/Compiler/11.0/081/mkl/include/fftw -lfftw3xc_intel -lmkl -lm

FFT.cpp(32): error: identifier "FFTW_IN_PLACE" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(32): error: identifier "FFTW_USE_WISDOM" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(32): error: identifier "fftw_create_plan" is undefined
p=fftw_create_plan(M, FFTW_FORWARD,  FFTW_MEASURE | FFTW_IN_PLACE | FFTW_USE_WISDOM);
^
FFT.cpp(46): error: expression must have class type
in[i].re = real(fu_in[i]);
^
FFT.cpp(47): error: expression must have class type
in[i].im = imag(fu_in[i]);
^
FFT.cpp(49): error: identifier "fftw_one" is undefined
fftw_one(pl_forward, in, out);
^
FFT.cpp(53): error: expression must have class type
out_re_robo[i] = out[i].re;
^
FFT.cpp(54): error: expression must have class type
out_im_robo[i] = out[i].im;
^
compilation aborted for FFT.cpp (code 2)
make: *** [FFT] Error 2
-------------------------------------------------------------------------------------------------

Thank you for your help.
Still, any ideas would be greatly appreciated.
--
Kind regards,
Kazik

You might want to ensure the version of FFTW you started out with is compatible with the MKL wrapper, you seem to have several function prototypes that I do not see in my fftw3.h

I am using fftw-3.1.2 and MKL version 10.1.1.019


Kazik
Total Points:
150
Status Points:
100
Green Belt
July 14, 2009 12:03 PM PDT
Rate
 
#5 Reply to #4
Quoting - mckinlk
You might want to ensure the version of FFTW you started out with is compatible with the MKL wrapper, you seem to have several function prototypes that I do not see in my fftw3.h

I am using fftw-3.1.2 and MKL version 10.1.1.019

Thank you,
that was the crucial hint. Indeed, I was using in my code some FFTW1 functions (I thought they will be automatically supported by the FFTW3) and tried to compile with FFTW3 library.. No comment about that.. Anyway, now it's working perfectly. Thanks once more.
--
Kind regards,
Kazik




Intel Software Network Forums Statistics

8439 users have contributed to 31542 threads and 100364 posts to date.
In the past 24 hours, we have 11 new thread(s) 33 new posts(s), and 45 new user(s).

In the past 3 days, the most popular thread for everyone has been /fpp interferes with breakpoints/stepping through code - again The most posts were made to IVF 11.1.051 freezes during build The post with the most views is Quoting - dannycat When I

Please welcome our newest member obi_1