[petsc-users] A beginner question about a PETSc example
Hong Zhang
hzhang at mcs.anl.gov
Tue May 10 14:39:34 CDT 2011
See
http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#differentiterations
Hong
On Tue, May 10, 2011 at 2:11 PM, <Nan.Jia at dartmouth.edu> wrote:
> Hello all the PETSc users and developers,
> I just started learning and exploring PETSc recently. I have a problem for
> the example: .../src/ksp/ksp/examples/ex2f.f
> I run several times with different numbers of processors. Here are the
> results.
>
> nan_jia at mir:/thayerfs/research/anatoly/NAN/Petsc/petsc-3.1-p8/src/ksp/ksp/examples/tutorials$
> mpiexec -np 1 ./ex2f -m 100 -n 100
> Norm of error 0.8936E-02 iterations 65
> nan_jia at mir:/thayerfs/research/anatoly/NAN/Petsc/petsc-3.1-p8/src/ksp/ksp/examples/tutorials$
> mpiexec -np 2 ./ex2f -m 100 -n 100
> Norm of error 0.3148E-01 iterations 89
> nan_jia at mir:/thayerfs/research/anatoly/NAN/Petsc/petsc-3.1-p8/src/ksp/ksp/examples/tutorials$
> mpiexec -np 3 ./ex2f -m 100 -n 100
> Norm of error 0.3193E-01 iterations 92
>
>
> What is weird to me is that with more processors, the norm does not decrease
> but increases, do does the number of iterations.
>
> I also try to compare .../src/ksp/ksp/examples/ex2f.f with
> .../src/ksp/ksp/examples/ex1f.f to see the difference between the
> sequential and parallel code in order to understand how PETSc parallelizes
> the code.
>
> This is my first use the PETSc mailing list. Thanks everyone.
>
> Best,
> Nan
>
More information about the petsc-users
mailing list