[petsc-users] [PETSc-Users] The MatSetValues takes too much time
Mark Adams
mfadams at lbl.gov
Thu May 2 06:57:10 CDT 2019
You need to set the preallocation for the matrix.
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html
On Thu, May 2, 2019 at 7:46 AM Dongyu Liu via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Hi,
>
> I am using PETSc sparse matrix ('aij') for a FEM program, when the
> matrix is really big, let's say 1million by 1million, we use setValues
> based on the index vector I and J, but the whole process takes around 2
> hours.
>
> I don't know why it is like that, or is there any option that I should
> set to make this faster?
>
>
> Best,
>
> Dongyu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190502/9c76226c/attachment.html>
More information about the petsc-users
mailing list