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

« back to all changes in this revision

Viewing changes to source/libs/sgeobj/sge_jobL.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_JOBL_H
 
2
#define __SGE_JOBL_H
 
3
/*___INFO__MARK_BEGIN__*/
 
4
/*************************************************************************
 
5
 * 
 
6
 *  The Contents of this file are made available subject to the terms of
 
7
 *  the Sun Industry Standards Source License Version 1.2
 
8
 * 
 
9
 *  Sun Microsystems Inc., March, 2001
 
10
 * 
 
11
 * 
 
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
 
18
 * 
 
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.
 
25
 * 
 
26
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
27
 * 
 
28
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
29
 * 
 
30
 *   All Rights Reserved.
 
31
 * 
 
32
 ************************************************************************/
 
33
/*___INFO__MARK_END__*/
 
34
 
 
35
#include "sge_boundaries.h"
 
36
#include "cull.h"
 
37
 
 
38
#ifdef  __cplusplus
 
39
extern "C" {
 
40
#endif
 
41
 
 
42
/* Job states moved in from def.h */
 
43
#define JIDLE                                0x00000000
 
44
/* #define JENABLED                             0x00000008 */
 
45
#define JHELD                                0x00000010
 
46
#define JMIGRATING                           0x00000020
 
47
#define JQUEUED                              0x00000040
 
48
#define JRUNNING                             0x00000080
 
49
#define JSUSPENDED                           0x00000100
 
50
#define JTRANSFERING                         0x00000200
 
51
#define JDELETED                             0x00000400
 
52
#define JWAITING                             0x00000800
 
53
#define JEXITING                             0x00001000
 
54
#define JWRITTEN                             0x00002000
 
55
/* used in execd - job waits for getting its ASH/JOBID */
 
56
#define JWAITING4OSJID                       0x00004000
 
57
/* used in execd - shepherd reports job exit but there are still processes */
 
58
#define JERROR                               0x00008000
 
59
#define JSUSPENDED_ON_THRESHOLD              0x00010000
 
60
/*
 
61
   SGEEE: qmaster delays job removal till schedd 
 
62
   does no longer need this finished job 
 
63
*/  
 
64
#define JFINISHED                            0x00010000
 
65
/* used in execd to prevent slave jobs from getting started */
 
66
#define JSLAVE                               0x00020000
 
67
 
 
68
/* 
 
69
   GDI request syntax for JB_hold 
 
70
 
 
71
   Example:
 
72
 
 
73
   qalter -h {u|s|o|n}
 
74
 
 
75
  POSIX (overwriting):
 
76
  u: SET|USER 
 
77
  o: SET|OPERATOR
 
78
  s: SET|SYSTEM 
 
79
  n: SUB|USER|SYSTEM|OPERATOR
 
80
 
 
81
  SGE (adding):
 
82
  +u: ADD|USER
 
83
  +o: ADD|OPERATOR
 
84
  +s: ADD|SYSTEM
 
85
 
 
86
  SGE (removing):
 
87
  -u: SUB|USER
 
88
  -o: SUB|OPERATOR
 
89
  -s: SUB|SYSTEM
 
90
   
 
91
*/
 
92
enum { 
 
93
   /* need place for tree bits */
 
94
   MINUS_H_CMD_ADD = (0<<4), /* adds targetted flags */
 
95
   MINUS_H_CMD_SUB = (1<<4), /* remove targetted flags */
 
96
   MINUS_H_CMD_SET = (2<<4)  /* overwrites using targetted flags */
 
97
}; 
 
98
enum { 
 
99
   MINUS_H_TGT_USER     = 1, /* remove needs at least job owner */
 
100
   MINUS_H_TGT_OPERATOR = 2, /* remove needs at least operator  */
 
101
   MINUS_H_TGT_SYSTEM   = 4, /* remove needs at least manager   */
 
102
   MINUS_H_TGT_JA_AD    = 8, /* removed automatically */
 
103
   MINUS_H_TGT_ALL      = 15,
 
104
   MINUS_H_TGT_NONE     = 31
 
105
};
 
106
 
 
107
/* values for JB_verify_suitable_queues */
 
108
#define OPTION_VERIFY_STR "nwev"
 
109
enum { 
 
110
   SKIP_VERIFY = 0,     /* -w n no expendable verifications will be done */
 
111
   WARNING_VERIFY,     /* -w w qmaster will warn about these jobs - but submit will succeed */ 
 
112
   ERROR_VERIFY,        /* -w e qmaster will make expendable verifications to reject 
 
113
                            jobs that are not schedulable (default) */ 
 
114
   JUST_VERIFY          /* -w v just verify at qmaster but do not submit */
 
115
};
 
116
 
 
117
 
 
118
 
 
119
/************    scheduling constants   *****************************************/
 
120
/* priorities are in the range from -1023 to 1024 */
 
121
/* to put them in into u_long we need to add 1024 */
 
122
#define BASE_PRIORITY  1024
 
123
 
 
124
/* int -> u_long */
 
125
#define PRI_ITOU(x) ((x)+BASE_PRIORITY)
 
126
/* u_long -> int */
 
127
#define PRI_UTOI(x) ((x)-BASE_PRIORITY)
 
128
 
 
129
#define PRIORITY_OFFSET 8
 
130
#define NEWCOMER_FLAG     0x1000000
 
131
 
 
132
/* forced negative sign bit  */
 
133
#define MAX_JOBS_EXCEEDED 0x8000000
 
134
#define ALREADY_SCANNED   0x4000000
 
135
#define PRIORITY_MASK     0xffff00
 
136
#define SUBPRIORITY_MASK  0x0000ff
 
137
#define JOBS_SCANNED_PER_PASS 10
 
138
 
 
139
/* 
 
140
   used in qstat:
 
141
 
 
142
   JSUSPENDED_ON_SUBORDINATE means that the job is
 
143
   suspended because its queue is suspended
 
144
 
 
145
*/
 
146
#define JSUSPENDED_ON_SUBORDINATE            0x00002000
 
147
 
 
148
/* reserved names for JB_context */
 
149
#define CONTEXT_IOR "IOR"
 
150
#define CONTEXT_PARENT "PARENT"
 
151
 
 
152
/****** sgeobj/job/--JB_Type **************************************************
 
153
*  NAME
 
154
*     JB_Type - CULL job element 
 
155
*
 
156
*  ELEMENTS
 
157
*     Job identification and dependencies
 
158
*     ===================================
 
159
*
 
160
*     SGE_ULONG(JB_job_number) ---> JB_id
 
161
*        Uniq job number.
 
162
*
 
163
*     SGE_STRING(JB_job_name) 
 
164
*        Job name ("qsub/qalter -N job_name")  
 
165
*
 
166
*     SGE_XULONG(JB_version)
 
167
*
 
168
*     SGE_LIST(JB_jid_request_list)
 
169
*        job requested dependencies (JRE_Type only JRE_job_name)
 
170
*
 
171
*     SGE_LIST(JB_jid_predecessor_list)
 
172
*        Predecessor jobs (JRE_Type only JRE_job_name)
 
173
*  
 
174
*     SGE_LIST(JB_jid_successor_list)  
 
175
*        Sucessor jobs (JRE_Type only JRE_job_number)
 
176
*
 
177
*     SGE_LIST(JB_ja_ad_request_list)
 
178
*        job requested array dependencies (JRE_Type only JRE_job_name)
 
179
*
 
180
*     SGE_LIST(JB_ja_ad_predecessor_list)
 
181
*        Predecessor array jobs (JRE_Type only JRE_job_name)
 
182
*  
 
183
*     SGE_LIST(JB_ja_ad_successor_list)  
 
184
*        Sucessor array jobs (JRE_Type only JRE_job_number)
 
185
*
 
186
*     SGE_STRING(JB_session) 
 
187
*        Jobs session (JAPI session tag for job event selection)  
 
188
*
 
189
*     Project/Department
 
190
*     ==================
 
191
*
 
192
*     SGE_STRING(JB_project)
 
193
*        Project name (qsub -P project_name)
 
194
*
 
195
*     SGE_STRING(JB_department)
 
196
*        Department name. Set by schedd, saved (once) to qmaster.
 
197
*
 
198
*     Data related to job script
 
199
*     ===========================
 
200
*
 
201
*     SGE_STRING(JB_directive_prefix)     
 
202
*        Command prefix for jobscript ("qsub -C prefix") for parsing 
 
203
*        special comments in the script file.
 
204
*
 
205
*     SGE_XSTRING(JB_exec_file) 
 
206
*     ---> is the path to the locally spooled copy on the execution daemon, 
 
207
*          it is script what actually gets executed, 
 
208
*          In the case of a binary, is unused.
 
209
*
 
210
*     SGE_STRING(JB_script_file)
 
211
*     ---> is the path to the job as sent from the CLI, is the path on the submit host  
 
212
*          In the case of a binary, is the path to the binary 
 
213
*
 
214
*     SGE_ULONG(JB_script_size) 
 
215
*     ---> really needed?
 
216
*
 
217
*     SGE_STRING(JB_script_ptr) 
 
218
*     ---> the pointer to the character area of the jobscript
 
219
*
 
220
*     Time information
 
221
*     ================
 
222
*
 
223
*     SGE_RULONG(JB_submission_time)
 
224
*
 
225
*     SGE_ULONG(JB_execution_time)         
 
226
*        When should the job start ("qsub/qalter -a date_time")
 
227
*
 
228
*     SGE_ULONG(JB_deadline)      
 
229
*        SGEEE. Deadline initiation time. (qsub -dl date_time)
 
230
*
 
231
*     User related information
 
232
*     ========================
 
233
*
 
234
*     SGE_RSTRING(JB_owner) ---> rename to JB_user to be consistent?
 
235
*
 
236
*     SGE_RULONG(JB_uid)
 
237
*
 
238
*     SGE_RSTRING(JB_group)
 
239
*
 
240
*     SGE_RULONG(JB_gid)
 
241
*
 
242
*     SGE_STRING(JB_account)  
 
243
*        Account string ("qsub/qalter -A account string")
 
244
*
 
245
*     Submission environment
 
246
*     ======================
 
247
*
 
248
*     SGE_STRING(JB_cwd)      
 
249
*        Current working directory during qsub ("qsub -cwd")
 
250
*
 
251
*     SGE_BOOL(JB_notify)                  
 
252
*        Notify job of impending kill/stop signal. ("qsub -notify")
 
253
*
 
254
*     SGE_ULONG(JB_type) 
 
255
*        Start job immediately or not at all. ("qsub -now")
 
256
*        JG: TODO: it is no boolean, but misused for other information!
 
257
*
 
258
*     SGE_BOOL(JB_reserve)
 
259
*        Specifies a reservation is desired by the user ("-R y|n").
 
260
*        Available for non-immediate job submissions. Irrespective 
 
261
*        of the users desire a job reservation is made
 
262
*
 
263
*        o only in reservation scheduling mode 
 
264
*        o only until the maximum number of reservations during a 
 
265
*          scheduling run is not exceeded when the order comes at 
 
266
*          this job. The maximum number (SC_max_reservation) can be 
 
267
*          specified in sched_conf(5).
 
268
*        o only for non-immediate jobs 
 
269
*
 
270
*        Default is 'n'.
 
271
*
 
272
*     SGE_ULONG(JB_ar) ---> JB_ar
 
273
*        Uniq advance reservation number.
 
274
*
 
275
*     SGE_ULONG(JB_priority) 
 
276
*        Priority ("qsub/qalter -p priority")     
 
277
*
 
278
*     SGE_ULONG(JB_jobshare) 
 
279
*        Priority ("qsub/qalter -js jobshare")     
 
280
*
 
281
*     SGE_LIST(JB_shell_list, PN_Type)    
 
282
*        Command interpreter to be used (PN_Type).
 
283
*        ("qsub/qalter -S shell")
 
284
*
 
285
*     SGE_ULONG(JB_verify)             
 
286
*        Triggers "verify" messages. (qsub -verify)
 
287
*
 
288
*     SGE_LIST(JB_env_list) 
 
289
*        Export these env variables (VA_Type). ("qsub -V").
 
290
*
 
291
*     SGE_TLIST(JB_context, VA_Type)       
 
292
*        Custom attributes (name,val) pairs (VA_Type). 
 
293
*        ("qsub/qalter -ac/-dc context_list")
 
294
*
 
295
*     SGE_LIST(JB_job_args)  
 
296
*        Job arguments (ST_Type). 
 
297
*
 
298
*     Checkpointing/Restart
 
299
*     =====================
 
300
*     SGE_ULONG(JB_checkpoint_attr)  ----> merge all checkpointing 
 
301
*                                          stuff to one object?
 
302
*        Checkpoint attributes ("qsub/qalter -c interval_flags")   
 
303
*
 
304
*     SGE_STRING(JB_checkpoint_name)    
 
305
*        Name of ckpt object ("qsub/qalter -ckpt ckpt_name")
 
306
*
 
307
*     SGE_OBJECT(JB_checkpoint_object, CK_Type)
 
308
*        Ckpt object which will be sent from qmaster to execd.
 
309
*
 
310
*     SGE_ULONG(JB_checkpoint_interval)    
 
311
*        Checkpoint frequency ("qsub/qalter -c seconds")
 
312
*
 
313
*     SGE_ULONG(JB_restart)                 
 
314
*        Is job rerunable? ("qsub/qalter -r y/n")
 
315
*        JG: TODO: it is no boolean, but misused for other information!
 
316
*
 
317
*     Job I/O
 
318
*     =======
 
319
*
 
320
*     SGE_LIST(JB_stdout_path_list) 
 
321
*        Pathname for stdout (PN_Type). ("qsub/qalter -o path_name")
 
322
*
 
323
*     SGE_LIST(JB_stderr_path_list)   
 
324
*        Std error path streams (PN_Type). ("qsub/qalter "-e path_name")
 
325
*
 
326
*     SGE_LIST(JB_stdin_path_list)   
 
327
*        Std input path streams (PN_Type). ("qsub/qalter "-i path_name")
 
328
*
 
329
*     SGE_BOOL(JB_merge_stderr)   
 
330
*        Merge stdout and stderr? ("qsub/qalter -j y|n")
 
331
*
 
332
*     Resource requests
 
333
*     =================
 
334
*
 
335
*     SGE_LIST(JB_hard_resource_list, CE_Type) 
 
336
*        Hard resource requirements/limits/restrictions (CE_Type).
 
337
*        ("qsub -l resource_list")
 
338
*
 
339
*     SGE_LIST(JB_soft_resource_list, CE_Type) 
 
340
*        Soft resource requirements/limits/restrictions (CE_Type).
 
341
*        ("qsub -l resource_list")
 
342
*
 
343
*     SGE_LIST(JB_hard_queue_list) 
 
344
*        ----> why separated from other requests?
 
345
*        Hard queue list (QR_Type). ("qsub -q dest_identifier")
 
346
*
 
347
*     SGE_LIST(JB_soft_queue_list) 
 
348
*        ----> why separated from other requests?
 
349
*        Soft queue list (QR_Type). ("qsub/qselect -q dest_identifier")
 
350
*
 
351
*     Mail options
 
352
*     ============
 
353
*
 
354
*     SGE_ULONG(JB_mail_options)           
 
355
*        Mail options  ("qsub/qalter -m mail_options")
 
356
*
 
357
*     SGE_LIST(JB_mail_list)    
 
358
*        Mail recipiants (MR_Type). ("qsub/qalter -M mail_list)
 
359
*
 
360
*     Parallel Job info
 
361
*     =================
 
362
*
 
363
*     SGE_STRING(JB_pe)      
 
364
*        Name of requested PE or wildcard expression for matching PEs
 
365
*
 
366
*     SGE_LIST(JB_pe_range)
 
367
*        PE slot range (RN_Type). Qmaster ensure it is ascending and 
 
368
*        normalized.
 
369
*
 
370
*     SGE_LIST(JB_master_hard_queue_list)  
 
371
*        Master queue list (QR_Type). ("qsub -masterq queue_list")
 
372
*
 
373
*     Security related data
 
374
*     =====================
 
375
*
 
376
*     SGE_XSTRING(JB_tgt)                  
 
377
*        Kerberos client TGT 
 
378
*
 
379
*     SGE_XSTRING(JB_cred)                 
 
380
*        DCE/Kerberos credentials 
 
381
*
 
382
*     Data related to array jobs
 
383
*     ==========================
 
384
*
 
385
*     SGE_LIST(JB_ja_structure)  
 
386
*        Elements describe task id range structure during the
 
387
*        submission time of a (array) job (RN_Type). 
 
388
*        ("qsub -t tid_range")
 
389
*
 
390
*     SGE_LIST(JB_ja_n_h_ids)    
 
391
*        Just submitted array task without hold state (RN_Type).
 
392
*        ("qsub -t tid_range")
 
393
*
 
394
*     SGE_LIST(JB_ja_u_h_ids)    
 
395
*        Just submitted and user hold applied (RN_Type).
 
396
*        ("qsub -h -t tid_range")
 
397
*        ("qalter -h u/U jid.tid1-tid2:step")
 
398
*
 
399
*     SGE_LIST(JB_ja_s_h_ids)    
 
400
*        Just submitted and system hold applied (RN_Type).
 
401
*        ("qalter -h s/S jid.tid1-tid2:step")
 
402
*  
 
403
*     SGE_LIST(JB_ja_o_h_ids)    
 
404
*        Just submitted and operator hold applied (RN_Type).
 
405
*        ("qalter -h o/O jid.tid1-tid2:step")
 
406
*
 
407
*     SGE_LIST(JB_ja_a_h_ids)    
 
408
*        Just submitted and array hold applied (RN_Type).
 
409
*        ("qalter -hold_jid_ad wc_job_list")
 
410
*
 
411
*     SGE_LIST(JB_ja_z_ids)      
 
412
*        Zombie task ids (RN_Type).
 
413
*
 
414
*     SGE_LIST(JB_ja_template)  
 
415
*        Template for new tasks. In SGEEE systems the schedd will
 
416
*        store initial tickets in this element. (JAT_Type)
 
417
*
 
418
*     SGE_LIST(JB_ja_tasks)     
 
419
*        List of array tasks (in case of array jobs) or one task 
 
420
*        (in case of a job) (JAT_Type).
 
421
*
 
422
*     Data used only in scheduler
 
423
*     ===========================
 
424
*
 
425
*     SGE_HOST(JB_host)                    
 
426
*        SGEEE - host job is executing on. Local to schedd. 
 
427
*        Not spooled.
 
428
*
 
429
*     SGE_REF(JB_category)
 
430
*        Category string reference used in schedd.
 
431
*
 
432
*     Misc
 
433
*     ====
 
434
*
 
435
*     SGE_LIST(JB_user_list)               
 
436
*        List of usernames (qsub/qalter -u username_list). 
 
437
*        ---> qsub -u does not exist. Not part of a job, but only 
 
438
*             userd for qalter request as where condition. Could most 
 
439
*             probably be passed via lCondition.
 
440
*
 
441
*     SGE_LIST(JB_job_identifier_list) 
 
442
*        ---> condition for qalter? Then it should better be passed 
 
443
*             via condition. 
 
444
*        (ID_Type)
 
445
*
 
446
*     SGE_XULONG(JB_verify_suitable_queues)   ---> qalter?
 
447
*
 
448
*     SGE_XULONG(JB_soft_wallclock_gmt) ---> the same as complex s_rt?
 
449
*
 
450
*     SGE_XULONG(JB_hard_wallclock_gmt) ---> the same as complex h_rt?
 
451
*
 
452
*     SGE_DOUBLE(JB_urg )         
 
453
*        SGEEE. Absolute static urgency importance. The admin can use arbitrary
 
454
*        weighting factors in the formula used to determine this number. So any
 
455
*        value is possible. Needed only when scheduling code is run.
 
456
*        Not spooled.
 
457
*
 
458
*     SGE_DOUBLE(JB_nurg )         
 
459
*        SGEEE. Relative importance due to static urgency in the range between 0.0 
 
460
*        and 1.0. No need to make this a per task attribute as long as waiting time 
 
461
*        and deadline remain job attributes.
 
462
*        Not spooled.
 
463
*
 
464
*     SGE_DOUBLE(JB_nppri )         
 
465
*        SGEEE. Relative importance due to Posix priority in the range between 0.0 
 
466
*        and 1.0. No need to make this a per task attribute as long as the POSIX
 
467
*        priority remains a job attribute.
 
468
*        Not spooled.
 
469
*
 
470
*     SGE_DOUBLE(JB_rrcontr )         
 
471
*        SGEEE. Combined contribution to static urgency from all resources. This can 
 
472
*        be any value. Actually this is a property of job category. This field is 
 
473
*        needed only to provide it for diagnosis purposes it as per job information 
 
474
*        via GDI. 
 
475
*        Not spooled.
 
476
*
 
477
*     SGE_DOUBLE(JB_dlcontr )         
 
478
*        SGEEE. Contribution to static urgency from job deadline. This can be any
 
479
*        value. No need to make this a per task attribute as long a deadline is a 
 
480
*        job attribute. Increases over time. 
 
481
*        Not spooled.
 
482
*
 
483
*     SGE_DOUBLE(JB_wtcontr )         
 
484
*        SGEEE. Contribution to static urgency from waiting time. This can be any
 
485
*        value. No need to make this a per task attribute as long as waiting time 
 
486
*        is a job attribute. Increases over time.
 
487
*        Not spooled.
 
488
*
 
489
*     SGE_ULONG(JB_override_tickets)       
 
490
*        SGEEE - override tickets assigned by admin. 
 
491
*        (qalter -ot tickets).
 
492
*
 
493
*     SGE_LIST(JB_qs_args) ---> qsi? 
 
494
*        Arguments for foreign queuing system (ST_Type).
 
495
*        Either delete it, or recycle it to be used with starter_method.
 
496
*
 
497
*     SGE_LIST(JB_path_aliases)  
 
498
*        Path aliases list (PA_Type).
 
499
*
 
500
*     SGE_ULONG(JB_pty)
 
501
*        Interactive job should be started in a pty. 0=no, 1=yes, 2=use default.
 
502
*
 
503
*
 
504
*  FUNCTION
 
505
*     JB_Type elements make only sense in conjunction with JAT_Type
 
506
*     elements.  One element of each type is necessary to hold all
 
507
*     data for the execution of one job. One JB_Type element and
 
508
*     x JAT_Type elements are needed to execute an array job with
 
509
*     x tasks.
 
510
*
 
511
*              -----------       1:x        ------------
 
512
*              | JB_Type |<---------------->| JAT_Type |
 
513
*              -----------                  ------------
 
514
*
 
515
*     The relation between these two elements is defined in the
 
516
*     'JB_ja_tasks' sublist of a 'JB_Type' element. This list will
 
517
*     contain all belonging JAT_Type elements.
 
518
*
 
519
*     The 'JAT_Type' CULL element containes all attributes in which
 
520
*     one array task may differ from another array task of the
 
521
*     same array job. The 'JB_Type' element defines all attributes
 
522
*     wich are equivalent for all tasks of an array job.
 
523
*     A job and an array job with one task are equivalent
 
524
*     concerning their data structures. Both consist of one 'JB_Type'
 
525
*     and one 'JAT_Type' element.
 
526
*
 
527
*  SEE ALSO
 
528
*     gdi/job/--JAT_Type                             
 
529
******************************************************************************/
 
530
enum {
 
531
   JB_job_number = JB_LOWERBOUND,
 
532
   JB_job_name,     
 
533
   JB_version,
 
534
   JB_jid_request_list,
 
535
   JB_jid_predecessor_list,
 
536
   JB_jid_successor_list,
 
537
   JB_ja_ad_request_list,
 
538
   JB_ja_ad_predecessor_list,
 
539
   JB_ja_ad_successor_list,
 
540
   JB_session,
 
541
 
 
542
   JB_project,
 
543
   JB_department,
 
544
   
 
545
   JB_directive_prefix, 
 
546
   JB_exec_file,
 
547
   JB_script_file,
 
548
   JB_script_size,
 
549
   JB_script_ptr,
 
550
   
 
551
   JB_submission_time,
 
552
   JB_execution_time,
 
553
   JB_deadline,
 
554
 
 
555
   JB_owner,
 
556
   JB_uid,
 
557
   JB_group,
 
558
   JB_gid,
 
559
   JB_account,
 
560
 
 
561
   JB_cwd,                
 
562
   JB_notify,        
 
563
   JB_type,
 
564
   JB_reserve,
 
565
   JB_priority,         
 
566
   JB_jobshare,         
 
567
   JB_shell_list,
 
568
   JB_verify,      
 
569
   JB_env_list,
 
570
   JB_context,
 
571
   JB_job_args,
 
572
  
 
573
   JB_checkpoint_attr,
 
574
   JB_checkpoint_name,
 
575
   JB_checkpoint_object,
 
576
   JB_checkpoint_interval, 
 
577
   JB_restart,      
 
578
 
 
579
   JB_stdout_path_list,
 
580
   JB_stderr_path_list,
 
581
   JB_stdin_path_list,
 
582
   JB_merge_stderr, 
 
583
 
 
584
   JB_hard_resource_list,
 
585
   JB_soft_resource_list,
 
586
   JB_hard_queue_list,
 
587
   JB_soft_queue_list,
 
588
 
 
589
   JB_mail_options,     
 
590
   JB_mail_list,
 
591
 
 
592
   JB_pe,
 
593
   JB_pe_range,
 
594
   JB_master_hard_queue_list,
 
595
  
 
596
   JB_tgt,
 
597
   JB_cred,
 
598
 
 
599
   JB_ja_structure,
 
600
   JB_ja_n_h_ids,
 
601
   JB_ja_u_h_ids,
 
602
   JB_ja_s_h_ids,
 
603
   JB_ja_o_h_ids,
 
604
   JB_ja_a_h_ids,
 
605
   JB_ja_z_ids,
 
606
   JB_ja_template,
 
607
   JB_ja_tasks,
 
608
 
 
609
   JB_host,
 
610
   JB_category,
 
611
 
 
612
   JB_user_list, 
 
613
   JB_job_identifier_list,
 
614
   JB_verify_suitable_queues,
 
615
   JB_soft_wallclock_gmt,
 
616
   JB_hard_wallclock_gmt,
 
617
   JB_override_tickets,
 
618
   JB_qs_args,
 
619
   JB_path_aliases,
 
620
   JB_urg,
 
621
   JB_nurg,
 
622
   JB_nppri,
 
623
   JB_rrcontr,
 
624
   JB_dlcontr,
 
625
   JB_wtcontr,
 
626
   JB_ar,
 
627
   JB_pty
 
628
};
 
629
 
 
630
/* 
 
631
 * IF YOU CHANGE SOMETHING HERE THEN CHANGE ALSO THE ADOC COMMENT ABOVE 
 
632
 */
 
633
   
 
634
LISTDEF(JB_Type)
 
635
   JGDI_ROOT_OBJ(Job, SGE_JOB_LIST, ADD | MODIFY| DELETE | GET | GET_LIST)
 
636
   JGDI_EVENT_OBJ(ADD(sgeE_JOB_ADD) | MODIFY(sgeE_JOB_MOD) | DELETE(sgeE_JOB_DEL) | GET_LIST(sgeE_JOB_LIST))
 
637
   SGE_ULONG(JB_job_number, CULL_PRIMARY_KEY | CULL_HASH | CULL_SPOOL) 
 
638
   SGE_STRING(JB_job_name, CULL_DEFAULT | CULL_SPOOL)
 
639
   SGE_ULONG(JB_version, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
640
   SGE_LIST(JB_jid_request_list, JRE_Type, CULL_DEFAULT | CULL_SPOOL)
 
641
   SGE_LIST(JB_jid_predecessor_list, JRE_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO) 
 
642
   SGE_LIST(JB_jid_successor_list, JRE_Type, CULL_DEFAULT | CULL_JGDI_RO) 
 
643
   SGE_LIST(JB_ja_ad_request_list, JRE_Type, CULL_DEFAULT | CULL_SPOOL)
 
644
   SGE_LIST(JB_ja_ad_predecessor_list, JRE_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO) 
 
645
   SGE_LIST(JB_ja_ad_successor_list, JRE_Type, CULL_DEFAULT | CULL_JGDI_RO) 
 
646
   SGE_STRING(JB_session, CULL_DEFAULT | CULL_SPOOL) 
 
647
 
 
648
   SGE_STRING(JB_project, CULL_DEFAULT | CULL_SPOOL)             
 
649
   SGE_STRING(JB_department, CULL_DEFAULT | CULL_SPOOL)  
 
650
 
 
651
   SGE_STRING(JB_directive_prefix, CULL_DEFAULT | CULL_SPOOL)     
 
652
   SGE_STRING(JB_exec_file, CULL_DEFAULT | CULL_SPOOL)
 
653
   SGE_STRING(JB_script_file, CULL_DEFAULT | CULL_SPOOL)
 
654
   SGE_ULONG(JB_script_size, CULL_DEFAULT | CULL_SPOOL)
 
655
   SGE_STRING(JB_script_ptr, CULL_DEFAULT)
 
656
 
 
657
   SGE_ULONG(JB_submission_time, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
658
   SGE_ULONG(JB_execution_time, CULL_DEFAULT | CULL_SPOOL)  
 
659
   SGE_ULONG(JB_deadline, CULL_DEFAULT | CULL_SPOOL) 
 
660
 
 
661
   SGE_STRING(JB_owner, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
662
   SGE_ULONG(JB_uid, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
663
   SGE_STRING(JB_group, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
664
   SGE_ULONG(JB_gid, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)
 
665
   SGE_STRING(JB_account, CULL_DEFAULT | CULL_SPOOL)      
 
666
 
 
667
   SGE_STRING(JB_cwd, CULL_DEFAULT | CULL_SPOOL)     
 
668
   SGE_BOOL(JB_notify, CULL_DEFAULT | CULL_SPOOL)  
 
669
   SGE_ULONG(JB_type, CULL_DEFAULT | CULL_SPOOL)     
 
670
   SGE_BOOL(JB_reserve, CULL_DEFAULT | CULL_SPOOL)
 
671
   SGE_ULONG(JB_priority, CULL_DEFAULT | CULL_SPOOL)       
 
672
   SGE_ULONG(JB_jobshare, CULL_DEFAULT | CULL_SPOOL)       
 
673
   SGE_LIST(JB_shell_list, PN_Type, CULL_DEFAULT | CULL_SPOOL) 
 
674
   SGE_ULONG(JB_verify, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO) 
 
675
   SGE_MAP(JB_env_list, VA_Type, CULL_DEFAULT | CULL_SPOOL)  
 
676
   SGE_MAP(JB_context, VA_Type, CULL_DEFAULT | CULL_SPOOL)  
 
677
   SGE_LIST(JB_job_args, ST_Type, CULL_DEFAULT | CULL_SPOOL)  
 
678
 
 
679
   SGE_ULONG(JB_checkpoint_attr, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)     
 
680
   SGE_STRING(JB_checkpoint_name, CULL_DEFAULT | CULL_SPOOL)   
 
681
   SGE_OBJECT(JB_checkpoint_object, CK_Type, CULL_DEFAULT | CULL_JGDI_RO)
 
682
   SGE_ULONG(JB_checkpoint_interval, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_RO)   
 
683
   SGE_ULONG(JB_restart, CULL_DEFAULT | CULL_SPOOL)  
 
684
 
 
685
   SGE_LIST(JB_stdout_path_list, PN_Type, CULL_DEFAULT | CULL_SPOOL) 
 
686
   SGE_LIST(JB_stderr_path_list, PN_Type, CULL_DEFAULT | CULL_SPOOL) 
 
687
   SGE_LIST(JB_stdin_path_list, PN_Type, CULL_DEFAULT | CULL_SPOOL) 
 
688
   SGE_BOOL(JB_merge_stderr, CULL_DEFAULT | CULL_SPOOL)     
 
689
 
 
690
   SGE_LIST(JB_hard_resource_list, CE_Type, CULL_DEFAULT | CULL_SPOOL)
 
691
   SGE_LIST(JB_soft_resource_list, CE_Type, CULL_DEFAULT | CULL_SPOOL)
 
692
   SGE_LIST(JB_hard_queue_list, QR_Type, CULL_DEFAULT | CULL_SPOOL) 
 
693
   SGE_LIST(JB_soft_queue_list, QR_Type, CULL_DEFAULT | CULL_SPOOL) 
 
694
   
 
695
   SGE_ULONG(JB_mail_options, CULL_DEFAULT | CULL_SPOOL) 
 
696
   SGE_LIST(JB_mail_list, MR_Type, CULL_DEFAULT | CULL_SPOOL)  
 
697
 
 
698
   SGE_STRING(JB_pe, CULL_DEFAULT | CULL_SPOOL)              
 
699
   SGE_LIST(JB_pe_range, RN_Type, CULL_DEFAULT | CULL_SPOOL)     
 
700
   SGE_LIST(JB_master_hard_queue_list, QR_Type, CULL_DEFAULT | CULL_SPOOL)  
 
701
 
 
702
   SGE_STRING(JB_tgt, CULL_DEFAULT)      
 
703
   SGE_STRING(JB_cred, CULL_DEFAULT)   
 
704
 
 
705
   SGE_LIST(JB_ja_structure, RN_Type, CULL_DEFAULT | CULL_SPOOL)  
 
706
   SGE_LIST(JB_ja_n_h_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL) 
 
707
   SGE_LIST(JB_ja_u_h_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL)   
 
708
   SGE_LIST(JB_ja_s_h_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL)    
 
709
   SGE_LIST(JB_ja_o_h_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL)   
 
710
   SGE_LIST(JB_ja_a_h_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL)   
 
711
   SGE_LIST(JB_ja_z_ids, RN_Type, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_HIDDEN)   
 
712
   SGE_LIST(JB_ja_template, JAT_Type, CULL_DEFAULT | CULL_SPOOL)  
 
713
   SGE_LIST(JB_ja_tasks, JAT_Type, CULL_DEFAULT | CULL_SPOOL)  
 
714
 
 
715
   SGE_HOST(JB_host, CULL_DEFAULT | CULL_JGDI_RO)       
 
716
   SGE_REF(JB_category, CT_Type, CULL_DEFAULT)    
 
717
 
 
718
   SGE_LIST(JB_user_list, ST_Type, CULL_DEFAULT)  
 
719
   SGE_LIST(JB_job_identifier_list, ID_Type, CULL_DEFAULT | CULL_JGDI_HIDDEN)    
 
720
   SGE_ULONG(JB_verify_suitable_queues, CULL_DEFAULT)
 
721
   SGE_ULONG(JB_soft_wallclock_gmt, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_HIDDEN)
 
722
   SGE_ULONG(JB_hard_wallclock_gmt, CULL_DEFAULT | CULL_SPOOL | CULL_JGDI_HIDDEN)
 
723
   SGE_ULONG(JB_override_tickets, CULL_DEFAULT | CULL_SPOOL)   
 
724
   SGE_LIST(JB_qs_args, ST_Type, CULL_DEFAULT | CULL_JGDI_HIDDEN)   
 
725
   SGE_LIST(JB_path_aliases, PA_Type, CULL_DEFAULT | CULL_SPOOL)
 
726
   SGE_DOUBLE(JB_urg, CULL_DEFAULT)         
 
727
   SGE_DOUBLE(JB_nurg, CULL_DEFAULT | CULL_JGDI_RO)         
 
728
   SGE_DOUBLE(JB_nppri, CULL_DEFAULT | CULL_JGDI_RO)         
 
729
   SGE_DOUBLE(JB_rrcontr, CULL_DEFAULT | CULL_JGDI_RO)         
 
730
   SGE_DOUBLE(JB_dlcontr, CULL_DEFAULT | CULL_JGDI_RO)         
 
731
   SGE_DOUBLE(JB_wtcontr, CULL_DEFAULT | CULL_JGDI_RO)         
 
732
   SGE_ULONG(JB_ar, CULL_DEFAULT | CULL_SPOOL)     
 
733
   SGE_ULONG(JB_pty, CULL_DEFAULT | CULL_SPOOL)     
 
734
 
 
735
   /* 
 
736
    * IF YOU ADD SOMETHING HERE THEN CHANGE ALSO THE ADOC COMMENT ABOVE 
 
737
    */
 
738
LISTEND
 
739
 
 
740
NAMEDEF(JBN)
 
741
   NAME("JB_job_number")
 
742
   NAME("JB_job_name")
 
743
   NAME("JB_version")
 
744
   NAME("JB_jid_request_list")
 
745
   NAME("JB_jid_predecessor_list")
 
746
   NAME("JB_jid_successor_list")
 
747
   NAME("JB_ja_ad_request_list")
 
748
   NAME("JB_ja_ad_predecessor_list")
 
749
   NAME("JB_ja_ad_successor_list")
 
750
   NAME("JB_session")
 
751
 
 
752
   NAME("JB_project")
 
753
   NAME("JB_department")
 
754
   
 
755
   NAME("JB_directive_prefix")
 
756
   NAME("JB_exec_file")
 
757
   NAME("JB_script_file")
 
758
   NAME("JB_script_size")
 
759
   NAME("JB_script_ptr")
 
760
   
 
761
   NAME("JB_submission_time")
 
762
   NAME("JB_execution_time")
 
763
   NAME("JB_deadline")
 
764
   
 
765
   NAME("JB_owner")
 
766
   NAME("JB_uid")
 
767
   NAME("JB_group")
 
768
   NAME("JB_gid")
 
769
   NAME("JB_account")
 
770
 
 
771
   NAME("JB_cwd")
 
772
   NAME("JB_notify")
 
773
   NAME("JB_type")
 
774
   NAME("JB_reserve")
 
775
   NAME("JB_priority")
 
776
   NAME("JB_jobshare")
 
777
   NAME("JB_shell_list")
 
778
   NAME("JB_verify")
 
779
   NAME("JB_env_list")
 
780
   NAME("JB_context")
 
781
   NAME("JB_job_args")
 
782
 
 
783
   NAME("JB_checkpoint_attr")
 
784
   NAME("JB_checkpoint_name")
 
785
   NAME("JB_checkpoint_object")
 
786
   NAME("JB_checkpoint_interval")
 
787
   NAME("JB_restart")
 
788
 
 
789
   NAME("JB_stdout_path_list")
 
790
   NAME("JB_stderr_path_list")
 
791
   NAME("JB_stdin_path_list")
 
792
   NAME("JB_merge_stderr")
 
793
 
 
794
   NAME("JB_hard_resource_list")
 
795
   NAME("JB_soft_resource_list")
 
796
   NAME("JB_hard_queue_list")
 
797
   NAME("JB_soft_queue_list")
 
798
   
 
799
   NAME("JB_mail_options")
 
800
   NAME("JB_mail_list")
 
801
 
 
802
   NAME("JB_pe")
 
803
   NAME("JB_pe_range")
 
804
   NAME("JB_master_hard_queue_list")
 
805
   
 
806
   NAME("JB_tgt")
 
807
   NAME("JB_cred")
 
808
 
 
809
   NAME("JB_ja_structure")
 
810
   NAME("JB_ja_n_h_ids")
 
811
   NAME("JB_ja_u_h_ids")
 
812
   NAME("JB_ja_s_h_ids")
 
813
   NAME("JB_ja_o_h_ids")
 
814
   NAME("JB_ja_a_h_ids")
 
815
   NAME("JB_ja_z_ids")
 
816
   NAME("JB_ja_template")
 
817
   NAME("JB_ja_tasks")
 
818
 
 
819
   NAME("JB_host")
 
820
   NAME("JB_category")
 
821
   
 
822
   NAME("JB_user_list")
 
823
   NAME("JB_job_identifier_list")
 
824
   NAME("JB_verify_suitable_queues")
 
825
   NAME("JB_soft_wallclock_gmt")
 
826
   NAME("JB_hard_wallclock_gmt")
 
827
   NAME("JB_override_tickets")
 
828
   NAME("JB_qs_args")
 
829
   NAME("JB_path_aliases")
 
830
   NAME("JB_urg")
 
831
   NAME("JB_nurg")
 
832
   NAME("JB_nppri")
 
833
   NAME("JB_rrcontr")
 
834
   NAME("JB_dlcontr")
 
835
   NAME("JB_wtcontr")
 
836
   NAME("JB_ar")
 
837
   NAME("JB_pty")
 
838
NAMEEND
 
839
 
 
840
 
 
841
#define JBS sizeof(JBN)/sizeof(char*)
 
842
 
 
843
/* -------- path name list ----------------- */
 
844
/* [host:]path[,[host:]path...]              */
 
845
   
 
846
enum {
 
847
   PN_path = PN_LOWERBOUND,
 
848
   PN_host,
 
849
   PN_file_host,
 
850
   PN_file_staging
 
851
};
 
852
 
 
853
LISTDEF(PN_Type)
 
854
   JGDI_OBJ(PathName)
 
855
   SGE_STRING(PN_path, CULL_PRIMARY_KEY | CULL_DEFAULT | CULL_SUBLIST)
 
856
   SGE_HOST(PN_host, CULL_DEFAULT )                    /* CR - hostname change */
 
857
   SGE_HOST(PN_file_host, CULL_DEFAULT )
 
858
   SGE_BOOL(PN_file_staging, CULL_DEFAULT )
 
859
LISTEND
 
860
 
 
861
NAMEDEF(PNN)
 
862
   NAME("PN_path")
 
863
   NAME("PN_host")
 
864
   NAME("PN_file_host")
 
865
   NAME("PN_file_staging")
 
866
NAMEEND
 
867
 
 
868
#define PNS sizeof(PNN)/sizeof(char*)
 
869
 
 
870
/* ---------- account list ----------------- */
 
871
/*   account[@cell][,account[@cell]...]      */
 
872
 
 
873
enum {
 
874
   AT_account = AT_LOWERBOUND,
 
875
   AT_cell
 
876
};
 
877
 
 
878
LISTDEF(AT_Type)
 
879
   SGE_STRING(AT_account, CULL_DEFAULT)
 
880
   SGE_STRING(AT_cell, CULL_DEFAULT )
 
881
LISTEND
 
882
 
 
883
NAMEDEF(ATN)
 
884
   NAME("AT_account")
 
885
   NAME("AT_cell")
 
886
NAMEEND
 
887
 
 
888
#define ATS sizeof(ATN)/sizeof(char*)
 
889
 
 
890
/* ---------------------------------------- 
 
891
 
 
892
   granted destination identifiers 
 
893
 
 
894
*/
 
895
 
 
896
enum {
 
897
   JG_qname = JG_LOWERBOUND,
 
898
   JG_qversion,
 
899
   JG_qhostname,
 
900
   JG_slots,
 
901
   JG_queue,
 
902
   JG_tag_slave_job,
 
903
   JG_task_id_range,
 
904
   JG_ticket,
 
905
   JG_oticket,
 
906
   JG_fticket,
 
907
   JG_sticket,
 
908
   JG_jcoticket,
 
909
   JG_jcfticket,
 
910
   JG_processors
 
911
};
 
912
 
 
913
LISTDEF(JG_Type)
 
914
   SGE_STRING(JG_qname, CULL_PRIMARY_KEY | CULL_HASH | CULL_UNIQUE | CULL_DEFAULT | CULL_SUBLIST)    /* the queue instance name                           */
 
915
   SGE_ULONG(JG_qversion, CULL_DEFAULT | CULL_JGDI_HIDDEN)  /* it's version                               */
 
916
   SGE_HOST(JG_qhostname, CULL_DEFAULT | CULL_HASH | CULL_SUBLIST)/* redundant qualified host name for caching  */  /* CR - hostname change */
 
917
   SGE_ULONG(JG_slots, CULL_DEFAULT | CULL_SUBLIST)     /* from orders list                           */
 
918
   SGE_OBJECT(JG_queue, QU_Type, CULL_DEFAULT | CULL_JGDI_HIDDEN | CULL_JGDI_RO) /* QU_Type - complete queue only in execd */
 
919
   SGE_ULONG(JG_tag_slave_job, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* whether slave execds job has arrived in 
 
920
                                 * case of pe's with sge controlled slaves */
 
921
   SGE_ULONG(JG_task_id_range, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* unused - please recycle */
 
922
   SGE_DOUBLE(JG_ticket, CULL_DEFAULT | CULL_JGDI_HIDDEN)    /* SGEEE tickets assigned to slots              */
 
923
   SGE_DOUBLE(JG_oticket, CULL_DEFAULT | CULL_JGDI_HIDDEN)   /* SGEEE override tickets assigned to slots     */
 
924
   SGE_DOUBLE(JG_fticket, CULL_DEFAULT | CULL_JGDI_HIDDEN)   /* SGEEE functional tickets assigned to slots   */
 
925
   SGE_DOUBLE(JG_sticket, CULL_DEFAULT | CULL_JGDI_HIDDEN)   /* SGEEE sharetree tickets assigned to slots    */
 
926
   SGE_DOUBLE(JG_jcoticket, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* SGEEE job class override tickets             */
 
927
   SGE_DOUBLE(JG_jcfticket, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* SGEEE job class functional tickets           */
 
928
   SGE_STRING(JG_processors, CULL_DEFAULT | CULL_JGDI_HIDDEN) /* processor sets */
 
929
LISTEND
 
930
 
 
931
NAMEDEF( JGN )
 
932
   NAME( "JG_qname" )
 
933
   NAME( "JG_qversion" )
 
934
   NAME( "JG_qhostname" )
 
935
   NAME( "JG_slots" )
 
936
   NAME( "JG_queue" )
 
937
   NAME( "JG_tag_slave_job" )
 
938
   NAME( "JG_task_id_range" )
 
939
   NAME( "JG_ticket" )
 
940
   NAME( "JG_oticket" )
 
941
   NAME( "JG_fticket" )
 
942
   NAME( "JG_sticket" )
 
943
   NAME( "JG_jcoticket" )
 
944
   NAME( "JG_jcfticket" )
 
945
   NAME( "JG_processors" )
 
946
NAMEEND
 
947
 
 
948
#define JGS sizeof(JGN)/sizeof(char*)
 
949
 
 
950
/* *INDENT-ON* */
 
951
 
 
952
#ifdef  __cplusplus
 
953
}
 
954
#endif
 
955
 
 
956
#endif /* __SGE_JOBL_H */