File: sge_schedd_confL.h

package info (click to toggle)
gridengine 6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 51,532 kB
  • ctags: 51,172
  • sloc: ansic: 418,155; java: 37,080; sh: 22,593; jsp: 7,699; makefile: 5,292; csh: 4,244; xml: 2,901; cpp: 2,086; perl: 1,895; tcl: 1,188; lisp: 669; ruby: 642; yacc: 393; lex: 266
file content (240 lines) | stat: -rw-r--r-- 12,172 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#ifndef __SGE_SCHEDCONFL_H
#define __SGE_SCHEDCONFL_H

/*___INFO__MARK_BEGIN__*/
/*************************************************************************
 * 
 *  The Contents of this file are made available subject to the terms of
 *  the Sun Industry Standards Source License Version 1.2
 * 
 *  Sun Microsystems Inc., March, 2001
 * 
 * 
 *  Sun Industry Standards Source License Version 1.2
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.2 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 * 
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 * 
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 * 
 *   Copyright: 2001 by Sun Microsystems, Inc.
 * 
 *   All Rights Reserved.
 * 
 ************************************************************************/
/*___INFO__MARK_END__*/

#include "sge_boundaries.h"
#include "cull.h"

#ifdef  __cplusplus
extern "C" {
#endif

/* *INDENT-OFF* */ 

/* 
 * valid values for SC_queue_sort_method 
 */
enum {
   QSM_LOAD = 0,
   QSM_SEQNUM = 1
};

/* 
 * This is the list type we use to hold the configuration of the scheduler.
 */
enum {
   SC_algorithm = SC_LOWERBOUND,
   SC_schedule_interval,
   SC_maxujobs,
   SC_queue_sort_method,
   SC_job_load_adjustments,
   SC_load_adjustment_decay_time,
   SC_load_formula,
   SC_schedd_job_info,
   SC_flush_submit_sec,   
   SC_flush_finish_sec, 
   SC_params,
   
   SC_reprioritize_interval,
   SC_halftime,
   SC_usage_weight_list,
   SC_compensation_factor,
   SC_weight_user,
   SC_weight_project,
   SC_weight_department,
   SC_weight_job,
   SC_weight_tickets_functional,
   SC_weight_tickets_share,
   SC_weight_tickets_override,
   SC_share_override_tickets,  
   SC_share_functional_shares,  
   SC_max_functional_jobs_to_schedule, 
   SC_report_pjob_tickets,    
   SC_max_pending_tasks_per_job,  
   SC_halflife_decay_list, 
   SC_policy_hierarchy,
   SC_weight_ticket,
   SC_weight_waiting_time,
   SC_weight_deadline,
   SC_weight_urgency,
   SC_weight_priority,
   SC_max_reservation,
   SC_default_duration
   };

LISTDEF(SC_Type)
   JGDI_ROOT_OBJ(SchedConf, SGE_SC_LIST, MODIFY | GET)
   JGDI_EVENT_OBJ(MODIFY(sgeE_SCHED_CONF))
   /*
    * configuration values used by both SGE and SGEEE
    */
   SGE_STRING_D(SC_algorithm, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "default")
   SGE_STRING_D(SC_schedule_interval, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "0:0:15")
   SGE_ULONG_D(SC_maxujobs, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)
   SGE_ULONG_D(SC_queue_sort_method, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)    /* see at top of file for valid values */
   SGE_LIST(SC_job_load_adjustments, CE_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)        /* CE_Type */
   SGE_STRING_D(SC_load_adjustment_decay_time, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "0:7:30")
   SGE_STRING_D(SC_load_formula, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "np_load_avg")
   SGE_STRING_D(SC_schedd_job_info, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "true")
   SGE_ULONG_D(SC_flush_submit_sec, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)            /* specifies the time after a job submit       *
                                                                         * to run the scheduler                        */
   SGE_ULONG_D(SC_flush_finish_sec, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)            /* specifies the time after a job has finished *   
                                                                         * to run the scheduler                        */
   SGE_STRING_D(SC_params, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "none")

   /* 
    * SGEEE specific configuration values
    */
   SGE_STRING_D(SC_reprioritize_interval, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "0:0:0")
   SGE_ULONG_D(SC_halftime, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 168)
   SGE_MAP(SC_usage_weight_list, UA_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)   /* SGEEE - UA_Type; gives    *
                                                                         * weights for building the  * 
                                                                         * usage usage = cpu * w_cpu *
                                                                         * + xxx * w_xxx + ...       */
   SGE_DOUBLE_D(SC_compensation_factor, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 5.0)

   SGE_DOUBLE_D(SC_weight_user, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.25)  /* gives weights between different *
                                                                                    * functional scheduling targets   */
   SGE_DOUBLE_D(SC_weight_project, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.25)
   SGE_DOUBLE_D(SC_weight_department, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.25)
   SGE_DOUBLE_D(SC_weight_job, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.25)

   SGE_ULONG_D(SC_weight_tickets_functional, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)      /* weight between different scheduling targets */
   SGE_ULONG_D(SC_weight_tickets_share, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)
   SGE_ULONG_D(SC_weight_tickets_override, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)
   SGE_BOOL(SC_share_override_tickets, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)          /* Override tickets of any object instance *
                                                                                             * are shared equally among all jobs       *
                                                                                             * associated with the object.             */
   SGE_BOOL(SC_share_functional_shares, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)         /* Functional shares of any object instance*
                                                                                             * are shared among all the jobs associated*
                                                                                             * with the object.                        */
   SGE_ULONG_D(SC_max_functional_jobs_to_schedule, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 200)   /* The maximum number of functional pending* 
                                                                                                       * jobs to scheduling using the brute-force* 
                                                                                                       * method.                                 */
   SGE_BOOL(SC_report_pjob_tickets, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF)             /* report tickets to the qmaster or not    */ 
   SGE_ULONG_D(SC_max_pending_tasks_per_job, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 50)      /* The number of subtasks per pending job  *
                                                                                                   * to schedule. This parameter exists in   *
                                                                                                   * order to reduce overhead.               */
   SGE_STRING_D(SC_halflife_decay_list,CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "none")        /* A list of halflife decay values (UA_Type)*/
   SGE_STRING_D(SC_policy_hierarchy,CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "OFS")            /* defines the order of the ticket         *
                                                                                                   * computation                             */
   SGE_DOUBLE_D(SC_weight_ticket, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.01)               /* weight in SGEEE priority formula applied */
                                                                                                  /* on normalized ticket amount             */
   SGE_DOUBLE_D(SC_weight_waiting_time, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.0)          /* weight applied in SGEEE static urgency  *
                                                                                                   * formula on waiting time                 */
   SGE_DOUBLE_D(SC_weight_deadline, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 3600000.0)        /* dividend used in SGEEE static urgency   *
                                                                                                   * formula with deadline initiation time   */
   SGE_DOUBLE_D(SC_weight_urgency, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0.1)               /* weight in SGEEE priority formula applied *
                                                                                                   * on normalized urgency                   */
   SGE_DOUBLE_D(SC_weight_priority, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 1.0)              /* weight in SGEEE priority formula applied *
                                                                                                   * on normalized posix priority */
   SGE_ULONG_D(SC_max_reservation, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, 0)                 /* Maximum number of reservations within a *
                                                                                                   * schedule run. The value U_LONG32_MAX    *
                                                                                                   * stands for 'infinity'                   */
   SGE_STRING_D(SC_default_duration, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_CONF, "0:10:0")        /* Default duration assumed for in         *
                                                                                                   * reseration scheduling mode for jobs     *
                                                                                                   * that specify no h_rt/s_rt. May not be   *
                                                                                                   * null if reservation is enabled */
LISTEND 

NAMEDEF(SCN)
   NAME("SC_algorithm")
   NAME("SC_schedule_interval")
   NAME("SC_maxujobs")
   NAME("SC_queue_sort_method")
   NAME("SC_job_load_adjustments")
   NAME("SC_load_adjustment_decay_time")
   NAME("SC_load_formula")
   NAME("SC_schedd_job_info")
   NAME("SC_flush_submit_sec")
   NAME("SC_flush_finish_sec")
   NAME("SC_params")
   
   NAME("SC_reprioritize_interval")
   NAME("SC_halftime")
   NAME("SC_usage_weight_list")
   NAME("SC_compensation_factor")

   NAME("SC_weight_user")
   NAME("SC_weight_project")
   NAME("SC_weight_department")
   NAME("SC_weight_job")

   NAME("SC_weight_tickets_functional")
   NAME("SC_weight_tickets_share")
   NAME("SC_weight_tickets_override")

   NAME("SC_share_override_tickets")
   NAME("SC_share_functional_shares")
   NAME("SC_max_functional_jobs_to_schedule")
   NAME("SC_report_pjob_tickets")
   NAME("SC_max_pending_tasks_per_job")
   NAME("SC_halflife_decay_list")
   NAME("SC_policy_hierarchy")

   NAME("SC_weight_ticket")
   NAME("SC_weight_waiting_time")
   NAME("SC_weight_deadline")
   NAME("SC_weight_urgency")
   NAME("SC_weight_priority")
   NAME("SC_max_reservation")
   NAME("SC_default_duration")
NAMEEND
#define SCS sizeof(SCN)/sizeof(char*)

/**
 * This is a list of parameters, stored in the params flag
 */
enum {
   PARA_name = PARA_LOWERBOUND,
   PARA_value
};

LISTDEF(PARA_Type)
   SGE_STRING(PARA_name, CULL_PRIMARY_KEY | CULL_DEFAULT)
   SGE_STRING(PARA_value, CULL_DEFAULT)
LISTEND

NAMEDEF(PARAN)
   NAME("PARA_name")
   NAME("PARA_value")
NAMEEND   

/* *INDENT-ON* */

#define PARAS sizeof(PARAN)/sizeof(char*)
#ifdef  __cplusplus
}
#endif
#endif                          /* __SGE_SCHEDCONFL_H */