From 3f2dc90655349f3af1b4524d13d14bdefeaf4759 Mon Sep 17 00:00:00 2001 From: degomme Date: Fri, 29 Mar 2019 14:27:39 +0100 Subject: [PATCH] Add -vgdb option to smpirun to run with valgrind+gdb. I keep forgetting the syntax of these options otherwise. --- src/smpi/smpirun.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 3536dd145c..03c626466b 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -37,6 +37,7 @@ Options: -wrapper # use command to run the program (e.g. "valgrind" or "gdb --args") -gdb # run within GDB (-wrapper "gdb --args" -keep-temps) -lldb # run within LLDB (-wrapper "lldb --" -keep-temps) + -vgdb # run within Valgrind+GDB (-wrapper "valgrind --vgdb=yes --vgdb-error=0" -keep-temps) -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. @@ -211,6 +212,12 @@ while true; do SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" shift 1 ;; + "-vgdb") + WRAPPER="valgrind --vgdb=yes --vgdb-error=0" + KEEP="true" + SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" + shift 1 + ;; "-lldb") WRAPPER="lldb --" KEEP="true" -- 2.20.1