<?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 Single precision for Complex Matrices in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820443#M4682</link>
    <description>&lt;P&gt;The speedup depends on many factors  type of matrix, size of matrix, architecture ant etc. But we dont have tests which compare single precision with double one.&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2010 06:46:16 GMT</pubDate>
    <dc:creator>Sergey_Solovev__Inte</dc:creator>
    <dc:date>2010-05-17T06:46:16Z</dc:date>
    <item>
      <title>Single precision for Complex Matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820440#M4679</link>
      <description>I made a comment to your article:&lt;BR /&gt; 
&lt;A href="http://software.intel.com/en-us/articles/single-precision-real-and-complex-data-support-in-pardiso/" target="_blank"&gt;http://software.intel.com/en-us/articles/single-precision-real-and-complex-data-support-in-pardiso/&lt;/A&gt;&lt;BR /&gt;
 ... but it was deleted. I have also write about them in :&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=67789" target="_blank"&gt;http://software.intel.com/en-us/forums/showthread.php?t=67789&lt;/A&gt;&lt;BR /&gt;but nowone replied.&lt;BR /&gt;&lt;BR /&gt;In this case I am creating a new thread:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;I am trying to use single precision for complex 
matrices. &lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;I did not have any problems with programming double 
pressision using &lt;I&gt;doublecomplex&lt;/I&gt; structure (iparm(28) = 0). But 
when I tried to use single precision it did not work. Below I will 
attach my code - maybe you find mistakes&lt;BR /&gt;&lt;BR /&gt;void setPardisoCf_9(PardisoCf_struct * ps, Matrix_MKLVector * mkl_vec, int* ria, int* rja, double * raRe, double * raI, int varN, int varNN ){&lt;BR /&gt; int i;&lt;BR /&gt; &lt;BR /&gt; ps-&amp;gt;n = varN;&lt;BR /&gt;&lt;BR /&gt; ps-&amp;gt;fa = (doublecomplex*)malloc(sizeof(doublecomplex*)*2*varNN);   &lt;BR /&gt; ps-&amp;gt;fx = (doublecomplex*)malloc(sizeof(doublecomplex*)*2*varN);&lt;BR /&gt; ps-&amp;gt;fb = (doublecomplex*)malloc(sizeof(doublecomplex*)*2*varN);&lt;BR /&gt; ps-&amp;gt;ria = (int*)malloc(sizeof(int)*varNN);&lt;BR /&gt; ps-&amp;gt;rja = (int*)malloc(sizeof(int)*(varN+1));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ps-&amp;gt;mtype = 6;&lt;B&gt;// 
complex symmetic &lt;/B&gt;&lt;BR /&gt; ps-&amp;gt;nrhs = 1;&lt;BR /&gt;&lt;BR /&gt;/* 
-------------------------------------------------------------------- */&lt;BR /&gt;/*
 .. Setup Pardiso control parameters. */&lt;BR /&gt;/* 
-------------------------------------------------------------------- */&lt;BR /&gt;
 for ( i = 0; i &amp;lt; 64; i++) {&lt;BR /&gt; ps-&amp;gt;iparm&lt;I&gt; = 0;&lt;BR /&gt; }&lt;BR /&gt; 
ps-&amp;gt;iparm[0] = 1; /* No solver default */&lt;BR /&gt; ps-&amp;gt;iparm[1] = 2; /*
 Fill-in reordering from METIS */&lt;BR /&gt;&lt;BR /&gt; /* Numbers of processors, 
value of OMP_NUM_THREADS */&lt;BR /&gt; ps-&amp;gt;iparm[2] = mkl_get_max_threads();&lt;BR /&gt;
 ps-&amp;gt;iparm[3] = 0; /* No iterative-direct algorithm */&lt;BR /&gt; 
ps-&amp;gt;iparm[4] = 0; /* No user fill-in reducing permutation */&lt;BR /&gt; 
ps-&amp;gt;iparm[5] = 0; /* Write solution into x */&lt;BR /&gt; ps-&amp;gt;iparm[6] = 
0; /* Not in use */&lt;BR /&gt; ps-&amp;gt;iparm[7] = 2; /* Max numbers of iterative
 refinement steps */&lt;BR /&gt; ps-&amp;gt;iparm[8] = 0; /* Not in use */&lt;BR /&gt; 
ps-&amp;gt;iparm[9] = 8; /* Perturb the pivot elements with 1E-13 */&lt;BR /&gt; 
ps-&amp;gt;iparm[10] = 1; /* Use nonsymmetric permutation and scaling MPS */&lt;BR /&gt;
 ps-&amp;gt;iparm[11] = 0; /* Not in use */&lt;BR /&gt; ps-&amp;gt;iparm[12] = 0; /* 1 
Maximum weighted matching algorithm is switched-off (default for 
symmetric). Try iparm[12] = 1 in case of inappropriate accuracy */&lt;BR /&gt; 
ps-&amp;gt;iparm[13] = 0; /* Output: Number of perturbed pivots */&lt;BR /&gt; 
ps-&amp;gt;iparm[14] = 0; /* Not in use */&lt;BR /&gt; ps-&amp;gt;iparm[15] = 0; /* Not 
in use */&lt;BR /&gt; ps-&amp;gt;iparm[16] = 0; /* Not in use */&lt;BR /&gt; 
ps-&amp;gt;iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */&lt;BR /&gt;
 ps-&amp;gt;iparm[18] = -1; /* Output: Mflops for LU factorization */&lt;BR /&gt; 
ps-&amp;gt;iparm[19] = 0; /* Output: Numbers of CG Iterations */&lt;BR /&gt; &lt;B&gt;ps-&amp;gt;iparm[27]
 = 1; /* float */&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; ps-&amp;gt;maxfct = 1; /* Maximum number of 
numerical factorizations. */&lt;BR /&gt; ps-&amp;gt;mnum = 1; /* Which factorization
 to use. */&lt;BR /&gt; ps-&amp;gt;msglvl = 1; /* Print statistical information in 
file */&lt;BR /&gt; ps-&amp;gt;error = 0; /* Initialize error flag */&lt;BR /&gt;&lt;BR /&gt;for (i = 0; i &amp;lt; varNN; i++) {&lt;BR /&gt;   ps-&amp;gt;fa&lt;I&gt;.re = raRe&lt;I&gt;;//(double)ra&lt;I&gt;; &lt;BR /&gt;   ps-&amp;gt;fa&lt;I&gt;.i = raI&lt;I&gt;;//(double)ra&lt;I&gt;;&lt;BR /&gt;   ps-&amp;gt;ria&lt;I&gt; = ria&lt;I&gt;;&lt;BR /&gt;}&lt;BR /&gt; &lt;BR /&gt; for (i = 0; i &amp;lt; varN+1; i++) {&lt;BR /&gt; ps-&amp;gt;rja&lt;I&gt; = rja&lt;I&gt;;&lt;BR /&gt;   if(i&lt;VARN&gt;&lt;/VARN&gt;   ps-&amp;gt;fx&lt;I&gt;.re = 0;&lt;BR /&gt;   ps-&amp;gt;fx&lt;I&gt;.i = 0;&lt;BR /&gt;   ps-&amp;gt;fb&lt;I&gt;.re = 0;&lt;BR /&gt;   ps-&amp;gt;fb&lt;I&gt;.i = 0;&lt;BR /&gt;   }&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;ps-&amp;gt;phase
 = 11;&lt;BR /&gt; PARDISO (ps-&amp;gt;pt, &amp;amp;ps-&amp;gt;maxfct, &amp;amp;ps-&amp;gt;mnum, 
&amp;amp;ps-&amp;gt;mtype, &amp;amp;ps-&amp;gt;phase,&lt;BR /&gt; &amp;amp;varN, ps-&amp;gt;fa, 
ps-&amp;gt;rja, ps-&amp;gt;ria, &amp;amp;ps-&amp;gt;idum, &amp;amp;ps-&amp;gt;nrhs,&lt;BR /&gt; 
ps-&amp;gt;iparm, &amp;amp;ps-&amp;gt;msglvl, &amp;amp;ps-&amp;gt;ddum, &amp;amp;ps-&amp;gt;ddum, 
&amp;amp;ps-&amp;gt;error);&lt;BR /&gt;&lt;BR /&gt; if (ps-&amp;gt;error != 0) {&lt;BR /&gt; printf("\\nERROR
 during symbolic factorization: %d", ps-&amp;gt;error);&lt;BR /&gt; getch();&lt;BR /&gt; 
exit(1);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And so far there are now errors during 
execution. &lt;B&gt;The errors occurs when I try to solve:&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;ps-&amp;gt;phase = 
33;&lt;BR /&gt;ps-&amp;gt;iparm[7] = 0; /* Max numbers of iterative refinement 
steps. */&lt;BR /&gt;&lt;BR /&gt;PARDISO (ps-&amp;gt;pt, &amp;amp;ps-&amp;gt;maxfct, 
&amp;amp;ps-&amp;gt;mnum, &amp;amp;ps-&amp;gt;mtype, &amp;amp;ps-&amp;gt;phase,&lt;BR /&gt; 
&amp;amp;ps-&amp;gt;n, ps-&amp;gt;fa, ps-&amp;gt;rja, ps-&amp;gt;ria, &amp;amp;ps-&amp;gt;idum, 
&amp;amp;ps-&amp;gt;nrhs,&lt;BR /&gt; ps-&amp;gt;iparm, &amp;amp;ps-&amp;gt;msglvl, ps-&amp;gt;fb, 
ps-&amp;gt;fx, &amp;amp;ps-&amp;gt;error);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What surprise me is the fact 
that if I execute above procedures with ps-&amp;gt;iparm[27] = 0; /* double 
precision */ everything is fine... . should I change any other iparm ? &lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Thu, 13 May 2010 07:18:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820440#M4679</guid>
      <dc:creator>programmer85</dc:creator>
      <dc:date>2010-05-13T07:18:57Z</dc:date>
    </item>
    <item>
      <title>Single precision for Complex Matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820441#M4680</link>
      <description>&lt;P&gt;If you use single precision (&lt;B&gt;ps-&amp;gt;iparm[27] = 1&lt;/B&gt;), then values ps-&amp;gt;fa&lt;I&gt;.re, ps-&amp;gt;fa&lt;I&gt;.i,ps-&amp;gt;fx&lt;I&gt;.re, ps-&amp;gt;fx&lt;I&gt;.i, ps-&amp;gt;fb&lt;I&gt;.re = 0, ps-&amp;gt;fb&lt;I&gt;.i = 0 should be float.&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;You can create new structure&lt;BR /&gt;typedef struct{&lt;BR /&gt; float re;&lt;BR /&gt; float i;}&lt;BR /&gt;floatcomplex;&lt;BR /&gt;and replace type "doublecomplex" to "floatcomplex" in the example.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2010 12:24:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820441#M4680</guid>
      <dc:creator>Sergey_Solovev__Inte</dc:creator>
      <dc:date>2010-05-13T12:24:05Z</dc:date>
    </item>
    <item>
      <title>Single precision for Complex Matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820442#M4681</link>
      <description>thx - it helped. I achieved about 10% speedup between execution in single and double precision, and hhonestly I expected much more...&lt;BR /&gt;&lt;BR /&gt;Sergey - do you have any test that compares execution in single and double precision ?&lt;BR /&gt;Programmer</description>
      <pubDate>Fri, 14 May 2010 10:50:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820442#M4681</guid>
      <dc:creator>programmer85</dc:creator>
      <dc:date>2010-05-14T10:50:37Z</dc:date>
    </item>
    <item>
      <title>Single precision for Complex Matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820443#M4682</link>
      <description>&lt;P&gt;The speedup depends on many factors  type of matrix, size of matrix, architecture ant etc. But we dont have tests which compare single precision with double one.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2010 06:46:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Single-precision-for-Complex-Matrices/m-p/820443#M4682</guid>
      <dc:creator>Sergey_Solovev__Inte</dc:creator>
      <dc:date>2010-05-17T06:46:16Z</dc:date>
    </item>
  </channel>
</rss>

