<?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 Statically linking to MKL 2017.3 on GCC 5.4.0 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Statically-linking-to-MKL-2017-3-on-GCC-5-4-0/m-p/1151960#M27212</link>
    <description>&lt;P&gt;&lt;BR /&gt;
	Hi there, I am trying to statically link my library to MKL 2017.3 (using Intel OpenMP for threading), under GCC 5.4.0, on Ubuntu. So according to the link line advisor, I need to link with libmkl_core, libmkl_intel_thread, libmkl_intel_lp64, and libiomp5. I'm finding that when I try to link with libiomp5.a, (and all the others *.a) I get the following linker error:&lt;/P&gt;

&lt;P&gt;/usr/bin/ld: libXXX.so: version node not found for symbol omp_set_nest_lock@OMP_3.0&lt;BR /&gt;
	/usr/bin/ld: failed to set dynamic section sizes: Bad value&lt;BR /&gt;
	collect2: error: ld returned 1 exit status&lt;/P&gt;

&lt;P&gt;[I replaced my library name with XXX]&lt;/P&gt;

&lt;P&gt;When I change the configuration to link with libiomp5.so (and the rest still *.a) my program builds successfully (I have not yet tried to run it, for unrelated reasons). Can anyone explain to me what the above error means? I assumed it was due to the symbol omp_set_nest_lock@OMP_3.0 not being defined, but I checked libiomp5.a with the 'nm' command-line tool and the symbol does appear to be defined there. I'm reasonably confident that the linker is finding all the libraries.&lt;/P&gt;

&lt;P&gt;In general, is it valid to link statically with libiomp5? I would have assumed so, since libiomp5.a is provided. I have also successfully linked my library to MKL statically on Windows and Mac, so I assumed it would be possible on Linux also.&lt;/P&gt;

&lt;P&gt;Any help would be much appreciated. Let me know if you need more information. I've done very little development for non-Windows platforms, so hopefully I haven't omitted anything important.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2017 06:25:53 GMT</pubDate>
    <dc:creator>Andrew_W_1</dc:creator>
    <dc:date>2017-07-21T06:25:53Z</dc:date>
    <item>
      <title>Statically linking to MKL 2017.3 on GCC 5.4.0</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Statically-linking-to-MKL-2017-3-on-GCC-5-4-0/m-p/1151960#M27212</link>
      <description>&lt;P&gt;&lt;BR /&gt;
	Hi there, I am trying to statically link my library to MKL 2017.3 (using Intel OpenMP for threading), under GCC 5.4.0, on Ubuntu. So according to the link line advisor, I need to link with libmkl_core, libmkl_intel_thread, libmkl_intel_lp64, and libiomp5. I'm finding that when I try to link with libiomp5.a, (and all the others *.a) I get the following linker error:&lt;/P&gt;

&lt;P&gt;/usr/bin/ld: libXXX.so: version node not found for symbol omp_set_nest_lock@OMP_3.0&lt;BR /&gt;
	/usr/bin/ld: failed to set dynamic section sizes: Bad value&lt;BR /&gt;
	collect2: error: ld returned 1 exit status&lt;/P&gt;

&lt;P&gt;[I replaced my library name with XXX]&lt;/P&gt;

&lt;P&gt;When I change the configuration to link with libiomp5.so (and the rest still *.a) my program builds successfully (I have not yet tried to run it, for unrelated reasons). Can anyone explain to me what the above error means? I assumed it was due to the symbol omp_set_nest_lock@OMP_3.0 not being defined, but I checked libiomp5.a with the 'nm' command-line tool and the symbol does appear to be defined there. I'm reasonably confident that the linker is finding all the libraries.&lt;/P&gt;

&lt;P&gt;In general, is it valid to link statically with libiomp5? I would have assumed so, since libiomp5.a is provided. I have also successfully linked my library to MKL statically on Windows and Mac, so I assumed it would be possible on Linux also.&lt;/P&gt;

&lt;P&gt;Any help would be much appreciated. Let me know if you need more information. I've done very little development for non-Windows platforms, so hopefully I haven't omitted anything important.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 06:25:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Statically-linking-to-MKL-2017-3-on-GCC-5-4-0/m-p/1151960#M27212</guid>
      <dc:creator>Andrew_W_1</dc:creator>
      <dc:date>2017-07-21T06:25:53Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Statically-linking-to-MKL-2017-3-on-GCC-5-4-0/m-p/1151961#M27213</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt;

&lt;P&gt;thank you for your report.&amp;nbsp; As i recalled, the issue in openmp should be resolved in latest version.&lt;/P&gt;

&lt;P&gt;I&amp;nbsp; try 2018 beta&amp;nbsp; with latest &amp;nbsp; gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12)&lt;/P&gt;

&lt;P&gt;&lt;A href="mailto:yhu5@kbl01-ub:~/eigen$"&gt;yhu5@kbl01-ub:~/eigen$&lt;/A&gt; g++ -I./eigen3 GEMM.cpp -L/opt/intel/compilers_and_libraries_2018.0.098/linux/mkl/lib/intel64&amp;nbsp; -Wl,--start-group /opt/intel/compilers_and_libraries_2018.0.098/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/compilers_and_libraries_2018.0.098/linux/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/compilers_and_libraries_2018.0.098/linux/mkl/lib/intel64/libmkl_core.a -Wl,--end-group /opt/intel/compilers_and_libraries_2018.0.098/linux/compiler/lib/intel64/libiomp5.a -shared -o gemm -std=c++11 -fPIC -lpthread -ldl&lt;/P&gt;

&lt;P&gt;Seem&amp;nbsp;it&amp;nbsp;works fine.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;

&lt;P&gt;If with 2017 update 3, where MKL version is 2017 update 2.&amp;nbsp; get similar error&lt;/P&gt;

&lt;P&gt;&lt;A href="mailto:yhu5@kbl01-ub:~/eigen$"&gt;yhu5@kbl01-ub:~/eigen$&lt;/A&gt; g++ -I./eigen3 GEMM.cpp -Wl,--start-group /opt/intel/compilers_and_libraries_2017.3.191/linux/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/compilers_and_libraries_2017.3.191/linux/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/compilers_and_libraries_2017.3.191/linux/mkl/lib/intel64/libmkl_core.a -Wl,--end-group /opt/intel/compilers_and_libraries_2017.3.191/linux/compiler/lib/intel64/libiomp5.a -shared -fPIC -o gemm -lpthread -ldl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /usr/bin/ld: gemm: version node not found for symbol &lt;A href="mailto:omp_get_wtime@OMP_2.0"&gt;omp_get_wtime@OMP_2.0&lt;/A&gt;&lt;BR /&gt;
	/usr/bin/ld: failed to set dynamic section sizes: Bad value&lt;BR /&gt;
	collect2: error: ld returned 1 exit status&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 08:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Statically-linking-to-MKL-2017-3-on-GCC-5-4-0/m-p/1151961#M27213</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2017-07-24T08:20:00Z</dc:date>
    </item>
  </channel>
</rss>

