Skip to content

Commit

Permalink
Update showNext to work with parallel jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Sep 18, 2020
1 parent 52eb6e1 commit ac0e512
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/pipelines/canu/Execution.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,20 @@ sub submitOrRunParallelJob ($$$$@) {

purgeGridJobSubmitScripts($path, $script);

if (getGlobal("showNext")) {
print STDERR "--\n";
print STDERR "-- NEXT COMMANDS\n";
print STDERR "--\n";
print STDERR "\n";
print STDERR prettifyCommand("cd $path"), "\n";
foreach my $j (@jobs) {
my ($cmd, $jobName) = buildGridJob($asm, $jobType, $path, $script, $mem, $thr, $dsk, $j, undef);

print STDERR prettifyCommand("./$cmd.sh") . "\n";
}
exit(0);
}

foreach my $j (@jobs) {
my ($cmd, $jobName) = buildGridJob($asm, $jobType, $path, $script, $mem, $thr, $dsk, $j, undef);

Expand Down Expand Up @@ -1376,6 +1390,18 @@ sub submitOrRunParallelJob ($$$$@) {
$st = $ed = $j;
}

if (getGlobal("showNext")) {
print STDERR "--\n";
print STDERR "-- NEXT COMMANDS\n";
print STDERR "--\n";
print STDERR "\n";
print STDERR prettifyCommand("cd $path") . "\n";
for (my $i=$st; $i<=$ed; $i++) {
print STDERR prettifyCommand("./$script.sh $i") . "\n";
}
exit(0);
}

for (my $i=$st; $i<=$ed; $i++) {
schedulerSubmit("./$script.sh $i > ./" . buildOutputName($path, $script, $i) . " 2>&1");
}
Expand Down Expand Up @@ -1473,7 +1499,11 @@ sub runCommand ($$) {
# If only showing the next command, show it and stop.

if (getGlobal("showNext")) {
print STDERR "--NEXT-COMMAND\n";
print STDERR "--\n";
print STDERR "-- NEXT COMMAND\n";
print STDERR "--\n";
print STDERR "\n";
print STDERR prettifyCommand("cd $dir") . "\n";
print STDERR "$dis\n";
exit(0);
}
Expand Down

0 comments on commit ac0e512

Please sign in to comment.