[petsc-users] tests of MatMPIAIJSetPreallocationCSR

Matthew Knepley knepley at gmail.com
Fri Mar 28 08:54:10 CDT 2014


On Fri, Mar 28, 2014 at 8:18 AM, 吕超 <luchao at mail.iggcas.ac.cn> wrote:

>
> Your faithfully:
>      Can you tell me whether I need to caculate the exact diag and
> off-diag arrays related to  the nonzeros numbers when I use subroutine
> MatMPIBAIJSetPreallocationCSR to allocate memory?
>
>      I have read  this website "
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html",
> but I don't understand it clealy.
>
All preallocation routines behave in the same way. If you give to little
memory, it will give an error
unless you use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE)

   Matt

> So can you tell me where can I find the example of
> MatMPIBAIJSetPreallocationCSR?
>
>      Thanks!
>
> your sincerely
>
> LV CHAO
>
> 2014/3/28
>
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140328/4da112e6/attachment.html>


More information about the petsc-users mailing list