<?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 Intel MP Linpack on Linux: multiple definiti in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833569#M1361</link>
    <description>&lt;BR /&gt;The only thing I'd like to add here is a suggestion to use &lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor"&gt;MKL Link advisor&lt;/A&gt;.&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Apr 2011 12:50:14 GMT</pubDate>
    <dc:creator>Dmitry_K_Intel2</dc:creator>
    <dc:date>2011-04-27T12:50:14Z</dc:date>
    <item>
      <title>Statically linking Intel MP Linpack on Linux: multiple definition of symbols 'free' and 'realloc'</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833566#M1358</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am trying to compile Intel MP Linpack from source code with some external libraries on Linux x86_64 (Debian 5.0.8). I use recent MKL set, latest Intel MPI library and latest Intel Compiler. In order to work properly the final binary should be made static (I want some flavour of PIN-based tool to be incorporated into the binary)&lt;/P&gt;&lt;P&gt;I am currently encountering the following problem at final linking:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;
 &lt;TBODY&gt;&lt;TR&gt;
  &lt;TD width="1273" valign="top"&gt;
  &lt;P&gt;mpiicc -DAdd__ -DF77_INTEGER=int
  -DStringSunStyle -DASYOUGO -DHYBRID
  -I/home/user/linpack_10.3.3/benchmarks/mp_linpack/include
  -I/home/user/linpack_10.3.3/benchmarks/mp_linpack/include/intel64
  -I/opt/intel/composerxe-2011.3.174/mkl/include
  -I/opt/intel/impi/4.0.1.007/include64 -I/opt/intel/composerxe-2011.3.174/mkl/include
  -O3 -w -ansi-alias&lt;STRONG&gt; -i-static&lt;/STRONG&gt; -z noexecstack -openmp -nocompchk -openmp
  -mt_mpi -i-static -z noexecstack &lt;STRONG&gt;-static_mpi&lt;/STRONG&gt; -nocompchk -u
  CarbonStartSim -u CarbonStopSim -L/home/user/mit-carbon-Graphite-52bf5d5/lib
  -L/home/user/mit-carbon-Graphite-52bf5d5/os-services-25032-gcc.4.0.0-linux-ia32_intel64/intel64
  -L/home/user/mit-carbon-Graphite-52bf5d5/contrib/orion -pthread -lcarbon_sim
  -lorion -los-services -lboost_filesystem-mt -lboost_system-mt -pthread
  -lstdc++ -lm &lt;STRONG&gt;-static&lt;/STRONG&gt; -o /home/user/linpack_10.3.3/benchmarks/mp_linpack/bin/intel64/xhpl
  HPL_pddriver.o
  HPL_pdinfo.o
  HPL_pdtest.o /home/user/linpack_10.3.3/benchmarks/mp_linpack/lib/intel64/libhpl.a
  -L/opt/intel/composerxe-2011.3.174/mkl/lib/intel64
  /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_intel_lp64.a
  /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_intel_thread.a
  /opt/intel/composerxe-2011.3.174/mkl/lib/intel64/libmkl_core.a -lpthread
  /home/user/linpack_10.3.3/benchmarks/mp_linpack/lib_hybrid/intel64/libhpl_hybrid.a
  /opt/intel/composerxe-2011.3.174/compiler/lib/intel64/libiomp5.a&lt;/P&gt;
  &lt;P&gt;/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib64/&lt;STRONG&gt;libc.a&lt;/STRONG&gt;(malloc.o):
  In function `free':&lt;/P&gt;
  &lt;P&gt;(.text+0x2700): &lt;STRONG&gt;multiple definition of `free'&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;/opt/intel/impi/4.0.1.007/intel64/lib/&lt;STRONG&gt;libmpi_mt.a&lt;/STRONG&gt;(i_rtc_hook.o):../../i_rtc_hook.c:(.text+0x0):
  first defined here&lt;/P&gt;
  &lt;P&gt;/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib64/&lt;STRONG&gt;libc.a&lt;/STRONG&gt;(malloc.o): In function
  `realloc':&lt;/P&gt;
  &lt;P&gt;(.text+0x4b10): &lt;STRONG&gt;multiple definition of
  `realloc'&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;/opt/intel/impi/4.0.1.007/intel64/lib/&lt;STRONG&gt;libmpi_mt.a&lt;/STRONG&gt;(i_rtc_hook.o):../../i_rtc_hook.c:(.text+0x120):
  first defined here&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV id="_mcePaste" style="position: absolute; left: -10000px; top: 9px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;&lt;TABLE class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 0cm 0cm 0cm;"&gt;&lt;TBODY&gt;&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes;"&gt;&lt;TD width="1273" valign="top" style="width: 864.35pt; border: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;"&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib64/libc.a(malloc.o):
  In function `free':&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;(.text+0x2700): &lt;SPAN style="background: yellow; mso-highlight: yellow;"&gt;multiple definition of `free'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;/opt/intel/impi/4.0.1.007/intel64/lib/libmpi_mt.a(i_rtc_hook.o):../../i_rtc_hook.c:(.text+0x0):
  first defined here&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib64/&lt;SPAN style="background: red; mso-highlight: red;"&gt;libc.a&lt;/SPAN&gt;(malloc.o): In function
  `realloc':&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;(.text+0x4b10): &lt;SPAN style="background: yellow; mso-highlight: yellow;"&gt;multiple definition of
  `realloc'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: " courier="" new=""&gt;/opt/intel/impi/4.0.1.007/intel64/lib/&lt;SPAN style="background: red; mso-highlight: red;"&gt;libmpi_mt.a&lt;/SPAN&gt;(i_rtc_hook.o):../../i_rtc_hook.c:(.text+0x120):
  first defined here&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US" style="font-family: " batang=""&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;/TD&gt;
 &lt;/TR&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;

