[petsc-users] Insering rows vs inserting columns

Jed Brown jed at 59A2.org
Thu May 26 07:20:35 CDT 2011


On Thu, May 26, 2011 at 13:46, Bartłomiej W <bartlomiej.wach at yahoo.pl>wrote:

> That helped.
>
> I am also wondering about SEQ and MPI matrices, do they differ more than
> just in way of allocating data? When I run a small problem on 2 processes on
> single machine, it slows down greatly if I use
>
>
> MatCreateMPIAIJ(PETSC_COMM_WORLD,PETSC_DECIDE,PETSC_DECIDE,n,n,5,PETSC_NULL,5,PETSC_NULL,&L);
>
> As I get mallocs during mat assembly while o_nz and d_nz are set to 5 where
> 5 is max nonzeros per whole row. I also get stash:0 assuring that values are
> set by correct process.


Your preallocation is either incorrect or it is getting lost.
Try MAT_NEW_NONZERO_ALLOCATION_ERR

http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MatSetOption.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110526/5ca7882f/attachment.htm>


More information about the petsc-users mailing list