[petsc-dev] PetscObjectViewFromOptions() pull request 1005 1006
Lawrence Mitchell
wence at gmx.li
Thu Jun 28 11:15:55 CDT 2018
> On 28 Jun 2018, at 16:51, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>
>
> I am having trouble tracking the following issue (and people's opinion on it) in the pull requests so I am starting an email thread to discuss the issue.
>
> Currently - (this is my understanding)
>
> 1) PetscObjectViewFromOptions() is very slow
> 2) Many calls are made to this routine directly from solvers (such as KSP)
It is particularly insidious in the PC under discussion in the PR#1005, because we have O(dofs) KSPs, not O(1).
> because of this there is a configure option to turn off checking of PetscObjectViewFromOptions
> In pull request 1005 Matt moved the PetscObjectViewFromOptions() routines out of KSPSolve() and put them in KSPSetFromOptions().
>
> In pull request 1006 Lisandro proposes moving the configure option to turn off checking of a PetscObjectViewFromOptions() to a runtime option.
This uses the Push/Pop stuff that I added in PR#604, in response to noting (in PCPATCH runs) that 90% of the time was spent in XXXViewFromOptions. After adding the push/pop pair, this dropped to basically 0%. I didn't do further exhaustive benchmarking to check for further problems.
The PCPATCH code already uses push/pop, so I don't know where Matt saw all this slow options checking that kicked off this discussion.
Cheers,
Lawrence
More information about the petsc-dev
mailing list