&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some unknown reason Intel MPI has two symbols defined in stock Libc and that breaks linking.&lt;/P&gt;&lt;P&gt;When I remove '-static' flag from linker options everything links fine but I get a binary with 
shared libs which is not what I need (as instrumentation I am attempting to use is not designed to work with code from shared libraries)&lt;/P&gt;&lt;P&gt;Could anyone tell me how to overcome this problem with symbols?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2011 11:17:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833566#M1358</guid>
      <dc:creator>Grigory_R_Intel</dc:creator>
      <dc:date>2011-04-26T11:17:02Z</dc:date>
    </item>
    <item>
      <title>Statically linking Intel MP Linpack on Linux: multiple definiti</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833567#M1359</link>
      <description>Would it not be safer to link libpthread normally (once, at the end, as already set by the -openmp option, so as to follow all libraries creating dependencies)? You can get away with odd linking orders more often with dynamic libraries. I suppose it should not be a problem to link against libiomp5.a and then libiomp5.so, provided that libpthread is searched afterwards only.</description>
      <pubDate>Tue, 26 Apr 2011 13:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833567#M1359</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-04-26T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Statically linking Intel MP Linpack on Linux: multiple definiti</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833568#M1360</link>
      <description>&lt;P&gt;It seems that adding '--allow-multiple-definition' to linker flags (as the first one - the order is important!) resolved the linking issue. See also Release Notes:&lt;/P&gt;&lt;P&gt;


&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;I&gt;&lt;SPAN style="font-family: " courier="" new=""&gt; - (SDK only) Certain
versions of the GNU* LIBC library define&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;I&gt;&lt;SPAN style="font-family: " courier="" new=""&gt;free()/realloc()
symbols as non-weak. Use the --allow-multiple-definition &lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P class="MsoNormal"&gt;&lt;I&gt;&lt;SPAN style="font-family: " courier="" new=""&gt;GNU*
linker option to link your application.&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have been advised that complete static linking of Intel MKL is a bad idea. But at least it is possible to do.&lt;/P&gt;&lt;DIV style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"&gt;
&lt;I style="mso-bidi-font-style: normal;"&gt;&lt;SPAN style="font-size: 11.0pt; font-family: " courier="" new=""&gt;--allow-multiple-definitionTo	Subject	Sent	Size	Categories	&lt;BR /&gt;Derbunovich, Andrey; Kuzmin, Dmitry	RE: multiple definition of symbols 'free' and 'realloc'	13:05	23 KB	Red Category	&lt;BR /&gt;
&lt;/SPAN&gt;&lt;/I&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Apr 2011 09:21:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833568#M1360</guid>
      <dc:creator>Grigory_R_Intel</dc:creator>
      <dc:date>2011-04-27T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Statically linking Intel MP Linpack on Linux: multiple definiti</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833569#M1361</link>
      <description>&lt;BR /&gt;The only thing I'd like to add here is a suggestion to use &lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor"&gt;MKL Link advisor&lt;/A&gt;.&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Apr 2011 12:50:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/Statically-linking-Intel-MP-Linpack-on-Linux-multiple-definition/m-p/833569#M1361</guid>
      <dc:creator>Dmitry_K_Intel2</dc:creator>
      <dc:date>2011-04-27T12:50:14Z</dc:date>
    </item>
  </channel>
</rss>

