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 

Reply via email to