<?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 linux matlab mex linking with MKL sparse solvers in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/linux-matlab-mex-linking-with-MKL-sparse-solvers/m-p/846809#M6310</link>
    <description>First some version information, since I suspect this is important:&lt;BR /&gt;&lt;BR /&gt;==&lt;BR /&gt;MATLAB Version 7.3.0.298 (R2006b)&lt;BR /&gt;Operating System: Linux 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64&lt;BR /&gt;Java VM Version: Java is not enabled&lt;BR /&gt;&lt;BR /&gt;==&lt;BR /&gt;mkl/10.0.3.020&lt;BR /&gt;&lt;BR /&gt;I want to make a mex file calling MKL sparse solvers. For now I call sequential libraries, but something goes wrong when I call the resulting file. I have created a custom shared object containing functions &lt;BR /&gt;dss_create_&lt;BR /&gt;dss_define_structure_&lt;BR /&gt;dss_reorder_&lt;BR /&gt;dss_factor_real_&lt;BR /&gt;dss_delete_&lt;BR /&gt;dss_solve_real_&lt;BR /&gt;&lt;BR /&gt;The command line to create the custom shared object looks like this: make em64t export=mrt_inv_funclist_nomp.txt interface=lp64 threading_name=sequential name=libmkl_custom&lt;BR /&gt;&lt;BR /&gt;I have made some modifications in the custom make tool to avoid any calls to libguile&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;IFACE_COMP_PART=gf &lt;BR /&gt;IFACE_THREADING_PART=intel &lt;BR /&gt; &lt;BR /&gt;ifeq ($(interface),ilp64)&amp;amp;nb
sp; &lt;BR /&gt;IFACE_LIB=libmkl_$(IFACE_COMP_PART)_ilp64.a &lt;BR /&gt;else &lt;BR /&gt;IFACE_LIB=libmkl_$(IFACE_COMP_PART)_lp64.a &lt;BR /&gt;endif &lt;BR /&gt;
 &lt;BR /&gt;THREADING_LIB=libmkl_sequential.a  &lt;BR /&gt;CORE_LIB=libmkl_core.a &lt;BR /&gt;&amp;amp;nb
sp; &lt;BR /&gt;func_list := $(addprefix -u ,$(shell cat $(export)))   &lt;BR /&gt;em64t: &lt;BR /&gt; gcc -shared -Bdynamic $(func_list)  &lt;BR /&gt; $(mklem64t_libpath)/libmkl_solver_lp64_sequential.a &lt;BR /&gt; $(xerbla) $(mklem64t_libpath)/$(IFACE_LIB) $(mklem64t_libpath)/$(THREADING_LIB) &lt;BR /&gt; $(mklem64t_libpath)/$(CORE_LIB) -L$(mklem64t_libpath) -o $(name).so&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;The resulting custom shared object is linked with the mex c-file code, which is quite simple. It contains no unresolved references - just matlab libs and the custom object.&lt;BR /&gt;Then the example 3x3 system is tried:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;mrt_inv(speye(3))&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;the result is below:&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;BR /&gt;cs_mex_check executed&lt;BR /&gt;convert indexing Matlab -&amp;gt; MKL style done&lt;BR /&gt;dss_create executed&lt;BR /&gt;dss_define_structure executed&lt;BR /&gt;MKL-DSS-DSS-Error, An unclassifiable error occurred&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;All the lines except the last one are debugging messages which I output using Matlab printf functions. &lt;BR /&gt;The last line is from MKL and immediately after that Matlab is crashing with no special message.&lt;BR /&gt;&lt;BR /&gt;I tried quite a few variations from the 
above, but the result is basically the same. My initial suspicion was that Matlab is using old version of MKL, so there may be a version conflict. For this reason I created a custom shared object, so that I can be sure that new MKL blas version is used in my mex file. Unfortunately the crashes keep happening.&lt;BR /&gt;&lt;BR /&gt;Can you advice me what to do and where to look.&lt;BR /&gt;Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;--JS&lt;BR /&gt;</description>
    <pubDate>Mon, 04 Aug 2008 13:03:06 GMT</pubDate>
    <dc:creator>julian_stoev</dc:creator>
    <dc:date>2008-08-04T13:03:06Z</dc:date>
    <item>
      <title>linux matlab mex linking with MKL sparse solvers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/linux-matlab-mex-linking-with-MKL-sparse-solvers/m-p/846809#M6310</link>
      <description>First some version information, since I suspect this is important:&lt;BR /&gt;&lt;BR /&gt;==&lt;BR /&gt;MATLAB Version 7.3.0.298 (R2006b)&lt;BR /&gt;Operating System: Linux 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64&lt;BR /&gt;Java VM Version: Java is not enabled&lt;BR /&gt;&lt;BR /&gt;==&lt;BR /&gt;mkl/10.0.3.020&lt;BR /&gt;&lt;BR /&gt;I want to make a mex file calling MKL sparse solvers. For now I call sequential libraries, but something goes wrong when I call the resulting file. I have created a custom shared object containing functions &lt;BR /&gt;dss_create_&lt;BR /&gt;dss_define_structure_&lt;BR /&gt;dss_reorder_&lt;BR /&gt;dss_factor_real_&lt;BR /&gt;dss_delete_&lt;BR /&gt;dss_solve_real_&lt;BR /&gt;&lt;BR /&gt;The command line to create the custom shared object looks like this: make em64t export=mrt_inv_funclist_nomp.txt interface=lp64 threading_name=sequential name=libmkl_custom&lt;BR /&gt;&lt;BR /&gt;I have made some modifications in the custom make tool to avoid any calls to libguile&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;IFACE_COMP_PART=gf &lt;BR /&gt;IFACE_THREADING_PART=intel &lt;BR /&gt; &lt;BR /&gt;ifeq ($(interface),ilp64)&amp;amp;nb
