<?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 static and dynamic linking in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/static-and-dynamic-linking/m-p/905093#M11572</link>
    <description>&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;hi group, &lt;BR /&gt; &lt;/FONT&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;I am a PhD student, and in my project I have to modify some subroutines of codes that were written in fortran. I have a basic knowledge of fortran as I do not have a background of compouter science. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;I have two different codes written in fortran. Both have scripts for compiling and linking provided by the suppliers. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;For Code-1: I modify the subroutine compile and link by using the supplied script. In the script I see the options "-static" -lpthread - ldl etc. an executable is generated. it works fine. system being Mandrake LINUX 2.4.22, compiler: intel_fc_81. Code-1 does not require mkl. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;on the same computer &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;For Code-2: the compilation works fine, but when I ask for linking with the option "-static" -lpthread -ldl etc. I get the errors that lpthread, ldl are missing (I can see them, they exist and work fine with Code-1). when I take out the option "-static" the executable is generated with an error:&lt;BR /&gt;liblcpack.a(IIRVmgr_init.o)(.text+0x717): In function `IIRVmgr_initOutOfCore': &lt;BR /&gt; : the use of `tmpnam' is dangerous, better use `mkstemp'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;the the executable takes 4 hrs 49 mins to solve the problem which I can solve in 38 mins. &lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier, Monospaced"&gt;now we turn to another computer this computer has intel_fc8, mkl8, LINUX 2.4.22 here with -static -lsvml -lpthread -ldl .... I get the follwong (no executable is created)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;liblcpack.a(IIRVmgr_init.o)(.text+0x717): In function `IIRVmgr_initOutOfCore':&lt;BR /&gt;: the use of `tmpnam' is dangerous, better use `mkstemp'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-write.o)(.text+0x25): In function `write':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-write.o)(.text+0x55): In function `write':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-read.o)(.text+0x25): In function `read':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-read.o)(.text+0x55): In function `read':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-close.o)(.text+0x1f): In function `close':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-close.o)(.text+0x4a): more undefined references to `__syscall_error' follow&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6d4): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_res'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6de): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6e8): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_h_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0xad4): In function `pthread_initialize':&lt;BR /&gt;: undefined reference to `_res'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1b8): undefined reference to `_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1c0): undefined reference to `_h_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1c8): undefined reference to `_res'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Cou
rier, Monospaced"&gt;does anyone have an idea where the problem might be. and what is the workaround for this. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;thanks in advance &lt;/FONT&gt;</description>
    <pubDate>Fri, 11 Apr 2008 16:11:29 GMT</pubDate>
    <dc:creator>milyas</dc:creator>
    <dc:date>2008-04-11T16:11:29Z</dc:date>
    <item>
      <title>static and dynamic linking</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/static-and-dynamic-linking/m-p/905093#M11572</link>
      <description>&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;hi group, &lt;BR /&gt; &lt;/FONT&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;I am a PhD student, and in my project I have to modify some subroutines of codes that were written in fortran. I have a basic knowledge of fortran as I do not have a background of compouter science. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;I have two different codes written in fortran. Both have scripts for compiling and linking provided by the suppliers. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;For Code-1: I modify the subroutine compile and link by using the supplied script. In the script I see the options "-static" -lpthread - ldl etc. an executable is generated. it works fine. system being Mandrake LINUX 2.4.22, compiler: intel_fc_81. Code-1 does not require mkl. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;on the same computer &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;For Code-2: the compilation works fine, but when I ask for linking with the option "-static" -lpthread -ldl etc. I get the errors that lpthread, ldl are missing (I can see them, they exist and work fine with Code-1). when I take out the option "-static" the executable is generated with an error:&lt;BR /&gt;liblcpack.a(IIRVmgr_init.o)(.text+0x717): In function `IIRVmgr_initOutOfCore': &lt;BR /&gt; : the use of `tmpnam' is dangerous, better use `mkstemp'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;the the executable takes 4 hrs 49 mins to solve the problem which I can solve in 38 mins. &lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier, Monospaced"&gt;now we turn to another computer this computer has intel_fc8, mkl8, LINUX 2.4.22 here with -static -lsvml -lpthread -ldl .... I get the follwong (no executable is created)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;liblcpack.a(IIRVmgr_init.o)(.text+0x717): In function `IIRVmgr_initOutOfCore':&lt;BR /&gt;: the use of `tmpnam' is dangerous, better use `mkstemp'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-write.o)(.text+0x25): In function `write':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-write.o)(.text+0x55): In function `write':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-read.o)(.text+0x25): In function `read':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-read.o)(.text+0x55): In function `read':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-close.o)(.text+0x1f): In function `close':&lt;BR /&gt;: undefined reference to `__syscall_error'&lt;BR /&gt;/usr/lib/libpthread.a(ptw-close.o)(.text+0x4a): more undefined references to `__syscall_error' follow&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6d4): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_res'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6de): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0x6e8): In function `__pthread_reset_main_thread':&lt;BR /&gt;: undefined reference to `_h_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.text+0xad4): In function `pthread_initialize':&lt;BR /&gt;: undefined reference to `_res'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1b8): undefined reference to `_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1c0): undefined reference to `_h_errno'&lt;BR /&gt;/usr/lib/libpthread.a(pthread.o)(.data+0x1c8): undefined reference to `_res'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT class="fixed_width" face="Cou
rier, Monospaced"&gt;does anyone have an idea where the problem might be. and what is the workaround for this. &lt;BR /&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;FONT class="fixed_width" face="Courier, Monospaced"&gt;thanks in advance &lt;/FONT&gt;</description>
      <pubDate>Fri, 11 Apr 2008 16:11:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/static-and-dynamic-linking/m-p/905093#M11572</guid>
      <dc:creator>milyas</dc:creator>
      <dc:date>2008-04-11T16:11:29Z</dc:date>
    </item>
  </channel>
</rss>

