[petsc-users] Slow speed when using PETSc multigrid

TAY wee-beng zonexo at gmail.com
Thu Jun 7 02:35:01 CDT 2012


On 7/6/2012 4:33 AM, Jed Brown wrote:
> On Wed, Jun 6, 2012 at 4:21 PM, TAY wee-beng <zonexo at gmail.com 
> <mailto:zonexo at gmail.com>> wrote:
>
>     *call PCMGSetLevels(pc,mg_lvl,MPI_COMM_WORLD,ierr)*
>
>
> The third arguments is an array of length mg_lvl, not a single 
> communicator. You can pass PETSC_NULL_OBJECT just like the man page 
> says to use the default.
>
>
I changed but the same Segmentation still occurs:

call KSPCreate(MPI_COMM_WORLD,ksp,ierr)

call KSPGetPC(ksp,pc,ierr)

call PCSetType(pc_uv,PCMG,ierr)

mg_lvl = 1 (or 2)

call PCMGSetLevels(pc,mg_lvl,PETSC_NULL_OBJECT,ierr)

call 
DMDACreate2d(MPI_COMM_WORLD,DMDA_BOUNDARY_NONE,DMDA_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,1,num_procs,i1,i1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da,ierr)

...

Btw, I tried to look at 
http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex42.c.html 
but I think there's some error in the page formatting.
>
>
>     However, I get the error:
>
>     Caught signal number 11 SEGV: Segmentation Violation, probably
>     memory access out of range
>
>     after calling *PCMGSetLevels*
>
>     What's the problem? Is there any examples which I can follow?
>
>
> I believe the other examples that use this routine are in C or just 
> tests (not tutorial-style) examples.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120607/0f335910/attachment.html>


More information about the petsc-users mailing list