[gmx-users] Profiling mdrun with GProf
Mark Abraham
mark.j.abraham at gmail.com
Tue Nov 17 15:36:38 CET 2015
Hi,
On Tue, Nov 17, 2015 at 2:22 PM Dave Michael <dm.cid.lab at gmail.com> wrote:
> My question was/still is "how can I set up the build options so that GProf
> can count the exact times a function is called" and "gprof can probably do
> that job" is not an answer.
> Here are my cmake build options:
> -DGMX_SIMD=None -DGMX_GPU=OFF -DGMX_OPENMP=OFF -DCMAKE_BUILD_TYPE=Profile
> -DGMX_MPI=OFF -DGMX_USE_RDTSCP=OFF
>
> The problem I'm seeing is that "do_force" is still missing from the output
> log, along with all the other "do_force_*" functions as well as all other
> electrostatic function calls.
>
Then inlining is not a relevant issue. There's no way that such calls
to/from do_force() can be being inlined, because they're all in different
compilation units. I'd be looking at gprof and asking it how to configure
the maximum depth of its call stacks. (Just a guess, though.)
And the -fno-inline flag won't override any always_inline attributes. Is
> there a smart way to remove all inlining attributes from the source code or
> should I use search & replace?
>
Probably search and replace, but I don't think this addresses your problem.
Mark
> Dave
>
> On Tue, Nov 17, 2015 at 2:36 PM, Mark Abraham <mark.j.abraham at gmail.com>
> wrote:
>
> > I answered the one actual question you asked ;-) I'm sorry I had to spend
> > my time guessing what your unstated intentions were, and what you thought
> > was "missing." :-) gprof can probably do that job, assuming that -O0 and
> a
> > no-inlining flag actually override source-code annotations for inlining.
> >
> > Mark
> >
> > On Tue, Nov 17, 2015 at 1:05 PM Dave Michael <dm.cid.lab at gmail.com>
> wrote:
> >
> > > I'm not interested in any performance and/or any time-domain profiling.
> > > Please just answer my questions without any additional comments.
> > > I just want to get the exact name of the functions called in a mdrun
> on a
> > > particular simulation and the exact number of times it gets called.
> > >
> > > On Tue, Nov 17, 2015 at 1:27 PM, Mark Abraham <
> mark.j.abraham at gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > On Tue, Nov 17, 2015 at 11:55 AM Dave Michael <dm.cid.lab at gmail.com>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I need some help with using gprof and mdrun.
> > > > >
> > > >
> > > > To what end? Note that the end of the .log file provides a very rough
> > > > profile already.
> > > >
> > > >
> > > > > Here's a short story of what I've tried so far:
> > > > > - a bunch of other tools (perf, zoom, valgrind) - not quite what I
> > was
> > > > > looking for
> > > > > - settled on GProf (and I want to count ALL function calls)
> > > > > - compiled the code with the "Profile" option
> > > > > - reduced -O3 to -O0 and had some success here (but some things are
> > > still
> > > > > missing)
> > > > >
> > > >
> > > > A profile not at -O3 is of zero value.
> > > >
> > > >
> > > > > Can someone help me out?
> > > > >
> > > > > Also, where are the compiler flags store (i.e. where can I specify
> a
> > > > > no-inline option)?
> > > > >
> > > >
> > > > CMake has various compiler-flag options you can play with (e.g. try
> the
> > > > advanced mode of ccmake). But all that you will observe is that the
> > > > functions that are no longer inlined should have been, because we
> make
> > > > extensive use of inlined functions in performance-critical kernels.
> > > >
> > > > Mark
> > > >
> > > >
> > > > > Dave
> > > > > --
> > > > > Gromacs Users mailing list
> > > > >
> > > > > * Please search the archive at
> > > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > > > posting!
> > > > >
> > > > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > > > >
> > > > > * For (un)subscribe requests visit
> > > > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> > or
> > > > > send a mail to gmx-users-request at gromacs.org.
> > > > >
> > > > --
> > > > Gromacs Users mailing list
> > > >
> > > > * Please search the archive at
> > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > > posting!
> > > >
> > > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > > >
> > > > * For (un)subscribe requests visit
> > > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> or
> > > > send a mail to gmx-users-request at gromacs.org.
> > > >
> > > --
> > > Gromacs Users mailing list
> > >
> > > * Please search the archive at
> > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > posting!
> > >
> > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > >
> > > * For (un)subscribe requests visit
> > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > > send a mail to gmx-users-request at gromacs.org.
> > >
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>
More information about the gromacs.org_gmx-users
mailing list