1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
<HTML>
<BODY BGCOLOR=white>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
NAME
drmaa_init, drmaa_exit - Start/finish Sun Grid Engine DRMAA
session
SYNOPSIS
#include "drmaa.h"
int drmaa_init(
const char *contact,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_exit(
char *error_diagnosis,
size_t error_diag_len
);
DESCRIPTION
drmaa_init()
The drmaa_init() function initializes the Sun Grid Engine
DRMAA API library for all threads of the process and creates
a new DRMAA session. This routine must be called once before
any other DRMAA call, except for <B><A HREF="../htmlman3/drmaa_version.html?pathrev=V62u5_TAG">drmaa_version(3)</A></B>,
<B><A HREF="../htmlman3/drmaa_get_DRM_system.html?pathrev=V62u5_TAG">drmaa_get_DRM_system(3)</A></B>, and
<B><A HREF="../htmlman3/drmaa_get_DRMAA_implementation.html?pathrev=V62u5_TAG">drmaa_get_DRMAA_implementation(3)</A></B>. Except for the above
listed functions, no DRMAA functions may be called before
the drmaa_init() function <I>completes</I>. Any DRMAA function
which is called before the drmaa_init() function completes
will return a DRMAA_ERRNO_NO_ACTIVE_SESSION error. <I>Contact</I>
is an implementation dependent string which may be used to
specify which Sun Grid Engine cell to use. If <I>contact</I> is
NULL, the default Sun Grid Engine cell will be used. In the
1.0 implementation <I>contact</I> may have the following value:
<I>session</I>=<<I>session</I>_<I>id</I>>. To determine the session_id, the
<B><A HREF="../htmlman3/drmaa_get_contact.html?pathrev=V62u5_TAG">drmaa_get_contact(3)</A></B> function should be called after the
session has already been initialized. By passing the
<I>session</I>=<<I>session</I>_<I>id</I>> string to the drmaa_init() function,
instead of creating a new session, DRMAA will attempt to
reconnect to the session indicated by the <I>session</I>_<I>id</I>. The
result of reconnecting to a previous session is that all
jobs previously submitted in that session that are still
running will be available in the DRMAA session. Note, how-
ever, that jobs which ended before the call to drmaa_init()
may not be available or may have no associated exit informa-
tion or resource usage data.
drmaa_exit()
The drmaa_exit() function closes the DRMAA session for all
threads and must be called before process termination. The
drmaa_exit() function may be called only once by a single
thread in the process and may only be called after the
drmaa_init() function has completed. Any DRMAA function,
other than <B><A HREF="../htmlman3/drmaa_init.html?pathrev=V62u5_TAG">drmaa_init(3)</A></B>, which is called after the
drmaa_exit() function completes will return a
DRMAA_ERRNO_NO_ACTIVE_SESSION error.
The drmaa_exit() function does necessary clean up of the
DRMAA session state, including unregistering from the <I>qmas-</I>
<B><A HREF="../htmlman8/ter.html?pathrev=V62u5_TAG">ter(8)</A></B>. If the drmaa_exit() function is not called, the
qmaster will store events for the DRMAA client until the
connection times out, causing extra work for the qmaster and
consuming system resources.
Submitted jobs are not affected by the drmaa_exit() func-
tion.
ENVIRONMENTAL VARIABLES
SGE_ROOT Specifies the location of the Sun Grid Engine
standard configuration files.
SGE_CELL If set, specifies the default Sun Grid Engine
cell to be used. To address a Sun Grid Engine
cell Sun Grid Engine uses (in the order of
precedence):
The name of the cell specified in the
environment variable SGE_CELL, if it is
set.
The name of the default cell, i.e.
default.
SGE_DEBUG_LEVEL
If set, specifies that debug information
should be written to stderr. In addition the
level of detail in which debug information is
generated is defined.
SGE_QMASTER_PORT
If set, specifies the tcp port on which the
sge_qmaster is expected to listen for commun-
ication requests. Most installations will
use a services map entry instead to define
that port.
RETURN VALUES
Upon successful completion, drmaa_init() and drmaa_exit()
return DRMAA_ERRNO_SUCCESS. Other values indicate an error.
Up to <I>error</I>_<I>diag</I>_<I>len</I> characters of error related diagnosis
information is then provided in the buffer <I>error</I>_<I>diagnosis</I>.
ERRORS
The drmaa_init() and drmaa_exit() functions will fail if:
DRMAA_ERRNO_INTERNAL_ERROR
Unexpected or internal DRMAA error, like system call
failure, etc.
DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
Could not contact DRM system for this request.
DRMAA_ERRNO_AUTH_FAILURE
The specified request is not processed successfully due to
authorization failure.
DRMAA_ERRNO_INVALID_ARGUMENT
The input value for an argument is invalid.
The drmaa_init() will fail if:
DRMAA_ERRNO_INVALID_CONTACT_STRING
Initialization failed due to invalid contact string.
DRMAA_ERRNO_DEFAULT_CONTACT_STRING_ERROR
Could not use the default contact string to connect to DRM
system.
DRMAA_ERRNO_DRMS_INIT_FAILED
Initialization failed due to failure to init DRM system.
DRMAA_ERRNO_ALREADY_ACTIVE_SESSION
Initialization failed due to existing DRMAA session.
DRMAA_ERRNO_NO_MEMORY
Failed allocating memory.
The drmaa_exit() will fail if:
DRMAA_ERRNO_NO_ACTIVE_SESSION
Failed because there is no active session.
DRMAA_ERRNO_DRMS_EXIT_ERROR
DRM system disengagement failed.
SEE ALSO
<B><A HREF="../htmlman3/drmaa_submit.html?pathrev=V62u5_TAG">drmaa_submit(3)</A></B>.
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
|