~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/sgeobj/sge_sharetreeL.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SGE_SHARE_TREE_NODEL_H
 
2
#define __SGE_SHARE_TREE_NODEL_H
 
3
 
 
4
/*___INFO__MARK_BEGIN__*/
 
5
/*************************************************************************
 
6
 * 
 
7
 *  The Contents of this file are made available subject to the terms of
 
8
 *  the Sun Industry Standards Source License Version 1.2
 
9
 * 
 
10
 *  Sun Microsystems Inc., March, 2001
 
11
 * 
 
12
 * 
 
13
 *  Sun Industry Standards Source License Version 1.2
 
14
 *  =================================================
 
15
 *  The contents of this file are subject to the Sun Industry Standards
 
16
 *  Source License Version 1.2 (the "License"); You may not use this file
 
17
 *  except in compliance with the License. You may obtain a copy of the
 
18
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
19
 * 
 
20
 *  Software provided under this License is provided on an "AS IS" basis,
 
21
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
22
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
23
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
24
 *  See the License for the specific provisions governing your rights and
 
25
 *  obligations concerning the Software.
 
26
 * 
 
27
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
28
 * 
 
29
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
30
 * 
 
31
 *   All Rights Reserved.
 
32
 * 
 
33
 ************************************************************************/
 
34
/*___INFO__MARK_END__*/
 
35
 
 
36
#include "sge_boundaries.h"
 
37
#include "cull.h"
 
38
 
 
39
#ifdef  __cplusplus
 
