diff --git a/bin/mpirunDebug b/bin/mpirunDebug index a7a0cb32b0965d88704fdcf8e88186e3a90ea092..7911e06e98639c6620ea4fd705293cb9c6057d9d 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -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