[petsc-users] Problem with SNES

Jed Brown jedbrown at mcs.anl.gov
Sat Aug 27 14:29:37 CDT 2011


On Sat, Aug 27, 2011 at 14:20, Milan Mitrovic <milan.v.mitrovic at gmail.com>wrote:

> sorry, it was the local to global mapping... forgot to turn it on
> again... it seems that there is a problem with preallocation as I get
> one of these:
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Argument out of range!
> [0]PETSC ERROR: New nonzero at (93,351) caused a malloc!
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17
> 13:37:48 CDT 2011
> [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: ./ppm_pf on a darwin10. named
> milan-mitrovics-macbook-pro.local by milan Sat Aug 27 21:13:10 2011
> [0]PETSC ERROR: Libraries linked from /Users/milan/Work/Library/petsc/lib
> [0]PETSC ERROR: Configure run at Fri May  6 16:32:02 2011
> [0]PETSC ERROR: Configure options --with-mpi=true
> --with-mpi-dir=/Users/milan/Work/Library/openmpi.gcc/
> --with-fortran=true --with-sundials=true
> --with-sundials-dir=/Users/milan/Work/Library/sundials/
> --prefix=/Users/milan/Work/Library/petsc
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: MatSetValues_MPIAIJ() line 358 in
> src/mat/impls/aij/mpi/mpiaij.c
>
> even though in:
>
>       call MatSetValuesLocal(Jac,1,(/i/),nzr(i),ind(i,:),val(i,:), &
>            ADD_VALUES,info)
>
> maxval(nzr) < nmax (the one used for preallocate)...
>

Do you ever try to insert the same row more than once? E.g. perhaps the
LocalToGlobalMapping is not injective (so there are two local indices that
map to the same global index).


>
> after that I get:
>
> [1]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [1]PETSC ERROR: Object is in wrong state!
> [1]PETSC ERROR: Not for unassembled matrix!


Did you forget to call MatAssemblyBegin() and MatAssemblyEnd() ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110827/844f6e97/attachment-0001.htm>


More information about the petsc-users mailing list