This is what I get

[szampini@localhost tutorials]$ mpiexec -n 2 ./ex2 -ksp_monitor_short -m 5
-n 5 -ksp_gmres_cgs_refinement_type refine_always
  0 KSP Residual norm 2.73499
  1 KSP Residual norm 0.795482
  2 KSP Residual norm 0.261984
  3 KSP Residual norm 0.0752998
  4 KSP Residual norm 0.0230031
  5 KSP Residual norm 0.00521255
  6 KSP Residual norm 0.00145783
  7 KSP Residual norm 0.000277319
Norm of error 0.000292349 iterations 7

When I sequentially, I get (same output as yours)

[szampini@localhost tutorials]$ mpiexec -n 1 ./ex2 -ksp_monitor_short -m 5
-n 5 -ksp_gmres_cgs_refinement_type refine_always
  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

This means you are using the wrong mpiexec

Il giorno mer 26 feb 2020 alle ore 11:17 Tsung-Hsing Chen <
[email protected]> ha scritto:

> 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
>


-- 
Stefano

Reply via email to