[petsc-users] Performance of PETSc TS solver
Jin, Shuangshuang
Shuangshuang.Jin at pnnl.gov
Fri Aug 16 16:01:50 CDT 2013
Hello, Jed, in my IJacobian subroutine, I defined a PetscScalar J[4*n][4*n], and filled in the values for this J matrix by MatSetValues().
245 seconds out of the total 351 seconds in the DAE TS solving part are due to this J matrix computation.
For that J matrix, half of them are constants values which doesn't change in each iteration. However, since my J is created inside each IJacobian() call, I couldn't reuse it. If that part of work belongs to redundant computation, I would like to know if there's a way to set up the Jacobian matrix outside of the IJacobian() subroutine, so that I can keep the constant part of values in J for all the iterations but only updates the changing values which depends on X?
Thanks,
Shuangshuang
-----Original Message-----
From: Jed Brown [mailto:five9a2 at gmail.com] On Behalf Of Jed Brown
Sent: Thursday, August 15, 2013 7:27 PM
To: Jin, Shuangshuang
Cc: petsc-users at mcs.anl.gov
Subject: RE: [petsc-users] Performance of PETSc TS solver
"Jin, Shuangshuang" <Shuangshuang.Jin at pnnl.gov> writes:
> Hi, Jed,
>
> I followed your suggestion and profiled the IJacobian stage, please see the related profile below:
Cool, all of these are pretty inexpensive, so your time is probably in compu
More information about the petsc-users
mailing list