1
#ifndef __SGE_SCHEDD_CONF_H
2
#define __SGE_SCHEDD_CONF_H
3
/*___INFO__MARK_BEGIN__*/
4
/*************************************************************************
6
* The Contents of this file are made available subject to the terms of
7
* the Sun Industry Standards Source License Version 1.2
9
* Sun Microsystems Inc., March, 2001
12
* Sun Industry Standards Source License Version 1.2
13
* =================================================
14
* The contents of this file are subject to the Sun Industry Standards
15
* Source License Version 1.2 (the "License"); You may not use this file
16
* except in compliance with the License. You may obtain a copy of the
17
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
19
* Software provided under this License is provided on an "AS IS" basis,
20
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
21
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
22
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
23
* See the License for the specific provisions governing your rights and
24
* obligations concerning the Software.
26
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
28
* Copyright: 2001 by Sun Microsystems, Inc.
30
* All Rights Reserved.
32
************************************************************************/
33
/*___INFO__MARK_END__*/
35
#include "sge_schedd_confL.h"
37
/* defines the last dispatched job */
39
DISPATCH_TYPE_NONE = 0, /* did not dispatch a job */
40
DISPATCH_TYPE_FAST, /* dispatched a sequential job */
41
DISPATCH_TYPE_FAST_SOFT_REQ, /* dispatch a sequential job with soft requests */
42
DISPATCH_TYPE_COMPREHENSIVE /* dispatched a pe job*/
45
enum schedd_job_info_key {
46
SCHEDD_JOB_INFO_FALSE=0,
48
SCHEDD_JOB_INFO_JOB_LIST,
52
/* defines the algorithm that should be used to compute pe-ranges */
54
SCHEDD_PE_AUTO=-1, /* automatic, the scheduler will decide */
55
SCHEDD_PE_LOW_FIRST=0, /* least slot first */
56
SCHEDD_PE_HIGH_FIRST, /* highest slot first */
57
SCHEDD_PE_BINARY, /* binary search */
58
SCHEDD_PE_ALG_MAX /* number of algorithms */ /* number of algorithms */
59
} schedd_pe_algorithm;
63
INVALID_POLICY = FIRST_POLICY_VALUE,
69
/* TODO: shouldn't LAST_POLICY_VALUE equal SHARE_TREE_POLICY?
70
* POLICY_VALUES = 4, should probably be 3
73
POLICY_VALUES = (LAST_POLICY_VALUE - FIRST_POLICY_VALUE)
81
void sc_mt_init(void);
83
void sconf_ph_fill_array(policy_hierarchy_t array[]);
85
void sconf_ph_print_array(policy_hierarchy_t array[]);
87
void sconf_print_config(void);
89
lListElem *sconf_create_default(void);
91
bool sconf_set_config(lList **config, lList **answer_list);
93
bool sconf_is_valid_load_formula(lList **answer_list,
97
sconf_is_centry_referenced(const lListElem *centry);
99
bool sconf_validate_config(lList **answer_list, lList *config);
101
bool sconf_validate_config_(lList **answer_list);
103
lListElem *sconf_get_config(void);
105
lList *sconf_get_config_list(void);
107
bool sconf_is_new_config(void);
108
void sconf_reset_new_config(void);
112
u_long32 sconf_get_load_adjustment_decay_time(void);
114
lList *sconf_get_job_load_adjustments(void);
116
char *sconf_get_load_formula(void);
118
u_long32 sconf_get_queue_sort_method(void);
120
u_long32 sconf_get_maxujobs(void);
122
u_long32 sconf_get_schedule_interval(void);
124
u_long32 sconf_get_reprioritize_interval(void);
126
u_long32 sconf_get_weight_tickets_share(void);
128
lList *sconf_get_schedd_job_info_range(void);
130
bool sconf_is_id_in_schedd_job_info_range(u_long32 job_number);
132
lList *sconf_get_usage_weight_list(void);
134
double sconf_get_weight_user(void);
136
double sconf_get_weight_department(void);
138
double sconf_get_weight_project(void);
140
double sconf_get_weight_job(void);
142
u_long32 sconf_get_weight_tickets_share(void);
144
u_long32 sconf_get_weight_tickets_functional(void);
146
u_long32 sconf_get_halftime(void);
148
void sconf_set_weight_tickets_override(u_long32 active);
150
u_long32 sconf_get_weight_tickets_override(void);
152
double sconf_get_compensation_factor(void);
154
bool sconf_get_share_override_tickets(void);
156
bool sconf_get_share_functional_shares(void);
158
bool sconf_get_report_pjob_tickets(void);
160
bool sconf_is_job_category_filtering(void);
162
u_long32 sconf_get_flush_submit_sec(void);
164
u_long32 sconf_get_flush_finish_sec(void);
166
u_long32 sconf_get_max_functional_jobs_to_schedule(void);
168
u_long32 sconf_get_max_pending_tasks_per_job(void);
170
lList* sconf_get_halflife_decay_list(void);
172
double sconf_get_weight_ticket(void);
173
double sconf_get_weight_waiting_time(void);
174
double sconf_get_weight_deadline(void);
175
double sconf_get_weight_urgency(void);
177
u_long32 sconf_get_max_reservations(void);
179
double sconf_get_weight_priority(void);
180
bool sconf_get_profiling(void);
182
u_long32 sconf_get_default_duration(void);
189
u_long32 sconf_get_schedd_job_info(void);
190
void sconf_disable_schedd_job_info(void);
191
void sconf_enable_schedd_job_info(void);
193
void sconf_set_qs_state(qs_state_t state);
194
qs_state_t sconf_get_qs_state(void);
196
void sconf_set_global_load_correction(bool flag);
197
bool sconf_get_global_load_correction(void);
199
void sconf_set_now(u_long32);
200
u_long32 sconf_get_now(void);
202
bool sconf_get_host_order_changed(void);
203
void sconf_set_host_order_changed(bool changed);
205
int sconf_get_last_dispatch_type(void);
206
void sconf_set_last_dispatch_type(int changed);
208
u_long32 sconf_get_duration_offset(void);
210
bool serf_get_active(void);
212
schedd_pe_algorithm sconf_best_pe_alg(void);
213
void sconf_update_pe_alg(int runs, int current, int max);
214
int sconf_get_pe_alg_value(schedd_pe_algorithm alg);
216
void sconf_inc_fast_jobs(void);
217
int sconf_get_fast_jobs(void);
219
void sconf_inc_comprehensive_jobs(void);
220
int sconf_get_comprehensive_jobs(void);
222
void sconf_set_decay_constant(double decay);
223
double sconf_get_decay_constant(void);
225
void sconf_reset_jobs(void);
227
void sconf_get_weight_ticket_urgency_priority(double *ticket, double *urgency, double *priority);
229
#endif /* __SGE_SCHEDD_CONF_H */