<?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 Here's the log output when I in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168462#M28375</link>
    <description>&lt;P&gt;Here's the log output when I run that previous command with the -v (verbose) flag:&lt;/P&gt;

&lt;PRE class="brush:;"&gt; "/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr 
-m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 
-o [executable] /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtbegin.o
 -L/path/to/intel64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0 
-L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu 
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/usr/lib/llvm-5.0/bin/../lib -L/lib -L/usr/lib 
-l:libmkl_core.a -l:libmkl_intel_ilp64.a -l:libmkl_gnu_thread.a -lgomp -lpthread -lm -ldl
[objects] -lm -lstdc++ -lomp -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed
 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtend.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crtn.o&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 17:19:00 GMT</pubDate>
    <dc:creator>Taber__Andrew</dc:creator>
    <dc:date>2018-04-12T17:19:00Z</dc:date>
    <item>
      <title>Link failure with Clang</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168461#M28374</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to link MKL with the clang compiler (on Linux), and I'm using the following link-line:&lt;/P&gt;

&lt;PRE class="brush:;"&gt;clang-5.0 -std=c++17 -O3 -Wall -Wextra 
&amp;nbsp; -Wno-missing-braces -Wunreachable-code -stdlib=libstdc++ 
&amp;nbsp; -fopenmp -msse2 -msse3 -msse4 -D EIGEN_USE_MKL_VML -m64 
&amp;nbsp; -O3 -DNDEBUG -lstdc++ -fopenmp -lpthread 
&amp;nbsp; -Wl,--start-group /path/to/mkl/libmkl_intel_ilp64.a /path/to/mkl/libmkl_gnu_thread.a 
&amp;nbsp; /path/to/mkl/libmkl_core.a -Wl,--end-group -lgomp -lpthread -ldl [objects] -o [executable] -lm &lt;/PRE&gt;

&lt;P&gt;I get the following errors:&lt;/P&gt;

&lt;PRE class="brush:;"&gt;... undefined reference to `MKL_malloc'
... undefined reference to `MKL_free'
... undefined reference to `feastinit'
... undefined reference to `dfeast_sygv'&lt;/PRE&gt;

&lt;P&gt;I followed the instructions from the link advsior for the GCC compiler. This seems as if the library I provided for mkl_core is either somehow not being linked correctly or does not contain the references to "MKL_malloc" (my code has "mkl_malloc" instead, so I'm not sure why it's trying to find this different spelling).&lt;/P&gt;

&lt;P&gt;What am I missing? Thanks!&lt;/P&gt;
&lt;STYLE type="text/css"&gt;p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #fdfffe; background-color: #000000; background-color: rgba(0, 0, 0, 0.75)}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/STYLE&gt;</description>
      <pubDate>Thu, 12 Apr 2018 01:26:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168461#M28374</guid>
      <dc:creator>Taber__Andrew</dc:creator>
      <dc:date>2018-04-12T01:26:03Z</dc:date>
    </item>
    <item>
      <title>Here's the log output when I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168462#M28375</link>
      <description>&lt;P&gt;Here's the log output when I run that previous command with the -v (verbose) flag:&lt;/P&gt;

&lt;PRE class="brush:;"&gt; "/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr 
-m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 
-o [executable] /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtbegin.o
 -L/path/to/intel64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0 
-L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu 
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/usr/lib/llvm-5.0/bin/../lib -L/lib -L/usr/lib 
-l:libmkl_core.a -l:libmkl_intel_ilp64.a -l:libmkl_gnu_thread.a -lgomp -lpthread -lm -ldl
[objects] -lm -lstdc++ -lomp -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed
 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtend.o 
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crtn.o&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 17:19:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168462#M28375</guid>
      <dc:creator>Taber__Andrew</dc:creator>
      <dc:date>2018-04-12T17:19:00Z</dc:date>
    </item>
    <item>
      <title>pls try to add -DMKL_ILP64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168463#M28376</link>
      <description>&lt;P&gt;pls try to add&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;-DMKL_ILP64 option in the case if you need to link with ILP64 API&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 17:19:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168463#M28376</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2018-04-12T17:19:41Z</dc:date>
    </item>
    <item>
      <title>I added that option, but I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168464#M28377</link>
      <description>&lt;P&gt;I added that option, but I still get the same error :( thanks for catching that though.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 18:10:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168464#M28377</guid>
      <dc:creator>Taber__Andrew</dc:creator>
      <dc:date>2018-04-12T18:10:51Z</dc:date>
    </item>
    <item>
      <title>My first guess is that since</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168465#M28378</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;My first guess is that since ld is a one pass linker, you need to put the mkl libraries at the end of the link line. &amp;nbsp;Your libraries will be passed first, and tell the linker which symbols it needs to be resolved. &amp;nbsp;Then the linker will pass the intel libraries and pick out the symbols it needs.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;If you put your objects in the start-group and the end-group, then the linker will make multiple passes in trying to satisfy the symbols. &amp;nbsp;The reason MKL has this is due to possible circular dependencies between the static libraries. &amp;nbsp;This would fail in a one pass linker, unless the libraries were placed multiple times on the same link line. &amp;nbsp;For example:&lt;BR /&gt;
	libA.a libB.a libA.a&lt;BR /&gt;
	would be required to fix the circular dependency without the start-group and end-group options.&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;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 20:17:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168465#M28378</guid>
      <dc:creator>j_s</dc:creator>
      <dc:date>2018-04-12T20:17:12Z</dc:date>
    </item>
    <item>
      <title>I gave your suggestion a try,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168466#M28379</link>
      <description>&lt;P&gt;I gave your suggestion a try, by duplicating the libmkl_core.a (as well as the others), but that doesn't work. Is there a recommended linker for MKL?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 19:46:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168466#M28379</guid>
      <dc:creator>Taber__Andrew</dc:creator>
      <dc:date>2018-04-13T19:46:11Z</dc:date>
    </item>
    <item>
      <title>The linker is usually part of</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168467#M28380</link>
      <description>&lt;P&gt;The linker is usually part of the system, unless clang has its own.&amp;nbsp; I am seeing the symbols here:&lt;/P&gt;

&lt;P&gt;nm libmkl_intel_ilp64.so | grep -i malloc&lt;BR /&gt;
	00000000001b2ff0 T cblas_xerbla_malloc_error&lt;BR /&gt;
	000000000063c1d0 T fftwf_malloc&lt;BR /&gt;
	00000000006383e0 T fftw_malloc&lt;BR /&gt;
	000000000013d3e0 T mkl_malloc&lt;BR /&gt;
	000000000013d3e0 T mkl_malloc_&lt;BR /&gt;
	000000000013d3f0 T MKL_malloc&lt;BR /&gt;
	000000000013d3e0 T MKL_MALLOC&lt;BR /&gt;
	000000000013d400 T mkl_serv_iface_malloc&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;U mkl_serv_malloc&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Of course you are using the .a file instead of the .so.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 21:56:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Link-failure-with-Clang/m-p/1168467#M28380</guid>
      <dc:creator>j_s</dc:creator>
      <dc:date>2018-04-13T21:56:33Z</dc:date>
    </item>
  </channel>
</rss>

