A 3D example of KSPSolve?

Barry Smith bsmith at mcs.anl.gov
Fri Feb 9 18:53:09 CST 2007


   There is never a better test problem then your actual problem.
Send the results from running on 1, 4, and 8 processes with the options
-log_summary -ksp_view (use the optimized version of PETSc (running 
config/configure.py --with-debugging=0))


On Fri, 9 Feb 2007, Shi Jin wrote:

> Hi there,
> I am tuning our 3D FEM CFD code written with PETSc.
> The code doesn't scale very well. For example, with 8
> processes on a linux cluster, the speedup we achieve
> with a fairly large problem size(million of elements)
> is only 3 to 4 using the Congugate gradient solver. We
> can achieve a speed up of a 6.5 using a GMRes solver
> but the wall clock time of a GMRes is longer than a CG
> solver which indicates that CG is the faster solver
> and it scales not as good as GMRes. Is this generally
> true?
> I then went to the examples and find a 2D example of
> KSPSolve (ex2.c). I let the code ran with a 1000x1000
> mesh and get a linear scaling of the CG solver and a
> super linear scaling of the GMRes. These are both much
> better than our code. However, I think the 2D nature
> of the sample problem might help the scaling of the
> code. So I would like to try some 3D example using the
> KSPSolve. Unfortunately, I couldn't find such an
> example either in the src/ksp/ksp/examples/tutorials
> directory or by google search. There are a couple of
> 3D examples in the src/ksp/ksp/examples/tutorials but
> they   are about the SNES not KSPSolve. If anyone can
> provide me with such an example, I would really
> appreciate it.
> Thanks a lot.
> Shi
> ____________________________________________________________________________________
> Finding fabulous fares is fun.  
> Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
> http://farechase.yahoo.com/promo-generic-14795097

More information about the petsc-users mailing list