Skip to content

Commit e1d1c8d

Browse files
author
Ralph Castain
authored
Merge pull request #4337 from rhc54/topic/scaling
Update the scaling.pl script
2 parents 835fa33 + 31bce4b commit e1d1c8d

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

contrib/scaling/scaling.pl

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
2727
my @options = ("", "", "", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1 -mca async_mpi_init 1 -mca async_mpi_finalize 1");
2828
my @starterlist = qw(mpirun prun srun aprun);
29-
my @starteroptionlist = ("--novm",
29+
my @starteroptionlist = (" --novm",
3030
"",
31-
"--distribution=cyclic -N",
32-
"-N");
31+
" --distribution=cyclic --ntasks-per-node=",
32+
" -N");
3333

3434
# Set to true if the script should merely print the cmds
3535
# it would run, but don't run them
@@ -130,7 +130,7 @@
130130
push @starteroptions, $opt;
131131
} elsif ($usesrun && $starter eq "srun") {
132132
push @starters, $starter;
133-
$opt = $starteroptionlist[$idx] . " " . $ppn;
133+
$opt = $starteroptionlist[$idx] . $ppn;
134134
push @starteroptions, $opt;
135135
}
136136
}
@@ -277,6 +277,10 @@ ()
277277
}
278278
# give it a couple of seconds to start
279279
sleep 2;
280+
} else {
281+
if ($myresults) {
282+
print FILE "\n\n";
283+
}
280284
}
281285

282286
if ($myresults) {
@@ -292,7 +296,15 @@ ()
292296
if (!$SHOWME) {
293297
# pre-position the executable
294298
$cmd = $starter . $starteroptions[$index] . " $test 2>&1";
295-
system($cmd);
299+
my $error;
300+
$error = system($cmd);
301+
if (0 != $error) {
302+
if ($myresults) {
303+
print FILE "Command $cmd returned error $error\n";
304+
$testnum = $testnum + 1;
305+
next;
306+
}
307+
}
296308
}
297309
$n = 1;
298310
while ($n <= $num_nodes) {
@@ -321,12 +333,18 @@ ()
321333
print "\n--------------------------------------------------\n";
322334
}
323335
$testnum = $testnum + 1;
336+
if ($starter eq "srun" or $starter eq "aprun") {
337+
if ($testnum ge 3) {
338+
last;
339+
}
340+
}
324341
}
325342
if ($havedvm) {
326343
if (!$SHOWME) {
327344
$cmd = "prun --terminate";
328345
system($cmd);
329346
}
347+
$havedvm = 0;
330348
}
331349
$index = $index + 1;
332350
}

0 commit comments

Comments
 (0)