[petsc-dev] MatCreateMPIAIJ(), MatCreateMPIBAIJ(), MatCreateMPISBAIJ() wrongly named

Barry Smith bsmith at mcs.anl.gov
Thu Mar 1 11:31:10 CST 2012


On Mar 1, 2012, at 11:11 AM, Matthew Knepley wrote:

> On Thu, Mar 1, 2012 at 11:03 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>    MatCreateMPIAIJ(), MatCreateMPIBAIJ(), MatCreateMPISBAIJ()   actually create Seq version of the matrices when run on one process.
> 
>    Meanwhile MatMPIXXXSetPreallocation() always do preallocation for MPI case.
> 
>    Shouldn't MatCreateMPIXXX() be MatCreateXXX()?
> 
> I agree, and we already have MATAIJ so it matches a type.
>  
>    Also should we add MatXXXSetPreallocation() that calls both MatSeqXXXSetPreallocation() and MatMPIXXXSetPreallocation()?
> 
> In fact, that exists: MatXAIJSetPreallocation(). I use it for DMComplex.

   Cool.  Some suggestions for this routine:

1) get rid of the maximum number of non-zeros per row arguments, they are stupid and just make this calling sequence too damn complicated looking. 

2) the manual page doesn't make clear these are nonzero BLOCKS per row, not nonzero entries per row.

   Barry


   Input Arguments:
+  A - matrix being preallocated
.  bs - block size
.  dnz - maximum number of nonzero entries per row of diagonal block of parallel matrix
.  dnnz - number of nonzeros per row of diagonal block of parallel matrix
.  onz - maximum number of nonzero entries per row of off-diagonal block of parallel matrix
.  onnz - number of nonzeros per row of off-diagonal block of parallel matrix
.  dnzu - maximum number of nonzero entries per row of upper-triangular part of diagonal block of parallel matrix
.  dnnzu - number of nonzeros per row of upper-triangular part of diagonal block of parallel matrix
.  onzu - maximum number of nonzero entries per row of upper-triangular part of off-diagonal block of parallel matrix
-  onnzu - number of nonzeros per row of upper-triangular part of off-diagonal block of parallel matrix


> 
>    Matt
>  
> 
>    Barry
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener




More information about the petsc-dev mailing list