<?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 I have solved the issue. It in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Some-subroutines-of-lapack-in-mkl-gives-Segmentation-fault-for/m-p/1125847#M25235</link>
    <description>&lt;P&gt;I have solved the issue.&amp;nbsp;It is because the default soft limit on stack size is too small for declaring large array in main function(stack). Just try `ulimit -s unlimited`, everything works fine then.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2019 01:33:05 GMT</pubDate>
    <dc:creator>Zhang__Simon</dc:creator>
    <dc:date>2019-07-16T01:33:05Z</dc:date>
    <item>
      <title>Some subroutines of lapack in mkl gives Segmentation fault for matrix dimension larger than 1020</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Some-subroutines-of-lapack-in-mkl-gives-Segmentation-fault-for/m-p/1125846#M25234</link>
      <description>&lt;P&gt;OS: Ubuntu 18.04.2 server, kernel&amp;nbsp;4.15.0-50-generic. MKL provided by intel parallel studio xe 2019.3.&lt;/P&gt;&lt;P&gt;The C code reproducing the error&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;mkl.h&amp;gt;

#define N 1021 

int main(){
printf("begin main\n");
double m&lt;N&gt;,a[N*N];
lapack_int n1=N, n2=N;
for(size_t i=0;i&amp;lt;N*N;i++){
if(i%(N+1)==0){
a&lt;I&gt;=(double) rand()/RAND_MAX;
}
else {a&lt;I&gt;=0;}
}
lapack_int info;
printf("begin lapack\n");
info = LAPACKE_dsyevd(LAPACK_ROW_MAJOR, 'V','U', n1, a, n2, m);
printf("%d: end lapack\n", info);
return 0;
}

&lt;/I&gt;&lt;/I&gt;&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;This code gave correct results for matrix smaller than 1020*1020, while gave Segmentation fault when N&amp;gt;1020. The error persists for icc, gcc, linking options as simple as -mkl for icc or full linking and compiling options as advised by linking advisor.&amp;nbsp;dsteqr routine seems have similar issues.&lt;/P&gt;
&lt;P&gt;I am new to directly using lower level routines in&amp;nbsp;MKL, so there may also be some problems in my&amp;nbsp;code above. Though it works well for smaller matrix.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 08:28:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Some-subroutines-of-lapack-in-mkl-gives-Segmentation-fault-for/m-p/1125846#M25234</guid>
      <dc:creator>Zhang__Simon</dc:creator>
      <dc:date>2019-07-11T08:28:31Z</dc:date>
    </item>
    <item>
      <title>I have solved the issue. It</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Some-subroutines-of-lapack-in-mkl-gives-Segmentation-fault-for/m-p/1125847#M25235</link>
      <description>&lt;P&gt;I have solved the issue.&amp;nbsp;It is because the default soft limit on stack size is too small for declaring large array in main function(stack). Just try `ulimit -s unlimited`, everything works fine then.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 01:33:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Some-subroutines-of-lapack-in-mkl-gives-Segmentation-fault-for/m-p/1125847#M25235</guid>
      <dc:creator>Zhang__Simon</dc:creator>
      <dc:date>2019-07-16T01:33:05Z</dc:date>
    </item>
  </channel>
</rss>

