<p><br>Your faithfully:<br>     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? </p><p>     I have read  this website "<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html</a>", but I don't understand it clealy. So can you tell me where can I find the example of MatMPIBAIJSetPreallocationCSR?</p><p>     Thanks! </p><p>your sincerely</p><p>LV CHAO</p><p>2014/3/28<br></p><span></span><br><br><br>