topic PARDISO much slower than DGESV and MATLAB for 6000*6000 non-symmetric sparse system, reasonable or not? in IntelĀ® oneAPI Math Kernel Library
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
<P>Hi guys,</P>
<P>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.</P>
<P><SPAN style="font-size: 1em; line-height: 1.5;">I have compared PARDISO, DGESV and Matlab using randomly generated 6000*6000 matrix on my Linux desktop with </SPAN>i7-3720QM CPU @ 2.60GHz and 8G RAM, ifort version 16.0.2. 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. 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)?</P>
<P>The following is my PARDISO parameters and I also found that by manually setting <SPAN style="font-size: 13.008px; line-height: 19.512px;">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?</SPAN></P>
<P> ALLOCATE( iparm ( 64 ) )<BR />
iparm=0 <BR />
<BR />
iparm(1) = 1 ! no solver default<BR />
iparm(2) = 3 ! fill-in reordering from METIS<BR />
iparm(4) = 0 ! no iterative-direct algorithm<BR />
iparm(5) = 0 ! no user fill-in reducing permutation<BR />
iparm(6) = 0 ! =0 solution on the first n compoments of x<BR />
iparm(8) = 1 ! numbers of iterative refinement steps<BR />
iparm(10) = 13 ! perturbe the pivot elements with 1E-13<BR />
iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS<BR />
iparm(13) = 1 ! maximum weighted matching algorithm is switched-off (default for symmetric). Try iparm(13) = 1 in case of inappropriate accuracy<BR />
iparm(14) = 0 ! Output: number of perturbed pivots<BR />
iparm(18) = -1 ! Output: number of nonzeros in the factor LU<BR />
iparm(19) = -1 ! Output: Mflops for LU factorization<BR />
iparm(20) = 0 ! Output: Numbers of CG Iterations<BR />
iparm(27) = 1 ! check the integer arrays ia and ja</P>
<P> error = 0 ! initialize error flag<BR />
msglvl = 0 ! print statistical information<BR />
mtype = 11 ! real and nonsymmetric</P>
<P> call mkl_set_dynamic(0)<BR />
call mkl_set_num_threads(2)</P>
<P>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 check the speed and accuracy of DGESV and PARDISO. </P>
<P>I appreciate your interest/feedback and discussions are very welcome! Thank you!</P>
<P>Sincerely,</P>
<P><SPAN style="font-size: 1em; line-height: 1.5;">Xiang</SPAN></P>
<P> </P>
<P> </P>
<P> </P>Thu, 21 Apr 2016 03:34:56 GMTxiang_z_2016-04-21T03:34:56ZPARDISO much slower than DGESV and MATLAB for 6000*6000 non-symmetric sparse system, reasonable or not?
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
<P>Hi guys,</P>
<P>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.</P>
<P><SPAN style="font-size: 1em; line-height: 1.5;">I have compared PARDISO, DGESV and Matlab using randomly generated 6000*6000 matrix on my Linux desktop with </SPAN>i7-3720QM CPU @ 2.60GHz and 8G RAM, ifort version 16.0.2. 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. 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)?</P>
<P>The following is my PARDISO parameters and I also found that by manually setting <SPAN style="font-size: 13.008px; line-height: 19.512px;">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?</SPAN></P>
<P> ALLOCATE( iparm ( 64 ) )<BR />
iparm=0 <BR />
<BR />
iparm(1) = 1 ! no solver default<BR />
iparm(2) = 3 ! fill-in reordering from METIS<BR />
iparm(4) = 0 ! no iterative-direct algorithm<BR />
iparm(5) = 0 ! no user fill-in reducing permutation<BR />
iparm(6) = 0 ! =0 solution on the first n compoments of x<BR />
iparm(8) = 1 ! numbers of iterative refinement steps<BR />
iparm(10) = 13 ! perturbe the pivot elements with 1E-13<BR />
iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS<BR />
iparm(13) = 1 ! maximum weighted matching algorithm is switched-off (default for symmetric). Try iparm(13) = 1 in case of inappropriate accuracy<BR />
iparm(14) = 0 ! Output: number of perturbed pivots<BR />
iparm(18) = -1 ! Output: number of nonzeros in the factor LU<BR />
iparm(19) = -1 ! Output: Mflops for LU factorization<BR />
iparm(20) = 0 ! Output: Numbers of CG Iterations<BR />
iparm(27) = 1 ! check the integer arrays ia and ja</P>
<P> error = 0 ! initialize error flag<BR />
msglvl = 0 ! print statistical information<BR />
mtype = 11 ! real and nonsymmetric</P>
<P> call mkl_set_dynamic(0)<BR />
call mkl_set_num_threads(2)</P>
<P>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 check the speed and accuracy of DGESV and PARDISO. </P>
<P>I appreciate your interest/feedback and discussions are very welcome! Thank you!</P>
<P>Sincerely,</P>
<P><SPAN style="font-size: 1em; line-height: 1.5;">Xiang</SPAN></P>
<P> </P>
<P> </P>
<P> </P>Thu, 21 Apr 2016 03:34:56 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/PARDISO-much-slower-than-DGESV-and-MATLAB-for-6000-6000-non/m-p/1098996#M23744xiang_z_2016-04-21T03:34:56Z