|
26 | 26 | my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op); |
27 | 27 | 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"); |
28 | 28 | my @starterlist = qw(mpirun prun srun aprun); |
29 | | -my @starteroptionlist = ("--novm", |
| 29 | +my @starteroptionlist = (" --novm", |
30 | 30 | "", |
31 | | - "--distribution=cyclic -N", |
32 | | - "-N"); |
| 31 | + " --distribution=cyclic --ntasks-per-node=", |
| 32 | + " -N"); |
33 | 33 |
|
34 | 34 | # Set to true if the script should merely print the cmds |
35 | 35 | # it would run, but don't run them |
|
130 | 130 | push @starteroptions, $opt; |
131 | 131 | } elsif ($usesrun && $starter eq "srun") { |
132 | 132 | push @starters, $starter; |
133 | | - $opt = $starteroptionlist[$idx] . " " . $ppn; |
| 133 | + $opt = $starteroptionlist[$idx] . $ppn; |
134 | 134 | push @starteroptions, $opt; |
135 | 135 | } |
136 | 136 | } |
|
277 | 277 | } |
278 | 278 | # give it a couple of seconds to start |
279 | 279 | sleep 2; |
| 280 | + } else { |
| 281 | + if ($myresults) { |
| 282 | + print FILE "\n\n"; |
| 283 | + } |
280 | 284 | } |
281 | 285 |
|
282 | 286 | if ($myresults) { |
|
292 | 296 | if (!$SHOWME) { |
293 | 297 | # pre-position the executable |
294 | 298 | $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 | + } |
296 | 308 | } |
297 | 309 | $n = 1; |
298 | 310 | while ($n <= $num_nodes) { |
|
321 | 333 | print "\n--------------------------------------------------\n"; |
322 | 334 | } |
323 | 335 | $testnum = $testnum + 1; |
| 336 | + if ($starter eq "srun" or $starter eq "aprun") { |
| 337 | + if ($testnum ge 3) { |
| 338 | + last; |
| 339 | + } |
| 340 | + } |
324 | 341 | } |
325 | 342 | if ($havedvm) { |
326 | 343 | if (!$SHOWME) { |
327 | 344 | $cmd = "prun --terminate"; |
328 | 345 | system($cmd); |
329 | 346 | } |
| 347 | + $havedvm = 0; |
330 | 348 | } |
331 | 349 | $index = $index + 1; |
332 | 350 | } |
|
0 commit comments