Problem with rectangular matrices

Matthew Knepley knepley at
Tue May 26 08:35:28 CDT 2009

I think there is an inconsistency in our definitions. If you create a matrix
is 4x8 on 2 procs, then you end up with a row and column map like this:

    rowMap           colMap
  [0..2) [2..4)      [0..4) [4..8)

However, we use the column map for queries which then give nonsense. The
damaging is in MatSetValues(). If I give a value for (2,2) on proc 1, then
2 < cstart = 4, this value is considered "off-diagonal" and can cause a
malloc(). So
I think we have a choice. We can define "diagonal block" to have this weird
or we can change all queries for the diagonal block to use only the rowMap.
I vote
for the latter, but does anyone have an objection?


What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-dev mailing list