[petsc-dev] PetscObjectViewFromOptions() pull request 1005 1006

Lisandro Dalcin dalcinl at gmail.com
Fri Jun 29 08:58:46 CDT 2018


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?


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459


More information about the petsc-dev mailing list