<div dir="ltr">Thanks -- will do. Just curious, what's the reason for sorting?<br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 12:26 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div class="im">On Fri, Aug 17, 2012 at 2:20 PM, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com" target="_blank">mirzadeh@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">You mean columns within a row? Nope.</div></blockquote><div><br></div></div><div>Okay, they are supposed to be. You can loop over your rows calling PetscSortInt() on each row separately.</div><div><br></div>

<div>
You didn't get the error before because debugging wasn't on, but you were also very lucky because many matrix kernels would have behaved incorrectly with unsorted data.</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr"><div><div><br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 12:18 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>On Fri, Aug 17, 2012 at 2:11 PM, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com" target="_blank">mirzadeh@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi guys,<div><br></div><div>I just realize my code breaks with new versions of petsc-dev. I use MatCreateMPIAIJWithSplitArrays() funtions and it works with this verison:</div><div><br></div><div>Petsc Development HG revision: b27fc9457bdc002c5a5de2b07797ae1a93094370  HG Date: Thu May 03 13:42:15 2012 -0500</div>







<div><br></div><div>but breaks with:</div><div><br></div><div>Petsc Development HG revision: f9c6cac2d69c724a2258d4e0dc2f51b0825aa875  HG Date: Thu Aug 16 08:37:18 2012 -0700</div><div><br></div><div>Here's the error code:</div>







<div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Argument out of range!</div><div>[0]PETSC ERROR: Column entry number 1 (actual colum 2) in row 3 is not sorted!</div>





</div></div></blockquote><div><br></div></div><div>Are your rows sorted?</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<div>

<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Development HG revision: f9c6cac2d69c724a2258d4e0dc2f51b0825aa875  HG Date: Thu Aug 16 08:37:18 2012 -0700</div>







<div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div><div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>







[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ./FVM on a arch-linu named mohammad-desktop by mohammad Fri Aug 17 12:06:15 2012</div><div>[0]PETSC ERROR: Libraries linked from /home/mohammad/soft/petsc-dev_new/petsc-dev/arch-linux2-cxx-debug/lib</div>







<div>[0]PETSC ERROR: Configure run at Fri Aug 17 11:45:31 2012</div><div>[0]PETSC ERROR: Configure options --with-clanguage=cxx --with-mpi-dir=/usr/bin --download-f-blas-lapack=1 --download-hypre=1 --download-parmetis=1 --download-metis=1 --download-superlu_dist=1</div>







<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: MatCreateSeqAIJWithArrays() line 4268 in /home/mohammad/soft/petsc-dev_new/petsc-dev/src/mat/impls/aij/seq/aij.c</div>







<div>[0]PETSC ERROR: MatCreateMPIAIJWithSplitArrays() line 5731 in /home/mohammad/soft/petsc-dev_new/petsc-dev/src/mat/impls/aij/mpi/mpiaij.c</div><div>[0]PETSC ERROR: setLinearSystemMatrix() line 84 in "unknowndirectory/"../../../CASL/lib/algebra/petscLinearSolver.cpp</div>







</div><div><br></div><div>Is there anything changed regarding numbering of diagonal and off-diagonal entries when using the said function between these two versions? </div><div><br></div><div>Thanks,</div><div>Mohammad</div>







</div>
</blockquote></div></div><br>
</blockquote></div><br></div></div></div>
</blockquote></div></div></div><br>
</blockquote></div><br></div>