<?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 Re:Segmentation fault for using LAPACK in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229061#M30362</link>
    <description>&lt;P&gt;Could you try to link against the sequential version of mkl and run this case once again.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 17 Nov 2020 14:16:25 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2020-11-17T14:16:25Z</dc:date>
    <item>
      <title>Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229016#M30361</link>
      <description>&lt;P&gt;Hello, "I have a problem Houston!" &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;I can't run MKL because the following message is displaying, on the my Intel Xeon 12-core workstation&lt;/P&gt;&lt;P&gt;with the 32GB of RAM, powered by the 64-bit Oracle Linux, NetBeans IDE(Oracle Developer Studio).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"RUN FINISHED; Segmentation fault; core dumped; real time: 930ms; user: 0ms; system: 0ms"&lt;/P&gt;&lt;P&gt;This occurs for the both Intel/GNU compilers!&lt;/P&gt;&lt;P&gt;It work fine with up to 700x700 matrix (currently, 10x10)&lt;/P&gt;&lt;P&gt;Matrix [A] :&lt;BR /&gt;18.04 8.47 16.82 17.15 19.58 4.24 7.20 16.50 5.97 11.90&lt;BR /&gt;10.25 13.50 7.83 11.03 20.45 19.68 13.65 15.40 3.04 13.03&lt;BR /&gt;0.35 5.22 2.95 17.27 3.36 8.61 2.79 2.34 21.45 4.69&lt;BR /&gt;11.02 18.02 13.16 6.36 13.69 11.26 10.60 20.89 6.28 16.56&lt;BR /&gt;11.31 16.53 8.59 19.15 6.08 7.57 17.35 19.74 1.50 20.39&lt;BR /&gt;11.30 1.85 4.13 14.24 19.12 7.49 1.38 0.43 9.83 1.35&lt;BR /&gt;5.12 20.84 19.37 18.27 5.73 11.59 8.06 16.33 11.01 14.34&lt;BR /&gt;11.42 0.84 9.40 20.01 19.99 15.48 6.11 15.86 13.74 7.60&lt;BR /&gt;14.77 3.56 9.45 18.90 17.81 7.09 4.92 19.19 7.52 14.75&lt;BR /&gt;20.54 12.64 14.12 18.44 9.44 19.84 8.56 17.50 14.69 19.56&lt;/P&gt;&lt;P&gt;Inverse of Matrix [A] :&lt;BR /&gt;-0.09 -0.15 -0.10 0.09 0.08 0.14 -0.01 0.09 -0.08 0.04&lt;BR /&gt;-0.19 -0.17 -0.12 0.14 0.09 0.21 0.07 0.08 -0.04 -0.02&lt;BR /&gt;0.22 0.16 0.10 -0.13 -0.11 -0.19 -0.00 -0.09 -0.00 0.02&lt;BR /&gt;-0.08 -0.06 -0.06 -0.02 0.06 0.08 0.05 0.05 0.01 -0.01&lt;BR /&gt;0.06 0.09 0.05 -0.02 -0.05 -0.03 -0.02 -0.07 0.06 -0.03&lt;BR /&gt;-0.05 0.03 -0.04 -0.03 -0.01 0.01 0.03 0.03 -0.01 0.03&lt;BR /&gt;0.18 0.10 0.11 -0.05 0.01 -0.14 -0.09 -0.01 -0.10 -0.01&lt;BR /&gt;-0.18 -0.20 -0.14 0.16 0.09 0.13 0.03 0.19 -0.04 -0.03&lt;BR /&gt;0.05 -0.01 0.07 0.04 -0.02 -0.03 -0.05 -0.00 -0.03 0.00&lt;BR /&gt;0.21 0.29 0.21 -0.19 -0.15 -0.25 -0.06 -0.28 0.19 0.03&lt;/P&gt;&lt;P&gt;Matrix [A] applying to it's inverse form :&lt;BR /&gt;1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00&lt;BR /&gt;0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00&lt;/P&gt;&lt;P&gt;Unfortunately, no more... &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;The source code is,&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;cstdlib&amp;gt;&lt;BR /&gt;#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;#include &amp;lt;iomanip&amp;gt;&lt;BR /&gt;#include &amp;lt;string&amp;gt;&lt;BR /&gt;#include &amp;lt;math.h&amp;gt;&lt;/P&gt;&lt;P&gt;using namespace std;&lt;BR /&gt;void print(string, MKL_INT, MKL_INT, double[], MKL_INT);&lt;BR /&gt;void mult(double[], MKL_INT, double[], MKL_INT, double[]);&lt;BR /&gt;const int M = 1000, N = 1000, LDA = M, LDB=N, NRHS=N, p = 8;&lt;BR /&gt;const double CF = 1.0e+08;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;MKL_INT m = M, n = N, lda = LDA, ldb = LDB, info, nrhs = NRHS, ipiv[N];&lt;BR /&gt;double b[LDB*NRHS],a[LDA*M],asv[LDA*M],bsv[LDB*NRHS];&lt;BR /&gt;int i, j;&lt;BR /&gt;// forming a unit matrix&lt;BR /&gt;for (i = 0; i &amp;lt; M; i++)&lt;BR /&gt;{&lt;BR /&gt;for (j = 0; j &amp;lt; N; ++j)&lt;BR /&gt;{&lt;BR /&gt;b[i*N + j] = 0.0;&lt;BR /&gt;if (i == j)b[i*N + j] = 1.0;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;// forming a source matrix&lt;BR /&gt;for (i = 0; i &amp;lt; LDA*M; ++i)a[i] = rand() / CF;&lt;BR /&gt;//&lt;BR /&gt;// saving the source matrix&lt;BR /&gt;//&lt;BR /&gt;for (i = 0; i &amp;lt; M; i++)&lt;BR /&gt;{&lt;BR /&gt;for (j = 0; j &amp;lt; LDA; j++)&lt;BR /&gt;asv[i*LDA + j] = a[i*LDA + j];&lt;BR /&gt;}&lt;BR /&gt;//&lt;BR /&gt;// saving the unit matrix&lt;BR /&gt;//&lt;BR /&gt;for (i = 0; i &amp;lt; M; i++)&lt;BR /&gt;{&lt;BR /&gt;for (j = 0; j &amp;lt; NRHS; j++)&lt;BR /&gt;bsv[i*NRHS + j] = b[i*NRHS + j];&lt;BR /&gt;}&lt;BR /&gt;//&lt;BR /&gt;// calling a parallel LAPACK solver&lt;BR /&gt;//&lt;BR /&gt;info = LAPACKE_dgesv(LAPACK_ROW_MAJOR, n, nrhs, a, lda, ipiv, b, ldb);&lt;BR /&gt;if (info &amp;gt; 0)&lt;BR /&gt;{&lt;BR /&gt;cout &amp;lt;&amp;lt; "The algorithm computing LU failed to converge" &amp;lt;&amp;lt; endl;&lt;BR /&gt;return EXIT_FAILURE;&lt;BR /&gt;}&lt;BR /&gt;if(N&amp;lt;=20)&lt;BR /&gt;{&lt;BR /&gt;print("Matrix [A] :", m, n, asv, lda);&lt;BR /&gt;print("Inverse of Matrix [A] :", m, nrhs, b, ldb);&lt;BR /&gt;mult(asv,lda,b,ldb,bsv);&lt;BR /&gt;print("Matrix [A] applying to it's inverse form :",m, nrhs, bsv, ldb);&lt;BR /&gt;}&lt;BR /&gt;cout &amp;lt;&amp;lt;endl&amp;lt;&amp;lt; "Successful termination...press any key to continue!" &amp;lt;&amp;lt; endl;&lt;BR /&gt;cin.get();&lt;BR /&gt;return EXIT_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;void print(string str, MKL_INT m, MKL_INT n, double a[], MKL_INT lda)&lt;BR /&gt;{&lt;BR /&gt;MKL_INT i, j;&lt;BR /&gt;cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; str &amp;lt;&amp;lt; endl;&lt;BR /&gt;for (i = 0; i &amp;lt; m; i++)&lt;BR /&gt;{&lt;BR /&gt;for (j = 0; j &amp;lt; n; j++) cout &amp;lt;&amp;lt; setw(p) &amp;lt;&amp;lt; fixed &amp;lt;&amp;lt; setprecision(2) &amp;lt;&amp;lt; a[i*lda + j];&lt;BR /&gt;cout &amp;lt;&amp;lt; endl;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;void mult(double a[], MKL_INT ia, double b[], MKL_INT jb, double c[])&lt;BR /&gt;{&lt;BR /&gt;MKL_INT i, j, k;&lt;BR /&gt;double sum=0.0;&lt;BR /&gt;for(i=0; i&amp;lt;ia; ++i)&lt;BR /&gt;{&lt;BR /&gt;for(j=0; j&amp;lt;N; ++j)&lt;BR /&gt;{&lt;BR /&gt;sum=0;&lt;BR /&gt;for(k=0; k&amp;lt;jb; ++k)&lt;BR /&gt;sum+=a[i*N+k]*b[k*N+j];&lt;BR /&gt;c[i*N+j]=fabs(sum);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;They are a libraries linked to GNU,&lt;/P&gt;&lt;P&gt;-mkl_core&lt;/P&gt;&lt;P&gt;-gomp&lt;/P&gt;&lt;P&gt;-mkl_gf_lp64&lt;/P&gt;&lt;P&gt;-mkl_gnu_thread&lt;/P&gt;&lt;P&gt;And correspondent library for INTEL as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE SAME RESULT FOR BOTH(Intel and GNU).&lt;/P&gt;&lt;P&gt;Many thanks for any help, friends!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 11:07:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229016#M30361</guid>
      <dc:creator>maksyutov__malik</dc:creator>
      <dc:date>2020-11-17T11:07:17Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229061#M30362</link>
      <description>&lt;P&gt;Could you try to link against the sequential version of mkl and run this case once again.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Nov 2020 14:16:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229061#M30362</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-17T14:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229456#M30365</link>
      <description>&lt;P&gt;Thank you Gennady!&lt;/P&gt;&lt;P&gt;It was a some problems with the my account. &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;No, the sequential lib was not solve my problem&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:10:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229456#M30365</guid>
      <dc:creator>Malik_M_</dc:creator>
      <dc:date>2020-11-18T14:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229457#M30366</link>
      <description>&lt;P&gt;However, the problem with the my account still exist! It's marked as 'spam probably'....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:13:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229457#M30366</guid>
      <dc:creator>Malik_M_</dc:creator>
      <dc:date>2020-11-18T14:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229467#M30367</link>
      <description>&lt;P&gt;This is a my project setting in NetBeans for GNU gcc v.4.8.5 compiler&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 14:29:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229467#M30367</guid>
      <dc:creator>Malik_M_</dc:creator>
      <dc:date>2020-11-18T14:29:54Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229533#M30368</link>
      <description>&lt;P&gt;Malik,&lt;/P&gt;&lt;P&gt;Could you allocate all working arrays dynamically (e.x mkl_malloc / mkl_free) instead of allocation at the stack? It might be the cause of the problem.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Nov 2020 17:45:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229533#M30368</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-18T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229538#M30369</link>
      <description>&lt;P&gt;Ok Gennady, I will try!&lt;/P&gt;&lt;P&gt;PS My account was fixed.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:00:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229538#M30369</guid>
      <dc:creator>Malik_M_</dc:creator>
      <dc:date>2020-11-18T18:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229552#M30370</link>
      <description>&lt;P&gt;Thank you very much Gennady!&lt;/P&gt;&lt;P&gt;It works fine. With the 'extra' large matrices as well. Thanks to MKL_LONG type.&lt;/P&gt;&lt;P&gt;However, I used a more compact form(new/delete) the C-like&amp;nbsp; malloc instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Malik.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:03:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229552#M30370</guid>
      <dc:creator>Malik_M_</dc:creator>
      <dc:date>2020-11-18T19:03:28Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229697#M30371</link>
      <description>&lt;P&gt;yes, the main idea here is dynamic allocation instead of allocation on the stack. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2020 01:59:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229697#M30371</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-19T01:59:39Z</dc:date>
    </item>
    <item>
      <title>Re:Segmentation fault for using LAPACK</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229700#M30372</link>
      <description>&lt;P&gt;The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2020 02:01:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-for-using-LAPACK/m-p/1229700#M30372</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-19T02:01:25Z</dc:date>
    </item>
  </channel>
</rss>

