<?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 Hi Strp, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144948#M26633</link>
    <description>&lt;P&gt;Hi Strp,&lt;BR /&gt;
	&lt;BR /&gt;
	1) It seems unknown issue regarding the functionality.&amp;nbsp; and&amp;nbsp;besides of the data fitting&amp;nbsp;function, does other mkl function cause the crash?&lt;BR /&gt;
	&lt;BR /&gt;
	2) How do you link the mkl library,&amp;nbsp; in the case of&amp;nbsp;wrapping the same isolated code into a static or a dynamic library and then having a standalone executable loading ​?&amp;nbsp; how about if&amp;nbsp;under command line: &amp;nbsp;&lt;BR /&gt;
	​&amp;gt;export OMP_NUM_THREADS=1&lt;BR /&gt;
	​&amp;gt;your.exe&lt;/P&gt;

&lt;P&gt;Could you please attach your isolate sample so we can test at our side?&amp;nbsp; and if the test case is private, please submit to supporttickets.intel.com/​.&lt;BR /&gt;
	&lt;BR /&gt;
	Best Regards,&lt;BR /&gt;
	​Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jun 2018 03:01:12 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2018-06-25T03:01:12Z</dc:date>
    <item>
      <title>Shared library using MKL crashes on runtime with EXC_BAD_ACCESS</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144947#M26632</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;

&lt;P&gt;I'm trying to create an application for MacOS platforms that uses some MKL methods for its math computations, namely the `dfdInterpolate1D()`. I'm facing a difficult issue, with random crashes due to bad access exceptions during the interpolation call. I tried several things and I can, quite safely, verify that it is not an obvious buffer allocations error from my side. Generally, I'm following the example templates that can be found at&amp;nbsp;https://software.intel.com/en-us/mkl-developer-reference-c-data-fitting-usage-examples.&lt;/P&gt;

&lt;P&gt;After a lengthy investigation time, I think the issue comes from the linking scheme of the project. Due to some design specs, the base code is wrapped into a static library that is then used to create the application. My findings are concluded to the following:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;isolating the code region that crashes from its surroundings and compiling it into a standalone executable runs fine and with no problem.&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="font-size: 1em;"&gt;wrapping the same isolated code into a static or a dynamic library and then having a standalone executable loading and using the library, creates the exact same crash.&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;turning the Xcode's memory management diagnostics on, makes the code to constantly crash at the same point, instead of the initial random crashes.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;So, my question is: is there a known issue or is there a certain way to wrap the MKL spline interpolation into a library? Is there anything I specifically have to be careful with for this use case? I'm using the linker and compiler options proposed by the MKL linker advisor.&lt;/P&gt;

&lt;P&gt;Thank you very much in advance and sorry for the long post.&lt;/P&gt;

&lt;P&gt;P.S. I'm using MacOS 10.13.5, Xcode 9.4.1, MKL 2018.0.104&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 16:08:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144947#M26632</guid>
      <dc:creator>strp</dc:creator>
      <dc:date>2018-06-22T16:08:51Z</dc:date>
    </item>
    <item>
      <title>Hi Strp,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144948#M26633</link>
      <description>&lt;P&gt;Hi Strp,&lt;BR /&gt;
	&lt;BR /&gt;
	1) It seems unknown issue regarding the functionality.&amp;nbsp; and&amp;nbsp;besides of the data fitting&amp;nbsp;function, does other mkl function cause the crash?&lt;BR /&gt;
	&lt;BR /&gt;
	2) How do you link the mkl library,&amp;nbsp; in the case of&amp;nbsp;wrapping the same isolated code into a static or a dynamic library and then having a standalone executable loading ​?&amp;nbsp; how about if&amp;nbsp;under command line: &amp;nbsp;&lt;BR /&gt;
	​&amp;gt;export OMP_NUM_THREADS=1&lt;BR /&gt;
	​&amp;gt;your.exe&lt;/P&gt;

&lt;P&gt;Could you please attach your isolate sample so we can test at our side?&amp;nbsp; and if the test case is private, please submit to supporttickets.intel.com/​.&lt;BR /&gt;
	&lt;BR /&gt;
	Best Regards,&lt;BR /&gt;
	​Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 03:01:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144948#M26633</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-06-25T03:01:12Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144949#M26634</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;First of all, thank you for answering. Regarding the points you made:&lt;/P&gt;

&lt;P&gt;1) I haven't tested this behaviour with other MKL functions, as I only use the functions related with the task based interpolation on this project.&lt;/P&gt;

&lt;P&gt;2) I forgot to mention that I'm using the sequential version of MKL, so setting the number of threads to 1 doesn't make any difference. I'm using these linker flags:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt; ${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_sequential.a ${MKLROOT}/lib/libmkl_core.a -lpthread -lm -ldl&lt;/PRE&gt;

&lt;P&gt;The test case code is indeed private. I will try to further isolate the point of interest and post it here. Until then, I have another question that could help: I'm using the MKL functions with data pointers of Eigen library matrices and vectors. Could this be a possible source of the crashes?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Again, thank you for your time.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;strp&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 09:10:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144949#M26634</guid>
      <dc:creator>strp</dc:creator>
      <dc:date>2018-06-25T09:10:37Z</dc:date>
    </item>
    <item>
      <title>Hi Strp,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144950#M26635</link>
      <description>&lt;P&gt;Hi Strp,&lt;BR /&gt;
	&lt;BR /&gt;
	​Yes, if possible, please submit your issue to Intel on-line service center:&amp;nbsp; supporttickets.intel.com/​.&amp;nbsp; with&amp;nbsp;the private test case.&lt;/P&gt;

&lt;P&gt;Generally, Eigen should be able to ok with MKL functions.&amp;nbsp; as Eigen have MKL supported. for example,&amp;nbsp; the matrix input should be ok.&lt;/P&gt;

&lt;P&gt;#define EIGEN_USE_MKL_ALL&lt;/P&gt;

&lt;P&gt;MatrixXd A = MatrixXd::Random(mA, kA);&lt;BR /&gt;
	&amp;nbsp;MatrixXd B = MatrixXd::Random(k, n);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; double alpha1 = 0.1;&lt;BR /&gt;
	&amp;nbsp;double alpha2 = 0.6;&lt;BR /&gt;
	&amp;nbsp;mkl_verbose(1);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;MatrixXd F = (alpha1* A.transpose() * B *A).block(0,0,2,2);&lt;BR /&gt;
	&lt;BR /&gt;
	​besides all of them, how about upgrade to the latest version MKL 2018.0.3?&lt;BR /&gt;
	&lt;BR /&gt;
	Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 08:36:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Shared-library-using-MKL-crashes-on-runtime-with-EXC-BAD-ACCESS/m-p/1144950#M26635</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2018-06-29T08:36:13Z</dc:date>
    </item>
  </channel>
</rss>

