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