ENH: mpirunDebug: Add gperftools option
gperftools comes with a profiler. It should be installed in ThirdParty. Then link the executable to libprofiler.so, run it and view the output using kcachegrind.
This commit is contained in:
parent
e4f7c306ab
commit
e4a3348ca2
@ -100,10 +100,10 @@ echo "run $args" > $PWD/gdbCommands
|
||||
echo "where" >> $PWD/gdbCommands
|
||||
echo "Constructed gdb initialization file $PWD/gdbCommands"
|
||||
|
||||
$ECHO "Choose running method: 0)normal 1)gdb+xterm 2)gdb 3)log 4)log+xterm 5)xterm+valgrind: \c"
|
||||
$ECHO "Choose running method: 0)normal 1)gdb+xterm 2)gdb 3)log 4)log+xterm 5)xterm+valgrind 6)gperftools(callgrind): \c"
|
||||
read method
|
||||
case "$method" in
|
||||
0 | 1 | 2 | 3 | 4 | 5 )
|
||||
0 | 1 | 2 | 3 | 4 | 5 | 6)
|
||||
# okay
|
||||
;;
|
||||
*)
|
||||
@ -199,6 +199,11 @@ do
|
||||
echo "$sourceFoam; cd $PWD; valgrind $exec $args; read dummy" >> $procCmdFile
|
||||
echo "${node}xterm -font fixed -title 'processor'$proc $geom -e $procCmdFile" >> $PWD/mpirun.schema
|
||||
;;
|
||||
6)
|
||||
echo "$sourceFoam; cd $PWD; CPUPROFILE=log.profiler_$proc $exec $args; \
|
||||
pprof --callgrind $exec log.profiler_$proc > log.profiler_$proc.callgrind;" >> $procCmdFile
|
||||
echo "${node}$procCmdFile" >> $PWD/mpirun.schema
|
||||
;;
|
||||
esac
|
||||
|
||||
chmod +x $procCmdFile
|
||||
|
Loading…
Reference in New Issue
Block a user