[petsc-users] sparse matrix addition
Barry Smith
bsmith at mcs.anl.gov
Thu Apr 14 07:46:20 CDT 2011
On Apr 14, 2011, at 3:08 AM, Jed Brown wrote:
> On Thu, Apr 14, 2011 at 05:48, Shiyuan <gshy2014 at gmail.com> wrote:
> I have two matrices A, B of different nonzero-pattern. Their size is about 60k*60k. I notices that MATAXPY() is extremely slow.
>
> What matrix format and what are you passing for MatStructure? With DIFFERENT_NONZERO_STRUCTURE, petsc-3.1 was not doing preallocation. This is fixed in petsc-dev.
In other words, switch to the development version of PETSc http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html and it should be much faster. If it is not much faster than please send mail to petsc-maint at mcs.anl.gov with details of the matrix type AIJ? and ideally sample code and we'll see why it is so slow.
Barry
More information about the petsc-users
mailing list