<?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: Threading issue with MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Threading-issue-with-MKL/m-p/889421#M10305</link>
    <description>&lt;FONT face="Arial" size="2"&gt;The file libmkl.so is a linker script that links libmkl_intel_lp64.so, libmkl_intel_thread.so and libmkl_core.so. It's meant to help users in the transition of library names that was made with version 10.0. Having '-lmkl' on the link line together with '-lmkl_gnu_thread' may be causing some problems since libmkl_gnu_thread.so and libmkl_intel_thread.so are both threading layer libraries and the one that is actually linked in may be unpredictable. Could you give the following link sequence a try?&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;link sequence:&lt;BR /&gt;-Wl,--start-group -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread -lgfortran&lt;BR /&gt;&lt;BR /&gt;Further linking information can be found in userguide which is available in the doc directory or &lt;A href="http://www3.intel.com/cd/software/products/asmo-na/eng/345631.htm"&gt;online&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Todd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
    <pubDate>Mon, 12 May 2008 21:14:25 GMT</pubDate>
    <dc:creator>Todd_R_Intel</dc:creator>
    <dc:date>2008-05-12T21:14:25Z</dc:date>
    <item>
      <title>Threading issue with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Threading-issue-with-MKL/m-p/889420#M10304</link>
      <description>&lt;FONT face="Arial" size="2"&gt;I get a segfault in an application linked to MKL, whenever more than one thread is used. The code works fine with OMP_NUM_THREADS=1, but it segfaults if I set this variable to &amp;gt;1. The simplest code exhibiting this problem uses only mkl_cspblas_dcsrgemv from mkl.&lt;BR /&gt;&lt;BR /&gt;System: Red Hat Enterprise Linux release 4&lt;BR /&gt;MKL: 10.0.011&lt;BR /&gt;&lt;BR /&gt;link sequence:&lt;BR /&gt;-lmkl_lapack -lmkl -lmkl_gnu_thread -liomp5 -lpthread -lgfortran -lmkl -lmkl_gnu_thread -liomp5 -lpthread -lgfortran&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;backtrace in gdb (thread which segfaults):&lt;BR /&gt;#0 0x0000002a9b54e9b9 in L_mkl_spblas_lp64_mkl_cspblas_dcsrgemv_128__par_loop0 ()&lt;BR /&gt; from /opt/intel/mkl/10.0.011/lib/em64t//libmkl_intel_thread.so&lt;BR /&gt;#1 0x0000002a9bdbb903 in __kmp_invoke_microtask () from /opt/intel/mkl/10.0.011/lib/em64t/libiomp5.so&lt;BR /&gt;#2 0x0000002a9bda93e0 in __kmpc_invoke_task_func () from /opt/intel/mkl/10.0.011/lib/em64t/libiomp5.so&lt;BR /&gt;#3 0x0000002a9bdaa0cc in __kmp_launch_thread () from /opt/intel/mkl/10.0.011/lib/em64t/libiomp5.so&lt;BR /&gt;#4 0x0000002a9bdbda43 in __kmp_create_monitor () from /opt/intel/mkl/10.0.011/lib/em64t/libiomp5.so&lt;BR /&gt;#5 0x0000003a626060aa in start_thread () from /lib64/tls/libpthread.so.0&lt;BR /&gt;#6 0x0000003a61bc53d3 in clone () from /lib64/tls/libc.so.6&lt;BR /&gt;#7 0x0000000000000000 in ?? ()&lt;BR /&gt;&lt;BR /&gt;threads (OMP_NUM_THREADS=2):&lt;BR /&gt; 3 Thread 1077973344 (LWP 28977) 0x0000003a6260ae2d in __lll_mutex_unlock_wake () from /lib64/tls/libpthread.so.0&lt;BR /&gt; 2 Thread 1073809760 (LWP 28976) 0x0000003a62608acf in pthread_cond_timedwait@@GLIBC_2.3.2 ()&lt;BR /&gt; from /lib64/tls/libpthread.so.0&lt;BR /&gt;* 1 Thread 182899530176 (LWP 28927) 0x0000002a9b54e9b9 in L_mkl_spblas_lp64_mkl_cspblas_dcsrgemv_128__par_loop0 ()&lt;BR /&gt; from /opt/intel/mkl/10.0.011/lib/em64t//libmkl_intel_thread.so&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ldd on executable:&lt;BR /&gt; libboost_python-gcc-1_32.so.1.32.0 =&amp;gt; /local/opt/lib/libboost_python-gcc-1_32.so.1.32.0 (0x0000002a95819000)&lt;BR /&gt; /local/libmesh-0.6.1/lib/x86_64-unknown-linux-gnu_opt/libmesh.so (0x0000002a95968000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/liblaspack.so (0x0000002a95ede000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libparmetis.so (0x0000002a95ff9000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libmetis.so (0x0000002a96152000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libsfcurves.so (0x0000002a962b5000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libgzstream.so (0x0000002a963b7000)&lt;BR /&gt; libz.so.1 =&amp;gt; /usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/libz.so.1 (0x0000002a964bb000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libgmv.so (0x0000002a965ce000)&lt;BR /&gt; libvtkIO.so.5.0 =&amp;gt; /usr/local/lib/libvtkIO.so.5.0 (0x0000002a966e4000)&lt;BR /&gt; libvtkCommon.so.5.0 =&amp;gt; /usr/local/lib/libvtkCommon.so.5.0 (0x0000002a96b9f000)&lt;BR /&gt;&amp;amp;
