<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thanks a lot. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129712#M25532</link>
    <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;

&lt;P&gt;Using the &lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;MKL link line advisor (&lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/" style="font-size: 12px;"&gt;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/&lt;/A&gt;&lt;SPAN style="font-size: 12px;"&gt;) I found&amp;nbsp;&lt;/SPAN&gt;I missed two &amp;nbsp;librarie.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Now it works.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2017 17:05:47 GMT</pubDate>
    <dc:creator>likeyou</dc:creator>
    <dc:date>2017-09-26T17:05:47Z</dc:date>
    <item>
      <title>MKL FFTW3 interface problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129710#M25530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am not a expert of Makefile and need help.&lt;/P&gt;

&lt;P&gt;I am trying to use MKL FFTW3.x to do image 2dFFT.&lt;/P&gt;

&lt;P&gt;1. I followed the following instruction to build a FFTW3 wrapper:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/mkl-developer-reference-c-building-your-own-fftw3-interface-wrapper-library" target="_blank"&gt;https://software.intel.com/en-us/mkl-developer-reference-c-building-your-own-fftw3-interface-wrapper-library&lt;/A&gt;&lt;/P&gt;

&lt;PRE class="brush:;" style="box-sizing: border-box; margin-top: 1.6em; margin-bottom: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; line-height: 1.6em; white-space: pre-wrap; background-color: rgb(245, 245, 245); clear: both; color: rgb(102, 102, 102);"&gt;cd interfaces/fftw3xc
make libintel64 compiler=gnu INSTALL_DIR=/my/path&lt;/PRE&gt;

&lt;P&gt;2. In my code I add the header files according to the&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-c-building-an-application-with-fftw3-interface-wrappers.&lt;/P&gt;

&lt;P&gt;#include "fftw3.h"&lt;/P&gt;

&lt;P&gt;#include "fftw3_mkl.h"&lt;BR /&gt;
	#include "mkl_service.h"&lt;/P&gt;

&lt;P&gt;3, I give the path for the header files and the library in the Makefile.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Below is the content:&lt;/P&gt;

&lt;P&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;

&lt;PRE class="brush:;"&gt;fti2 := $(shell echo ${HOME})/bin/MKLfftw3/include
fftl := $(shell echo ${HOME})/bin/MKLfftw3
all:
        g++ `Magick++-config --cxxflags --cppflags` -O2 -o main main.cpp \
        `Magick++-config --ldflags --libs` -lm -lfftw3xc_gnu -I${ffti2} -L${fftl} -lfftw3xc_gnu  -g -Wall

run:
        ./main ../inputs/

clean:
        rm -f -r main&lt;/PRE&gt;

&lt;P style="font-size: 13.008px;"&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Below is the result of make all.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I found the "'&lt;STRONG&gt;MKL_free&lt;/STRONG&gt;" &amp;nbsp;is in the&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp;"mkl_service.h" file.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Though I add its path in the makefile, compiler still cannot find "&lt;STRONG&gt;MKL_free&lt;/STRONG&gt;".&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Did I miss something?&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Any hint will be appreciated!&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Below is the result of make all.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;make all&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:;"&gt;g++ `Magick++-config --cxxflags --cppflags` -O2 -o main main.cpp \
        `Magick++-config --ldflags --libs` -lm -lfftw3xc_gnu -I/home/bin/MKLfftw3/include  -L/home/bin/MKLfftw3 -lfftw3xc_gnu  -g -Wall
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_free.o): In function `fftwf_free':
fftwf_free.c:(.text+0x14): undefined reference to `&lt;STRONG&gt;MKL_free&lt;/STRONG&gt;'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_malloc.o): In function `fftwf_malloc':
fftwf_malloc.c:(.text+0x1c): undefined reference to `MKL_malloc'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_plan_guru64_dft.o): In function `fftwf_plan_guru64_dft':
fftwf_plan_guru64_dft.c:(.text+0x288): undefined reference to `DftiCreateDescriptor_s_1d'
fftwf_plan_guru64_dft.c:(.text+0x2b3): undefined reference to `DftiCreateDescriptor_s_md'
fftwf_plan_guru64_dft.c:(.text+0x2e5): undefined reference to `DftiCreateDescriptor_s_1d'
fftwf_plan_guru64_dft.c:(.text+0x310): undefined reference to `DftiCreateDescriptor_s_md'
fftwf_plan_guru64_dft.c:(.text+0x335): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x369): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x38e): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x3ba): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x3df): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x582): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x5a7): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x5d0): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x5f5): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x6aa): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x6cf): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x6fb): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x720): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x74c): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x771): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x7a9): undefined reference to `DftiSetValue'
fftwf_plan_guru64_dft.c:(.text+0x7ce): undefined reference to `DftiErrorClass'
fftwf_plan_guru64_dft.c:(.text+0x7e5): undefined reference to `DftiCommitDescriptor'
fftwf_plan_guru64_dft.c:(.text+0x80a): undefined reference to `DftiErrorClass'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_plan_guru64_dft.o): In function `execute_fi':
fftwf_plan_guru64_dft.c:(.text+0x8a9): undefined reference to `DftiComputeForward'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_plan_guru64_dft.o): In function `execute_bi':
fftwf_plan_guru64_dft.c:(.text+0x8d7): undefined reference to `DftiComputeBackward'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_plan_guru64_dft.o): In function `execute_fo':
fftwf_plan_guru64_dft.c:(.text+0x90d): undefined reference to `DftiComputeForward'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftwf_plan_guru64_dft.o): In function `execute_bo':
fftwf_plan_guru64_dft.c:(.text+0x943): undefined reference to `DftiComputeBackward'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftw_version.o): In function `delete_plan':
fftw_version.c:(.text+0x7e): undefined reference to `DftiFreeDescriptor'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftw_free.o): In function `fftw_free':
fftw_free.c:(.text+0x14): undefined reference to `MKL_free'
/home/bin/MKLfftw3/libfftw3xc_gnu.a(fftw_malloc.o): In function `fftw_malloc':
fftw_malloc.c:(.text+0x1c): undefined reference to `MKL_malloc'
collect2: error: ld returned 1 exit status
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 1
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2017 00:13:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129710#M25530</guid>
      <dc:creator>likeyou</dc:creator>
      <dc:date>2017-09-23T00:13:27Z</dc:date>
    </item>
    <item>
      <title>Including a header file in a</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129711#M25531</link>
      <description>&lt;P&gt;Including a header file in a C/C++ source file provides information for the compiler regarding external functions. This information is usually about the order, number and types of the arguments. The header file may also provide definitions for some macros, and some data items.&lt;/P&gt;

&lt;P&gt;However, at link time you have to supply the name of the library (static or shared) that contains the object code for those external functions. Some compilers, especially on Windows, provide directives such as&lt;STRONG&gt; includelib&lt;/STRONG&gt; that cause the compiler to embed information regarding the libraries (which are to be used at link time) in the object file. Failing this, you have to add the library name explicitly using the usual -l option. See the MKL link line advisor (https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/) for specific information on which libraries to include.&lt;/P&gt;

&lt;P&gt;If you are going to be using Make, it is definitely worthwhile for you spend the time to read the Make documentation.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2017 16:53:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129711#M25531</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-09-23T16:53:00Z</dc:date>
    </item>
    <item>
      <title>Thanks a lot.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129712#M25532</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;

&lt;P&gt;Using the &lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;MKL link line advisor (&lt;/SPAN&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/" style="font-size: 12px;"&gt;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/&lt;/A&gt;&lt;SPAN style="font-size: 12px;"&gt;) I found&amp;nbsp;&lt;/SPAN&gt;I missed two &amp;nbsp;librarie.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Now it works.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 17:05:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFTW3-interface-problem/m-p/1129712#M25532</guid>
      <dc:creator>likeyou</dc:creator>
      <dc:date>2017-09-26T17:05:47Z</dc:date>
    </item>
  </channel>
</rss>

