possible bug in MatGetOwnershipRanges() and MatGetOwnershipRangesColumns()

Lisandro Dalcin dalcinl at gmail.com
Mon Aug 25 16:27:52 CDT 2008


Barry/Matt/Shatish. Could any of you review the implementation of
MatGetOwnershipRanges() and MatGetOwnershipRangesColumns(). I believe
a MatPreallocated() call is missing in both functions?  The companion
ones, MatGetOwnershipRange() and MatGetOwnershipRangeColumns()
DO HAVE the call to MatPreallocate(), I believe this is indeed the
right way: PetscMapSetUp() calls are actually made in matrix
preallocation routines. Anyway, this is a bit dangerous, because this
makes getting ownership range a collective operation if the matrix is
not preallocated. Furthermore, this is in contradiction to all the
docs about XXXGetOwnershipRangeXXX(). Of course, the safe (but
unconvenient) way to go would be to disable operation on
non-preallocated Mat's by generating errors.

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list