From: Arnaud Giersch Date: Fri, 22 Feb 2013 15:28:11 +0000 (+0100) Subject: Add new option to smpirun, for running valgrind/gdb/whatever... X-Git-Tag: v3_9_90~467 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5252c7065d5f738649239f8b262393fd463c637d Add new option to smpirun, for running valgrind/gdb/whatever... --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 74ffb3c742..d53e7297ca 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -23,6 +23,7 @@ cat < -hostfile program [program-options] Options: -keep-temps # don't remove the generated files after execution + -wrapper # use command to run the program (e.g. "valgrind") -map # display the machine on which each process rank is mapped -np # use that amount of processes from the hostfile. # By default, all processes of the hostfile are used. @@ -49,6 +50,7 @@ then fi EXTOPT="" +WRAPPER="" while true; do case "$1" in @@ -131,6 +133,11 @@ while true; do shift 1 ;; + "-wrapper") + WRAPPER="$2" + shift 2 + ;; + "-help" | "--help" | "-h") usage exit @@ -149,7 +156,11 @@ while true; do esac done -EXEC="$1" +if [ -n "$WRAPPER" ]; then + EXEC="$WRAPPER $1" +else + EXEC="$1" +fi shift ##-----------------------------------