GMON_OUT_PREFIX
Greg,
This seems to work great - I just tried it out on a single-processor
program on Titan, also single and MPI run on Platinum.
I'm not sure if this is documented anywhere, but recent versions
of glibc support the environment variable GMON_OUT_PREFIX, which
causes the resulting files to be named something other than gmon.out,
and instead names them according to the process ID:
$GMON_OUT_PREFIX.<pid>
I think this is helpful in the case of MPI processes so they don't
overwrite each other's profile. Another thing that seems to
work is to generate a summary from multiple profiles, e.g.,
gprof -s a.out $GMON_OUT_PREFIX.*
gprof a.out gmon.sum > summary-profile
Rick
> ============ Gregory Bauer's message of May 20, 4:28pm ================
> I met with Dan Lapine and he copied the patched version of
> gcrt1.o to /usr/lib on titan. This file is loaded during compile/link
> time.
>
> To profile using efc/ecc, use '-qp -g' and which ever optimization level,
> '-O2' for example. (Yes, you need to use the -g but since it also allows
> optimization, it shouldn't be a hinderance.)
>
> For gcc, use the usual '-pg'.
>
> If you run into problems, let me know.
>
> -Greg
> ============ End of Gregory Bauer's message of May 20, 4:28pm =========