Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • mckinlkJuly 7, 2009 10: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.

    KazikJuly 8, 2009 3:16 AM PDT
    Rate
     
    Re: Using FFTW Wrapper - fftw_plan_many_dft

    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


    mckinlkJuly 8, 2009 5:40 AM PDT
    Rate
     
    Re: Using FFTW Wrapper - fftw_plan_many_dft

    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.


    KazikJuly 8, 2009 7:36 AM PDT
    Rate
     
    Re: Using FFTW Wrapper - fftw_plan_many_dft

    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



    mckinlkJuly 8, 2009 11:45 AM PDT
    Rate
     
    Re: Using FFTW Wrapper - fftw_plan_many_dft

    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


    KazikJuly 14, 2009 11:03 AM PDT
    Rate
     
    Re: Using FFTW Wrapper - fftw_plan_many_dft

    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


Forum jump:  

Intel Software Network Forums Statistics

17,025 users have contributed to 48,319 threads and 172,758 posts to date.

In the past 24 hours, we have 11 new thread(s) 54 new posts(s), and 47 new user(s).

In the past 3 days, the most popular thread for everyone has been Optimalization of sine function\'s taylor expansion The most posts were made to Most likely, the issue is that The post with the most views is Optimalization of sine function\'s taylor expansion

Please welcome our newest member redfruit83


For more complete information about compiler optimizations, see our Optimization Notice.