<div class="gmail_quote">On Sat, Aug 27, 2011 at 14:20, Milan Mitrovic <span dir="ltr"><<a href="mailto:milan.v.mitrovic@gmail.com">milan.v.mitrovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
sorry, it was the local to global mapping... forgot to turn it on<br>
again... it seems that there is a problem with preallocation as I get<br>
one of these:<br>
<div class="im">[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: Argument out of range!<br>
</div>[0]PETSC ERROR: New nonzero at (93,351) caused a malloc!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17<br>
<div class="im">13:37:48 CDT 2011<br>
</div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./ppm_pf on a darwin10. named<br>
milan-mitrovics-macbook-pro.local by milan Sat Aug 27 21:13:10 2011<br>
[0]PETSC ERROR: Libraries linked from /Users/milan/Work/Library/petsc/lib<br>
[0]PETSC ERROR: Configure run at Fri May 6 16:32:02 2011<br>
[0]PETSC ERROR: Configure options --with-mpi=true<br>
<div class="im">--with-mpi-dir=/Users/milan/Work/Library/openmpi.gcc/<br>
--with-fortran=true --with-sundials=true<br>
--with-sundials-dir=/Users/milan/Work/Library/sundials/<br>
--prefix=/Users/milan/Work/Library/petsc<br>
</div>[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: MatSetValues_MPIAIJ() line 358 in src/mat/impls/aij/mpi/mpiaij.c<br>
<br>
even though in:<br>
<br>
call MatSetValuesLocal(Jac,1,(/i/),nzr(i),ind(i,:),val(i,:), &<br>
ADD_VALUES,info)<br>
<br>
maxval(nzr) < nmax (the one used for preallocate)...<br></blockquote><div><br></div><div>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).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
after that I get:<br>
<div class="im"><br>
[1]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
</div>[1]PETSC ERROR: Object is in wrong state!<br>
[1]PETSC ERROR: Not for unassembled matrix!</blockquote><div> </div><div>Did you forget to call MatAssemblyBegin() and MatAssemblyEnd() ?</div><div><br></div></div>