[petsc-dev] MatXXXSetPreallocation and -mat_new_nonzero_allocation_error

Jed Brown jed at 59A2.org
Thu Apr 22 14:27:15 CDT 2010


On Thu, 22 Apr 2010 14:07:06 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>    I don't understand how knowing the preallocation for SBAIJ give you  
> an efficient way to know the preallocation for BAIJ?  Say you have  
> 20,000 processors can you efficiently get the information where it is  
> needed? Are you willing to write the code to do that?

Ah, you're right, there's no way to preallocate BAIJ from SBAIJ without
indices (it's not just hard, there isn't enough information).  That
seems to have been a bad example.  But there is a clear way to
preallocate AIJ from BAIJ and that code is written (in
SlicedGetMatrix(), if not elsewhere).  So what about having AIJ
implement BAIJ preallocation, consistent with the theme of BAIJ
interfaces merely providing more structured information?

Jed



More information about the petsc-dev mailing list