4
<!-- Manpage converted by man2html 3.0.1 -->
6
drmaa_synchronize, drmaa_wait, drmaa_wifexited,
7
drmaa_wexitstatus, drmaa_wifsignaled, drmaa_wtermsig,
8
drmaa_wcoredump, drmaa_wifaborted - Waiting for jobs to fin-
14
int drmaa_synchronize(
15
const char *job_ids[],
18
char *error_diagnosis,
25
size_t job_id_out_len,
28
drmaa_attr_values_t **rusage,
29
char *error_diagnosis,
30
size_t error_diagnois_len
36
char *error_diagnosis,
43
char *error_diagnosis,
47
int drmaa_wifsignaled(
50
char *error_diagnosis,
57
char *error_diagnosis,
61
int drmaa_wexitstatus(
64
char *error_diagnosis,
72
char *error_diagnosis,
77
The drmaa_synchronize() function blocks the calling thread
78
until all jobs specified in <I>job</I>_<I>ids</I> have failed or finished
79
execution. If <I>job</I>_<I>ids</I> contains 'DRMAA_JOB_IDS_SESSION_ALL',
80
then this function waits for all jobs submitted during this
81
DRMAA session. The <I>job</I>_<I>ids</I> pointer array must be <I>NULL</I> ter-
84
To prevent blocking indefinitely in this call, the caller
85
may use the <I>timeout</I>, specifying how many seconds to wait for
86
this call to complete before timing out. The special value
87
DRMAA_TIMEOUT_WAIT_FOREVER can be used to wait indefinitely
88
for a result. The special value DRMAA_TIMEOUT_NO_WAIT can be
89
used to return immediately. If the call exits before <I>timeout</I>
90
seconds, all the specified jobs have completed or the cal-
91
ling thread received an interrupt. In both cases, the
92
return code is DRMAA_ERRNO_EXIT_TIMEOUT.
94
The <I>dispose</I> parameter specifies how to treat reaping infor-
95
mation. If '0' is passed to this parameter, job finish
96
information will still be available when <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> is
97
used. If '1' is passed, <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> will be unable to
98
access this job's finish information.
101
The drmaa_wait() function blocks the calling thread until a
102
job fails or finishes execution. This routine is modeled on
103
the <B><A HREF="../htmlman3/wait4.html">wait4(3)</A></B> routine. If the special string
104
'DRMAA_JOB_IDS_SESSION_ANY' is passed as <I>job</I>_<I>id</I>, this rou-
105
tine will wait for any job from the session. Otherwise the
106
<I>job</I>_<I>id</I> must be the job identifier of a job or array job task
107
that was submitted during the session.
109
To prevent blocking indefinitely in this call, the caller
110
may use <I>timeout</I>, specifying how many seconds to wait for
111
this call to complete before timing out. The special value
112
DRMAA_TIMEOUT_WAIT_FOREVER can be to wait indefinitely for a
113
result. The special value DRMAA_TIMEOUT_NO_WAIT can be used
114
to return immediately. If the call exits before <I>timeout</I>
115
seconds have passed, all the specified jobs have completed
116
or the calling thread received an interrupt. In both cases,
117
the return code is DRMAA_ERRNO_EXIT_TIMEOUT.
119
The routine reaps jobs on a successful call, so any subse-
120
quent calls to <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> will fail returning a
121
DRMAA_ERRNO_INVALID_JOB error, meaning that the job has
122
already been reaped. This error is the same as if the job
123
were unknown. Returning due to an elapsed timeout or an
124
interrupt does not cause the job information to be reaped.
125
This means that, in this case, it is possible to issue
126
<B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> multiple times for the same <I>job</I>_<I>id</I>.
128
If <I>job</I>_<I>id</I>_<I>out</I> is not a null pointer, then on return from a
129
successful <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> call, up to <I>job</I>_<I>id</I>_<I>out</I>_<I>len</I> charac-
130
ters from the job id of the failed or finished job are
133
If <I>stat</I> is not a null pointer, then on return from a suc-
134
cessful <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> call, the status of the job is stored
135
in the integer pointed to by <I>stat</I>. <I>stat</I> indicates whether
136
job failed or finished and other information. The informa-
137
tion encoded in the integer value can be accessed via
138
<B><A HREF="../htmlman3/drmaa_wifaborted.html">drmaa_wifaborted(3)</A></B> <B><A HREF="../htmlman3/drmaa_wifexited.html">drmaa_wifexited(3)</A></B> <B><A HREF="../htmlman3/drmaa_wifsignaled.html">drmaa_wifsignaled(3)</A></B>
139
<B><A HREF="../htmlman3/drmaa_wcoredump.html">drmaa_wcoredump(3)</A></B> <B><A HREF="../htmlman3/drmaa_wexitstatus.html">drmaa_wexitstatus(3)</A></B> <B><A HREF="../htmlman3/drmaa_wtermsig.html">drmaa_wtermsig(3)</A></B>.
141
If <I>rusage</I> is not a null pointer, then on return from a suc-
142
cessful <B><A HREF="../htmlman3/drmaa_wait.html">drmaa_wait(3)</A></B> call, a summary of the resources used
143
by the terminated job is returned in form of a DRMAA values
144
string vector. The entries in the DRMAA values string vec-
145
tor can be extracted using <B><A HREF="../htmlman3/drmaa_get_next_attr_value.html">drmaa_get_next_attr_value(3)</A></B>.
146
Each string returned by <B><A HREF="../htmlman3/drmaa_get_next_attr_value.html">drmaa_get_next_attr_value(3)</A></B> will be
147
of the format <name>=<value>, where <name> and <value>
148
specify name and amount of resources consumed by the job,
149
respectively. See <B><A HREF="../htmlman5/accounting.html">accounting(5)</A></B> for an explanation of the
150
resource information.
153
The drmaa_wifaborted() function evaluates into the integer
154
pointed to by <I>aborted</I> a non-zero value if <I>stat</I> was returned
155
from a job that ended before entering the running state.
158
The drmaa_wifexited() function evaluates into the integer
159
pointed to by <I>exited</I> a non-zero value if <I>stat</I> was returned
160
from a job that terminated normally. A zero value can also
161
indicate that although the job has terminated normally, an
162
exit status is not available, or that it is not known
163
whether the job terminated normally. In both cases
164
<B><A HREF="../htmlman3/drmaa_wexitstatus.html">drmaa_wexitstatus(3)</A></B> will not provide exit status informa-
165
tion. A non-zero value returned in <I>exited</I> indicates more
166
detailed diagnosis can be provided by means of
167
<B><A HREF="../htmlman3/drmaa_wifsignaled.html">drmaa_wifsignaled(3)</A></B>, <B><A HREF="../htmlman3/drmaa_wtermsig.html">drmaa_wtermsig(3)</A></B> and
168
<B><A HREF="../htmlman3/drmaa_wcoredump.html">drmaa_wcoredump(3)</A></B>.
171
The drmaa_wifsignaled() function evaluates into the integer
172
pointed to by <I>signaled</I> a non-zero value if <I>stat</I> was returned
173
for a job that terminated due to the receipt of a signal. A
174
zero value can also indicate that although the job has ter-
175
minated due to the receipt of a signal, the signal is not
176
available, or it is not known whether the job terminated due
177
to the receipt of a signal. In both cases <B><A HREF="../htmlman3/drmaa_wtermsig.html">drmaa_wtermsig(3)</A></B>
178
will not provide signal information. A non-zero value
179
returned in <I>signaled</I> indicates signal information can be
180
retrieved by means of <B><A HREF="../htmlman3/drmaa_wtermsig.html">drmaa_wtermsig(3)</A></B>.
183
If <B><A HREF="../htmlman3/drmaa_wifsignaled.html">drmaa_wifsignaled(3)</A></B> returned a non-zero value in the
184
<I>signaled</I> parameter, the drmaa_wcoredump() function evaluates
185
into the integer pointed to by <I>core</I>_<I>dumped</I> a non-zero value
186
if a core image of the terminated job was created.
189
If <B><A HREF="../htmlman3/drmaa_wifexited.html">drmaa_wifexited(3)</A></B> returned a non-zero value in the
190
<I>exited</I> parameter, the drmaa_wexitstatus() function evaluates
191
into the integer pointed to by <I>exit</I>_<I>code</I> the exit code that
192
the job passed to <B><A HREF="../htmlman2/exit.html">exit(2)</A></B> or the value that the child pro-
193
cess returned from main.
196
If <B><A HREF="../htmlman3/drmaa_wifsignaled.html">drmaa_wifsignaled(3)</A></B> returned a non-zero value in the
197
<I>signaled</I> parameter, the drmaa_wtermsig() function evaluates
198
into <I>signal</I> up to <I>signal</I>_<I>len</I> characters of a string
199
representation of the signal that caused the termination of
200
the job. For signals declared by POSIX.1, the symbolic names
201
are returned (e.g., SIGABRT, SIGALRM). For signals not
202
declared by POSIX, any other string may be returned.
204
ENVIRONMENTAL VARIABLES
205
SGE_ROOT Specifies the location of the Grid Engine
206
standard configuration files.
208
SGE_CELL If set, specifies the default Grid Engine
209
cell to be used. To address a Grid Engine
210
cell Grid Engine uses (in the order of pre-
213
The name of the cell specified in the
214
environment variable SGE_CELL, if it is
217
The name of the default cell, i.e.
222
If set, specifies that debug information
223
should be written to stderr. In addition the
224
level of detail in which debug information is
225
generated is defined.
228
If set, specifies the tcp port on which
229
<B><A HREF="../htmlman8/sge_qmaster.html">sge_qmaster(8)</A></B> is expected to listen for com-
230
munication requests. Most installations will
231
use a services map entry instead to define
235
Upon successful completion, drmaa_run_job(),
236
drmaa_run_bulk_jobs(), and drmaa_get_next_job_id() return
237
DRMAA_ERRNO_SUCCESS. Other values indicate an error. Up to
238
<I>error</I>_<I>diag</I>_<I>len</I> characters of error related diagnosis infor-
239
mation is then provided in the buffer <I>error</I>_<I>diagnosis</I>.
242
The drmaa_synchronize(), drmaa_wait(), drmaa_wifexited(),
243
drmaa_wexitstatus(), drmaa_wifsignaled(), drmaa_wtermsig(),
244
drmaa_wcoredump(), and drmaa_wifaborted() will fail if:
246
DRMAA_ERRNO_INTERNAL_ERROR
247
Unexpected or internal DRMAA error, like system call
250
DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
251
Could not contact DRM system for this request.
253
DRMAA_ERRNO_AUTH_FAILURE
254
The specified request is not processed successfully due to
255
authorization failure.
257
DRMAA_ERRNO_INVALID_ARGUMENT
258
The input value for an argument is invalid.
260
DRMAA_ERRNO_NO_ACTIVE_SESSION
261
Failed because there is no active session.
263
DRMAA_ERRNO_NO_MEMORY
264
Failed allocating memory.
265
The drmaa_synchronize() and drmaa_wait() functions will fail
268
DRMAA_ERRNO_EXIT_TIMEOUT
271
DRMAA_ERRNO_INVALID_JOB
272
The job specified by the does not exist.
274
The drmaa_wait() will fail if:
276
DRMAA_ERRNO_NO_RUSAGE
277
This error code is returned by drmaa_wait() when a job has
278
finished but no rusage and stat data could be provided.
281
<B><A HREF="../htmlman3/drmaa_submit.html">drmaa_submit(3)</A></B>.
320
Man(1) output converted with
321
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>