sp; &lt;BR /&gt;IFACE_LIB=libmkl_$(IFACE_COMP_PART)_ilp64.a &lt;BR /&gt;else &lt;BR /&gt;IFACE_LIB=libmkl_$(IFACE_COMP_PART)_lp64.a &lt;BR /&gt;endif &lt;BR /&gt;
 &lt;BR /&gt;THREADING_LIB=libmkl_sequential.a  &lt;BR /&gt;CORE_LIB=libmkl_core.a &lt;BR /&gt;&amp;amp;nb
sp; &lt;BR /&gt;func_list := $(addprefix -u ,$(shell cat $(export)))   &lt;BR /&gt;em64t: &lt;BR /&gt; gcc -shared -Bdynamic $(func_list)  &lt;BR /&gt; $(mklem64t_libpath)/libmkl_solver_lp64_sequential.a &lt;BR /&gt; $(xerbla) $(mklem64t_libpath)/$(IFACE_LIB) $(mklem64t_libpath)/$(THREADING_LIB) &lt;BR /&gt; $(mklem64t_libpath)/$(CORE_LIB) -L$(mklem64t_libpath) -o $(name).so&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;The resulting custom shared object is linked with the mex c-file code, which is quite simple. It contains no unresolved references - just matlab libs and the custom object.&lt;BR /&gt;Then the example 3x3 system is tried:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;mrt_inv(speye(3))&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;the result is below:&lt;BR /&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;BR /&gt;cs_mex_check executed&lt;BR /&gt;convert indexing Matlab -&amp;gt; MKL style done&lt;BR /&gt;dss_create executed&lt;BR /&gt;dss_define_structure executed&lt;BR /&gt;MKL-DSS-DSS-Error, An unclassifiable error occurred&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;All the lines except the last one are debugging messages which I output using Matlab printf functions. &lt;BR /&gt;The last line is from MKL and immediately after that Matlab is crashing with no special message.&lt;BR /&gt;&lt;BR /&gt;I tried quite a few variations from the 
above, but the result is basically the same. My initial suspicion was that Matlab is using old version of MKL, so there may be a version conflict. For this reason I created a custom shared object, so that I can be sure that new MKL blas version is used in my mex file. Unfortunately the crashes keep happening.&lt;BR /&gt;&lt;BR /&gt;Can you advice me what to do and where to look.&lt;BR /&gt;Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;--JS&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:03:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/linux-matlab-mex-linking-with-MKL-sparse-solvers/m-p/846809#M6310</guid>
      <dc:creator>julian_stoev</dc:creator>
      <dc:date>2008-08-04T13:03:06Z</dc:date>
    </item>
  </channel>
</rss>

