[petsc-dev] PetscObjectViewFromOptions() pull request 1005 1006
Boyce Griffith
griffith at cims.nyu.edu
Fri Jun 29 09:20:44 CDT 2018
> On Jun 29, 2018, at 9:58 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>
> On Thu, 28 Jun 2018 at 20:17, Lawrence Mitchell <wence at gmx.li> wrote:
>>
>>
>> OK, I've done some more benchmarking now, and cooked up a very simple test case. I just solve a tiny problem 10 million times.
>>
>> On master, this completes on my machine in:
>>
>> If I leave the viewers on, this takes ages:
>>
>> (master-viewers-on) $ time taskset -c 1 ./many-ksps
>> real 0m37.07s
>>
>> When I turn the viewers off
>> (master-viewers-off) $ time taskset -c 1 ./many-ksps
>> real 0m17.979s
>>
>> On knepley/feature-pc-patch both are faster, with no difference between turning viewers on and turning viewers off.
>>
>> (patch) $ time task set -c 1 ./many-ksps
>> real 0m12.512s
>>
>> So a 25%-30% win.
>>
>
> Your example is hardly representative of any actual problem you will
> ever solve with PCPATCH. You matrix is diagonal (identity!!), and the
> same KSP object (and trivial matrix, and ILU preconditioner) is used
> over and over again (all memory will reside in cache?), and all the
> solves are just one iteration. The fact that you get an improvement in
> Matt's branch respect to turning the viewers off smells to just C
> function call overhead, otherwise how do you explain the difference?
FWIW, we implemented some Vanka-type multigrid smoothers for the incompressible Stokes equations, and we found that ~15% of total runtime was spent dealing with options on real (or at least real-ish) test problems. The configure-time flag turning off the viewers dropped that down to ~1%. I don't know what PCPATCH is, but it sounds like it may be doing something similar.
-- Boyce
More information about the petsc-dev
mailing list