[petsc-users] MatMPIAIJSetPreallocationCSR

Oliver Browne oliver.browne at upm.es
Wed May 14 07:42:58 CDT 2014


Hi,

I am using MatMPIAIJSetPreallocationCSR to preallocate the rows, columns 
and values for my matrix (efficiency). I have my 3 vectors in CSR 
format. If I run on a single processor, with my test case, everything 
works fine. I also worked without MatMPIAIJSetPreallocationCSR, and 
individually input each value with the call MatSetValues in MPI and this 
also works fine.

If I want to use MatMPIAIJSetPreallocationCSR, do I need to separate the 
vectors for each processor as they have done here;

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html#MatMPIAIJSetPreallocationCSR

Thanks in advance,

Ollie



More information about the petsc-users mailing list