[petsc-users] Problem with -pc_type gamg

Randall Mackie rlmackie862 at gmail.com
Fri Sep 14 13:07:34 CDT 2012


Thanks, I will try and let you know.

Randy


On Sep 14, 2012, at 11:07 AM, "Mark F. Adams" <mark.adams at columbia.edu> wrote:

> I just pushed a fix in petsc-dev that should fix the problem.
> 
> Mark
> 
> On Sep 14, 2012, at 1:58 PM, Randall Mackie <rlmackie862 at gmail.com> wrote:
> 
>> Hi Mark,
>> 
>> Yes, the answer to your question is that the first entry in the matrix has a 1 on the diagonal due to boundary conditions.
>> 
>> I will try your suggestion and see if it works, or if you improve on this, I can always try petsc-dev.
>> 
>> Thanks, Randy
>> 
>> 
>> On Sep 14, 2012, at 10:41 AM, Mark F. Adams <mark.adams at columbia.edu> wrote:
>> 
>>> Randy,
>>> 
>>> PETSc does not allow new non-zero entries any more so it requires me to get a an upper bound on non-zeros per row.  This can be a little tricky to do perfectly.
>>> 
>>> It looks to me like you have have set block size in your matrix > 1.  Do you have a BC on one degree of freedom (the first one) on the first vertex, such that the first row of your matrix has just a diagonal entry, and other degrees of freedom on this first vertex do not have a BC?
>>> 
>>> I should do a better job at doing this and can fix this in petsc-dev but you are using 3.3 so a fix, that might be easy for you to do, is to add or keep zeros in these matrix entries that are deleted by BCs.  This will let me get an accurate count of the non-zeros in the row of the graph of your mesh, which is what I am constructing in this code.
>>> 
>>> Mark
>>> 
>>> On Sep 14, 2012, at 12:28 PM, Randall Mackie <rlmackie862 at gmail.com> wrote:
>>> 
>>>> For quite some time I've been solving my problems using BCGS with ASM and that works quite well. 
>>>> I was curious to try gamg, but when I try, I get error messages about
>>>> a new nonzero causing a malloc (see error message below). What is strange is that in my code, I specifically
>>>> turn this off with:
>>>> 
>>>>    call MatSetOption(A,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE,ierr)
>>>> 
>>>> Is there some way to turn this off globally, or is this error potentially caused by some other issue?
>>>> 
>>>> Thanks, Randy
>>>> 
>>>> [0]PCSetData_AGG bs=3 MM=1286334
>>>> [0]PETSC ERROR: --------------------- Error Message ------------------------------------
>>>> [0]PETSC ERROR: Argument out of range!
>>>> [0]PETSC ERROR: New nonzero at (0,1) caused a malloc!
>>>> [0]PETSC ERROR: ------------------------------------------------------------------------
>>>> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 CDT 2012 
>>>> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
>>>> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
>>>> [0]PETSC ERROR: See docs/index.html for manual pages.
>>>> [0]PETSC ERROR: ------------------------------------------------------------------------
>>>> [0]PETSC ERROR: Configure run at Fri Aug 31 12:55:11 2012
>>>> [0]PETSC ERROR: Configure options --with-scalar-type=complex --with-debugging=1 --with-fortran=1 --with-fortran-kernels=1
>>>> [0]PETSC ERROR: ------------------------------------------------------------------------
>>>> [0]PETSC ERROR: MatSetValues_SeqAIJ() line 346 in /home/MackieR/PETSc/petsc-3.3-p3/src/mat/impls/aij/seq/aij.c
>>>> [0]PETSC ERROR: MatSetValues() line 1025 in /home/MackieR/PETSc/petsc-3.3-p3/src/mat/interface/matrix.c
>>>> [0]PETSC ERROR: PCGAMGCreateGraph() line 68 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/pc/impls/gamg/tools.c
>>>> [0]PETSC ERROR: PCGAMGgraph_AGG() line 977 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/pc/impls/gamg/agg.c
>>>> [0]PETSC ERROR: PCSetUp_GAMG() line 656 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/pc/impls/gamg/gamg.c
>>>> [0]PETSC ERROR: PCSetUp() line 832 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/pc/interface/precon.c
>>>> [0]PETSC ERROR: KSPSetUp() line 278 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/ksp/interface/itfunc.c
>>>> [0]PETSC ERROR: KSPSolve() line 402 in /home/MackieR/PETSc/petsc-3.3-p3/src/ksp/ksp/interface/itfunc.c
>>>> 
>>> 
>> 
>> 
> 



More information about the petsc-users mailing list