[petsc-users] Slow speed to SetValues for matrix created by PETSC by mat_initial_matrix
Zhang, Hong
hzhang at mcs.anl.gov
Thu Jun 4 09:45:06 CDT 2020
Check the output of MatMatMult(). If your matrix product has all diagonal entries? How large is your matrix?
Hong
________________________________
From: petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of Yang Juntao <Y.Juntao at hotmail.com>
Sent: Thursday, June 4, 2020 4:01 AM
To: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: [petsc-users] Slow speed to SetValues for matrix created by PETSC by mat_initial_matrix
Hello,
I computed a preconditioned matrix by MatMatMulti(), and I generated the new matrix with option MAT_INITIAL_MATRIX.
However I need to change the generated matrix by insert value 1 to half of the diagonal. MatSetValue() is used but the speed a much slower than MatSetValue with matrix setup by MatCreate() and MatSeqAIJPreallocation().
I would like to ask is it due to the preallocation setting of MAT_INITIAL_MATRIX generated matrix and how I can change it?
Thanks in advance
JT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200604/a9ab91e2/attachment.html>
More information about the petsc-users
mailing list