[gecode-users] Analysing search performance
Guido Tack
tack at ps.uni-sb.de
Tue Feb 28 09:06:54 CET 2006
Hi Lars.
> Hence I'd like to make some kind of analysis of where the depth first
> search in Gecode spends it time, to find potential bottlenecks. For a start
> it would e.g. be nice to see how much time is spent propagating my custom
> constraints (or all constraints in general).
>
> Is there any way to do this in Gecode? I realize this might also be a more
> general C++ question, in this case I'd appreciate any pointers on where to
> look for more info...
The first thing you could try is profiling using gprof. Simply compile Gecode
using the --enable-profile configure switch (I hope it still works, I haven't
tested it in a while). Then you simply run your sample program, which will
result in a file gmon.out. For analysis, you may want to try graphical
frontends to gprof such as kprof (http://kprof.sourceforge.net/).
If this doesn't help you find the bottleneck, you will have to write some
profiling code by hand; we haven't built anything into the system yet. I'd
probably start by instrumenting the propagation loop (e.g. in Space::status
in file core.cc), and then move to individual propagators.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list