Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Shared library using MKL crashes on runtime with EXC_BAD_ACCESS

$
0
0

Hi everyone!

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 https://software.intel.com/en-us/mkl-developer-reference-c-data-fitting-....

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:

  • isolating the code region that crashes from its surroundings and compiling it into a standalone executable runs fine and with no problem.
  • 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.
  • turning the Xcode's memory management diagnostics on, makes the code to constantly crash at the same point, instead of the initial random crashes.

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.

Thank you very much in advance and sorry for the long post.

P.S. I'm using MacOS 10.13.5, Xcode 9.4.1, MKL 2018.0.104


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>