<?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 Segmentation fault in MKL_get_N_Cores in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792061#M2296</link>
    <description>Bruce,&lt;BR /&gt;&lt;BR /&gt;Thanks for your time and efforts to create small testcase to reproduce the problem.&lt;BR /&gt;&lt;BR /&gt;Just my guess however, MKL_get_N_Cores function tries to recognize CPU topology, but if Xenomai framework changesit via shadowing some CPU parameters (for example, CPU affinity) then MKLmight be confused somehow but must not crashed anyway.</description>
    <pubDate>Mon, 02 Jul 2012 05:38:04 GMT</pubDate>
    <dc:creator>barragan_villanueva_</dc:creator>
    <dc:date>2012-07-02T05:38:04Z</dc:date>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792058#M2293</link>
      <description>As part of a 2D spline interpolation routine, I'm calling dgesv(). That routine is giving me a segmentation fault in MKL_get_N_Cores(). The debugger output is:&lt;BR /&gt;&lt;BR /&gt;Dump of assembler code for function MKL_get_N_Cores:&lt;BR /&gt;0x0063f190 &amp;lt;+0&amp;gt;:  push %ebx&lt;BR /&gt;0x0063f191 &amp;lt;+1&amp;gt;:  push %esi&lt;BR /&gt;0x0063f192 &amp;lt;+2&amp;gt;:  push %edi&lt;BR /&gt;0x0063f193 &amp;lt;+3&amp;gt;:  push %ebp&lt;BR /&gt;0x0063f194 &amp;lt;+4&amp;gt;:  sub $0x4ecc,%esp&lt;BR /&gt;0x0063f19a &amp;lt;+10&amp;gt;:  call 0x63f19f &lt;MKL_GET_N_CORES&gt;&lt;BR /&gt;0x0063f19f &amp;lt;+15&amp;gt;:  pop %edi&lt;BR /&gt;0x0063f1a0 &amp;lt;+16&amp;gt;:  lea 0x4671c9(%edi),%edi&lt;BR /&gt;0x0063f1a6 &amp;lt;+22&amp;gt;:  cmpl $0x1,0xa1f74(%edi)&lt;BR /&gt;0x0063f1ad &amp;lt;+29&amp;gt;:  je 0x63f1c1 &lt;MKL_GET_N_CORES&gt;&lt;BR /&gt;0x0063f1af &amp;lt;+31&amp;gt;:  mov %edi,%ebx&lt;BR /&gt;0x0063f1b1 &amp;lt;+33&amp;gt;:  call 0x63b820 &lt;OMP_GET_NUM_PROCS&gt;&lt;BR /&gt;0x0063f1b6 &amp;lt;+38&amp;gt;:  mov %eax,%esi&lt;BR /&gt;0x0063f1b8 &amp;lt;+40&amp;gt;:  cmpl $0xffffffff,0x3658(%edi)&lt;BR /&gt;0x0063f1bf &amp;lt;+47&amp;gt;:  je 0x63f1cc &lt;MKL_GET_N_CORES&gt;&lt;BR /&gt;0x0063f1c1 &amp;lt;+49&amp;gt;:  add $0x4ecc,%esp&lt;BR /&gt;0x0063f1c7 &amp;lt;+55&amp;gt;:  pop %ebp&lt;BR /&gt;0x0063f1c8 &amp;lt;+56&amp;gt;:  pop %edi&lt;BR /&gt;0x0063f1c9 &amp;lt;+57&amp;gt;:  pop %esi&lt;BR /&gt;0x0063f1ca &amp;lt;+58&amp;gt;:  pop %ebx&lt;BR /&gt;0x0063f1cb &amp;lt;+59&amp;gt;:  ret&lt;BR /&gt;&lt;BR /&gt;The crash occurs at the line: call &lt;MKL_GET_N_CORES&gt;. This is running on Ubuntu with g++ compiler. It was using the static libraries. I switched to the dynamic libraries and got the same fault. The 2D spline code is included in another app. I fed the same input file to the 2nd app and it works fine. I verified with the debugger that the arguments to dgesv with the two apps were identical. The app that crashes uses about 1.2GB of RAM while the app that doesn't crash uses about 100MB.&lt;BR /&gt;&lt;BR /&gt;Any idea what's causing this? Or suggestions for a workaround.&lt;BR /&gt;&lt;BR /&gt;Bruce&lt;/MKL_GET_N_CORES&gt;&lt;/MKL_GET_N_CORES&gt;&lt;/OMP_GET_NUM_PROCS&gt;&lt;/MKL_GET_N_CORES&gt;&lt;/MKL_GET_N_CORES&gt;</description>
      <pubDate>Fri, 29 Jun 2012 19:50:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792058#M2293</guid>
      <dc:creator>bruce1661</dc:creator>
      <dc:date>2012-06-29T19:50:14Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792059#M2294</link>
      <description>Dear Bruce,&lt;BR /&gt;&lt;BR /&gt;Could you please give me a testcase so that I can reproduce it and figure out and dig more into what could be the problem?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Sridevi</description>
      <pubDate>Fri, 29 Jun 2012 23:09:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792059#M2294</guid>
      <dc:creator>Sridevi_A_Intel</dc:creator>
      <dc:date>2012-06-29T23:09:11Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792060#M2295</link>
      <description>I'll try. I thought of another difference between the 2 apps. The app that fails is using real-time extensions (Xenomai). And the app that works is not. I'll write a small test app. If it works, I'll add a few Xenomai calls and see if it fails.&lt;BR /&gt;&lt;BR /&gt;This may take a few days.&lt;BR /&gt;&lt;BR /&gt;Bruce</description>
      <pubDate>Fri, 29 Jun 2012 23:33:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792060#M2295</guid>
      <dc:creator>bruce1661</dc:creator>
      <dc:date>2012-06-29T23:33:55Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792061#M2296</link>
      <description>Bruce,&lt;BR /&gt;&lt;BR /&gt;Thanks for your time and efforts to create small testcase to reproduce the problem.&lt;BR /&gt;&lt;BR /&gt;Just my guess however, MKL_get_N_Cores function tries to recognize CPU topology, but if Xenomai framework changesit via shadowing some CPU parameters (for example, CPU affinity) then MKLmight be confused somehow but must not crashed anyway.</description>
      <pubDate>Mon, 02 Jul 2012 05:38:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792061#M2296</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2012-07-02T05:38:04Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792062#M2297</link>
      <description>Attached are 2 test cases. The one built as a linux program (mkltest) 
