| line |
true |
false |
branch |
|
18
|
4 |
0 |
if (-e "$main::RealBin/../dist.ini") |
|
19
|
0 |
4 |
if $ENV{'DEBUG'} |
|
74
|
0 |
4 |
unless &GetOptions("m|memory=s", \$memory, "c|cores|threads=i", \$threads, "q|queue=s", \$queue, "T|time=s", \$time, "w|tmpdir=s", \$tmpdir, "n|name=s", \$name, "r|run", \$run, "a|email-address=s", \$email_address, "e|mail-type=s", \$mail_type, "after=s", \@afterok, "f|files=s", \my @files, "p|params-array=s", \$params_array_file, "placeholder=s", \$opt_placeholder, "gpu", \$gpu, "option=s", \@slurm_options, "eco", \$opt_eco, "no-eco", \$opt_no_eco, "verbose", \$verbose, "version", sub {
say "runjob v", $NBI::Slurm::VERSION;
exit;
}
, "debug", \$debug, "help", sub {
usage(1);
}
) |
|
76
|
0 |
4 |
if ($opt_eco and $opt_no_eco) |
|
81
|
0 |
4 |
if $ENV{'DEBUG'} |
|
82
|
0 |
4 |
if $debug |
|
88
|
0 |
4 |
unless $command |
|
90
|
1 |
3 |
if (@files and defined $params_array_file) |
|
97
|
0 |
2 |
@abs_files ? : |
|
102
|
0 |
2 |
if ($verbose) |
|
111
|
0 |
0 |
if defined $params_array_abs |
|
112
|
0 |
0 |
if $total_array_tasks |
|
113
|
0 |
0 |
if defined $array_task_limit |
|
116
|
0 |
2 |
if (-d $time) |
|
122
|
2 |
0 |
if (-d $tmpdir) { } |
|
124
|
0 |
2 |
if $debug |
|
127
|
0 |
0 |
if ($tmpdir =~ / /u or $tmpdir =~ /(\d+)[dh]/u) |
|
131
|
0 |
0 |
unless mkdir $tmpdir |
|
133
|
0 |
0 |
if ($@) { } |
|
|
0 |
0 |
elsif ($verbose or $debug) { } |
|
142
|
0 |
2 |
if ($memory =~ /^(\d+)$/u and $1 < 200) |
|
146
|
1 |
1 |
unless defined $name |
|
147
|
0 |
2 |
if $debug |
|
149
|
0 |
2 |
defined $afterok[0] ? : |
|
153
|
0 |
2 |
if defined $afterok_string |
|
154
|
0 |
2 |
if $gpu |
|
156
|
0 |
2 |
if @slurm_options |
|
158
|
0 |
2 |
if $gpu |
|
161
|
1 |
1 |
unless (NBI::Slurm::valid_queue($queue)) |
|
163
|
0 |
1 |
if (scalar @valid_queues) { } |
|
166
|
0 |
1 |
if ($run) { } |
|
180
|
0 |
2 |
defined $config->{'eco_default'} ? : |
|
181
|
0 |
1 |
$opt_eco ? : |
|
|
1 |
1 |
$opt_no_eco ? : |
|
185
|
1 |
1 |
if ($use_eco) |
|
186
|
0 |
1 |
if (defined $config->{'start_time'} or defined $config->{'start_date'}) |
|
195
|
0 |
0 |
if (ref $value eq 'HASH') { } |
|
206
|
1 |
1 |
if (@array_chunks > 1) |
|
211
|
1 |
1 |
scalar @array_chunks > 1 ? : |
|
219
|
0 |
4 |
if (@abs_files and @array_chunks > 1) { } |
|
|
4 |
0 |
elsif (defined $params_array_abs) { } |
|
226
|
3 |
1 |
if (@array_chunks > 1) |
|
247
|
1 |
3 |
if ($use_eco) |
|
249
|
1 |
0 |
if (defined $begin_epoch) { } |
|
253
|
0 |
1 |
$tier == 3 ? : |
|
|
0 |
1 |
$tier == 2 ? : |
|
256
|
1 |
0 |
if $chunk_idx == 0 |
|
258
|
0 |
0 |
if $chunk_idx == 0 |
|
262
|
0 |
4 |
if ($verbose) |
|
263
|
0 |
0 |
if $chunk_idx == 0 |
|
264
|
0 |
0 |
if $chunk_idx == 0 |
|
265
|
0 |
0 |
if $chunk_idx == 0 |
|
274
|
0 |
4 |
if ($debug) |
|
283
|
1 |
1 |
if ($run) { } |
|
287
|
3 |
0 |
if ($j) { } |
|
288
|
0 |
3 |
if ($verbose) |
|
294
|
0 |
0 |
if ($verbose) |
|
301
|
1 |
0 |
unless ($err) |
|
306
|
1 |
0 |
if @jobs == 1 |
|
307
|
0 |
1 |
if @jobs > 1 |
|
313
|
0 |
2 |
if ($err) { } |
|
|
1 |
1 |
elsif ($run) { } |
|
346
|
0 |
0 |
if $_[0] |
|
361
|
0 |
1 |
if (grep {$_ eq $parts[0];} @ints and defined $parts[1]) { } |
|
|
0 |
1 |
elsif (grep {$_ eq $parts[0];} @subs and defined $parts[1]) { } |
|
375
|
4 |
0 |
unless ($queue =~ /\*/u) |
|
382
|
0 |
0 |
if ($time <= 2) { } |
|
|
0 |
0 |
elsif ($time_h <= 48) { } |
|
415
|
0 |
0 |
if (-e $file) { } |
|
421
|
0 |
0 |
if (scalar @tmpfiles) { } |
|
435
|
0 |
3 |
unless defined $file |
|
437
|
0 |
3 |
unless (-e $file) |
|
443
|
0 |
3 |
unless (open my $fh, "<", $abs_file) |
|
454
|
3 |
2 |
if $n > $max_placeholder |
|
456
|
0 |
3 |
if ($max_placeholder == 0) |
|
465
|
1 |
11 |
if $line =~ /^\s*$/u |
|
466
|
1 |
10 |
if $line =~ /^\s*#/u |
|
468
|
1 |
9 |
if (scalar @fields < $max_placeholder) |
|
476
|
0 |
2 |
if ($rows == 0) |
|
486
|
0 |
2 |
unless $total_tasks |
|
487
|
0 |
1 |
unless defined $task_limit and $task_limit > 0 and $total_tasks > $task_limit |
|
493
|
1 |
2 |
if $remaining < $chunk_tasks |
|
502
|
1 |
0 |
if (defined $ENV{'NBI_MAX_ARRAY_SIZE'} and $ENV{'NBI_MAX_ARRAY_SIZE'} =~ /^\d+$/u and $ENV{'NBI_MAX_ARRAY_SIZE'} > 0) |
|
505
|
0 |
0 |
if (defined $config->{'max_array_size'} and $config->{'max_array_size'} =~ /^\d+$/u and $config->{'max_array_size'} > 0) |
|
510
|
1 |
0 |
if $? != 0 or not $output |
|
513
|
0 |
0 |
if ($output =~ /^MaxArraySize\s*=\s*(\d+)/mu) |
|
514
|
0 |
0 |
if $1 > 0 |
|
516
|
0 |
0 |
if ($output =~ /max_array_tasks=(\d+)/u) |
|
517
|
0 |
0 |
if $1 > 0 |
|
519
|
0 |
0 |
unless @limits |
|
523
|
0 |
0 |
if $candidate < $limit |