Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

undefined reference to `fftw_create_plan'

Alexey1978
New Contributor I
2,247 Views

Hi,

I've read a lot of similar problems, but still cannot resolve it.

QT 5.15 + MinGW 8.1.0 + Windows 10

 

fftw_plan my_plan;
    double Scale;
    fftw_complex* x_in;
x_in = (fftw_complex*)fftw_malloc(2*m_nR*sizeof(double));
my_plan = fftw_create_plan(m_nR, FFTW_FORWARD, FFTW_ESTIMATE );


In last line I have "undefined reference to `fftw_create_plan'". I think that I cannot create library fft in win 10. There is makefile wich do not work with minGW.

 

How can I use mkl fft library?

Libraries

LIBS += -L'C:/Program Files (x86)/Intel/oneAPI/mkl/2021.1.1/redist/intel64'\
-llibimalloc
LIBS += -L'C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\redist\intel64_win\compiler'\
-llibiomp5md
LIBS += -L'C:/Program Files (x86)/Intel/oneAPI/mkl/2021.1.1/redist/intel64'\
-lmkl_cdft_core_dll -lmkl_intel_ilp64_dll -lmkl_sequential_dll -lmkl_blacs_lp64_dll -lmkl_blacs_ilp64_dll -lm -lstdc++

 

Thanks a lot.

 

0 Kudos
1 Solution
Alexey1978
New Contributor I
2,190 Views

Rajesh, thank you for you reply.

The mentioned examples cause the same problem in both MinGW 64 and MSVC 64. I think the problem is in follows:

In mkl folder there is no one precompiled interfaces (.dll) for fast fourier like fftw2c,... (I mean redist folder)  in comparison to parsido ans other packages. 

 

May be I've missed some libraries when writing LIBS section.

 

Thanks a lot.

 

View solution in original post

0 Kudos
6 Replies
MRajesh_intel
Moderator
2,202 Views

Hi,

 

You may refer to the MKL FFT samples in the path below:

C:\Program Files (x86)\Intel\oneAPI\mkl\latest\examples and extract examples_core_c.zip.

 

After extracting, locate fft2w folder and refer to the makefile provided (For the flags to be included). We tried with the ICL compiler and we were able to compile without any issues.

 

Thanks,

Rajesh

0 Kudos
Alexey1978
New Contributor I
2,191 Views

Rajesh, thank you for you reply.

The mentioned examples cause the same problem in both MinGW 64 and MSVC 64. I think the problem is in follows:

In mkl folder there is no one precompiled interfaces (.dll) for fast fourier like fftw2c,... (I mean redist folder)  in comparison to parsido ans other packages. 

 

May be I've missed some libraries when writing LIBS section.

 

Thanks a lot.

 

0 Kudos
Alexey1978
New Contributor I
2,178 Views

So, finally I've solved the problem. 

I've compiled makefile using nmake with msvs compiler and have generated fftw2xc_double_msvs.lib 

nmake LIB compiler=msvs PRECISION=MKL_DOUBLE

So, it works only in MSVC, but not in MinGW.

0 Kudos
MRajesh_intel
Moderator
2,134 Views

Hi,


Since you have accepted your solution, can we proceed to close this thread?


Please let us know if you face any issues.


Regards

Rajesh.


0 Kudos
Alexey1978
New Contributor I
2,121 Views
0 Kudos
MRajesh_intel
Moderator
2,105 Views

Hi,

Thanks for the confirmation!

As this issue has been resolved, we will no longer respond to this thread.

If you require any additional assistance from Intel, please start a new thread.

Any further interaction in this thread will be considered community only.

Have a Good day.

Regards

Rajesh


0 Kudos
Reply