nbsp; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libtetgen.so (0x0000002a96ecb000)&lt;BR /&gt; /local/libmesh-0.6.1/contrib/lib/x86_64-unknown-linux-gnu_opt/libtriangle.so (0x0000002a97080000)&lt;BR /&gt; libpetscsnes.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetscsnes.so (0x0000002a971a6000)&lt;BR /&gt; libpetscksp.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetscksp.so (0x0000002a972e2000)&lt;BR /&gt; libpetscdm.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetscdm.so (0x0000002a9761f000)&lt;BR /&gt; libpetscmat.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetscmat.so (0x0000002a97797000)&lt;BR /&gt; libpetscvec.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetscvec.so (0x0000002a97b7d000)&lt;BR /&gt; libpetsc.so =&amp;gt; /local/petsc-2.3.3-p8/lib/linux-mkl-dbg5/libpetsc.so (0x0000002a97d1a000)&lt;BR /&gt; libmkl_lapack.so =&amp;gt; /opt/intel/mkl/10.0.011/lib/em64t/libmkl_lapack.so (0x0000002a97ef0000)&lt;BR /&gt; /opt/intel/mkl/10.0.011/lib/em64t//libmkl_intel_lp64.so (0x0000002a9862f000)&lt;BR /&gt; /opt/intel/mkl/10.0.011/lib/em64t//libmkl_intel_thread.so (0x0000002a98935000)&lt;BR /&gt; /opt/intel/mkl/10.0.011/lib/em64t//libmkl_core.so (0x0000002a98d76000)&lt;BR /&gt; libmkl_gnu_thread.so =&amp;gt; /opt/intel/mkl/10.0.011/lib/em64t/libmkl_gnu_thread.so (0x0000002a98f47000)&lt;BR /&gt; libiomp5.so =&amp;gt; /opt/intel/mkl/10.0.011/lib/em64t/libiomp5.so (0x0000002a9929f000)&lt;BR /&gt; libpthread.so.0 =&amp;gt; /lib/../lib64/tls/libpthread.so.0 (0x0000002a9940b000)&lt;BR /&gt; libgfortran.so.1 =&amp;gt; /usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/libgfortran.so.1 (0x0000002a99520000)&lt;BR /&gt; libdl.so.2 =&amp;gt; /lib/../lib64/libdl.so.2 (0x0000002a996b5000)&lt;BR /&gt; libgcc_s.so.1 =&amp;gt; /lib/../lib64/libgcc_s.so.1 (0x0000002a997b9000)&lt;BR /&gt; libg2c.so.0 =&amp;gt; /usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/libg2c.so.0 (0x0000002a998c4000)&lt;BR /&gt; libm.so.6 =&amp;gt; /lib/../lib64/tls/libm.so.6 (0x0000002a999e5000)&lt;BR /&gt; libX11.so.6 =&amp;gt; /usr/X11R6/lib64/libX11.so.6 (0x0000002a99b91000)&lt;BR /&gt; libmkl_mc.so =&amp;gt; /opt/intel/mkl/10.0.011/lib/em64t/libmkl_mc.so (0x0000002a99d72000)&lt;BR /&gt; libmkl_def.so =&amp;gt; /opt/intel/mkl/10.0.011/lib/em64t/libmkl_def.so (0x0000002a9a57f000)&lt;BR /&gt; libc.so.6 =&amp;gt; /lib/../lib64/tls/libc.so.6 (0x0000002a9ab4d000)&lt;BR /&gt; libstdc++.so.6 =&amp;gt; /usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/libstdc++.so.6 (0x0000002a9ad80000)&lt;BR /&gt; libvtkFiltering.so.5.0 =&amp;gt; /usr/local/lib/libvtkFiltering.so.5.0 (0x0000002a9af71000)&lt;BR /&gt; l
ibvtkDICOMParser.so.5.0 =&amp;gt; /usr/local/lib/libvtkDICOMParser.so.5.0 (0x0000002a9b3c1000)&lt;BR /&gt; libvtkpng.so.5.0 =&amp;gt; /usr/local/lib/libvtkpng.so.5.0 (0x0000002a9b503000)&lt;BR /&gt; libvtkzlib.so.5.0 =&amp;gt; /usr/local/lib/libvtkzlib.so.5.0 (0x0000002a9b633000)&lt;BR /&gt; libvtkjpeg.so.5.0 =&amp;gt; /usr/local/lib/libvtkjpeg.so.5.0 (0x0000002a9b747000)&lt;BR /&gt; libvtktiff.so.5.0 =&amp;gt; /usr/local/lib/libvtktiff.so.5.0 (0x0000002a9b872000)&lt;BR /&gt; libvtkexpat.so.5.0 =&amp;gt; /usr/local/lib/libvtkexpat.so.5.0 (0x0000002a9b9d0000)&lt;BR /&gt; libvtkMPEG2Encode.so.5.0 =&amp;gt; /usr/local/lib/libvtkMPEG2Encode.so.5.0 (0x0000002a9bafe000)&lt;BR /&gt; libvtksys.so.5.0 =&amp;gt; /usr/local/lib/libvtksys.so.5.0 (0x0000002a9bc17000)&lt;BR /&gt; libmpich.so =&amp;gt; /local/petsc-2.3.3-p8/externalpackages/mpich2-1.0.5p4/linux-mkl-dbg5/lib/libmpich.so (0x0000002a9bd52000)&lt;BR /&gt; librt.so.1 =&amp;gt; /lib/../lib64/tls/librt.so.1 (0x0000002a9bfff000)&lt;BR /&gt; /lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)&lt;/FONT&gt;</description>
      <pubDate>Mon, 12 May 2008 19:10:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Threading-issue-with-MKL/m-p/889420#M10304</guid>
      <dc:creator>postaquestion</dc:creator>
      <dc:date>2008-05-12T19:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Threading issue with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Threading-issue-with-MKL/m-p/889421#M10305</link>
      <description>&lt;FONT face="Arial" size="2"&gt;The file libmkl.so is a linker script that links libmkl_intel_lp64.so, libmkl_intel_thread.so and libmkl_core.so. It's meant to help users in the transition of library names that was made with version 10.0. Having '-lmkl' on the link line together with '-lmkl_gnu_thread' may be causing some problems since libmkl_gnu_thread.so and libmkl_intel_thread.so are both threading layer libraries and the one that is actually linked in may be unpredictable. Could you give the following link sequence a try?&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;link sequence:&lt;BR /&gt;-Wl,--start-group -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread -lgfortran&lt;BR /&gt;&lt;BR /&gt;Further linking information can be found in userguide which is available in the doc directory or &lt;A href="http://www3.intel.com/cd/software/products/asmo-na/eng/345631.htm"&gt;online&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Todd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 12 May 2008 21:14:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Threading-issue-with-MKL/m-p/889421#M10305</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-05-12T21:14:25Z</dc:date>
    </item>
  </channel>
</rss>

