<?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 Segmentation fault from a BLAS routine in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778207#M1240</link>
    <description>Dear Victor,&lt;BR /&gt;&lt;BR /&gt;I've tried to set lda = 3 and it works. But I am so confused since according to the manual it should not be 3.&lt;BR /&gt;&lt;BR /&gt;lda INTEGER. Specifies the first dimension of a as declared in&lt;BR /&gt; the calling (sub)program. When trans = 'N' or 'n', then&lt;BR /&gt; lda must be at least max(1,n), otherwise lda must be at&lt;BR /&gt; least max(1, k).&lt;BR /&gt;&lt;BR /&gt;And the first dimension of my A is 2. Anyway, thanks for you kind help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Stanley KO</description>
    <pubDate>Sun, 18 Jul 2010 03:49:10 GMT</pubDate>
    <dc:creator>stanleyimko</dc:creator>
    <dc:date>2010-07-18T03:49:10Z</dc:date>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778204#M1237</link>
      <description>Dear all,&lt;BR /&gt;&lt;BR /&gt;I am trying to implement a BLAS routine dsyrk with the following code. It was compiled successfully. But whenever I excute the output file, a Segmentation fault appears. I've checked the code from time to time and found no error. Please help. Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;The compilation line:&lt;BR /&gt;$ icpc syrk.cpp -L/libmkl_solver_ilp64.a -Wl,--start-group
-lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp
-lpthread -o syrk.out&lt;BR /&gt;&lt;BR /&gt;The source code:&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;&lt;BR /&gt;extern "C"&lt;BR /&gt;{&lt;BR /&gt;#include "mkl.h"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;/********C := alpha * A'A + beta * C*********/&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt; /* 2x3 matrix A&lt;BR /&gt; 3 7 2&lt;BR /&gt; 4 1 9&lt;BR /&gt; */&lt;BR /&gt;&lt;BR /&gt; const CBLAS_ORDER order = CblasRowMajor;&lt;BR /&gt; const CBLAS_TRANSPOSE trans = CblasTrans;&lt;BR /&gt; const CBLAS_UPLO uplo = CblasUpper;&lt;BR /&gt;&lt;BR /&gt; const int N = 3; // the order of the matrix C&lt;BR /&gt; const int K = 2; // when trans = 'T', K is the number of rows of A &lt;BR /&gt; const double alpha = 1.0;&lt;BR /&gt; const double a[6] = {3.0, 7.0, 2.0, 4.0, 1.0, 9.0};&lt;BR /&gt; const int lda = 2; // the first dimension of A&lt;BR /&gt; const double beta = 0.0;&lt;BR /&gt; double c[9] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0} ;&lt;BR /&gt; const int ldc = 3;&lt;BR /&gt;&lt;BR /&gt; cblas_dsyrk(order, uplo, trans, N, K, alpha, a, lda, beta, c, ldc);&lt;BR /&gt; &lt;BR /&gt; for( int i = 0; i &amp;lt; 9; i++ )&lt;BR /&gt; cout &amp;lt;&amp;lt; c&lt;I&gt; &amp;lt;&amp;lt; " ";&lt;BR /&gt; cout &amp;lt;&amp;lt; endl;&lt;BR /&gt; &lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Stanley KO&lt;/I&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Sat, 17 Jul 2010 03:48:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778204#M1237</guid>
      <dc:creator>stanleyimko</dc:creator>
      <dc:date>2010-07-17T03:48:36Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778205#M1238</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It looks like root cause of your problem is related to LP64/ILP64.&lt;BR /&gt;&lt;BR /&gt;If you linked with ILP64 MKL libraries you need to add compiler option -DMKL_ILP64 for C-compilation&lt;BR /&gt;&lt;BR /&gt;Or please try to use LP64 model:&lt;BR /&gt;&lt;BR /&gt;-L$MKLPATH $MKLPATH/libmkl_solver_lp64.a -Wl,--start-group -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread &lt;BR /&gt;&lt;BR /&gt;Please seealso thread: &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=76101&amp;amp;o=d&amp;amp;s=lr"&gt;http://software.intel.com/en-us/forums/showthread.php?t=76101&amp;amp;o=d&amp;amp;s=lr&lt;/A&gt;</description>
      <pubDate>Sat, 17 Jul 2010 16:17:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778205#M1238</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-07-17T16:17:40Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778206#M1239</link>
      <description>Dear Victor,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. I have tried both link in compilation. But the Error now becomes &lt;BR /&gt;&lt;BR /&gt;MKL ERROR: Parameter 8 was incorrect on entry to cblas_dsyrk&lt;BR /&gt;&lt;BR /&gt;I have checked the code and the BLAS manual but found no mistake in the input. Still don't know what's wrong.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Stanley KO</description>
      <pubDate>Sun, 18 Jul 2010 03:26:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778206#M1239</guid>
      <dc:creator>stanleyimko</dc:creator>
      <dc:date>2010-07-18T03:26:15Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778207#M1240</link>
      <description>Dear Victor,&lt;BR /&gt;&lt;BR /&gt;I've tried to set lda = 3 and it works. But I am so confused since according to the manual it should not be 3.&lt;BR /&gt;&lt;BR /&gt;lda INTEGER. Specifies the first dimension of a as declared in&lt;BR /&gt; the calling (sub)program. When trans = 'N' or 'n', then&lt;BR /&gt; lda must be at least max(1,n), otherwise lda must be at&lt;BR /&gt; least max(1, k).&lt;BR /&gt;&lt;BR /&gt;And the first dimension of my A is 2. Anyway, thanks for you kind help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Stanley KO</description>
      <pubDate>Sun, 18 Jul 2010 03:49:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778207#M1240</guid>
      <dc:creator>stanleyimko</dc:creator>
      <dc:date>2010-07-18T03:49:10Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778208#M1241</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Well, it's not so simple to use CBLAScorrectly passing LDA etc...</description>
      <pubDate>Sun, 18 Jul 2010 06:03:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778208#M1241</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-07-18T06:03:29Z</dc:date>
    </item>
    <item>
      <title>Segmentation fault from a BLAS routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778209#M1242</link>
      <description>C stores 2-D arrays by rows; Fortran, which underlies much of BLAS/LAPACK, stores by columns. &lt;BR /&gt;&lt;BR /&gt;The C interface to MKL has to know how many columns there are in the actual matrix being passed as a 1-D array. In your example, there are 3 columns.</description>
      <pubDate>Mon, 19 Jul 2010 19:41:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Segmentation-fault-from-a-BLAS-routine/m-p/778209#M1242</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-07-19T19:41:10Z</dc:date>
    </item>
  </channel>
</rss>

