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

« back to all changes in this revision

Viewing changes to source/libs/sgeobj/sge_ptfL.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_PTFL_H
 
2
#define __SGE_PTFL_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 jobs which
 
47
 * are running under the local execution daemon.
 
48
 */
 
49
 
 
50
enum {
 
51
   JL_job_ID = JL_LOWERBOUND,
 
52
   JL_OS_job_list,
 
53
   JL_state,
 
54
   JL_tickets,
 
55
   JL_share,
 
56
   JL_ticket_share,
 
57
   JL_timeslice,
 
58
   JL_usage,
 
59
   JL_old_usage_value,
 
60
   JL_adjusted_usage,
 
61
   JL_last_usage,
 
62
   JL_old_usage,
 
63
   JL_proportion,
 
64
   JL_adjusted_proportion,
 
65
   JL_adjusted_current_proportion,
 
66
   JL_actual_proportion,
 
67
   JL_diff_proportion,
 
68
   JL_last_proportion,
 
69
   JL_curr_pri,
 
70
   JL_pri,
 
71
   JL_procfd,
 
72
   JL_interactive
 
73
};
 
74
 
 
75
LISTDEF(JL_Type)
 
76
   SGE_ULONG(JL_job_ID, CULL_DEFAULT)       /* job identifier */
 
77
   SGE_LIST(JL_OS_job_list, JO_Type, CULL_DEFAULT)   /* O.S. job list */
 
78
   SGE_ULONG(JL_state, CULL_DEFAULT)        /* job state (JL_JOB_*) */
 
79
   SGE_ULONG(JL_tickets, CULL_DEFAULT)      /* job tickets */
 
80
   SGE_DOUBLE(JL_share, CULL_DEFAULT)       /* ptf interval share */
 
81
   SGE_DOUBLE(JL_ticket_share, CULL_DEFAULT) /* ptf job ticket share */
 
82
   SGE_DOUBLE(JL_timeslice, CULL_DEFAULT)   /* ptf calculated timeslice (SX) */
 
83
   SGE_DOUBLE(JL_usage, CULL_DEFAULT)       /* ptf interval combined usage */
 
84
   SGE_DOUBLE(JL_old_usage_value, CULL_DEFAULT)     /* ptf interval combined usage */
 
85
   SGE_DOUBLE(JL_adjusted_usage, CULL_DEFAULT)      /* ptf interval adjusted usage */
 
86
   SGE_DOUBLE(JL_last_usage, CULL_DEFAULT)  /* ptf last interval combined usage */
 
87
   SGE_DOUBLE(JL_old_usage, CULL_DEFAULT)   /* prev interval combined usage */
 
88
   SGE_DOUBLE(JL_proportion, CULL_DEFAULT)
 
89
   SGE_DOUBLE(JL_adjusted_proportion, CULL_DEFAULT)
 
90
   SGE_DOUBLE(JL_adjusted_current_proportion, CULL_DEFAULT)
 
91
   SGE_DOUBLE(JL_actual_proportion, CULL_DEFAULT)
 
92
   SGE_DOUBLE(JL_diff_proportion, CULL_DEFAULT)
 
93
   SGE_DOUBLE(JL_last_proportion, CULL_DEFAULT)
 
94
   SGE_DOUBLE(JL_curr_pri, CULL_DEFAULT)
 
95
   SGE_LONG(JL_pri, CULL_DEFAULT)
 
96
   SGE_ULONG(JL_procfd, CULL_DEFAULT)       /* /proc file descriptor */
 
97
   SGE_ULONG(JL_interactive, CULL_DEFAULT)  /* interactive flag */
 
98
LISTEND 
 
99
 
 
100
NAMEDEF(JLN)
 
101
   NAME("JL_job_ID")
 
102
   NAME("JL_OS_job_list")
 
103
   NAME("JL_state")
 
104
   NAME("JL_tickets")
 
105
   NAME("JL_share")
 
106
   NAME("JL_ticket_share")
 
