4
<!-- Manpage converted by man2html 3.0.1 -->
6
drmaa_init, drmaa_exit - Start/finish Grid Engine DRMAA ses-
14
char *error_diagnosis,
19
char *error_diagnosis,
25
The drmaa_init() function initializes the Grid Engine DRMAA
26
API library for all threads of the process and creates a new
27
DRMAA session. This routine must be called once before any
28
other DRMAA call, except for <B><A HREF="../htmlman3/drmaa_version.html">drmaa_version(3)</A></B>,
29
<B><A HREF="../htmlman3/drmaa_get_DRM_system.html">drmaa_get_DRM_system(3)</A></B>, and
30
<B><A HREF="../htmlman3/drmaa_get_DRMAA_implementation.html">drmaa_get_DRMAA_implementation(3)</A></B>. Except for the above
31
listed functions, no DRMAA functions may be called before
32
the drmaa_init() function <I>completes</I>. Any DRMAA function
33
which is called before the drmaa_init() function completes
34
will return a DRMAA_ERRNO_NO_ACTIVE_SESSION error. <I>Contact</I>
35
is an implementation dependent string which may be used to
36
specify which Grid Engine cell to use. If <I>contact</I> is NULL,
37
the default Grid Engine cell will be used. In the 1.0 imple-
38
mentation <I>contact</I> may have the following value:
39
<I>session</I>=<<I>session</I>_<I>id</I>>. To determine the session_id, the
40
<B><A HREF="../htmlman3/drmaa_get_contact.html">drmaa_get_contact(3)</A></B> function should be called after the
41
session has already been initialized. By passing the
42
<I>session</I>=<<I>session</I>_<I>id</I>> string to the drmaa_init() function,
43
instead of creating a new session, DRMAA will attempt to
44
reconnect to the session indicated by the <I>session</I>_<I>id</I>. The
45
result of reconnecting to a previous session is that all
46
jobs previously submitted in that session that are still
47
running will be available in the DRMAA session. Note, how-
48
ever, that jobs which ended before the call to drmaa_init()
49
may not be available or may have no associated exit informa-
50
tion or resource usage data.
52
In the 0.95 implementation, setting <I>contact</I> has no effect.
55
The drmaa_exit() function closes the DRMAA session for all
56
threads and must be called before process termination. The
57
drmaa_exit() function may be called only once by a single
58
thread in the process and may only be called after the
59
drmaa_init() function has completed. Any DRMAA function,
60
other than <B><A HREF="../htmlman3/drmaa_init.html">drmaa_init(3)</A></B>, which is called after the
61
drmaa_exit() function completes will return a
62
DRMAA_ERRNO_NO_ACTIVE_SESSION error.
64
The drmaa_exit() function does necessary clean up of the
65
DRMAA session state, including unregistering from the <I>qmas-</I>
66
<B><A HREF="../htmlman8/ter.html">ter(8)</A></B>. If the drmaa_exit() function is not called, the
67
qmaster will store events for the DRMAA client until the
68
connection times out, causing extra work for the qmaster and
69
consuming system resources.
71
Submitted jobs are not affected by the drmaa_exit() func-
74
ENVIRONMENTAL VARIABLES
75
SGE_ROOT Specifies the location of the Grid Engine
76
standard configuration files.
78
SGE_CELL If set, specifies the default Grid Engine
79
cell to be used. To address a Grid Engine
80
cell Grid Engine uses (in the order of pre-
83
The name of the cell specified in the
84
environment variable SGE_CELL, if it is
87
The name of the default cell, i.e.
92
If set, specifies that debug information
93
should be written to stderr. In addition the
94
level of detail in which debug information is
98
If set, specifies the tcp port on which the
99
sge_qmaster is expected to listen for commun-
100
ication requests. Most installations will
101
use a services map entry instead to define
105
Upon successful completion, drmaa_init() and drmaa_exit()
106
return DRMAA_ERRNO_SUCCESS. Other values indicate an error.
107
Up to <I>error</I>_<I>diag</I>_<I>len</I> characters of error related diagnosis
108
information is then provided in the buffer <I>error</I>_<I>diagnosis</I>.
111
The drmaa_init() and drmaa_exit() functions will fail if:
113
DRMAA_ERRNO_INTERNAL_ERROR
114
Unexpected or internal DRMAA error, like system call
117
DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
118
Could not contact DRM system for this request.
120
DRMAA_ERRNO_AUTH_FAILURE
121
The specified request is not processed successfully due to
122
authorization failure.
124
DRMAA_ERRNO_INVALID_ARGUMENT
125
The input value for an argument is invalid.
127
The drmaa_init() will fail if:
129
DRMAA_ERRNO_INVALID_CONTACT_STRING
130
Initialization failed due to invalid contact string.
132
DRMAA_ERRNO_DEFAULT_CONTACT_STRING_ERROR
133
Could not use the default contact string to connect to DRM
136
DRMAA_ERRNO_DRMS_INIT_FAILED
137
Initialization failed due to failure to init DRM system.
139
DRMAA_ERRNO_ALREADY_ACTIVE_SESSION
140
Initialization failed due to existing DRMAA session.
142
DRMAA_ERRNO_NO_MEMORY
143
Failed allocating memory.
145
The drmaa_exit() will fail if:
147
DRMAA_ERRNO_NO_ACTIVE_SESSION
148
Failed because there is no active session.
150
DRMAA_ERRNO_DRMS_EXIT_ERROR
151
DRM system disengagement failed.
154
<B><A HREF="../htmlman3/drmaa_submit.html">drmaa_submit(3)</A></B>.
165
Man(1) output converted with
166
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>