<?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 PARDISO much slower than DGESV and MATLAB for 6000*6000 non-symmetric sparse system, reasonable or not? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/PARDISO-much-slower-than-DGESV-and-MATLAB-for-6000-6000-non/m-p/1098996#M23744</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;Have been looking for an efficient linear solver for middle sized (between 6000*6000 to 20000*2000) non-symmetric sparse (density between 0.6 and 0.8) system.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I have compared PARDISO, DGESV and Matlab using randomly generated 6000*6000 matrix on my Linux desktop with &lt;/SPAN&gt;i7-3720QM CPU @ 2.60GHz and 8G RAM,&amp;nbsp;ifort version 16.0.2. &amp;nbsp;Matlab backslash took 2.x seconds, DGESV took 5.x seconds while PARDISO took 12.x seconds. This does not seem to be reasonable to me as I am expecting PARDISO to be faster than DGESV. &amp;nbsp;Can someone share some experience/perspective on this or provide some solutions for which solver to choose for this type of problem (I am hoping to get somewhat close to MATLAB backslash if possible)?&lt;/P&gt;

&lt;P&gt;The following is my PARDISO parameters and I also found that by manually setting&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;mkl_set_num_threads to be 1 to 8 won't make any obvious change of the wall time? Is that reasonable or have I made something wrong?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; ALLOCATE( iparm ( 64 ) )&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm=0 &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(1) = 1 ! no solver default&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(2) = 3 ! fill-in reordering from METIS&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(4) = 0 ! no iterative-direct algorithm&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(5) = 0 ! no user fill-in reducing permutation&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(6) = 0 ! =0 solution on the first n compoments of x&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(8) = 1 ! numbers of iterative refinement steps&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(10) = 13 ! perturbe the pivot elements with 1E-13&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(13) = 1 ! maximum weighted matching algorithm is switched-off (default for symmetric). Try iparm(13) = 1 in case of inappropriate accuracy&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(14) = 0 ! Output: number of perturbed pivots&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(18) = -1 ! Output: number of nonzeros in the factor LU&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(19) = -1 ! Output: Mflops for LU factorization&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(20) = 0 ! Output: Numbers of CG Iterations&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(27) = 1 ! check the integer arrays ia and ja&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; error &amp;nbsp;= 0 ! initialize error flag&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; msglvl = 0 ! print statistical information&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; mtype &amp;nbsp;= 11 ! real and nonsymmetric&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; call mkl_set_dynamic(0)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call mkl_set_num_threads(2)&lt;/P&gt;

&lt;P&gt;I also attached two code if someone is interested in reproducing this problem, one is a MATLAB code (MatGen.m) which generates random non-symmetric sparse matrix A, and x and calculate b=A*x. A, n and x are written into file MatInp.dat as an input for the Fortran code adapted from the example code to &amp;nbsp;check the speed and accuracy of DGESV and PARDISO.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I appreciate your interest/feedback and discussions are very welcome! Thank you!&lt;/P&gt;

&lt;P&gt;Sincerely,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Xiang&lt;/SPAN&gt;&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>Thu, 21 Apr 2016 03:34:56 GMT</pubDate>
    <dc:creator>xiang_z_</dc:creator>
    <dc:date>2016-04-21T03:34:56Z</dc:date>
    <item>
      <title>PARDISO much slower than DGESV and MATLAB for 6000*6000 non-symmetric sparse system, reasonable or not?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/PARDISO-much-slower-than-DGESV-and-MATLAB-for-6000-6000-non/m-p/1098996#M23744</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;Have been looking for an efficient linear solver for middle sized (between 6000*6000 to 20000*2000) non-symmetric sparse (density between 0.6 and 0.8) system.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I have compared PARDISO, DGESV and Matlab using randomly generated 6000*6000 matrix on my Linux desktop with &lt;/SPAN&gt;i7-3720QM CPU @ 2.60GHz and 8G RAM,&amp;nbsp;ifort version 16.0.2. &amp;nbsp;Matlab backslash took 2.x seconds, DGESV took 5.x seconds while PARDISO took 12.x seconds. This does not seem to be reasonable to me as I am expecting PARDISO to be faster than DGESV. &amp;nbsp;Can someone share some experience/perspective on this or provide some solutions for which solver to choose for this type of problem (I am hoping to get somewhat close to MATLAB backslash if possible)?&lt;/P&gt;

&lt;P&gt;The following is my PARDISO parameters and I also found that by manually setting&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;mkl_set_num_threads to be 1 to 8 won't make any obvious change of the wall time? Is that reasonable or have I made something wrong?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; ALLOCATE( iparm ( 64 ) )&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm=0 &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(1) = 1 ! no solver default&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(2) = 3 ! fill-in reordering from METIS&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(4) = 0 ! no iterative-direct algorithm&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(5) = 0 ! no user fill-in reducing permutation&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(6) = 0 ! =0 solution on the first n compoments of x&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(8) = 1 ! numbers of iterative refinement steps&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(10) = 13 ! perturbe the pivot elements with 1E-13&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(13) = 1 ! maximum weighted matching algorithm is switched-off (default for symmetric). Try iparm(13) = 1 in case of inappropriate accuracy&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(14) = 0 ! Output: number of perturbed pivots&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(18) = -1 ! Output: number of nonzeros in the factor LU&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(19) = -1 ! Output: Mflops for LU factorization&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(20) = 0 ! Output: Numbers of CG Iterations&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; iparm(27) = 1 ! check the integer arrays ia and ja&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; error &amp;nbsp;= 0 ! initialize error flag&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; msglvl = 0 ! print statistical information&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; mtype &amp;nbsp;= 11 ! real and nonsymmetric&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; call mkl_set_dynamic(0)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call mkl_set_num_threads(2)&lt;/P&gt;

&lt;P&gt;I also attached two code if someone is interested in reproducing this problem, one is a MATLAB code (MatGen.m) which generates random non-symmetric sparse matrix A, and x and calculate b=A*x. A, n and x are written into file MatInp.dat as an input for the Fortran code adapted from the example code to &amp;nbsp;check the speed and accuracy of DGESV and PARDISO.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I appreciate your interest/feedback and discussions are very welcome! Thank you!&lt;/P&gt;

&lt;P&gt;Sincerely,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Xiang&lt;/SPAN&gt;&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>Thu, 21 Apr 2016 03:34:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/PARDISO-much-slower-than-DGESV-and-MATLAB-for-6000-6000-non/m-p/1098996#M23744</guid>
      <dc:creator>xiang_z_</dc:creator>
      <dc:date>2016-04-21T03:34:56Z</dc:date>
    </item>
  </channel>
</rss>

