1drmaa_jobcontrol(3) Grid Engine DRMAA drmaa_jobcontrol(3)
2
3
4
6 drmaa_job_ps, drmaa_control, - Monitor and control jobs
7
9 #include "drmaa.h"
10
11 int drmaa_job_ps(
12 const char *job_id,
13 int *remote_ps,
14 char *error_diagnosis,
15 size_t error_diag_len
16 );
17
18 int drmaa_control(
19 const char *jobid,
20 int action,
21 char *error_diagnosis,
22 size_t error_diag_len
23 );
24
26 The drmaa_job_ps() function returns the status of the Grid Engine job
27 job_id into the integer pointed to by remote_ps. Possible return values
28 are
29
30 DRMAA_PS_UNDETERMINED job status cannot be determined
31 DRMAA_PS_QUEUED_ACTIVE job is queued and active
32 DRMAA_PS_SYSTEM_ON_HOLD job is queued and in system hold
33 DRMAA_PS_USER_ON_HOLD job is queued and in user hold
34 DRMAA_PS_USER_SYSTEM_ON_HOLD job is queued and in user and system hold
35 DRMAA_PS_RUNNING job is running
36 DRMAA_PS_SYSTEM_SUSPENDED job is system suspended
37 DRMAA_PS_USER_SUSPENDED job is user suspended
38 DRMAA_PS_DONE job finished normally
39 DRMAA_PS_FAILED job finished, but failed
40
41 Jobs' user hold and user suspend states can be controlled via
42 drmaa_control(3). For affecting system hold and system suspend states
43 the appropriate Grid Engine interfaces must be used.
44
45 drmaa_control()
46 The drmaa_control() function applies control operations on Grid Engine
47 jobs. jobid may contain either an Grid Engine jobid or
48 `DRMAA_JOB_IDS_SESSION_ALL' to refer to all jobs submitted during the
49 DRMAA session opened using drmaa_init(3). Legal values for action and
50 their meanings are:
51
52 DRMAA_CONTROL_SUSPEND suspend the job
53 DRMAA_CONTROL_RESUME resume the job,
54 DRMAA_CONTROL_HOLD put the job on-hold
55 DRMAA_CONTROL_RELEASE release the hold on the job
56 DRMAA_CONTROL_TERMINATE kill the job
57
58 The DRMAA suspend/resume operations are equivalent to the use of `-sj
59 <jobid>' and `-usj <jobid>' options with Grid Engine qmod(1). The
60 DRMAA hold/release operations are equivalent to the use of Grid Engine
61 qhold(1) and qrls(1). The DRMAA terminate operation is equivalent to
62 the use of Grid Engine qdel(1). Only user hold and user suspend can be
63 controlled via drmaa_control(3). For affecting system hold and system
64 suspend states the appropriate Grid Engine interfaces must be used.
65
67 GE_ROOT Specifies the location of the Grid Engine standard con‐
68 figuration files.
69
70 GE_CELL If set, specifies the default Grid Engine cell to be
71 used. To address a Grid Engine cell Grid Engine uses (in
72 the order of precedence):
73
74 The name of the cell specified in the environment
75 variable GE_CELL, if it is set.
76
77 The name of the default cell, i.e. default.
78
79
80 GE_DEBUG_LEVEL If set, specifies that debug information should be writ‐
81 ten to stderr. In addition the level of detail in which
82 debug information is generated is defined.
83
84 GE_QMASTER_PORT
85 If set, specifies the tcp port on which ge_qmaster(8) is
86 expected to listen for communication requests. Most
87 installations will use a services map entry instead to
88 define that port.
89
91 Upon successful completion, drmaa_job_ps(), and drmaa_control() return
92 DRMAA_ERRNO_SUCCESS. Other values indicate an error. Up to
93 error_diag_len characters of error related diagnosis information is
94 then provided in the buffer, error_diagnosis.
95
97 The drmaa_job_ps(), and drmaa_control() will fail if:
98
99 DRMAA_ERRNO_INTERNAL_ERROR
100 Unexpected or internal DRMAA error, like system call failure, etc.
101
102 DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
103 Could not contact DRM system for this request.
104
105 DRMAA_ERRNO_AUTH_FAILURE
106 The specified request was not processed successfully due to authoriza‐
107 tion failure.
108
109 DRMAA_ERRNO_INVALID_ARGUMENT
110 The input value for an argument is invalid.
111
112 DRMAA_ERRNO_NO_ACTIVE_SESSION
113 Failed because there is no active session.
114
115 DRMAA_ERRNO_NO_MEMORY
116 Failed allocating memory.
117
118 DRMAA_ERRNO_INVALID_JOB
119 The specified job does not exist.
120
121 The drmaa_control() will fail if:
122
123 DRMAA_ERRNO_RESUME_INCONSISTENT_STATE
124 The job is not suspended. The resume request will not be processed.
125
126 DRMAA_ERRNO_SUSPEND_INCONSISTENT_STATE
127 The job is not running and thus cannot be suspended.
128
129 DRMAA_ERRNO_HOLD_INCONSISTENT_STATE
130 The job cannot be moved to a hold state.
131
132 DRMAA_ERRNO_RELEASE_INCONSISTENT_STATE
133 The job is not in a hold state.
134
136 drmaa_submit(3)and drmaa_wait(3).
137
138
139
140GE 6.2u5 $Date: 2009/06/17 09:50:13 $ drmaa_jobcontrol(3)