107
   NAME("JL_timeslice")
 
108
   NAME("JL_usage")
 
109
   NAME("JL_old_usage_value")
 
110
   NAME("JL_adjusted_usage")
 
111
   NAME("JL_last_usage")
 
112
   NAME("JL_old_usage")
 
113
   NAME("JL_proportion")
 
114
   NAME("JL_adjusted_proportion")
 
115
   NAME("JL_adjusted_current_proportion")
 
116
   NAME("JL_actual_proportion")
 
117
   NAME("JL_diff_proportion")
 
118
   NAME("JL_last_proportion")
 
119
   NAME("JL_curr_pri")
 
120
   NAME("JL_pri")
 
121
   NAME("JL_procfd")
 
122
   NAME("JL_interactive")
 
123
NAMEEND
 
124
 
 
125
#define JLS sizeof(JLN)/sizeof(char*)
 
126
 
 
127
/*
 
128
 * This is the list type we use to hold the list of
 
129
 * O.S. jobs being tracked for each PTF job. There
 
130
 * will normally only be one O.S. job per PTF job,
 
131
 * except in the case of parallel jobs or jobs with
 
132
 * multiple tasks.
 
133
 */
 
134
 
 
135
enum {
 
136
   JO_OS_job_ID,
 
137
   JO_OS_job_ID2,
 
138
   JO_ja_task_ID,
 
139
   JO_task_id_str,
 
140
   JO_state,
 
141
   JO_usage_list,
 
142
   JO_pid_list
 
143
};
 
144
 
 
145
LISTDEF(JO_Type)
 
146
   SGE_ULONG(JO_OS_job_ID, CULL_DEFAULT)    /* O.S. job id (lower 32 bits) */
 
147
   SGE_ULONG(JO_OS_job_ID2, CULL_DEFAULT)   /* O.S. job id (upper 32 bits) */
 
148
   SGE_ULONG(JO_ja_task_ID, CULL_DEFAULT)   /* job array task id */
 
149
   SGE_STRING(JO_task_id_str, CULL_DEFAULT) /* task ID string */
 
150
   SGE_ULONG(JO_state, CULL_DEFAULT)        /* job state (JL_JOB_*) */
 
151
   SGE_MAP(JO_usage_list, UA_Type, CULL_DEFAULT)    /* ptf interval usage */
 
152
   SGE_LIST(JO_pid_list, JP_Type, CULL_DEFAULT)      /* process ID list */
 
153
LISTEND 
 
154
 
 
155
NAMEDEF(JON)
 
156
   NAME("JO_OS_job_ID")
 
157
   NAME("JO_OS_job_ID2")
 
158
   NAME("JO_ja_task_ID")
 
159
   NAME("JO_task_id_str")
 
160
   NAME("JO_state")
 
161
   NAME("JO_usage_list")
 
162
   NAME("JO_pid_list")
 
163
NAMEEND
 
164
 
 
165
#define JOS sizeof(JON)/sizeof(char*)
 
166
 
 
167
/*
 
168
 * This is the list type we use to hold the process ID
 
169
 * list for jobs in the PTF O.S. job list
 
170
 */
 
171
enum {
 
172
   JP_pid = JP_LOWERBOUND,
 
173
   JP_background
 
174
};
 
175
 
 
176
LISTDEF(JP_Type)
 
177
   SGE_ULONG(JP_pid, CULL_HASH | CULL_UNIQUE)          /* process ID */
 
178
   SGE_ULONG(JP_background, CULL_DEFAULT)   /* background flag */
 
179
LISTEND 
 
180
 
 
181
NAMEDEF(JPN)
 
182
   NAME("JP_pid")
 
183
   NAME("JP_background")
 
184
NAMEEND
 
185
 
 
186
/* *INDENT-ON* */ 
 
187
 
 
188
#define JPS sizeof(JPN)/sizeof(char*)
 
189
#ifdef  __cplusplus
 
190
}
 
191
#endif
 
192
#endif                          /* __SGE_PTFL_H */