[petsc-users] Column #j is wrong in parallel from message "Inserting a new nonzero (i, j) into matrix"
Barry Smith
bsmith at mcs.anl.gov
Wed Mar 25 14:26:54 CDT 2015
Eric,
This is a good idea. I've fixed it for MatSetValues, MatSetValuesLocal, and MatSetValuesStencil, for AIJ,BAIJ, and SBAIJ matrices in the branch barry/fix-inserting-new-nonzero-column-location.
Fixing for the MatSetValuesBlocked family of methods for BAIJ and SBAIJ is tricky since the global information is lost before reaching the location that generates the error message. But you are right the current situation is very confusing and we should find a way to fix it.
Barry
> On Mar 25, 2015, at 1:03 PM, Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> wrote:
>
> Hi,
>
> while looking for where in the world do I insert the (135,9) entry in my matrix, I have discovered that the column # shown is wrong in parallel!
>
> I am using PETsc 3.5.3.
>
> The full error message is:
>
> [0]PETSC ERROR: MatSetValues_MPIAIJ() line 564 in /home/mefpp_ericc/petsc-3.5.3/src/mat/impls/aij/mpi/mpiaij.c Inserting a new nonzero (135, 9) into matrix
>
> This line code is a call to a #defined macro:
>
> MatSetValues_SeqAIJ_B_Private(row,col,value,addv);
>
> where the "col" parameter is not equal to "in[j]"!!!
>
> in gdb, printing "in[j]" gave me:
>
> print in[j]
> $6 = 537
>
> while "col" is:
>
> print col
> $7 = 9
>
> So, I expected to have a message telling me that (135,537) and not (135,9) is a new entry matrix!!!
>
> Would it be a big work to fix this so that the col # displayed is correct?
>
> Thanks!
>
> Eric
More information about the petsc-users
mailing list