<?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 Andrey, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957431#M15584</link>
    <description>&lt;P&gt;Andrey,&lt;/P&gt;

&lt;P&gt;thanks, that was the fault! I am guessing if the array-linear representation&lt;/P&gt;

&lt;P&gt;I am using and called in the routine vsldSSNewTask is either the&lt;/P&gt;

&lt;P&gt;{x_0,y_0,...,x_npart,y_npart}&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;{x_0,...,x_npart,y_0,...,y_npart}&lt;/P&gt;

&lt;P&gt;?&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2014 10:17:09 GMT</pubDate>
    <dc:creator>Fabio_G_</dc:creator>
    <dc:date>2014-03-24T10:17:09Z</dc:date>
    <item>
      <title>Simple task from example failing to execute</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957429#M15582</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I' ve got a simple example from &lt;A href="http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mklman/index.htm"&gt;http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mklman/index.htm&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;which works fine.&lt;/P&gt;

&lt;P&gt;I wrote the pretty similar code&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;
#include &amp;lt;stdio.h&amp;gt;
#include "mkl.h"
#include "errcheck.inc"

#define NPART 10
#define NDIM 2
#define STREAMFILENAME "task.stream"

int main(){

  VSLStreamStatePtr stream;
  FILE* streamfile;
  int errcode=0;
  double *r=malloc(NPART*NDIM*sizeof(double));
  double M[]={1e0,0e0},S[]={1e0,1e0};

  VSLSSTaskPtr task;
  double *m=malloc(NDIM*sizeof(double));
  MKL_INT rstorage=VSL_SS_MATRIX_STORAGE_ROWS;
  int ipart=0,idata=0,idim=0;
  MKL_INT npart=NPART,ndim=NDIM,xstorage=VSL_SS_MATRIX_STORAGE_COLS;

  streamfile=fopen(STREAMFILENAME,"r");
  if(streamfile){
    fclose(streamfile);
    errcode=vslLoadStreamF(&amp;amp;stream,STREAMFILENAME);
  }else{
    errcode=vslNewStream(&amp;amp;stream,VSL_BRNG_MCG31,7777777);
  }

  errcode=vdRngGaussianMV(VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2,stream,
    NPART,(double*)r,NDIM,VSL_MATRIX_STORAGE_DIAGONAL,M,(double*)S);

  errcode=vsldSSNewTask(&amp;amp;task,&amp;amp;npart,&amp;amp;ndim,&amp;amp;xstorage,r,0,0);

  errcode=vsldSSEditTask(task,VSL_SS_ED_MEAN,m);

  errcode=vsldSSCompute(task,VSL_SS_MEAN,VSL_SS_METHOD_FAST);
  errcode=vslSSDeleteTask(&amp;amp;task);
  CheckVslError(errcode);

  for(idim=0;idim&amp;lt;NDIM;idim++)printf("%20.16e ",m[idim]);
  printf("\n");  free(r);
  free(m);
  errcode=vslSaveStreamF(stream,STREAMFILENAME);

  return 0;
}

this wont work at all. I can compile and run, but a fatal error occurs
&lt;/PRE&gt;

&lt;P&gt;in between vsldSSCompute and result printing.&lt;/P&gt;

&lt;P&gt;Where am I doing the error? Can someone help me?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 09:29:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957429#M15582</guid>
      <dc:creator>Fabio_G_</dc:creator>
      <dc:date>2014-03-24T09:29:48Z</dc:date>
    </item>
    <item>
      <title>Hi Fabio,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957430#M15583</link>
      <description>&lt;P&gt;Hi Fabio,&lt;/P&gt;

&lt;P&gt;You generate 10 vectors of size 2 with MKL multi-variate version of Gaussian RNG, thus, the dimension of Summary Stats task&amp;nbsp;p should be set to 2, and number of observations n - to 10. Please, replace the line errcode=vsldSSNewTask(&amp;amp;task,&amp;amp;npart,&amp;amp;ndim,&amp;amp;xstorage,r,0,0); with&amp;nbsp;errcode=vsldSSNewTask(&amp;amp;task,&amp;amp;ndim, &amp;amp;npart,&amp;amp;xstorage,r,0,0);&lt;/P&gt;

&lt;P&gt;Also,&amp;nbsp;do not forget to&amp;nbsp;delete&amp;nbsp;the memory&amp;nbsp;allocated for need of random number generation via call to the function &lt;SPAN class="kwd"&gt;&lt;FONT face="Courier New"&gt;vslDeleteStream();&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Please, let me know if it answers your question.&lt;/P&gt;

&lt;P&gt;Andrey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:10:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957430#M15583</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2014-03-24T10:10:17Z</dc:date>
    </item>
    <item>
      <title>Andrey,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957431#M15584</link>
      <description>&lt;P&gt;Andrey,&lt;/P&gt;

&lt;P&gt;thanks, that was the fault! I am guessing if the array-linear representation&lt;/P&gt;

&lt;P&gt;I am using and called in the routine vsldSSNewTask is either the&lt;/P&gt;

&lt;P&gt;{x_0,y_0,...,x_npart,y_npart}&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;{x_0,...,x_npart,y_0,...,y_npart}&lt;/P&gt;

&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:17:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957431#M15584</guid>
      <dc:creator>Fabio_G_</dc:creator>
      <dc:date>2014-03-24T10:17:09Z</dc:date>
    </item>
    <item>
      <title>Hi Fabio,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957432#M15585</link>
      <description>&lt;P&gt;Hi Fabio,&lt;/P&gt;

&lt;P&gt;MKL Multi-variate Gaussian RNG packs the numbers in column-major format, that is&lt;/P&gt;

&lt;PRE class="brush:;"&gt;
{ (x(0),y(0)),
&amp;nbsp; (x(1),y(1)),
&amp;nbsp; (x(2),y(2)),
&amp;nbsp;&amp;nbsp; ...
};

So, in your example you correctly specified the storage format for the dataset xstorage=VSL_SS_MATRIX_STORAGE_COLS;&lt;/PRE&gt;

&lt;P&gt;Andrey&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:24:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957432#M15585</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2014-03-24T10:24:32Z</dc:date>
    </item>
    <item>
      <title>OK! Thank you very much for</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957433#M15586</link>
      <description>&lt;P&gt;OK! Thank you very much for everything!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 10:29:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Simple-task-from-example-failing-to-execute/m-p/957433#M15586</guid>
      <dc:creator>Fabio_G_</dc:creator>
      <dc:date>2014-03-24T10:29:14Z</dc:date>
    </item>
  </channel>
</rss>

