Some subroutine in PETSc is a little slow

Chen, Changjun cjchen at math.msu.edu
Sun Sep 21 13:22:51 CDT 2008


Dear Sir,
      I have be using PETSc for many days. Recently I find one subroutine in PETSc is a little slow, It is an initialization subroutine to fill in the matrix elements:

     call MatSetValues(A,ione,II,ione,JJ,v,INSERT_VALUES,ierr)

      I find that the total time to fill in the matrix data is even much longer than the iteration time to solve the system
               call KSPSolve(ksp,b,x,ierr)
      How could this happen?  Could I accelerate the time for filling in the data?

Sincerely,
Changjun Chen




More information about the petsc-users mailing list