<?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 Re: Problem with dynamic linking to mkl_cfg_file in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878850#M9304</link>
    <description>So I have upgraded to MKL V10, and things seem better, but I still seem to be missing symbols. For example, at dynamic link time I get the message:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;(my program): symbol lookup error: /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.so: undefined symbol: mkl_lapack_sgeqrf&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;Yet, nm tells me that the symbol mkl_lapack_sgeqrf is defined in the Text section of the object libmkl_sequential.so, and I have the library libmkl_sequential.so in my list of .so's for the dynamic linker to search. &lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;P&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 14 Dec 2007 23:38:15 GMT</pubDate>
    <dc:creator>PhilN</dc:creator>
    <dc:date>2007-12-14T23:38:15Z</dc:date>
    <item>
      <title>Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878848#M9302</link>
      <description>We are using the Clearspeed accelerators, which dynamically link to MKL routines. We encounter a the error:&lt;BR /&gt;
&lt;BR /&gt;&lt;SPAN&gt;
(our executable): symbol lookup error: /usr/local/intel/mkl/9.0/lib/em64t/libmkl_lapack32.so: undefined symbol: mkl_cfg_file&lt;/SPAN&gt;&lt;BR /&gt;
&lt;BR /&gt;
We have tried to give the Clearspeed libraries the proper environment
variable with a list of .so files to search, including
/usr/local/intel/mkl/libmkl_def.so, which seems to define mkl_cfg_file,
according to nm. But no luck.&lt;BR /&gt;
&lt;BR /&gt;
Do you have any idea why libmkl_lapack32.so wouldn't be satisfied with the mkl_cfg_file found in libmkl_def.so? Or any other suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
P</description>
      <pubDate>Thu, 13 Dec 2007 00:23:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878848#M9302</guid>
      <dc:creator>PhilN</dc:creator>
      <dc:date>2007-12-13T00:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878849#M9303</link>
      <description>mkl_lapack depends on the "core" MKL library (actually so named only in MKL 10). That would be the one from the same /em64t/ directory as the lapack. If you tried to use a 32-bit library, or one from an earlier MKL, that could account for missing references.&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Dec 2007 15:09:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878849#M9303</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-12-13T15:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878850#M9304</link>
      <description>So I have upgraded to MKL V10, and things seem better, but I still seem to be missing symbols. For example, at dynamic link time I get the message:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;(my program): symbol lookup error: /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.so: undefined symbol: mkl_lapack_sgeqrf&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;Yet, nm tells me that the symbol mkl_lapack_sgeqrf is defined in the Text section of the object libmkl_sequential.so, and I have the library libmkl_sequential.so in my list of .so's for the dynamic linker to search. &lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;P&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Dec 2007 23:38:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878850#M9304</guid>
      <dc:creator>PhilN</dc:creator>
      <dc:date>2007-12-14T23:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878851#M9305</link>
      <description>It seems more likely that this should be an undefined symbol in the lp64 library, which should be defined in another library, e.g. mkl_core. As far as I know, the function of lp64 is to define entry points with 32-bit integer arguments, and the effect of sequential is to stub out OpenMP multithreading from MKL libraries. Hope I didn't mangle the working too much.&lt;BR /&gt;</description>
      <pubDate>Sat, 15 Dec 2007 00:59:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878851#M9305</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-12-15T00:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878852#M9306</link>
      <description>I encountered the same problem on 32-bit linux when using a custom-built .SO file. I tracked it down to a bug in the makefile (/tools/builder/makefile), where the lapack routines are apparently not included with everything else:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;FONT size="2" face="Courier New"&gt;ia32:&lt;BR /&gt;
 gcc -shared -Bdynamic $(func_list) &lt;BR /&gt;
 $(xerbla) $(mkl32_libpath)/libmkl_intel.a $(mkl32_libpath)/$(THREADING_LIB) &lt;BR /&gt;
 $(mkl32_libpath)/$(CORE_LIB) -L$(mkl32_libpath) -lguide -o $(name).so&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;should really have &lt;/FONT&gt;&lt;FONT size="3"&gt;&lt;FONT size="2" face="Courier New"&gt;$(mkl32_libpath)/libmkl_lapack.a&lt;/FONT&gt; in there also, so the last line becomes&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="3"&gt;&lt;BR /&gt;
&lt;FONT size="2" face="Courier New"&gt; $(mkl32_libpath)/$(CORE_LIB) $(mkl32_libpath)/libmkl_lapack.a -L$(mkl32_libpath) -lguide -o $(name).so&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;when I rebuild my .SO file with this modified makefile, then everything works.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Gabriel&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Sep 2008 19:44:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878852#M9306</guid>
      <dc:creator>Gabriel_R_</dc:creator>
      <dc:date>2008-09-23T19:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878853#M9307</link>
      <description>&lt;P&gt;You may have been lucky. If you failed to link your lapack dependencies from mkl_core library the first time, it's because there are circular references, which can be resolved by surrounding the core and threading library pair with -Wl,--begin-group .... -Wl,--end-group as documented in the instructions for use of .a libraries. Otherwise, you can resolve it by repeating the libraries (usually 3 times) in correct order. If the sample script still shows the use of .a libraries to build a .so without showing the -group directives, that is a bug. Note that there was an update of MKL released today.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2008 23:32:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878853#M9307</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-09-23T23:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dynamic linking to mkl_cfg_file</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878854#M9308</link>
      <description>&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Hello Phil,&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;As Tim recommended, for linking your application on Linux with MKL libraries you have to surround the core and treading libraries &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;-Wl,--begin-group .... -Wl,--end-group as documented in userguide manual ( see $MKLROOT/Doc/ folder ).&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;For example, &lt;SPAN&gt;&lt;/SPAN&gt;for static linking lapack functionality for em64t, you can use the following example:&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;ifort&lt;SPAN&gt; &lt;/SPAN&gt;-w test_lapack.f /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_lp64.a -Wl,--start-group /opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_intel_thread.a&lt;SPAN&gt; &lt;/SPAN&gt;/opt/intel/mkl/10.0.1.014/lib/em64t/libmkl_core.a -Wl,--end-group -L/opt/intel/mkl/10.0.1.014/lib/em64t -lguide lib/libaux_em64t_intel.a -lpthread&lt;SPAN&gt; &lt;/SPAN&gt;-o test.out&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;Gennady &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;</description>
      <pubDate>Wed, 24 Sep 2008 04:56:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-with-dynamic-linking-to-mkl-cfg-file/m-p/878854#M9308</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2008-09-24T04:56:06Z</dc:date>
    </item>
  </channel>
</rss>