works. The xenomai version (mklxentest) fails with the same fault. &lt;BR /&gt;
&lt;BR /&gt;
I took the dgesv example and turned it into a function. In the xenomai 
version, main() makes a couple of xenomai calls to create and run it as a
 task.&lt;BR /&gt;&lt;BR /&gt;Bruce</description>
      <pubDate>Mon, 02 Jul 2012 21:53:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792062#M2297</guid>
      <dc:creator>bruce1661</dc:creator>
      <dc:date>2012-07-02T21:53:31Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792063#M2298</link>
      <description>Bruce,&lt;BR /&gt;&lt;BR /&gt;Nothing was attached in your previous post. Please try again.&lt;BR /&gt;&lt;BR /&gt;Also, it would be helpful to add some description how to run your tests. E.g. how tocreate xenomai environment and run the second test</description>
      <pubDate>Tue, 03 Jul 2012 07:07:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792063#M2298</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2012-07-03T07:07:27Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault in MKL_get_N_Cores</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792064#M2299</link>
      <description>Found the answer. When a xenomai task is created, you tell it the 
amount of stack space to allocate. From the documentation "The size of 
the stack (in bytes) for the new task. If zero is passed, a reasonable 
pre-defined size will be substituted." We were passing 0. When I 
increased the stack size to 1MB, then the MKL calls didn't crash.&lt;BR /&gt;&lt;BR /&gt;As far as I can tell the files are there. Not sure what I need to do so you can access the files.</description>
      <pubDate>Tue, 24 Jul 2012 18:24:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-in-MKL-get-N-Cores/m-p/792064#M2299</guid>
      <dc:creator>bruce1661</dc:creator>
      <dc:date>2012-07-24T18:24:25Z</dc:date>
    </item>
  </channel>
</rss>

