From 727deae514ba3f612e130c6a4ff3fbb435319ef6 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 22 Feb 2013 16:29:01 +0100 Subject: [PATCH] Avoid to run the smpirun script through valgrind on memcheck. --- buildtools/Cmake/Scripts/my_valgrind.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildtools/Cmake/Scripts/my_valgrind.pl b/buildtools/Cmake/Scripts/my_valgrind.pl index bbd72c5ca1..82e950fad6 100755 --- a/buildtools/Cmake/Scripts/my_valgrind.pl +++ b/buildtools/Cmake/Scripts/my_valgrind.pl @@ -5,12 +5,14 @@ my $count = 0; while (defined(my $arg = shift)) { print "arg($count)$arg\n"; - if($arg eq "--cd"){ + if ($arg =~ m!/smpirun$!) { + @argv = ( $arg, "-wrapper", "@argv" ); + } elsif ($arg eq "--cd") { $arg = shift; print "cd $arg\n"; chdir ($arg); $count++; - } else{ + } else { push @argv, $arg; } $count++; -- 2.20.1