[petsc-users] PCASM and dof > 1

Matthew Knepley knepley at gmail.com
Mon Mar 12 12:56:56 CDT 2012


On Mon, Mar 12, 2012 at 11:50 AM, Laurent Berenguer <
laurent.berenguer at gmail.com> wrote:

> Hello,
>
> I would like to solve nonlinear PDEs on a regular grid (DMDACreate2D, 2
> dof per node) using:
> - MatFDColoring to compute the Jacobian matrix
> - The ASM preconditioner
>

I have just run

  mpiexec -n 2 ./ex32 -pc_type asm

without a problem.Please send yourconfigure.log to petsc-maint at mcs.anl.gov

   Matt


> Here is an overview of the code:
>
> ierr = DMGetMatrix(da,MATAIJ,&J);
> ierr = TSGetSNES(ts,&snes);
> ierr = DMGetColoring(da,IS_COLORING_GLOBAL,MATAIJ,&iscoloring);
> ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);
> ierr = MatFDColoringSetFromOptions(matfdcoloring);
> ierr = ISColoringDestroy(&iscoloring);
> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode
> (*)(void))SNESTSFormFunction,ts);
> ierr =
> SNESSetJacobian(snes,J,J,SNESDefaultComputeJacobianColor,matfdcoloring);
> ierr = KSPCreate(PETSC_COMM_WORLD,&ksp);
> ierr = KSPSetOperators(ksp,J,J,DIFFERENT_NONZERO_PATTERN);
> ierr = KSPGetPC(ksp,&pc);
> ierr = PCSetType(pc,PCASM);
> ierr = PCASMSetOverlap(pc,1);
> ierr = KSPSetUp(ksp);
> ierr = SNESSetKSP(snes,ksp);
> ierr = TSSetFromOptions(ts);
> ierr = TSSolve(ts,u,&ftime);
>
> And I have the following error for overlap>0.
>
> [1]PETSC ERROR:
> ------------------------------------------------------------------------
> [1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range
> [1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
> [1]PETSC ERROR: or see
> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#valgrind
> [1]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS
> X to find memory corruption errors
> [1]PETSC ERROR: likely location of problem given in stack below
> [1]PETSC ERROR: ---------------------  Stack Frames
> ------------------------------------
> [1]PETSC ERROR: Note: The EXACT line numbers in the stack are not
> available,
> [1]PETSC ERROR:       INSTEAD the line number of the start of the function
> [1]PETSC ERROR:       is given.
> [1]PETSC ERROR: [1] MatIncreaseOverlap_MPIAIJ_Receive line 427
> src/mat/impls/aij/mpi/mpiov.c
> [1]PETSC ERROR: [1] MatIncreaseOverlap_MPIAIJ_Once line 71
> src/mat/impls/aij/mpi/mpiov.c
> [1]PETSC ERROR: [1] MatIncreaseOverlap_MPIAIJ line 22
> src/mat/impls/aij/mpi/mpiov.c
> [1]PETSC ERROR: [1] MatIncreaseOverlap line 6543 src/mat/interface/matrix.c
> [1]PETSC ERROR: [1] PCSetUp_ASM line 155 src/ksp/pc/impls/asm/asm.c
> [1]PETSC ERROR: [1] PCSetUp line 797 src/ksp/pc/interface/precon.c
> [1]PETSC ERROR: [1] KSPSetUp line 184 src/ksp/ksp/interface/itfunc.c
> [1]PETSC ERROR: [1] KSPSolve line 331 src/ksp/ksp/interface/itfunc.c
> [1]PETSC ERROR: [1] SNES_KSPSolve line 3394 src/snes/interface/snes.c
> [1]PETSC ERROR: [1] SNESSolve_LS line 142 src/snes/impls/ls/ls.c
> [1]PETSC ERROR: [1] SNESSolve line 2647 src/snes/interface/snes.c
> [1]PETSC ERROR: [1] TSStep_Theta line 25
> src/ts/impls/implicit/theta/theta.c
> [1]PETSC ERROR: [1] TSStep line 1768 src/ts/interface/ts.c
> [1]PETSC ERROR: [1] TSSolve line 1824 src/ts/interface/ts.c
> [1]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> The same error happens when I run the example
> /snes/examples/tutorials/ex32.c with the option -'pc_type asm'.
>
> How to properly set up the preconditioner in that case (dof > 1) ?
>
> Thanks,
>
> Laurent Berenguer
>
> PhD student,
> Université Lyon 1
>
>
>
>


-- 
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/20120312/82408a99/attachment.htm>


More information about the petsc-users mailing list