/bicgstab

asymmetric linear system solver by using BiCGSTAB method with diagonal preconditioning.

Primary LanguageFortran

asymmetric linear system solver by using BiCGSTAB method with diagonal preconditioning.

$ make
$ OMP_NUM_THREADS=1 ./a.out
 size:        1024
 BiCGSTAB method converged.
 iter, res:         161  8.122849438702899E-011
 time[s]:  0.247600000000000
 check the result: calc res = b - A*x
 residual:  8.122849438702899E-011

$ OMP_NUM_THREADS=16 KMP_AFFINITY=compact ./a.out
 size:        1024
 BiCGSTAB method converged.
 iter, res:         161  7.729346016224966E-011
 time[s]:  9.450000000000000E-002
 check the result: calc res = b - A*x
 residual:  7.729346016224966E-011

* with diagonal preconditioning:

$ ./a.out.precond
 size:        1024
 BiCGSTAB method converged.
 iter, res:           8  5.889016570610078E-015 <---- only 8 iterations
 time[s]:  6.900000000000001E-002
 check the result: calc res = b - A*x
 residual:  1.196561173929648E-012