| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/local/bin/perl |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
#Part of Slurm::Sacctmgr: Perl wrapper for Slurm's sacctmgr cmd |
|
4
|
|
|
|
|
|
|
#Represents a Qos |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Slurm::Sacctmgr::Qos; |
|
7
|
64
|
|
|
64
|
|
25404
|
use strict; |
|
|
64
|
|
|
|
|
64
|
|
|
|
64
|
|
|
|
|
1443
|
|
|
8
|
64
|
|
|
64
|
|
206
|
use warnings; |
|
|
64
|
|
|
|
|
64
|
|
|
|
64
|
|
|
|
|
1237
|
|
|
9
|
64
|
|
|
64
|
|
143
|
use base qw(Slurm::Sacctmgr::EntityBaseRW); |
|
|
64
|
|
|
|
|
64
|
|
|
|
64
|
|
|
|
|
22836
|
|
|
10
|
64
|
|
|
64
|
|
256
|
use Carp qw(carp croak); |
|
|
64
|
|
|
|
|
16533
|
|
|
|
64
|
|
|
|
|
17841
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
13
|
|
|
|
|
|
|
# Globals |
|
14
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
17
|
|
|
|
|
|
|
# Accessors |
|
18
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my @common_simple_accessors = qw( |
|
21
|
|
|
|
|
|
|
description |
|
22
|
|
|
|
|
|
|
gracetime |
|
23
|
|
|
|
|
|
|
grpjobs |
|
24
|
|
|
|
|
|
|
grpsubmitjobs |
|
25
|
|
|
|
|
|
|
grpwall |
|
26
|
|
|
|
|
|
|
id |
|
27
|
|
|
|
|
|
|
maxjobs |
|
28
|
|
|
|
|
|
|
maxsubmitjobs |
|
29
|
|
|
|
|
|
|
maxwall |
|
30
|
|
|
|
|
|
|
name |
|
31
|
|
|
|
|
|
|
preempt |
|
32
|
|
|
|
|
|
|
preemptmode |
|
33
|
|
|
|
|
|
|
priority |
|
34
|
|
|
|
|
|
|
usagefactor |
|
35
|
|
|
|
|
|
|
usagethreshold |
|
36
|
|
|
|
|
|
|
); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my @preTRES_accessors = qw( |
|
39
|
|
|
|
|
|
|
grpcpumins |
|
40
|
|
|
|
|
|
|
grpcpus |
|
41
|
|
|
|
|
|
|
grpnodes |
|
42
|
|
|
|
|
|
|
maxcpumins |
|
43
|
|
|
|
|
|
|
maxcpus |
|
44
|
|
|
|
|
|
|
maxcpusperuser |
|
45
|
|
|
|
|
|
|
maxnodes |
|
46
|
|
|
|
|
|
|
maxnodesperuser |
|
47
|
|
|
|
|
|
|
mincpus |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my @postTRES_accessors = qw( |
|
52
|
|
|
|
|
|
|
grptresmins |
|
53
|
|
|
|
|
|
|
grptresrunmins |
|
54
|
|
|
|
|
|
|
grptres |
|
55
|
|
|
|
|
|
|
maxtresmins |
|
56
|
|
|
|
|
|
|
maxtresperjob |
|
57
|
|
|
|
|
|
|
maxtrespernode |
|
58
|
|
|
|
|
|
|
maxtresperuser |
|
59
|
|
|
|
|
|
|
mintresperjob |
|
60
|
|
|
|
|
|
|
); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my @common_aref_accessors = qw( |
|
63
|
|
|
|
|
|
|
flags |
|
64
|
|
|
|
|
|
|
); |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my @common_accessors = ( |
|
67
|
|
|
|
|
|
|
@common_simple_accessors, |
|
68
|
|
|
|
|
|
|
@common_aref_accessors, |
|
69
|
|
|
|
|
|
|
); |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
my @all_accessors = ( |
|
72
|
|
|
|
|
|
|
@common_accessors, |
|
73
|
|
|
|
|
|
|
@preTRES_accessors, |
|
74
|
|
|
|
|
|
|
@postTRES_accessors, |
|
75
|
|
|
|
|
|
|
); |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
my @simple_accessors = (@common_simple_accessors); |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(@simple_accessors); |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
#------------ Special accessors |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
#Aref |
|
84
|
|
|
|
|
|
|
__PACKAGE__->mk_arrayref_accessors(@common_aref_accessors); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
#TRES/nonTRES variants |
|
87
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('grptres', 'grpcpus' => 'cpu', 'grpnodes' => 'node' ); |
|
88
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('grptresmins', 'grpcpumins' => 'cpu', ); |
|
89
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('maxtresmins', 'maxcpumins' => 'cpu', ); |
|
90
|
|
|
|
|
|
|
#maxcpus/maxnodes are actually per job |
|
91
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('maxtresperjob', 'maxcpus' => 'cpu', 'maxnodes' => 'node' ); |
|
92
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('maxtresperuser', |
|
93
|
|
|
|
|
|
|
'maxcpusperuser' => 'cpu', 'maxnodesperuser' => 'node' ); |
|
94
|
|
|
|
|
|
|
#mincpus is actually per job |
|
95
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('mintresperjob', 'mincpus' => 'cpu', ); |
|
96
|
|
|
|
|
|
|
#These do not have preTRES counterparts ??? |
|
97
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('grptresrunmins'); |
|
98
|
|
|
|
|
|
|
__PACKAGE__->mk_tres_nontres_accessors('maxtrespernode'); |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
101
|
|
|
|
|
|
|
# Overloaded methods |
|
102
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub _rw_fields($) |
|
105
|
1376
|
|
|
1376
|
|
1426
|
{ my $class = shift; |
|
106
|
1376
|
|
|
|
|
9413
|
return [ @all_accessors ]; |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
sub _sacctmgr_fields($$) |
|
110
|
0
|
|
|
0
|
|
0
|
{ my $class = shift; |
|
111
|
0
|
|
|
|
|
0
|
return [ @all_accessors ]; |
|
112
|
|
|
|
|
|
|
} |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub _sacctmgr_name_field($) |
|
115
|
482
|
|
|
482
|
|
600
|
{ my $class = shift; |
|
116
|
482
|
|
|
|
|
965
|
return 'name'; |
|
117
|
|
|
|
|
|
|
} |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub _sacctmgr_fields_in_order($$) |
|
120
|
1080
|
|
|
1080
|
|
1167
|
{ my $class = shift; |
|
121
|
1080
|
|
|
|
|
1138
|
my $sacctmgr = shift; |
|
122
|
1080
|
|
|
|
|
7279
|
my @fields = @common_accessors; |
|
123
|
1080
|
100
|
|
|
|
3091
|
if ( $sacctmgr->sacctmgr_cmd_supports('trackable_resources') ) |
|
124
|
297
|
|
|
|
|
1087
|
{ push @fields, @postTRES_accessors; |
|
125
|
|
|
|
|
|
|
} else |
|
126
|
783
|
|
|
|
|
2985
|
{ push @fields, @preTRES_accessors; |
|
127
|
|
|
|
|
|
|
} |
|
128
|
1080
|
|
|
|
|
5458
|
return [ @fields ]; |
|
129
|
|
|
|
|
|
|
} |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub _sacctmgr_fields_addable($$) |
|
132
|
50
|
|
|
50
|
|
50
|
{ my $class = shift; |
|
133
|
50
|
|
|
|
|
74
|
my $sacctmgr = shift; |
|
134
|
50
|
|
|
|
|
100
|
return $class->_sacctmgr_fields_in_order($sacctmgr); |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub _sacctmgr_fields_updatable($$) |
|
138
|
0
|
|
|
0
|
|
|
{ my $class = shift; |
|
139
|
0
|
|
|
|
|
|
my $sacctmgr = shift; |
|
140
|
0
|
|
|
|
|
|
return $class->_sacctmgr_fields_in_order($sacctmgr); |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
144
|
|
|
|
|
|
|
# Constructors, etc |
|
145
|
|
|
|
|
|
|
#------------------------------------------------------------------- |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
#All inherited |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
1; |
|
150
|
|
|
|
|
|
|
__END__ |