[petsc-users] If I use MatISSetLocalMat with a MatCreateSeqAIJ local matrix, do I need to use MatISSetPreallocation for the global matrix ?

Franck Houssen franck.houssen at inria.fr
Wed May 31 10:59:53 CDT 2017


If I use MatISSetLocalMat with a preallocated MatCreateSeqAIJ local matrix, do I need to use MatISSetPreallocation for the global matrix ? 

Here is the pseudo-code: 
MatCreateIS(PETSC_COMM_WORLD, ..., &globalMat) 
MatISSetPreallocation(globalMatrix, ...) // Is this necessary ? 
MatCreateSeqAIJ(PETSC_COMM_SELF, ..., &localMatrix) // Prealloc done on the fly 
MatSetValues(localMatrix, ...) 
MatISSetLocalMat(globalMatrix, localMatrix) 

Is it necessary to call MatISSetPreallocation for globalMatrix ? (prealloc should have been done locally for each local matrix, no ?) 

Franck 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170531/70fa91fc/attachment.html>


More information about the petsc-users mailing list