possible bug in MatGetOwnershipRanges() and MatGetOwnershipRangesColumns()

Barry Smith bsmith at mcs.anl.gov
Mon Aug 25 17:21:09 CDT 2008


    I'm changing those two routines to also preallocate.

    Barry

On Aug 25, 2008, at 4:27 PM, Lisandro Dalcin wrote:

> 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