File: sge_pe_task_PETR_L.h

package info (click to toggle)
gridengine 8.1.9%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 56,880 kB
  • sloc: ansic: 432,689; java: 87,068; cpp: 31,958; sh: 29,429; jsp: 7,757; perl: 6,336; xml: 5,828; makefile: 4,701; csh: 3,928; ruby: 2,221; tcl: 1,676; lisp: 669; yacc: 519; python: 503; lex: 361; javascript: 200
file content (295 lines) | stat: -rw-r--r-- 8,018 bytes parent folder | download | duplicates (12)
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295

#ifndef __SGE_PE_TASKL_H
#define __SGE_PE_TASKL_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 "cull/cull.h"

#include "sgeobj/sge_boundaries.h"

#ifdef  __cplusplus
extern "C" {
#endif

/****** sgeobj/pe_task/--PET_Type *********************************************
*  NAME
*     PET_Type - CULL pe task element 
*
*  ELEMENTS
*     Job identification
*     ==================
*     SGE_STRING(PET_id)
*        The pe task id. It is unique per job.
*
*     SGE_STRING(PET_name)
*        Optional name of a pe task. Not yet completely implemented, but
*        it could be used to pass information to be shown by qstat.
*   
*     Runtime control information
*     ===================
*     SGE_ULONG(PET_status)
*        Status of the pe job, see defines in libs/gdi/sge_jobL.h.
*
*     SGE_LIST(PET_granted_destin_identifier_list)
*        Granted destination identifier list. Will contain one
*        entry specifying the queue the pe task runns in.
*
*     SGE_ULONG(PET_pid)
*        Pid of a running pe task (process group id).
*
*     SGE_STRING(PET_osjobid)
*        os jobid  of a running pe task.
*
*     Usage information
*     =================
*     SGE_LIST(PET_usage)
*     SGE_LIST(PET_scaled_usage)
*     SGE_LIST(PET_previous_usage)
*
*     Time information
*     ================
*     SGE_ULONG(PET_submission_time)
*     SGE_ULONG(PET_start_time)
*     SGE_ULONG(PET_end_time)
*
*     Submission information
*     ======================
*     SGE_STRING(PET_cwd)
*        Current working directory of the pe task. If not set, the 
*        cwd from the ja task is inherited.
*
*     SGE_LIST(PET_path_aliases)
*        Path alias list for the pe task.
*
*     SGE_LIST(PET_environment)
*        Environment variables exported to the pe task.
*        They will overwrite inherited variables from the ja task.
*
*  FUNCTION
*     PET_Type objects are used to store information about tasks of
*     tightly integrated parallel jobs (started with qrsh -inherit).
*     
*     Parallel tasks are sub objects of array tasks (even for non 
*     array jobs one pseudo array task is created).
*
*         +---------+   1:x   +----------+   1:x   +----------+
*         | JB_Type |<------->| JAT_Type |<------->| PET_Type |
*         +---------+         +----------+         +----------+
*
*  SEE ALSO
*     gdi/job/--JB_Type
*     gdi/job_jatask/JAT_Type                             
******************************************************************************/
enum {
   PET_id = PET_LOWERBOUND,
   PET_name,

   PET_status,

   PET_granted_destin_identifier_list,

   PET_pid,
   PET_osjobid,
   PET_usage,
   PET_scaled_usage,
   PET_reported_usage,
   PET_previous_usage,

   PET_submission_time,
   PET_start_time,
   PET_end_time,

   PET_cwd,
   PET_path_aliases,
   PET_environment,

   PET_do_contact
};

LISTDEF(PET_Type)
   JGDI_OBJ(PETask)
   JGDI_EVENT_OBJ(ADD(sgeE_PETASK_ADD) | DELETE(sgeE_PETASK_DEL))
   SGE_STRING(PET_id, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_SUBLIST)
   SGE_STRING(PET_name, CULL_DEFAULT | CULL_SUBLIST)
   
   SGE_ULONG(PET_status, CULL_DEFAULT | CULL_SUBLIST)

   SGE_LIST(PET_granted_destin_identifier_list, JG_Type, CULL_DEFAULT | CULL_SUBLIST)

   SGE_ULONG(PET_pid, CULL_DEFAULT)
   SGE_STRING(PET_osjobid, CULL_DEFAULT)
   SGE_MAP(PET_usage, UA_Type, CULL_DEFAULT | CULL_SUBLIST)
   SGE_MAP(PET_scaled_usage, UA_Type, CULL_DEFAULT | CULL_SUBLIST)
   SGE_MAP(PET_reported_usage, UA_Type, CULL_DEFAULT | CULL_SUBLIST)
   SGE_MAP(PET_previous_usage, UA_Type, CULL_DEFAULT)

   SGE_ULONG(PET_submission_time, CULL_DEFAULT | CULL_SUBLIST)
   SGE_ULONG(PET_start_time, CULL_DEFAULT | CULL_SUBLIST)
   SGE_ULONG(PET_end_time, CULL_DEFAULT | CULL_SUBLIST)

   SGE_STRING(PET_cwd, CULL_DEFAULT | CULL_SUBLIST)
   SGE_LIST(PET_path_aliases, PA_Type, CULL_DEFAULT)
   SGE_MAP(PET_environment, VA_Type, CULL_DEFAULT)
   SGE_BOOL(PET_do_contact, CULL_DEFAULT | CULL_SUBLIST)
LISTEND

NAMEDEF(PETN)
   NAME("PET_id")
   NAME("PET_name")
   
   NAME("PET_status")
   
   NAME("PET_granted_destin_identifier_list")

   NAME("PET_pid")
   NAME("PET_osjobid")
   NAME("PET_usage")
   NAME("PET_scaled_usage")
   NAME("PET_reported_usage")
   NAME("PET_previous_usage")
   
   NAME("PET_submission_time")
   NAME("PET_start_time")
   NAME("PET_end_time")
   
   NAME("PET_cwd")
   NAME("PET_path_aliases")
   NAME("PET_environment")
   NAME("PET_do_contact")
NAMEEND


#define PETS sizeof(PETN)/sizeof(char*)

/****** sgeobj/pe_task/--PETR_Type ********************************************
*  NAME
*     PET_Type - CULL pe task request element 
*
*  ELEMENTS
*     Job identification
*     ==================
*     SGE_ULONG(PETR_jobid)
*
*     SGE_ULONG(PETR_jataskid)
*
*     Submission information
*     ======================
*     SGE_STRING(PETR_queuename)
*
*     SGE_STRING(PETR_owner)
*
*     SGE_STRING(PETR_cwd)
*
*     SGE_LIST(PETR_path_aliases)
*
*     SGE_LIST(PETR_environment)
*
*     Time information
*     ================
*     SGE_ULONG(PETR_submission_time)
*
*  FUNCTION
*     Objects of PETR_Type are used to request the start of a task in a 
*     tightly integrated parallel job.
*     
*  SEE ALSO
*     gdi/job_jatask/PET_Type
******************************************************************************/
enum {
   PETR_jobid = PETR_LOWERBOUND,
   PETR_jataskid,
   PETR_queuename,
   PETR_owner,
   PETR_cwd,
   PETR_path_aliases,
   PETR_environment,
   PETR_submission_time
};

LISTDEF(PETR_Type)
   SGE_ULONG(PETR_jobid, CULL_DEFAULT)
   SGE_ULONG(PETR_jataskid, CULL_DEFAULT)
   SGE_STRING(PETR_queuename, CULL_DEFAULT)
   SGE_STRING(PETR_owner, CULL_DEFAULT)
   SGE_STRING(PETR_cwd, CULL_DEFAULT)
   SGE_LIST(PETR_path_aliases, PA_Type, CULL_DEFAULT)
   SGE_MAPLIST(PETR_environment, VA_Type, CULL_DEFAULT)
   SGE_ULONG(PETR_submission_time, CULL_DEFAULT)
LISTEND


NAMEDEF(PETRN)
   NAME("PETR_jobid")
   NAME("PETR_jataskid")
   NAME("PETR_queuename")
   NAME("PETR_owner")
   NAME("PETR_cwd")
   NAME("PETR_path_aliases")
   NAME("PETR_environment")
   NAME("PETR_submission_time")
NAMEEND

#define PETRS sizeof(PETRN)/sizeof(char*)

/*
 * We need to store information about finished pe tasks to avoid
 * duplicate accounting records (see IZ 438).
 * A ja task will contain a list of finished pe tasks.
 * Only the task id of finished tasks will be stored.
 */

/* *INDENT-OFF* */

enum {
   FPET_id = FPET_LOWERBOUND
};

LISTDEF(FPET_Type)
   SGE_STRING(FPET_id, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_SUBLIST)
LISTEND

NAMEDEF(FPETN)
   NAME("FPET_id")
NAMEEND

/* *INDENT-ON* */

#define FPETS sizeof(FPETN)/sizeof(char *)


#ifdef  __cplusplus
}
#endif

#endif /* __SGE_PE_TASKL_H */