<?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 Can't build custom MKL on Linux, prof edition 11.1 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901357#M11284</link>
    <description>&lt;P&gt;I wasn't suggesting duplicating it, that would make no sense (as you say). Just that the makefile should contain the correct path to wherever libiomp5.so is. Making users run a shell script just makes it harder to do a custom build. Anyway, I submitted a patch to the makefile, you can use it if you want.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2010 11:40:11 GMT</pubDate>
    <dc:creator>gary-oberbrunner</dc:creator>
    <dc:date>2010-02-05T11:40:11Z</dc:date>
    <item>
      <title>Can't build custom MKL on Linux, prof edition 11.1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901355#M11282</link>
      <description>I get the following error when building a custom MKL on Linux (RedHat 4) with compiler Professional Edition 11.1.064. The makefile seems to be missing a -L directive to find libiomp5. Any suggestions?&lt;BR /&gt;
&lt;PRE&gt;[bash]&lt;PRE name="code" class="bash"&gt;% make em64t name=foo_mkl&lt;BR /&gt;export LIBRARY_PATH=:; \&lt;BR /&gt;gcc -shared -Bdynamic \&lt;BR /&gt; -u dgemm_ -u ddot_ -u dgetrf_ \&lt;BR /&gt;-Wl,--start-group \&lt;BR /&gt;"/opt/intel/Compiler/11.1/064/mkl//lib/em64t/libmkl_intel_lp64.a" \&lt;BR /&gt;"/opt/intel/Compiler/11.1/064/mkl//lib/em64t/libmkl_intel_thread.a" \&lt;BR /&gt;"/opt/intel/Compiler/11.1/064/mkl//lib/em64t/libmkl_core.a" \&lt;BR /&gt;-Wl,--end-group \&lt;BR /&gt;-L"/opt/intel/Compiler/11.1/064/mkl//lib/em64t" -liomp5 -lm \&lt;BR /&gt;-o "foo_mkl.so"&lt;BR /&gt;/usr/bin/ld: cannot find -liomp5&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;make: *** [em64t] Error 1&lt;BR /&gt;[/bash]&lt;/PRE&gt;
&lt;/PRE&gt;
&lt;P&gt;This patch fixes it for me:&lt;/P&gt;
&lt;P&gt;
&lt;PRE&gt;[bash][garyo@smoke4-64 builder]$ diff -u makefile.~1~ makefile
--- makefile.~1~        2009-11-19 08:19:15.000000000 -0500
+++ makefile    2010-02-04 09:33:35.000000000 -0500
@@ -78,6 +78,9 @@
 mklem64t_libpath=$(MKLROOT)/lib/em64t
 mkl64_libpath=$(MKLROOT)/lib/64

+iomp5_ia32_libpath=$(MKLROOT)/../lib/ia32
+iomp5_em64t_libpath=$(MKLROOT)/../lib/intel64
+
 ##------------------------------------------------------------------------------
 ## No changes below this line !
 ##------------------------------------------------------------------------------
@@ -136,7 +139,7 @@
        "$(mkl32_libpath)/$(THREADING_LIB)" \
        "$(mkl32_libpath)/$(CORE_LIB)" \
        -Wl,--end-group \
-       -L"$(mkl32_libpath)" $(OMP_LIB) $(LIBM) \
+       -L"$(mkl32_libpath)" -L"$(iomp5_ia32_libpath)" $(OMP_LIB) $(LIBM) \
        -o "$(name).so"

 em64t:
@@ -148,7 +151,7 @@
        "$(mklem64t_libpath)/$(THREADING_LIB)" \
        "$(mklem64t_libpath)/$(CORE_LIB)" \
        -Wl,--end-group \
-       -L"$(mklem64t_libpath)" $(OMP_LIB) $(LIBM) \
+       -L"$(mklem64t_libpath)" -L"$(iomp5_em64t_libpath)" $(OMP_LIB) $(LIBM) \
        -o "$(name).so"

 ipf ia64:
[/bash]&lt;/PRE&gt;
&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2010 14:27:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901355#M11282</guid>
      <dc:creator>gary-oberbrunner</dc:creator>
      <dc:date>2010-02-04T14:27:44Z</dc:date>
    </item>
    <item>
      <title>Can't build custom MKL on Linux, prof edition 11.1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901356#M11283</link>
      <description>&lt;P&gt;&lt;I&gt;&lt;B&gt; The makefile seems to be missing a -L directive to find libiomp5. Any suggestions?&lt;/B&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;DIV id="_mcePaste"&gt;The openmp threading library "libiomp5" is located into Compiler's directory ( for example see into ../Compiler/11.1/064/lib/intel64" folder for 64 bit version ).So, you have to set paths to this folder.&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;the best way to do that - to launch "iccvars.sh intel64" from../Compiler/11.1/064/bin folder.&lt;/P&gt;
&lt;P&gt;The reason why libiomp has been stored into another place ( if we look at the stanalone version on MKL we can find libiom5* binaries into &lt;MKLROOT&gt;/lib/em64t ) is that all CPE components like IPP, MKL and compiler itself are using this library.&lt;/MKLROOT&gt;&lt;/P&gt;
&lt;P&gt;So there are no sense to have several duplicates&lt;/P&gt;
&lt;P&gt;--Gennady&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2010 09:06:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901356#M11283</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-02-05T09:06:24Z</dc:date>
    </item>
    <item>
      <title>Can't build custom MKL on Linux, prof edition 11.1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901357#M11284</link>
      <description>&lt;P&gt;I wasn't suggesting duplicating it, that would make no sense (as you say). Just that the makefile should contain the correct path to wherever libiomp5.so is. Making users run a shell script just makes it harder to do a custom build. Anyway, I submitted a patch to the makefile, you can use it if you want.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2010 11:40:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-build-custom-MKL-on-Linux-prof-edition-11-1/m-p/901357#M11284</guid>
      <dc:creator>gary-oberbrunner</dc:creator>
      <dc:date>2010-02-05T11:40:11Z</dc:date>
    </item>
  </channel>
</rss>

