<?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 had done that already and, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169444#M28449</link>
    <description>&lt;P&gt;I had done that already and, together with the segmentation fault, I also got the error that&amp;nbsp;parameter number&amp;nbsp;9 had an illegal value in descinit. In the past I had solved this problem for another program by linking with LP6, as somebody suggested me in this forum.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 09:10:42 GMT</pubDate>
    <dc:creator>Arrigoni__Viviana</dc:creator>
    <dc:date>2019-06-24T09:10:42Z</dc:date>
    <item>
      <title>scalapack psgemm fails</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169440#M28445</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use psgemm to multiply a matrix A by its transpose on its left-hand-side, namely: C = At * A&lt;/P&gt;&lt;P&gt;I am trying to run a simple program with 9 processors placed&amp;nbsp;in a 3x3 grid. Each processor generates a random square matrix, Ablock, of size block_dim x block_dim (choosing here block_dim = 10), that is a submatrix of A. Hence the global matrix A is a 30x30 matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;myrow and mycol are the row and column grid&amp;nbsp;indexes of processors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;idesca and idescc are the descriptors of matrices A and C.&amp;nbsp;&lt;/P&gt;&lt;P&gt;C is initialized as a block_dim x block_dim array.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call psgemm as follows, but I get a segmentation fault:&lt;/P&gt;&lt;P&gt;psgemm_('T', 'N', block_dim, block_dim, block_dim, &amp;amp;one, Ablock, myrow * block_dim, mycol * block_dim, idesca, Ablock, myrow * block_dim, mycol * block_dim, idescal, &amp;amp;zero, C, myrow * block_dim, mycol * block_dim, idescc);&lt;/P&gt;&lt;P&gt;what am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 09:11:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169440#M28445</guid>
      <dc:creator>Arrigoni__Viviana</dc:creator>
      <dc:date>2019-06-20T09:11:16Z</dc:date>
    </item>
    <item>
      <title>Viviana, could you give us</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169441#M28446</link>
      <description>&lt;P&gt;Viviana, could you give us the test which we may compile and run on our side?&amp;nbsp; &amp;nbsp; &amp;nbsp;and also show how did you link this case and version of mkl did you try.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 05:15:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169441#M28446</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-06-24T05:15:55Z</dc:date>
    </item>
    <item>
      <title>Here is what I do before</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169442#M28447</link>
      <description>&lt;P&gt;Here is what I do before calling psgemm:&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;int n_procs, id;
int nprow, npcol, myrow, mycol, np, info;
int idesca[9], idescc[9];
int block_dim, n;
Cblacs_pinfo(&amp;amp;id, &amp;amp;n_procs);

np = (ceil)(sqrtf((double)n_procs));
n = 27;
block_dim = n / np;

Cblacs_get( -1, 0, &amp;amp;icon );

Cblacs_gridinit( &amp;amp;icon,"r", np, np );&amp;nbsp;

Cblacs_gridinfo( icon, &amp;amp;nprow, &amp;amp;npcol, &amp;amp;myrow, &amp;amp;mycol);

descinit_(idesca, &amp;amp;n, &amp;amp;n&amp;nbsp; , &amp;amp;block_dim, &amp;amp;block_dim , &amp;amp;izero, &amp;amp;izero, &amp;amp;icon, &amp;amp;block_dim, &amp;amp;info);

descinit_(idescc,&amp;nbsp; &amp;amp;n, &amp;amp;n, &amp;amp;block_dim, &amp;amp;block_dim, &amp;amp;izero, &amp;amp;izero, &amp;amp;icon, &amp;amp;block_dim, &amp;amp;info);

float *Ablock = (float*)calloc(block_dim * block_dim, sizeof(float));

float *C = (float*)calloc(block_dim * block_dim, sizeof(float));

for (int k = 0; k &amp;lt; n_procs; ++k){
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generate_rand_mtx(Ablock, block_dim, block_dim);
}&lt;/PRE&gt;

&lt;P&gt;Where generate_rand_mtx is the following function:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;void generate_rand_mtx(float *A, int m , int n){
&amp;nbsp; &amp;nbsp; int seed = time(NULL);
&amp;nbsp; &amp;nbsp; srand(seed);
&amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; m; ++i){
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int j = 0; j &amp;lt; n; ++j)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A[i * n + j] = (float)rand()/(float)(RAND_MAX);
&amp;nbsp; &amp;nbsp; }
    return;
}&lt;/PRE&gt;

&lt;P&gt;I compile the code in this way:&lt;BR /&gt;mpiicc -std=c99 -DMKL_LP64 -I${MKLROOT}/include -o atasc AtA_scalapack.c -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm -ldl&lt;BR /&gt;&lt;BR /&gt;and I run it with 9 processors:&lt;BR /&gt;mpirun -np 9 ./atasc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 08:20:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169442#M28447</guid>
      <dc:creator>Arrigoni__Viviana</dc:creator>
      <dc:date>2019-06-24T08:20:56Z</dc:date>
    </item>
    <item>
      <title>-DMKL_LP64 - what is that? </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169443#M28448</link>
      <description>&lt;P&gt;&lt;STRONG&gt;-DMKL_LP64&lt;/STRONG&gt; - what is that?&amp;nbsp; Do you want to link with ILP64 API, then please set&amp;nbsp; -DMKL_ILP64&amp;nbsp; and link with ILP64 libs&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 08:58:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169443#M28448</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-06-24T08:58:19Z</dc:date>
    </item>
    <item>
      <title>I had done that already and,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169444#M28449</link>
      <description>&lt;P&gt;I had done that already and, together with the segmentation fault, I also got the error that&amp;nbsp;parameter number&amp;nbsp;9 had an illegal value in descinit. In the past I had solved this problem for another program by linking with LP6, as somebody suggested me in this forum.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 09:10:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/scalapack-psgemm-fails/m-p/1169444#M28449</guid>
      <dc:creator>Arrigoni__Viviana</dc:creator>
      <dc:date>2019-06-24T09:10:42Z</dc:date>
    </item>
  </channel>
</rss>

