4
<!-- Manpage converted by man2html 3.0.1 -->
6
drmaa_get_attribute_names, drmaa_get_vector_attribute_names,
7
drmaa_get_next_attr_name, drmaa_get_num_attr_names,
8
drmaa_release_attr_names - DRMAA job template attributes
13
int drmaa_get_attribute_names(
14
drmaa_attr_names_t **values,
15
char *error_diagnosis,
19
int drmaa_get_vector_attribute_names(
20
drmaa_attr_names_t **values,
21
char *error_diagnosis,
25
int drmaa_get_next_attr_name(
26
drmaa_attr_names_t* values,
31
int drmaa_get_next_attr_value(
32
drmaa_attr_values_t* values,
37
int drmaa_get_num_attr_names(
38
drmaa_attr_names_t* values,
42
void drmaa_release_attr_names(
43
drmaa_attr_names_t* values
47
The drmaa_get_attribute_names() function returns into <I>values</I>
48
a DRMAA names string vector containing the set of supported
49
non-vector DRMAA job template attribute names. The set
50
includes supported DRMAA reserved attribute names and Grid
51
Engine native attribute names. The names in the names string
52
vector can be extracted using <B><A HREF="../htmlman3/drmaa_get_next_attr_name.html">drmaa_get_next_attr_name(3)</A></B>.
53
The number of names in the names string vector can be deter-
54
mined using <B><A HREF="../htmlman3/drmaa_get_num_attr_names.html">drmaa_get_num_attr_names(3)</A></B>. Note that this
55
function is only available in the 1.0 implementation. The
56
caller is responsible for releasing the names string vector
57
returned into <I>values</I> using <B><A HREF="../htmlman3/drmaa_release_attr_names.html">drmaa_release_attr_names(3)</A></B>. Use
58
<B><A HREF="../htmlman3/drmaa_set_attribute.html">drmaa_set_attribute(3)</A></B> and <B><A HREF="../htmlman3/drmaa_get_attribute.html">drmaa_get_attribute(3)</A></B> for set-
59
ting and inspecting non-vector attributes.
61
drmaa_get_vector_attribute_names()
62
The drmaa_get_vector_attribute_names() function returns into
63
<I>values</I> a DRMAA names string vector containing the set of
64
supported vector DRMAA job template attribute names. The set
65
includes supported DRMAA reserved attribute names and Grid
66
Engine native attribute names. The names in the names string
67
vector can be extracted using <B><A HREF="../htmlman3/drmaa_get_next_attr_name.html">drmaa_get_next_attr_name(3)</A></B>.
68
The caller is responsible for releasing the names string
69
vector returned into <I>values</I> using
70
<B><A HREF="../htmlman3/drmaa_release_attr_names.html">drmaa_release_attr_names(3)</A></B>. Use
71
<B><A HREF="../htmlman3/drmaa_set_vector_attribute.html">drmaa_set_vector_attribute(3)</A></B> and
72
<B><A HREF="../htmlman3/drmaa_get_vector_attribute.html">drmaa_get_vector_attribute(3)</A></B> for setting and inspecting
75
drmaa_get_next_attr_name()
76
Each time drmaa_get_next_attr_name() is called it returns
77
into the buffer, <I>value</I>, up to <I>value</I>_<I>len</I> bytes of the next
78
entry stored in the DRMAA names string vector, <I>values</I>. With
79
the DRMAA 1.0 library, once the names list has been
80
exhausted, DRMAA_ERRNO_NO_MORE_ELEMENTS is returned. With
81
the DRMAA 0.95 library, once the names list has been
82
exhausted, DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE is returned.
83
In order to use the DRMAA 0.95 library, you must define the
84
DRMAA_95 macro, either in your application directly or
85
through a compiler flag, such as -DDRMAA_95.
87
drmaa_get_num_attr_names()
88
The drmaa_get_num_attr_names() returns into <I>size</I> the number
89
of entries in the DRMAA names string vector. This function
90
is only available in the 1.0 implementation.
92
drmaa_release_attr_names()
93
The drmaa_release_attr_names() function releases all
94
resources associated with the DRMAA names string vector,
98
DRMAA job template attributes can be set from six different
99
sources. In order of precedence, from lowest to highest,
100
these are: options set by DRMAA automatically by default,
101
options set in the <B><A HREF="../htmlman5/sge_request.html">sge_request(5)</A></B> file(s), options set in
102
the script file, options set by the drmaa_job_category
103
attribute, options set by the drmaa_native_specification
104
attribute, and options set through other DRMAA attributes.
106
By default DRMAA sets four options for all jobs. These are
107
"-p 0", "-b yes", "-shell no", and "-w e". This means that
108
by default, all jobs will have priority 0, all jobs will be
109
treated as binary, i.e. no scripts args will be parsed, all
110
jobs will be executed without a wrapper shell, and jobs
111
which are unschedulable will cause a submit error.
113
The <B><A HREF="../htmlman5/sge_request.html">sge_request(5)</A></B> file, found in the
114
$SGE_ROOT/$SGE_CELL/common directory, may contain options to
115
be applied to all jobs. The .sge_request file found in the
116
user's home directory or the current working directory may
117
also contain options to be applied to certain jobs. See
118
<B><A HREF="../htmlman5/sge_request.html">sge_request(5)</A></B> for more information.
120
If the <B><A HREF="../htmlman5/sge_request.html">sge_request(5)</A></B> file contains "-b no" or if the
121
drmaa_native_specification attribute is set and contains "-b
122
no", the script file will be parsed for in-line arguments.
123
Otherwise, no scripts args will be interpreted. See <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B>
124
for more information.
126
If the drmaa_job_category attribute is set, and the category
127
it points to exists in one of the <B><A HREF="../htmlman5/qtask.html">qtask(5)</A></B> files, the
128
options associated with that category will be applied to the
129
job template. See <B><A HREF="../htmlman5/qtask.html">qtask(5)</A></B> and the drmaa_job_category
130
attribute below for more information.
132
If the drmaa_native_specification attribute is set, all
133
options contained therein will be applied to the job tem-
134
plate. See the drmaa_native_specification below for more
137
Other DRMAA attributes will override any previous settings.
138
For example, if the sge_request file contains "-j y", but
139
the drmaa_join_files attribute is set to "n", the ultimate
140
result is that the input and output files will remain
143
For various reasons, some options are silently ignored by
144
DRMAA. Setting any of these options will have no effect.
145
The ignored options are: -cwd, -help, -t, -verify, -w w, and
146
-w v. The -cwd option can be reenabled by setting the
147
environment variable, SGE_DRMAA_ALLOW_CWD. However, the
148
-cwd option is not thread safe and should not be used in a
149
multi-threaded context.
151
Attribute Correlations
152
The following DRMAA attributes correspond to the following
153
<B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> options:
155
DRMAA Attribute qsub Option
156
-------------------------------------------------------
157
drmaa_remote_command script file
158
drmaa_v_argv script file args
159
drmaa_js_state = "drmaa_hold" -h
162
drmaa_job_category (qtsch qtask)*
163
drmaa_native_specification ALL*
165
drmaa_block_email = "1" -m n
172
drmaa_transfer_files (prolog and epilog)*
174
* See the individual attribute description below
176
DRMAA JOB TEMPLATE ATTRIBUTES
177
drmaa_remote_command - "<remote_command>"
178
Specifies the remote command to execute. The <I>remote</I>_<I>command</I>
179
must be the path of an executable that is available at the
180
job's execution host. If the path is relative, it is
181
assumed to be relative to the working directory, usually set
182
through the drmaa_wd attribute. If working directory is not
183
set, the path is assumed to be relative to the user's home
186
The file pointed to by remote_command may either be an exe-
187
cutable binary or an executable script. If a script, it
188
must include the path to the shell in a #! line at the
189
beginning of the script. By default, the remote command
190
will be executed directly, as by <B><A HREF="../htmlman2/exec.html">exec(2)</A></B>. To have the
191
remote command executed in a shell, such as to preserve
192
environment settings, use the drmaa_native_specification
193
attribute to include the "-shell yes" option. Jobs which
194
are executed by a wrapper shell fail differently from jobs
195
which are executed directly. When a job which contains a
196
user error, such as an invalid path to the executable, is
197
executed by a wrapper shell, the job will execute success-
198
fully, but exit with a return code of 1. When a job which
199
contains such an error is executed directly, it will enter
200
the DRMAA_PS_FAILED state upon execution.
202
drmaa_js_state - "{drmaa_hold|drmaa_active}"
203
Specifies the job state at submission. The string values
204
'drmaa_hold' and 'drmaa_active' are supported. When
205
'drmaa_active' is used the job is submitted in a runnable
206
state. When 'drmaa_hold' is used the job is submitted in
207
user hold state (either DRMAA_PS_USER_ON_HOLD or
208
DRMAA_PS_USER_SYSTEM_ON_HOLD). This attribute is largely
209
equivalent to the <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> submit option '-h'.
211
drmaa_wd - "<directory_name>"
212
Specifies the directory name where the job will be executed.
213
A '$drmaa_hd_ph$' placeholder at the beginning of the
214
<I>directory</I>_<I>name</I> denotes the remaining string portion as a
215
relative directory name that is resolved relative to the job
216
user's home directory at the execution host. When the DRMAA
217
job template is used for bulk job submission (see also
218
<B><A HREF="../htmlman3/drmaa_run_bulk_job.html">drmaa_run_bulk_job(3)</A></B>) the '$drmaa_incr_ph$' placeholder can
219
be used at any position within <I>directory</I>_<I>name</I> to cause a
220
substitution with the parametric job's index. The
221
<I>directory</I>_<I>name</I> must be specified in a syntax that is common
222
at the host where the job is executed. If set to a relative
223
path and no placeholder is used, a path relative to the
224
user's home directory is assumed. If not set, the working
225
directory will default to the user's home directory. If set
226
and the given directory does not exist the job will enter
227
the DRMAA_PS_FAILED state when run.
229
Note that the working directory path is the path on the exe-
230
cution host. If binary mode is disabled, an attempt to find
231
the job script will be made, relative to the working direc-
232
tory path. That means that the path to the script must be
233
the same on both the submission and execution hosts.
235
drmaa_job_name - "<job_name>"
236
Specifies the job's name. Setting the job name is equivalent
237
to use of <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> submit option '-N' with <I>job</I>_<I>name</I> as option
240
drmaa_input_path - "[<hostname>]:<file_path>"
241
Specifies the standard input of the job. Unless set else-
242
where, if not explicitly set in the job template, the job is
243
started with an empty input stream. If the standard input is
244
set it specifies the network path of the job's input stream
247
When the 'drmaa_transfer_files' job template attribute is
248
supported and contains the character 'i', the input file
249
will be fetched by Grid Engine from the specified host or
250
from the submit host if no <I>hostname</I> is specified. When the
251
'drmaa_transfer_files' job template attribute is not sup-
252
ported or does not contain the character 'i', the input file
253
is always expected at the host where the job is executed
254
regardless of any <I>hostname</I> specified.
256
If the DRMAA job template will be used for bulk job submis-
257
sion, (See also <B><A HREF="../htmlman3/drmaa_run_bulk_job.html">drmaa_run_bulk_job(3)</A></B>) the '$drmaa_incr_ph$'
258
placeholder can be used at any position within <I>file</I>_<I>path</I> to
259
cause a substitution with the parametric job's index. A
260
'$drmaa_hd_ph$' placeholder at the beginning of <I>file</I>_<I>path</I>
261
denotes the remaining portion of the <I>file</I>_<I>path</I> as a relative
262
file specification resolved relative to the job user's home
263
directory at the host where the file is located. A
264
'$drmaa_wd_ph$' placeholder at the beginning of <I>file</I>_<I>path</I>
265
denotes the remaining portion of the <I>file</I>_<I>path</I> as a relative
266
file specification resolved relative to the job's working
267
directory at the host where the file is located. The
268
<I>file</I>_<I>path</I> must be specified in a syntax that is common at
269
the host where the file is located. If set and the file
270
can't be read the job enters the state DRMAA_PS_FAILED.
272
drmaa_output_path - "[<hostname>]:<file_path>"
273
Specifies the standard output of the job. If not explicitly
274
set in the job template, the whereabouts of the job's output
275
stream is not defined. If set, this attribute specifies the
276
network path of the job's output stream file.
278
When the 'drmaa_transfer_files' job template attribute is
279
supported and contains the character 'o', the output file
280
will be transferred by Grid Engine to the specified host or
281
to the submit host if no <I>hostname</I> is specified. When the
282
'drmaa_transfer_files' job template attribute is not sup-
283
ported or does not contain the character 'o', the output
284
file is always kept at the host where the job is executed
285
regardless of any <I>hostname</I> specified.
287
If the DRMAA job template will be used for of bulk job sub-
288
mission (see also <B><A HREF="../htmlman3/drmaa_run_bulk_job.html">drmaa_run_bulk_job(3)</A></B>) the
289
'$drmaa_incr_ph$' placeholder can be used at any position
290
within the <I>file</I>_<I>path</I> to cause a substitution with the
291
parametric job's index. A '$drmaa_hd_ph$' placeholder at the
292
beginning of <I>file</I>_<I>path</I> denotes the remaining portion of the
293
<I>file</I>_<I>path</I> as a relative file specification resolved relative
294
to the job user's home directory at the host where the file
295
is located. A '$drmaa_wd_ph$' placeholder at the beginning
296
of the <I>file</I>_<I>path</I> denotes the remaining portion of <I>file</I>_<I>path</I>
297
as a relative file specification resolved relative to the
298
job's working directory at the host where the file is
299
located. The <I>file</I>_<I>path</I> must be specified in a syntax that is
300
common at the host where the file is located. If set and the
301
file can't be written before execution the job enters the
302
state DRMAA_PS_FAILED.
304
drmaa_error_path - "[<hostname>]:<file_path>"
305
Specifies the standard error of the job. If not explicitly
306
set in the job template, the whereabouts of the job's error
307
stream is not defined. If set, this attribute specifies the
308
network path of the job's error stream file.
310
When the 'drmaa_transfer_files' job template attribute is
311
supported and contains the character 'e', the output file
312
will be transferred by Grid Engine to the specified host or
313
to the submit host if no <I>hostname</I> is specified. When the
314
'drmaa_transfer_files' job template attribute is not sup-
315
ported or does not contain the character 'e', the error file
316
is always kept at the host where the job is executed
317
regardless of any <I>hostname</I> specified.
319
If the DRMAA job template will be used for of bulk job sub-
320
mission (see also <B><A HREF="../htmlman3/drmaa_run_bulk_job.html">drmaa_run_bulk_job(3)</A></B>) the
321
'$drmaa_incr_ph$' placeholder can be used at any position
322
within the <I>file</I>_<I>path</I> to cause a substitution with the
323
parametric job's index. A '$drmaa_hd_ph$' placeholder at the
324
beginning of the <I>file</I>_<I>path</I> denotes the remaining portion of
325
the <I>file</I>_<I>path</I> as a relative file specification resolved
326
relative to the job user's home directory at the host where
327
the file is located. A '$drmaa_wd_ph$' placeholder at the
328
beginning of the <I>file</I>_<I>path</I> denotes the remaining portion of
329
the <I>file</I>_<I>path</I> as a relative file specification resolved
330
relative to the job's working directory at the host where
331
the file is located. The <I>file</I>_<I>path</I> must be specified in a
332
syntax that is common at the host where the file is located.
333
If set and the file can't be written before execution the
334
job enters the state DRMAA_PS_FAILED. The attribute name is
338
drmaa_join_files - "{y|n}"
339
Specifies if the job's error stream should be intermixed
340
with the output stream. If not explicitly set in the job
341
template the attribute defaults to 'n'. Either 'y' or 'n'
342
can be specified. If 'y' is specified Grid Engine will
343
ignore the value of the 'drmaa_error_path' job template
344
attribute and intermix the standard error stream with the
345
standard output stream as specified with
348
drmaa_v_argv - "argv1 argv2 ..."
349
Specifies the arguments to the job.
351
drmaa_job_category - "<category>"
352
Specifies the DRMAA job category. The <I>category</I> string is
353
used by Grid Engine as a reference into the <B><A HREF="../htmlman5/qtask.html">qtask(5)</A></B> file.
354
Certain <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> options used in the referenced qtask file
355
line are applied to the job template before submission to
356
allow site-specific resolving of resources and/or policies.
357
The cluster qtask file, the local qtask file, and the user
358
qtask file are searched. Job settings resulting from job
359
template category are overridden by settings resulting from
360
the job template drmaa_native_specification attribute as
361
well as by explicit DRMAA job template settings.
363
In order to avoid collisions with command names in the qtask
364
files, it is recommended that DRMAA job category names take
365
the form: <category_name>.cat.
367
The options -help, -t, -verify, and -w w|v are ignored. The
368
-cwd option is ignored unless the $SGE_DRMAA_ALLOW_CWD
369
environment variable is set.
371
drmaa_native_specification - "<native_specification>"
372
Specifies Grid Engine native <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> options which will be
373
interpreted as part of the DRMAA job template. All options
374
available to <B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> command may be used in the
375
<I>native</I>_<I>specification</I>, except for -help, -t, -verify, and -w
376
w|v. The -cwd option may only be used if the
377
SGE_DRMAA_ALLOW_CWD environment variable is set. This is
378
because the current parsing algorithm for -cwd is not
379
thread-safe. Options set in the <I>native</I> <I>specification</I> will
380
be overridden by the corresponding DRMAA attributes. See
381
<B><A HREF="../htmlman1/qsub.html">qsub(1)</A></B> for more information on qsub options.
383
drmaa_v_env - "<name1>=<value1> <name2>=<value2> ...
384
Specifies the job environment. Each environment <I>value</I>
385
defines the remote environment. The <I>value</I> overrides the
386
remote environment values if there is a collision.
388
drmaa_v_email - "<email1> <email2> ...
389
Specifies e-mail addresses that are used to report the job
390
completion and status.
392
drmaa_block_email - "{0|1}"
393
Specifies whether e-mail sending shall blocked or not. By
394
default email is not sent. If, however, a setting in a
395
cluster or user settings file or the email in association
396
with job events, the 'drmaa_block_email' attribute will
397
override that setting, causing no email to be sent.
399
drmaa_start_time - "[[[[CC]YY/]MM/]DD] hh:mm[:ss] [{-|+}UU:uu]"
400
Specifies the earliest time when the job may be eligible to
403
CC is the first two digits of the year (century-1)
404
YY is the last two digits of the year
405
MM is the two digits of the month [01,12]
406
DD is the two digit day of the month [01,31]
407
hh is the two digit hour of the day [00,23]
408
mm is the two digit minute of the day [00,59]
409
ss is the two digit second of the minute [00,61]
410
UU is the two digit hours since (before) UTC
411
uu is the two digit minutes since (before) UTC
413
If the optional UTC-offset is not specified, the offset
414
associated with the local timezone will be used. If the day
415
(DD) is not specified, the current day will be used unless
416
the specified hour:mm:ss has already elapsed, in which case
417
the next day will be used. Similarly for month (MM), year
418
(YY), and century-1 (CC). Example: The time: Sep 3 4:47:27
419
PM PDT 2002, could be represented as: 2002/09/03 16:47:27
422
drmaa_transfer_files - "[i][o][e]"
423
Specifies, which of the standard I/O files (stdin, stdout
424
and stderr) are to be transferred to/from the execution
425
host. If not set, defaults to "". Any combination of 'e',
426
'i' and 'o' may be specified. See drmaa_input_path,
427
drmaa_output_path and drmaa_error_path for information about
428
how to specify the standard input file, standard output file
429
and standard error file. The file transfer mechanism itself
430
must be configured by the administrator (see <B><A HREF="../htmlman5/sge_conf.html">sge_conf(5)</A></B> ).
431
When it is configured, the administrator has to enable
432
drmaa_transfer_files. If it is not configured,
433
"drmaa_transfer_files" is not enabled and can't be used.
435
ENVIRONMENTAL VARIABLES
437
Enables the parsing of the -cwd option from
438
the sge_request file(s), job category, and/or
439
the native specification attribute. This
440
option is disabled by default because the
441
algorithm for parsing the -cwd option is not
444
SGE_ROOT Specifies the location of the Grid Engine
445
standard configuration files.
447
SGE_CELL If set, specifies the default Grid Engine
448
cell to be used. To address a Grid Engine
449
cell Grid Engine uses (in the order of pre-
452
The name of the cell specified in the
453
environment variable SGE_CELL, if it is
456
The name of the default cell, i.e.
461
If set, specifies that debug information
462
should be written to stderr. In addition the
463
level of detail in which debug information is
464
generated is defined.
467
If set, specifies the tcp port on which
468
<B><A HREF="../htmlman8/sge_qmaster.html">sge_qmaster(8)</A></B> is expected to listen for com-
469
munication requests. Most installations will
470
use a services map entry instead to define
475
Upon successful completion, drmaa_get_attribute_names(),
476
drmaa_get_vector_attribute_names(), and
477
drmaa_get_next_attr_name() return DRMAA_ERRNO_SUCCESS. Other
478
values indicate an error. Up to <I>error</I>_<I>diag</I>_<I>len</I> characters
479
of error related diagnosis information is then provided in
480
the buffer <I>error</I>_<I>diagnosis</I>.
483
The drmaa_get_attribute_names(),
484
drmaa_get_vector_attribute_names(), and
485
drmaa_get_next_attr_name() functions will fail if:
487
DRMAA_ERRNO_INTERNAL_ERROR
488
Unexpected or internal DRMAA error, like system call
491
DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
492
Could not contact DRM system for this request.
494
DRMAA_ERRNO_AUTH_FAILURE
495
The specified request is not processed successfully due to
496
authorization failure.
498
DRMAA_ERRNO_INVALID_ARGUMENT
499
The input value for an argument is invalid.
501
DRMAA_ERRNO_NO_ACTIVE_SESSION
502
Failed because there is no active session.
504
DRMAA_ERRNO_NO_MEMORY
505
Failed allocating memory.
507
The drmaa_get_next_attr_name() will fail if:
509
DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE
510
When there are no more entries in the vector.
513
<B><A HREF="../htmlman3/drmaa_jobtemplate.html">drmaa_jobtemplate(3)</A></B>and <B><A HREF="../htmlman3/drmaa_submit.html">drmaa_submit(3)</A></B>.
529
Man(1) output converted with
530
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>