Update the scaling.pl script
* check that the command succeeds when pre-positioning the file to ensure there isn't an error somewhere in the execution * properly define srun cmd line options * terminate the orte-dvm only when it is actually in operation so prun doesn't generate spurious error messages Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
835fa336d3
Коммит
31bce4ba9c
@ -26,10 +26,10 @@ my @csvrow;
|
|||||||
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
|
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
|
||||||
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");
|
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");
|
||||||
my @starterlist = qw(mpirun prun srun aprun);
|
my @starterlist = qw(mpirun prun srun aprun);
|
||||||
my @starteroptionlist = ("--novm",
|
my @starteroptionlist = (" --novm",
|
||||||
"",
|
"",
|
||||||
"--distribution=cyclic -N",
|
" --distribution=cyclic --ntasks-per-node=",
|
||||||
"-N");
|
" -N");
|
||||||
|
|
||||||
# Set to true if the script should merely print the cmds
|
# Set to true if the script should merely print the cmds
|
||||||
# it would run, but don't run them
|
# it would run, but don't run them
|
||||||
@ -130,7 +130,7 @@ foreach $starter (@starterlist) {
|
|||||||
push @starteroptions, $opt;
|
push @starteroptions, $opt;
|
||||||
} elsif ($usesrun && $starter eq "srun") {
|
} elsif ($usesrun && $starter eq "srun") {
|
||||||
push @starters, $starter;
|
push @starters, $starter;
|
||||||
$opt = $starteroptionlist[$idx] . " " . $ppn;
|
$opt = $starteroptionlist[$idx] . $ppn;
|
||||||
push @starteroptions, $opt;
|
push @starteroptions, $opt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,6 +277,10 @@ foreach $starter (@starters) {
|
|||||||
}
|
}
|
||||||
# give it a couple of seconds to start
|
# give it a couple of seconds to start
|
||||||
sleep 2;
|
sleep 2;
|
||||||
|
} else {
|
||||||
|
if ($myresults) {
|
||||||
|
print FILE "\n\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($myresults) {
|
if ($myresults) {
|
||||||
@ -292,7 +296,15 @@ foreach $starter (@starters) {
|
|||||||
if (!$SHOWME) {
|
if (!$SHOWME) {
|
||||||
# pre-position the executable
|
# pre-position the executable
|
||||||
$cmd = $starter . $starteroptions[$index] . " $test 2>&1";
|
$cmd = $starter . $starteroptions[$index] . " $test 2>&1";
|
||||||
system($cmd);
|
my $error;
|
||||||
|
$error = system($cmd);
|
||||||
|
if (0 != $error) {
|
||||||
|
if ($myresults) {
|
||||||
|
print FILE "Command $cmd returned error $error\n";
|
||||||
|
$testnum = $testnum + 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$n = 1;
|
$n = 1;
|
||||||
while ($n <= $num_nodes) {
|
while ($n <= $num_nodes) {
|
||||||
@ -321,12 +333,18 @@ foreach $starter (@starters) {
|
|||||||
print "\n--------------------------------------------------\n";
|
print "\n--------------------------------------------------\n";
|
||||||
}
|
}
|
||||||
$testnum = $testnum + 1;
|
$testnum = $testnum + 1;
|
||||||
|
if ($starter eq "srun" or $starter eq "aprun") {
|
||||||
|
if ($testnum ge 3) {
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($havedvm) {
|
if ($havedvm) {
|
||||||
if (!$SHOWME) {
|
if (!$SHOWME) {
|
||||||
$cmd = "prun --terminate";
|
$cmd = "prun --terminate";
|
||||||
system($cmd);
|
system($cmd);
|
||||||
}
|
}
|
||||||
|
$havedvm = 0;
|
||||||
}
|
}
|
||||||
$index = $index + 1;
|
$index = $index + 1;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user