| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HPC::Runner::Command::submit_jobs::Utils::Scheduler::Job; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
9
|
use Moose; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
10
|
|
|
4
|
1
|
|
|
1
|
|
10906
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
12
|
|
|
5
|
1
|
|
|
1
|
|
4153
|
use HPC::Runner::Command::submit_jobs::Utils::Scheduler::Batch; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
45
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use BioSAILs::Utils::Traits qw(ArrayRefOfStrs); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'HPC::Runner::Command::submit_jobs::Utils::Scheduler::Directives'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 HPC::Runner::Command::submit_jobs::Utils::Scheduler::Job; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head2 Attributes |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has 'deps' => ( |
|
19
|
|
|
|
|
|
|
default => sub { [] }, |
|
20
|
|
|
|
|
|
|
traits => ['Array'], |
|
21
|
|
|
|
|
|
|
is => 'rw', |
|
22
|
|
|
|
|
|
|
isa => ArrayRefOfStrs, |
|
23
|
|
|
|
|
|
|
handles => { |
|
24
|
|
|
|
|
|
|
all_deps => 'elements', |
|
25
|
|
|
|
|
|
|
add_deps => 'push', |
|
26
|
|
|
|
|
|
|
map_deps => 'map', |
|
27
|
|
|
|
|
|
|
get_deps => 'get', |
|
28
|
|
|
|
|
|
|
join_deps => 'join', |
|
29
|
|
|
|
|
|
|
has_deps => 'count', |
|
30
|
|
|
|
|
|
|
clear_deps => 'clear', |
|
31
|
|
|
|
|
|
|
has_no_deps => 'is_empty', |
|
32
|
|
|
|
|
|
|
}, |
|
33
|
|
|
|
|
|
|
); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has 'cmds' => ( |
|
36
|
|
|
|
|
|
|
traits => ['Array'], |
|
37
|
|
|
|
|
|
|
is => 'rw', |
|
38
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
39
|
|
|
|
|
|
|
default => sub { [] }, |
|
40
|
|
|
|
|
|
|
handles => { |
|
41
|
|
|
|
|
|
|
all_cmds => 'elements', |
|
42
|
|
|
|
|
|
|
add_cmds => 'push', |
|
43
|
|
|
|
|
|
|
join_cmds => 'join', |
|
44
|
|
|
|
|
|
|
count_cmds => 'count', |
|
45
|
|
|
|
|
|
|
clear_cmds => 'clear', |
|
46
|
|
|
|
|
|
|
}, |
|
47
|
|
|
|
|
|
|
); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'cmd_counter' => ( |
|
50
|
|
|
|
|
|
|
traits => ['Counter'], |
|
51
|
|
|
|
|
|
|
is => 'rw', |
|
52
|
|
|
|
|
|
|
isa => 'Num', |
|
53
|
|
|
|
|
|
|
required => 1, |
|
54
|
|
|
|
|
|
|
default => 0, |
|
55
|
|
|
|
|
|
|
handles => { |
|
56
|
|
|
|
|
|
|
inc_cmd_counter => 'inc', |
|
57
|
|
|
|
|
|
|
reset_cmd_counter => 'reset', |
|
58
|
|
|
|
|
|
|
}, |
|
59
|
|
|
|
|
|
|
); |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has 'hpc_meta' => ( |
|
62
|
|
|
|
|
|
|
traits => ['Array'], |
|
63
|
|
|
|
|
|
|
is => 'rw', |
|
64
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
65
|
|
|
|
|
|
|
default => sub { [] }, |
|
66
|
|
|
|
|
|
|
handles => { |
|
67
|
|
|
|
|
|
|
all_hpc_meta => 'elements', |
|
68
|
|
|
|
|
|
|
add_hpc_meta => 'push', |
|
69
|
|
|
|
|
|
|
join_hpc_meta => 'join', |
|
70
|
|
|
|
|
|
|
count_hpc_meta => 'count', |
|
71
|
|
|
|
|
|
|
has_hpc_meta => 'count', |
|
72
|
|
|
|
|
|
|
clear_hpc_meta => 'clear', |
|
73
|
|
|
|
|
|
|
has_no_hpc_meta => 'is_empty', |
|
74
|
|
|
|
|
|
|
}, |
|
75
|
|
|
|
|
|
|
); |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
has 'scheduler_ids' => ( |
|
78
|
|
|
|
|
|
|
traits => ['Array'], |
|
79
|
|
|
|
|
|
|
is => 'rw', |
|
80
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
81
|
|
|
|
|
|
|
default => sub { [] }, |
|
82
|
|
|
|
|
|
|
handles => { |
|
83
|
|
|
|
|
|
|
all_scheduler_ids => 'elements', |
|
84
|
|
|
|
|
|
|
add_scheduler_ids => 'push', |
|
85
|
|
|
|
|
|
|
has_scheduler_ids => 'count', |
|
86
|
|
|
|
|
|
|
count_scheduler_ids => 'count', |
|
87
|
|
|
|
|
|
|
has_no_scheduler_ids => 'is_empty', |
|
88
|
|
|
|
|
|
|
}, |
|
89
|
|
|
|
|
|
|
); |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
has 'lognames' => ( |
|
92
|
|
|
|
|
|
|
traits => ['Array'], |
|
93
|
|
|
|
|
|
|
is => 'rw', |
|
94
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
95
|
|
|
|
|
|
|
default => sub { [] }, |
|
96
|
|
|
|
|
|
|
handles => { |
|
97
|
|
|
|
|
|
|
all_lognames => 'elements', |
|
98
|
|
|
|
|
|
|
add_lognames => 'push', |
|
99
|
|
|
|
|
|
|
has_lognames => 'count', |
|
100
|
|
|
|
|
|
|
count_lognames => 'count', |
|
101
|
|
|
|
|
|
|
has_no_lognames => 'is_empty', |
|
102
|
|
|
|
|
|
|
}, |
|
103
|
|
|
|
|
|
|
); |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
has 'submission_failure' => ( |
|
106
|
|
|
|
|
|
|
is => 'rw', |
|
107
|
|
|
|
|
|
|
isa => 'Bool', |
|
108
|
|
|
|
|
|
|
traits => ['Bool'], |
|
109
|
|
|
|
|
|
|
default => 0, |
|
110
|
|
|
|
|
|
|
handles => { |
|
111
|
|
|
|
|
|
|
no_submission_failure => 'not', |
|
112
|
|
|
|
|
|
|
}, |
|
113
|
|
|
|
|
|
|
); |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
has 'batches' => ( |
|
116
|
|
|
|
|
|
|
traits => ['Array'], |
|
117
|
|
|
|
|
|
|
is => 'rw', |
|
118
|
|
|
|
|
|
|
isa => |
|
119
|
|
|
|
|
|
|
'ArrayRef[HPC::Runner::Command::submit_jobs::Utils::Scheduler::Batch]', |
|
120
|
|
|
|
|
|
|
default => sub { [] }, |
|
121
|
|
|
|
|
|
|
handles => { |
|
122
|
|
|
|
|
|
|
all_batches => 'elements', |
|
123
|
|
|
|
|
|
|
add_batches => 'push', |
|
124
|
|
|
|
|
|
|
has_batches => 'count', |
|
125
|
|
|
|
|
|
|
count_batches => 'count', |
|
126
|
|
|
|
|
|
|
has_no_batches => 'is_empty', |
|
127
|
|
|
|
|
|
|
}, |
|
128
|
|
|
|
|
|
|
); |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
##Batches are groups of commands |
|
131
|
|
|
|
|
|
|
has batch_indexes => ( |
|
132
|
|
|
|
|
|
|
traits => ['Array'], |
|
133
|
|
|
|
|
|
|
is => 'rw', |
|
134
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
135
|
|
|
|
|
|
|
default => sub { [] }, |
|
136
|
|
|
|
|
|
|
handles => { |
|
137
|
|
|
|
|
|
|
all_batch_indexes => 'elements', |
|
138
|
|
|
|
|
|
|
add_batch_indexes => 'push', |
|
139
|
|
|
|
|
|
|
has_batch_indexes => 'count', |
|
140
|
|
|
|
|
|
|
count_batch_indexes => 'count', |
|
141
|
|
|
|
|
|
|
# has_no_batch_indexes => 'is_empty', |
|
142
|
|
|
|
|
|
|
}, |
|
143
|
|
|
|
|
|
|
); |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
has batch_index_start => ( |
|
146
|
|
|
|
|
|
|
isa => 'Int', |
|
147
|
|
|
|
|
|
|
is => 'rw', |
|
148
|
|
|
|
|
|
|
); |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
has batch_index_end => ( |
|
151
|
|
|
|
|
|
|
isa => 'Int', |
|
152
|
|
|
|
|
|
|
is => 'rw', |
|
153
|
|
|
|
|
|
|
); |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
has submit_by_tags => ( |
|
156
|
|
|
|
|
|
|
is => 'rw', |
|
157
|
|
|
|
|
|
|
isa => 'Bool', |
|
158
|
|
|
|
|
|
|
default => 0, |
|
159
|
|
|
|
|
|
|
); |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
has submitted => ( |
|
162
|
|
|
|
|
|
|
traits => ['Bool'], |
|
163
|
|
|
|
|
|
|
is => 'rw', |
|
164
|
|
|
|
|
|
|
isa => 'Bool', |
|
165
|
|
|
|
|
|
|
default => 0, |
|
166
|
|
|
|
|
|
|
handles => { |
|
167
|
|
|
|
|
|
|
submit => 'set', |
|
168
|
|
|
|
|
|
|
no_submit => 'unset', |
|
169
|
|
|
|
|
|
|
flip_switch => 'toggle', |
|
170
|
|
|
|
|
|
|
is_not_submitted => 'not', |
|
171
|
|
|
|
|
|
|
}, |
|
172
|
|
|
|
|
|
|
); |
|
173
|
|
|
|
|
|
|
1; |