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