[petsc-users] Slow speed when using PETSc multigrid

Matthew Knepley knepley at gmail.com
Thu Jun 7 06:20:56 CDT 2012


On Thu, Jun 7, 2012 at 3:35 PM, TAY wee-beng <zonexo at gmail.com> wrote:

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

Look, programming is a skill. It demands you learn to use certain tools. A
message like "Segmentation still occurs"
is USELESS since we are not looking at your code or running it. Sending in
a stack trace from gdb is much more
informative and means you will get help sooner.

   Matt


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


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120607/7644a797/attachment.html>


More information about the petsc-users mailing list