1. drmaa2_j_get_state(3)
  2. DRMAA2
  3. drmaa2_j_get_state(3)

NAME

drmaa2_j_get_state - drmaa2_j_get_state, Returns the job state.

SYNOPSIS

#include "drmaa2.h"

typedef enum drmaa2_jstate { DRMAA2_UNDETERMINED = 0, DRMAA2_QUEUED = 1, DRMAA2_QUEUED_HELD = 2, DRMAA2_RUNNING = 3, DRMAA2_SUSPENDED = 4, DRMAA2_REQUEUED = 5, DRMAA2_REQUEUED_HELD = 6, DRMAA2_DONE = 7, DRMAA2_FAILED = 8 } drmaa2_jstate;

drmaa2_jstate drmaa2_j_get_state(const drmaa2_j job, drmaa2_string *substate)

DESCRIPTION

Determines the current state of a DRMAA2 job. Since the Univa(R) Grid Engine(TM) DRMAA2 implemenation is event based, the function call does not result in any addionaly communication to the Grid Engine master process. Hence this function can be savely called in a loop while waiting for a specific job state.

Currently the sub-state does not provide any information so the second argument must be NULL.

A job state can be fetched for any kind jobs which are currently visible through open job and monitoring sessions.

RETURN VALUES

Returns a DRMAA2 job state (drmaa2_jstate). In case the job stated can not be fetched DRMAA2_UNDETERMINED is returned and the failure reason is set in the context of the calling thread. It can be read out by using the drmaa2_geterror(3) and drmaa2_geterror_text(3) functions.

SEE ALSO

drmaa2_geterror(3), drmaa2_geterror_text(3), drmaa2_j_suspend(3), drmaa2_j_resume(3), drmaa2_j_hold(3), drmaa2_j_release(3), drmaa2_j_terminate(3), drmaa2_j_get_id(3), drmaa2_j_get_session_name(3), drmaa2_j_get_jt(3), drmaa2_j_get_state(3), drmaa2_j_get_info(3), drmaa2_j_wait_started(3), drmaa2_j_wait_terminated(3), drmaa2_jsession_run_job(3), drmaa2_j_free(3)

AUTHOR

Copyright Univa Corporation 2013

  1. Univa Corporation
  2. October 2013
  3. drmaa2_j_get_state(3)