line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HPC::Runner::Command::execute_job; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1617
|
use MooseX::App::Command; |
|
1
|
|
|
|
|
1791
|
|
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
88886
|
use JSON; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'HPC::Runner::Command'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'HPC::Runner::Command::Logger::JSON'; |
9
|
|
|
|
|
|
|
with 'HPC::Runner::Command::Utils::Base'; |
10
|
|
|
|
|
|
|
with 'HPC::Runner::Command::Utils::Log'; |
11
|
|
|
|
|
|
|
with 'HPC::Runner::Command::Utils::Git'; |
12
|
|
|
|
|
|
|
with 'HPC::Runner::Command::execute_job::Utils::MCE'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
command_short_description 'Execute commands'; |
15
|
|
|
|
|
|
|
command_long_description |
16
|
|
|
|
|
|
|
'Take the parsed files from hpcrunner.pl submit_jobs and executes the code'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
option 'batch_index_start' => ( |
19
|
|
|
|
|
|
|
is => 'rw', |
20
|
|
|
|
|
|
|
isa => 'Num', |
21
|
|
|
|
|
|
|
required => 0, |
22
|
|
|
|
|
|
|
predicate => 'has_batch_index_start', |
23
|
|
|
|
|
|
|
documentation => |
24
|
|
|
|
|
|
|
'Counter to tell execute_array where to start reading in the infile.' |
25
|
|
|
|
|
|
|
. ' Omit this option in order to run in single node.' |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub BUILD { |
29
|
1
|
|
|
1
|
|
38
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
15
|
$self->gen_load_plugins; |
32
|
1
|
|
|
|
|
249
|
$self->job_load_plugins; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
17
|
my $job_meta; |
35
|
1
|
50
|
|
|
|
40
|
if ( $self->metastr ) { |
36
|
0
|
|
|
|
|
0
|
$job_meta = decode_json( $self->metastr ); |
37
|
|
|
|
|
|
|
} |
38
|
1
|
50
|
|
|
|
15
|
return unless defined $job_meta; |
39
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if(exists $job_meta->{job_cmd_start}){ |
41
|
0
|
|
|
|
|
|
$self->counter($job_meta->{job_cmd_start} + $self->batch_index_start); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub execute { |
46
|
0
|
|
|
0
|
|
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
$self->git_things; |
49
|
0
|
|
|
|
|
|
$self->run_mce; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |