SECTION 3 Session Management Functions


Functions

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)

Function Documentation

int drmaa_exit ( char *  error_diagnosis,
size_t  error_diag_len 
)

Disengage from DRMAA library. This routine ends this DRMAA Session, but does not effect any jobs (i.e. queued and running jobs remain queued and running).

Parameters:
error_diagnosis string of characters with error related diagnosis information. The error diagnosis buffer will be filled in case of error. If the size of error_diagnosis buffer passed is smaller than the error message the resultant string will be truncated.
error_diag_len size of the error_diagnosis buffer. DRMAA_ERROR_STRING_BUFFER can be used for error_diag_len when appropiate.
Returns:
  • DRMAA_ERRNO_SUCCESS on success
  • DRMAA_ERRNO_NO_ACTIVE_SESSION no active session

int drmaa_init ( const char *  contact,
char *  error_diagnosis,
size_t  error_diag_len 
)

Initialize DRMAA API library and create a new DRMAA Session. drmaa_init() function MUST BE called once per DRMAA program BEFORE any DRMAA related functions are used.

Parameters:
contact is an implementation dependent string which may be used to specify which DRM system to use. The current GridWay DRMAA implementation contact MUST be NULL or "localhost".
error_diagnosis string of characters with error related diagnosis information. The error diagnosis buffer will be filled in case of error. If the size of error_diagnosis buffer passed is smaller than the error message the resultant string will be truncated.
error_diag_len size of the error_diagnosis buffer. DRMAA_ERROR_STRING_BUFFER can be used for error_diag_len when appropiate.
Returns:
  • DRMAA_ERRNO_SUCCESS on success
  • DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE if the DRMAA runtime library could not contact the GridWay daemon
  • DRMAA_ERRNO_INVALID_CONTACT_STRING if contact is not NULL or "localhost"
  • DRMAA_ERRNO_ALREADY_ACTIVE_SESSION when drmaa_init() has been called previously.