40
extern "C" {
 
41
#endif
 
42
 
 
43
/* *INDENT-OFF* */ 
 
44
 
 
45
/*
 
46
 * This is the list type we use to hold the 
 
47
 * nodes of a share tree.
 
48
 */
 
49
#define STT_USER    0
 
50
#define STT_PROJECT 1
 
51
 
 
52
enum {
 
53
   STN_name = STN_LOWERBOUND,        /* Node name (user or projectname in
 
54
                                      * the leafs) spooled */
 
55
   STN_type,                 /* Kind of tree: STT_USER | STT_PROJECT All
 
56
                              * nodes in a tree have the same type spooled 
 
57
                              */
 
58
 
 
59
   STN_id,                   /* Only for editing and save/restore. May be
 
60
                              * different each time stored not spooled */
 
61
 
 
62
   STN_shares,               /* Configured shares for a subtree spooled */
 
63
 
 
64
   STN_children,             /* Configured childrens of this node.
 
65
                              * STN_Type list spooled */
 
66
 
 
67
   STN_job_ref_count,        /* number of active and pending jobs used in
 
68
                              * schedd, not stored to qmaster */
 
69
   STN_active_job_ref_count, /* number of active jobs used in schedd, not
 
70
                              * stored to qmaster */
 
71
   STN_project,              /* set to 1 if this node is a project used in 
 
72
                              * schedd, not stored to qmaster */
 
73
   STN_proportion,           /* share proportion used in schedd, not
 
74
                              * stored to qmaster */
 
75
   STN_adjusted_proportion,  /* share adjusted proportion used in schedd,
 
76
                              * not stored to qmaster */
 
77
   STN_combined_usage,       /* combined usage used in schedd, not stored
 
78
                              * to qmaster */
 
79
   STN_pass2_seqno,          /* seqno for pass 2 used in schedd, not
 
80
                              * stored to qmaster */
 
81
   STN_sum_priority,         /* sum of job priorities used in schedd, not
 
82
                              * stored to qmaster */
 
83
   STN_actual_proportion,    /* long term actual proportion, calculated in 
 
84
                              * qmon, not stored to qmaster */
 
85
   STN_m_share,              /* dynamic long term targetted proportion,
 
86
                              * set in schedd, stored to qmaster, not
 
87
                              * spooled */
 
88
   STN_last_actual_proportion,       /* short term actual proportion, set
 
89
                                      * in schedd, stored to qmaster, not
 
90
                                      * spooled */
 
91
   STN_adjusted_current_proportion,  /* short term targetted proportion, 
 
92
                                      * set in schedd, stored to qmaster,
 
93
                                      * not spooled */
 
94
   STN_temp,                 /* this node is a temporary node created in
 
95
                              * schedd/qmon and will not be sent to qmaster,
 
96
                              * set in schedd/qmon, not stored to qmaster,
 
97
                              * not spooled */
 
98
   STN_stt,                  /* short term targeted proportion of node 
 
99
                              * compared to sibling nodes,
 
100
                              * calculated during scheduling of pending
 
101
                              * jobs, set in schedd, not stored to qmaster,
 
102
                              * not spooled */
 
103
   STN_ostt,                 /* overall short term targeted proportion of
 
104
                              * node compared to all nodes,
 
105
                              * calculated during scheduling of pending
 
106
                              * jobs, set in schedd, not stored to qmaster,
 
107
                              * not spooled */
 
108
   STN_ltt,                  /* long term targeted proportion of node 
 
109
                              * compared to all nodes,
 
110
                              * calculated during scheduling of pending
 
111
                              * jobs, set in schedd, not stored to qmaster,
 
112
                              * not spooled */
 
113
   STN_oltt,                 /* overall long term targeted proportion of
 
114
                              * node compared to all nodes,
 
115
                              * calculated during scheduling of pending
 
116
                              * jobs, set in schedd, not stored to qmaster,
 
117
                              * not spooled */
 
118
   STN_shr,                  /* hierarchical calculated "share" node,
 
119
                              * calculated during scheduling of pending
 
120
                              * jobs, set in schedd, not stored to qmaster,
 
121
                              * not spooled */
 
122
   STN_sort,                 /* value for sorting jobs attached to a node,
 
123
                              * calculated during scheduling of pending
 
124
                              * jobs, set in schedd, not stored to qmaster,
 
125
                              * not spooled */
 
126
   STN_ref,                  /* Temporary index reference back into the
 
127
                              * array of pending jobs, used during
 
128
                              * scheduling of pending jobs, set in schedd,
 
129
                              * not stored to qmaster, not spooled */
 
130
   STN_tickets,              /* Temporary storage of pending tickets from
 
131
                              * higher level policies, used during
 
132
                              * scheduling of pending jobs, set in schedd,
 
133
                              * not stored to qmaster, not spooled */
 
134
   STN_jobid,                /* Job number of a temporary job node,
 
135
                              * used during scheduling of pending jobs,
 
136
                              * set in schedd, not stored to qmaster,
 
137
                              * not spooled */
 
138
   STN_taskid,               /* Task number of a temporary job node,
 
139
                              * used during scheduling of pending jobs,
 
140
                              * set in schedd, not stored to qmaster,
 
141
                              * not spooled */
 
142
   STN_usage_list,           /* Node usage list used during scheduling
 
143
                              * of pending jobs, set in schedd,
 
144
                              * not stored to qmaster, not spooled */
 
145
   STN_version               /* version of share tree set in qmaster when
 
146
                              * sharetree changes spooled */
 
147
};
 
148
 
 
149
enum {
 
150
   STN_name_POS = 0,
 
151
   STN_type_POS,                
 
152
   STN_id_POS,                 
 
153
   STN_shares_POS,            
 
154
   STN_children_POS,         
 
155
   STN_job_ref_count_POS,   
 
156
   STN_active_job_ref_count_POS,
 
157
   STN_project_POS,            
 
158
   STN_proportion_POS,        
 
159
   STN_adjusted_proportion_POS,
 
160
   STN_combined_usage_POS,  
 
161
   STN_pass2_seqno_POS,  
 
162
   STN_sum_priority_POS, 
 
163
   STN_actual_proportion_POS,
 
164
   STN_m_share_POS,         
 
165
   STN_last_actual_proportion_POS,
 
166
   STN_adjusted_current_proportion_POS,
 
167
   STN_temp_POS,           
 
168
   STN_stt_POS,           
 
169
   STN_ostt_POS,         
 
170
   STN_ltt_POS,         
 
171
   STN_oltt_POS,       
 
172
   STN_shr_POS,       
 
173
   STN_sort_POS,     
 
174
   STN_ref_POS,     
 
175
   STN_tickets_POS,
 
176
   STN_jobid_POS, 
 
177
   STN_taskid_POS,
 
178
   STN_usage_list_POS,  
 
179
   STN_version_POS     
 
180
};
 
181
 
 
182
 
 
183
LISTDEF(STN_Type)
 
184
   JGDI_ROOT_OBJ(ShareTree, SGE_SHARETREE_LIST , MODIFY | GET)
 
185
   JGDI_EVENT_OBJ(MODIFY(sgeE_NEW_SHARETREE))
 
186
   SGE_STRING(STN_name, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_SPOOL | CULL_JGDI_CONF)
 
187
   SGE_ULONG(STN_type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)        /* 960624 svd - changed to STN_type */
 
188
   SGE_ULONG(STN_id, CULL_DEFAULT | CULL_JGDI_CONF)         /* Unique node id for storing to disk */
 
189
   SGE_ULONG(STN_shares, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)
 
190
   SGE_LIST(STN_children, STN_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)
 
191
   SGE_ULONG(STN_job_ref_count, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
192
   SGE_ULONG(STN_active_job_ref_count, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
193
   SGE_ULONG(STN_project, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
194
   SGE_DOUBLE(STN_proportion, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
195
   SGE_DOUBLE(STN_adjusted_proportion, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
196
   SGE_DOUBLE(STN_combined_usage, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
197
   SGE_ULONG(STN_pass2_seqno, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
198
   SGE_ULONG(STN_sum_priority, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
199
   SGE_DOUBLE(STN_actual_proportion, CULL_DEFAULT | CULL_JGDI_RO)
 
200
   SGE_DOUBLE(STN_m_share, CULL_DEFAULT | CULL_JGDI_RO)
 
201
   SGE_DOUBLE(STN_last_actual_proportion, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
202
   SGE_DOUBLE(STN_adjusted_current_proportion, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
203
   SGE_ULONG(STN_temp, CULL_DEFAULT | CULL_JGDI_RO)
 
204
   SGE_DOUBLE(STN_stt, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
205
   SGE_DOUBLE(STN_ostt, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                   
 
206
   SGE_DOUBLE(STN_ltt, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                    
 
207
   SGE_DOUBLE(STN_oltt, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                   
 
208
   SGE_DOUBLE(STN_shr, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                    
 
209
   SGE_DOUBLE(STN_sort, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                    
 
210
   SGE_ULONG(STN_ref, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                    
 
211
   SGE_DOUBLE(STN_tickets, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                    
 
212
   SGE_ULONG(STN_jobid, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                  
 
213
   SGE_ULONG(STN_taskid, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                                 
 
214
   SGE_MAP(STN_usage_list,UA_Type, CULL_DEFAULT | CULL_JGDI_HIDDEN)                                     
 
215
   SGE_ULONG(STN_version, CULL_DEFAULT | CULL_JGDI_HIDDEN)
 
216
LISTEND 
 
217
 
 
218
NAMEDEF(STNN)
 
219
   NAME("STN_name")
 
220
   NAME("STN_type")
 
221
   NAME("STN_id")
 
222
   NAME("STN_shares")
 
223
   NAME("STN_children")
 
224
   NAME("STN_job_ref_count")
 
225
   NAME("STN_active_job_ref_count")
 
226
   NAME("STN_project")
 
227
   NAME("STN_proportion")
 
228
   NAME("STN_adjusted_proportion")
 
229
   NAME("STN_combined_usage")
 
230
   NAME("STN_pass2_seqno")
 
231
   NAME("STN_sum_priority")
 
232
   NAME("STN_actual_proportion")
 
233
   NAME("STN_m_share")
 
234
   NAME("STN_last_actual_proportion")
 
235
   NAME("STN_adjusted_current_proportion")
 
236
   NAME("STN_temp")
 
237
   NAME("STN_stt")
 
238
   NAME("STN_ostt")
 
239
   NAME("STN_ltt")
 
240
   NAME("STN_oltt")
 
241
   NAME("STN_shr")
 
242
   NAME("STN_sort")
 
243
   NAME("STN_ref")
 
244
   NAME("STN_tickets")
 
245
   NAME("STN_jobid")
 
246
   NAME("STN_taskid")
 
247
   NAME("STN_usage_list")
 
248
   NAME("STN_version")
 
249
NAMEEND
 
250
 
 
251
/* *INDENT-ON* */
 
252
 
 
253
#define STNS sizeof(STNN)/sizeof(char*)
 
254
#ifdef  __cplusplus
 
255
}
 
256
#endif
 
257
#endif                          /* __SGE_SHARE_TREE_NODEL_H */