Manpages

NAME

drmaa_job_ps, drmaa_control, - Monitor and control jobs

SYNOPSIS

#include "drmaa.h"

int drmaa_job_ps(

const char *job_id,
int *
remote_ps,
char *
error_diagnosis,
size_t 
error_diag_len

);

int drmaa_control(

const char *jobid,
int 
action,
char *
error_diagnosis,
size_t 
error_diag_len

);

DESCRIPTION

The drmaa_job_ps() function returns the status of the Grid Engine job job_id into the integer pointed to by remote_ps. Possible return values are listed below. See sge_status(5) for the correspondence between them and the Grid Engine status.

Image /var/www/mancx/application/src/../www/___/img/man3/man3/drmaa_control1.png

Jobs’ user hold and user suspend states can be controlled via drmaa_control(3). For affecting system hold and system suspend states the appropriate Grid Engine interfaces must be used.

drmaa_control()
The drmaa_control() function applies control operations on Grid Engine jobs. jobid may contain either an Grid Engine jobid or ’DRMAA_JOB_IDS_SESSION_ALL’ to refer to all jobs submitted during the DRMAA session opened using drmaa_init(3). Legal values for action and their meanings are:

Image /var/www/mancx/application/src/../www/___/img/man3/man3/drmaa_control2.png

The DRMAA suspend/resume operations are equivalent to the use of -sj jobid and -usj jobid options with Grid Engine qmod(1). The DRMAA hold/release operations are equivalent to the use of Grid Engine qhold(1) and qrls(1). The DRMAA terminate operation is equivalent to the use of Grid Engine qdel(1). Only user hold and user suspend can be controlled via drmaa_control(3). For affecting system hold and system suspend states the appropriate Grid Engine interfaces must be used.

ENVIRONMENTAL VARIABLES

SGE_ROOT

Specifies the location of the Grid Engine standard configuration files.

SGE_CELL

If set, specifies the default Grid Engine cell to be used. To address a Grid Engine cell 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 sge_qmaster(8) is expected to listen for communication requests. Most installations will use a services map entry instead to define that port.

RETURN VALUES

Upon successful completion, drmaa_job_ps(), and drmaa_control() return DRMAA_ERRNO_SUCCESS. Other values indicate an error. Up to error_diag_len characters of error related diagnosis information is then provided in the buffer, error_diagnosis.

ERRORS

The drmaa_job_ps() and drmaa_control() functions may fail with:
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 was not processed successfully due to authorization failure.

DRMAA_ERRNO_INVALID_ARGUMENT

The input value for an argument is invalid.

DRMAA_ERRNO_NO_ACTIVE_SESSION

Failed because there is no active session.

DRMAA_ERRNO_NO_MEMORY

Failed allocating memory.

DRMAA_ERRNO_INVALID_JOB

The specified job does not exist.

The drmaa_control() function may fail with:
DRMAA_ERRNO_RESUME_INCONSISTENT_STATE

The job is not suspended. The resume request will not be processed.

DRMAA_ERRNO_SUSPEND_INCONSISTENT_STATE

The job is not running and thus cannot be suspended.

DRMAA_ERRNO_HOLD_INCONSISTENT_STATE

The job cannot be moved to a hold state.

DRMAA_ERRNO_RELEASE_INCONSISTENT_STATE

The job is not in a hold state.

SEE ALSO

drmaa_submit(3), drmaa_wait(3), sge_status(5).