1drmaa_session(3)               Grid Engine DRMAA              drmaa_session(3)
2
3
4

NAME

6       drmaa_init, drmaa_exit - Start/finish Grid Engine DRMAA session
7

SYNOPSIS

9       #include "drmaa.h"
10
11       int drmaa_init(
12              const char *contact,
13              char *error_diagnosis,
14              size_t error_diag_len
15       );
16
17       int drmaa_exit(
18              char *error_diagnosis,
19              size_t error_diag_len
20       );
21

DESCRIPTION

23   drmaa_init()
24       The drmaa_init() function initializes the Grid Engine DRMAA API library
25       for all threads of the process and creates a new  DRMAA  session.  This
26       routine  must  be  called  once before any other DRMAA call, except for
27       drmaa_version(3), drmaa_get_DRM_system(3),  and  drmaa_get_DRMAA_imple‐
28       mentation(3).   Except  for  the above listed functions, no DRMAA func‐
29       tions may be called before the drmaa_init()  function  completes.   Any
30       DRMAA  function  which  is called before the drmaa_init() function com‐
31       pletes will return a DRMAA_ERRNO_NO_ACTIVE_SESSION error.   Contact  is
32       an  implementation  dependent string which may be used to specify which
33       Grid Engine cell to use. If contact is NULL, the  default  Grid  Engine
34       cell  will be used. In the 1.0 implementation contact may have the fol‐
35       lowing value: session=<session_id>.  To determine the  session_id,  the
36       drmaa_get_contact(3)  function  should  be called after the session has
37       already been initialized.  By passing the  session=<session_id>  string
38       to  the drmaa_init() function, instead of creating a new session, DRMAA
39       will attempt to reconnect to the session indicated by  the  session_id.
40       The  result of reconnecting to a previous session is that all jobs pre‐
41       viously submitted in that session that are still running will be avail‐
42       able in the DRMAA session.  Note, however, that jobs which ended before
43       the call to drmaa_init() may not be available or may have no associated
44       exit information or resource usage data.
45
46   drmaa_exit()
47       The  drmaa_exit() function closes the DRMAA session for all threads and
48       must be called before process termination.  The  drmaa_exit()  function
49       may  be called only once by a single thread in the process and may only
50       be called after the drmaa_init() function  has  completed.   Any  DRMAA
51       function,   other   than  drmaa_init(3),  which  is  called  after  the
52       drmaa_exit()      function      completes      will      return       a
53       DRMAA_ERRNO_NO_ACTIVE_SESSION error.
54
55       The  drmaa_exit() function does necessary clean up of the DRMAA session
56       state,  including  unregistering   from   the   qmaster(8).    If   the
57       drmaa_exit()  function is not called, the qmaster will store events for
58       the DRMAA client until the connection times out, causing extra work for
59       the qmaster and consuming system resources.
60
61       Submitted jobs are not affected by the drmaa_exit() function.
62

ENVIRONMENTAL VARIABLES

64       GE_ROOT        Specifies  the location of the Grid Engine standard con‐
65                      figuration files.
66
67       GE_CELL        If set, specifies the default Grid  Engine  cell  to  be
68                      used. To address a Grid Engine cell Grid Engine uses (in
69                      the order of precedence):
70
71                             The name of the cell specified in the environment
72                             variable GE_CELL, if it is set.
73
74                             The name of the default cell, i.e. default.
75
76
77       GE_DEBUG_LEVEL If set, specifies that debug information should be writ‐
78                      ten to stderr. In addition the level of detail in  which
79                      debug information is generated is defined.
80
81       GE_QMASTER_PORT
82                      If  set,  specifies the tcp port on which the ge_qmaster
83                      is expected to listen for communication requests.   Most
84                      installations  will  use a services map entry instead to
85                      define that port.
86

RETURN VALUES

88       Upon  successful  completion,  drmaa_init()  and  drmaa_exit()   return
89       DRMAA_ERRNO_SUCCESS.    Other   values   indicate   an  error.   Up  to
90       error_diag_len characters of error  related  diagnosis  information  is
91       then provided in the buffer error_diagnosis.
92

ERRORS

94       The drmaa_init() and drmaa_exit() functions will fail if:
95
96   DRMAA_ERRNO_INTERNAL_ERROR
97       Unexpected or internal DRMAA error, like system call failure, etc.
98
99   DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
100       Could not contact DRM system for this request.
101
102   DRMAA_ERRNO_AUTH_FAILURE
103       The  specified  request is not processed successfully due to authoriza‐
104       tion failure.
105
106   DRMAA_ERRNO_INVALID_ARGUMENT
107       The input value for an argument is invalid.
108
109       The drmaa_init() will fail if:
110
111   DRMAA_ERRNO_INVALID_CONTACT_STRING
112       Initialization failed due to invalid contact string.
113
114   DRMAA_ERRNO_DEFAULT_CONTACT_STRING_ERROR
115       Could not use the default contact string to connect to DRM system.
116
117   DRMAA_ERRNO_DRMS_INIT_FAILED
118       Initialization failed due to failure to init DRM system.
119
120   DRMAA_ERRNO_ALREADY_ACTIVE_SESSION
121       Initialization failed due to existing DRMAA session.
122
123   DRMAA_ERRNO_NO_MEMORY
124       Failed allocating memory.
125
126       The drmaa_exit() will fail if:
127
128   DRMAA_ERRNO_NO_ACTIVE_SESSION
129       Failed because there is no active session.
130
131   DRMAA_ERRNO_DRMS_EXIT_ERROR
132       DRM system disengagement failed.
133

SEE ALSO

135       drmaa_submit(3).
136
137
138
139GE 6.2u5                 $Date: 2008/07/08 09:10:04 $         drmaa_session(3)
Impressum