From 1dd45e0f30c0800e5002866db2be9d1e65bd45ea Mon Sep 17 00:00:00 2001
From: Ralph Castain <rhc@open-mpi.org>
Date: Fri, 22 Sep 2017 21:02:15 -0700
Subject: [PATCH] Get the scaling test to properly run a scan across the #nodes

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
---
 contrib/scaling/scaling.pl | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/contrib/scaling/scaling.pl b/contrib/scaling/scaling.pl
index 4d2a8b4f52..6b50195382 100755
--- a/contrib/scaling/scaling.pl
+++ b/contrib/scaling/scaling.pl
@@ -267,7 +267,7 @@ foreach $starter (@starters) {
     # if we are going to use the dvm, then we
     if ($starter eq "prun") {
         # need to start it
-        $cmd = "orte-dvm 2>&1 &";
+        $cmd = "orte-dvm -mca pmix_system_server 1 2>&1 &";
         if ($myresults) {
             print FILE "\n\n$cmd\n";
         }
@@ -275,6 +275,8 @@ foreach $starter (@starters) {
             system($cmd);
             $havedvm = 1;
         }
+        # give it a couple of seconds to start
+        sleep 2;
     }
 
     if ($myresults) {
@@ -295,7 +297,11 @@ foreach $starter (@starters) {
             $n = 1;
             while ($n <= $num_nodes) {
                 push @csvrow,$n;
-                $cmd = "time " . $starter . " " . $starteroptions[$index] . " $option $test 2>&1";
+                if ($starter eq "prun" or $starter eq "mpirun") {
+                    $cmd = "time " . $starter . " " . $starteroptions[$index] . " $option -n $n $test 2>&1";
+                } else {
+                    $cmd = "time " . $starter . " " . $starteroptions[$index] . " $option -N $n $test 2>&1";
+                }
                 print $cmd . "\n";
                 if (!$SHOWME) {
                     runcmd();