Recent posts
https://software.intel.com/en-us/recent/978581
enSSOR preconditioner using RCI
https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/494663
<p>Hey Guys,</p>
<p>I have a problem with impelementing SSOR precondtioner using RCI and hope you can help me with that.</p>
<p>I have written a cg solver using RCI for a symmetric matrix that is stored in CSR format 3 array version. I have also implemented the jacobi preconditioner and it works fine. Now I want to implement SSOR but unfortunately I am lost somehow. There is an example of SSOR in MKL example directory, but in that example the SSOR is implemented in a loop which I don't know why!</p>
<p>Here is the SSOR that I am aware of.</p>
<p>Let's say M is the preconditioner which works as follows:</p>
<p>M rho = r (eq.1)</p>
<p>where r is the current residual ( stored in &tmp[2n] in RCI) and rho is the modified residual (shall be stored in &tmp[3n] in RCI)</p>
<p>M is defined as follow [SAAD 2002]</p>
<p>M = 1/(w(2-w)) (D+wL) D^-1 (D+wU)</p>
<p>where</p>
<p>w = relaxation parameter 0<w<2</p>
<p>U = is the upper part of the matrix A</p>
<p>L = the lower part of the matrix A</p>
<p>D = diagonal of the matrix A</p>
<p>so A = L+D+U and since A is symmetric L= U'</p>
<p>To solve the eq. 1 the following is suggested </p>
<p>Q = 1/(w(2-w)) (D+wL) D^-1</p>
<p>G = (D+wU)</p>
<p>1. Solve Q z = r</p>
<p>2. Solve G rho = z</p>
<p>To perform the above steps we need to triangular solvers. Now my question, what function from mkl should I use to this end? Is it necessary to build Q and G explicitly or the mkl functions can do so?</p>
<p>I would be happy if somebody can give me some hints here.</p>
<p>With best regards.</p>
<p>Meysam</p>
Tue, 26 Nov 13 06:36:23 -0800Meysam J.494663SSOR preconditioner in RCI
https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/494650
<p>Hi all,</p>
<p>I have a question related to the SSOR precondtioner for the cg algorithm, and would appreciate it if someone can help me with that.</p>
<p>The system of equation in my case is symmetric positive and it is stored in CSR format (3 array version). My cg solver is based on RCI from MKL. I already have Jacobi preconditioner implemented which, works fine. For the SSOR, there is an example in mkl/example directory, but I cannot really understand the example. That example assumes the the diagonal of the equation system is identity matrix. There is an iterative section in the example which I do not understand!</p>
<p>Let me explain the SSOR which I know:</p>
<p>M rho = r where r is the current residual (&tmp[2n] in rci) , rho is the modified residual (&tmp[3n]), and M is the precondtioner.</p>
<p>The SSOR precondtioner is as follows [SAAD2002]</p>
<p>M = LU</p>
<p>To solve the above equation system we do the following</p>
<p>1. Solve L z = r where L = (D-wE)*D^-1 = I-wED^-1</p>
<p>2. Solve U rho = z where U = D-wF</p>
<pre>
where:
D = diagonal of A
-E = strict lower triangular part of A
-F = strict upper triangular part of A
w = parameter in SOR method; should be 0<w<2 (if w=1, this is the Symmetric Gauss-Seidel (SGS) preconditioner</pre><p>now the question is, I don't understand how to implement this! Do I need to store L, U and D separately? Or is there a way to take advantage of the mkl Blas function to do that more efficiently?</p>
<p>Thank you so much guys for any hint.</p>
<p>Regards,Meysam</p>
Tue, 26 Nov 13 01:39:03 -0800Meysam J.494650Pardiso problem with large equation systems
https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/489520
<p>Hi guys,</p>
<p>I am facing a problem with Pardiso and I really appreciate it if someone could give me a hint on it.</p>
<p>The system I am trying to solve contains 1,016,451 number of equations with 569392326 nonzero elements. I am using my settings in pardiso which looks like the following</p>
<p> iparm[0] = 1; /* No solver default */<br /> iparm[1] = 0;</p>
<p> iparm[3] = 0; /* No iterative-direct algorithm */<br /> iparm[4] = 0; /* No user fill-in reducing permutation */<br /> iparm[5] = 0; /* Write solution into x */<br /> iparm[7] = 1; /* Max numbers of iterative refinement steps */<br /> iparm[9] = 8; /* Perturb the pivot elements with 1E-13 */<br /> iparm[10] = 0; /* Use nonsymmetric permutation and scaling MPS */<br /> iparm[12] = 0; /* Maximum weighted matching algorithm is switched-off (default for symmetric). Try iparm[12] = 1 in case of inappropriate accuracy */<br /> iparm[13] = 0; /* Output: Number of perturbed pivots */<br /> iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */<br /> iparm[18] = 0; /* disable Output: Mflops for LU factorization */<br /> iparm[19] = 0; /* Output: Numbers of CG Iterations */<br /> iparm[26] = 1; /* PARDISO checks integer arrays ia and ja. */<br /> iparm[34] = 1; /* C-style indexing. starts from 0. */</p>
<p> mtype = 2; /*Real and symmetric positive definite */<br /> maxfct = 1; /* Maximum number of numerical factorizations. */<br /> mnum = 1; /* Which factorization to use. */<br /> msglvl = 1; /* Print statistical information in file */</p>
<p>nrhs = 1;</p>
</p>
<p>After reordeing I get the following error</p>
<p>Percentage of computed non-zeros for LL^T factorization<br />*** error PARDISO: iterative refinement<br /> contraction rate is greater than 0.9, interrupt</p>
<p>and during factorization, Pardiso throws error flag -4 and stops continuing.</p>
</p>
<p>I have tried both ruining the problem with default settings and also with setting iparm[1] to 2 and 3. But, unfortunately, none of them solved the problem. I wonder if someone has ever experienced something like this. </p>
<p>Additional information:</p>
<p>=== PARDISO: solving a symmetric positive definite system ===<br />The local (internal) PARDISO version is : 103911000<br />0-based array is turned ON<br />PARDISO double precision computation is turned ON</p>
<p>< Parallel Direct Factorization with number of processors: > 42<br />< Numerical Factorization with BLAS3 and O(n) synchronization ></p>
<p>=== PARDISO: solving a symmetric positive definite system ===<br />Single-level factorization algorithm is turned ON</p>
<p></p>
</p>
Fri, 15 Nov 13 04:38:04 -0800Meysam J.489520Calling Pardiso in parallel loop
https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/487697
<p>Hi,</p>
<p>I am using Pardiso for a little while and I am happy with it. It works fine in parallel and I can use all the cores on my machine. Recently I wanted to call pardiso in a for loop to solve different equation systems. The for loop itself is parllelized using openmp (#pragma omp parallel). Now the problem is wheh I call pardiso in this loop it only runs with one single core! The code is as the following </p>
<p>.........</p>
<p>njbs = 8;</p>
<p>nthr = 6;<br />N is the number of equation systems</p>
<p>#pragma omp parallel for num_threads(njbs) schedule(dynamic,1)<br /> for (i=0; i<N; i++)<br /> {</p>
<p> B = get_equation _system_number(i); /* B is the handle to the corresponding equation system number i*/</p>
<p> init(B); /*set all the pointers and corresponding parameters in B. set pt = 0 for this solver*/ </p>
<p> omp_set_num_threads(nthr);<br /> B.iparm[2]=omp_get_max_threads(); /*B.iparm[2] is 6 now*/</p>
<p> B->phase = 11;</p>
<p> PARDISO (pt, &(B->maxfct), &(B->mnum), &(B->mtype), &(B->phase), <br /> &B->n, B->a, B->ia, B->ja, &(B->idum), &(B->nrhs), <br /> B->iparm, &(B->msglvl),&(B->ddum), &(B->ddum), &(B->error));</p>
<p> }</p>
<p>when msglvl is activated to show statistics, I get</p>
<p>< Parallel Direct Factorization with number of processors: > 1</p>
<p>Now the question is why does pardiso run in serial? Do I do something wrong or do I have missed something?</p>
<p>Best regards,</p>
<p>Meysam</p>
</p>
Mon, 04 Nov 13 02:09:48 -0800Meysam J.487697