The Shallow demo project from the eclipse tutorial cvs can be used with gprof and gcov with a few simple adjustments to the Makefile and MPI runtime. Here are the details and some discussion of what can be done with the profiling and coverage output.
galen@lgheron:~/workspace/shallow$ gprof -s shallow gmon_* galen@lgheron:~/workspace/shallow$ ls calc.c decs.h eclipse.inc init.o time.c worker.c calc.gcda diag.c gmon_shallow.9885 main.c time.gcda worker.gcda calc.gcno diag.gcda gmon_shallow.9886 main.gcda time.gcno worker.gcno calc.o diag.gcno gmon_shallow.9887 main.gcno time.o worker.o copy.c diag.o gmon_shallow.9888 main.o tstep.c copy.gcda dump.c gmon.sum Makefile tstep.f90 copy.gcno dump.gcda init.c Makefile.gem tstep.gcda copy.o dump.gcno init.gcda Makefile.mk tstep.gcno CVS dump.o init.gcno shallow tstep.o galen@lgheron:~/workspace/shallow$
References:
http://wiki.eclipse.org/Linux_Tools_Project/GProf/User_Guide
http://www.ncsa.illinois.edu/UserInfo/Resources/Hardware/SGIAltix/Doc/timing.html
http://archive.ncsa.illinois.edu/lists/perftools/may02/msg00001.html