MKL preconditioned conjugate gradient (PCG)

Alexander Kalinkin (Intel)
Total Points:
710
Status Points:
210
Brown Belt
June 27, 2009 4:48 AM PDT
Rate
 
#2 Reply to #1
Quoting - Idefix

Hi all, let me come to my question now. I am trying to implement a precondtioned conjugate gradient solver for a system A*x=b were A is a symmetric matrix. Without precondtioning I get the correct solution in a transient flow simulation but the solution is too slow. From the MKL Reference manual I infer that preconditioners are supported by the DCG routine but it is also stated that:

'Both ILU0 and ILUT preconditioners can apply to any non-degenerate matrix. They can be used
alone or together with the Intel MKL RCI FGMRES solver (see Sparse Solver Routines). Avoid
using this preconditioners with MKL RCI CG solver because in general, they produce
non-symmetric resulting matrix even if the original matrix is symmetric.'


THis is bad news because other people have used incomplete lower upper decomposition with great success in their PCG codes. So what preconditioners are recommended by the Intel team and where can I find them? Actually, I tried ILUO in my problem despite the above warning but the solution did not converge anymore. Here is a brief extract from my code:

call dcg_init(N,xopt,B,istat,ipar,dpar,tmp)
call dcg_check(N,xopt,B,istat,ipar,dpar,tmp)
call DCSRILU0(N,AP,IA,JA,CP,ipar,dpar,ierr)
201 call dcg(N,xopt,B,istat,ipar,dpar,tmp)
if (istat.eq.0) then
goto 210
elseif (istat.eq.1) then
call MKL_DCSRSYMV('U',N,AP,IA,JA,TMP,TMP(1,2))
goto 201
elseif (istat.eq.3) then
call mkl_dcsrtrsv('L','N','U',N,CP,IA,JA,tmp(1,3),trvec)
call mkl_dcsrtrsv('U','N','N',N,CP,IA,JA,trvec,tmp(1,4))
goto 201
else
write(*,*) 'Error in MKL solver.'
stop
endif
210 call dcg_get(NumNP,xopt,B,istat,ipar,dpar,tmp,it)

If anyone has an idea where my bug is or what preconditioner I could use instead of ILU, I would appreciate it!

Idefix






Hi Idefix,
Could you please describe some details?  First of all what the value of ipar(5) and ipar(11) before calling dcg_check? The value of error with/without preconditioner after computation?  Is it matrix A positive define? It can help us to understand your problem with ILU and find the way to solve it.
With best regards,
Alexander



Intel Software Network Forums Statistics

8472 users have contributed to 31603 threads and 100652 posts to date.
In the past 24 hours, we have 31 new thread(s) 115 new posts(s), and 163 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Edwin B. Ramayya