[petsc-users] The question of the output from ksp/ex2.c

Tsung-Hsing Chen barrydog505 at gmail.com
Wed Feb 26 02:15:57 CST 2020


Hi,

I tried to run the example in ksp/examples/tutorials/ex2.
I run the code with : mpiexec -n 2 ./ex2 -ksp_monitor_short -m 5 -n 5
-ksp_gmres_cgs_refinement_type refine_always

the output is :
  0 KSP Residual norm 3.21109
  1 KSP Residual norm 0.93268
  2 KSP Residual norm 0.103515
  3 KSP Residual norm 0.00787798
  4 KSP Residual norm 0.000387275
Norm of error 0.000392701 iterations 4
  0 KSP Residual norm 3.21109
  1 KSP Residual norm 0.93268
  2 KSP Residual norm 0.103515
  3 KSP Residual norm 0.00787798
  4 KSP Residual norm 0.000387275
Norm of error 0.000392701 iterations 4

My output(above) is twice as the ksp/examples/tutorials/output/ex2_4.out.
Is this the right answer that should come out?

Thanks in advance,

Tsung-Hsing Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200226/38b36db2/attachment.html>


More information about the petsc-users mailing list