On May 14, 2014, at 7:42 AM, Oliver Browne <[email protected]> wrote:

> 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;

   What do you mean by “separate” the vectors? Each processor needs to provide 
ITS rows to the function call. You cannot have processor zero deliver all the 
rows. 

   

   Barry

> 
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html#MatMPIAIJSetPreallocationCSR
> 
> Thanks in advance,
> 
> Ollie
> 

Reply via email to