1. drmaa2_j_wait_started(3)
  2. DRMAA2
  3. drmaa2_j_wait_started(3)

NAME

drmaa2_j_wait_started - drmaa2_j_wait_started, Blocks until the job is running.

SYNOPSIS

#include "drmaa2.h"

define DRMAA2_ZERO_TIME ((time_t) 0)

define DRMAA2_INFINITE_TIME ((time_t) -1)

drmaa2_error drmaa2_j_wait_started(const drmaa2_j job, const time_t timeout);

DESCRIPTION

This function blocks until the given job is in started state. The function should be called for jobs in DRMAA2_QUEUED and DRMAA2_QUEUED_HELD states. It immediately returns when the job is in any finished or unknown state (DRMAA2_FAILED, DRMAA2_DONE, DRMAA2_UNDETERMINED). The timeout argument determines a maximum time - in seconds - the function should block. Special constant values (defined in the drmaa2.h file) are DRMAA2_ZERO_TIME and DRMAA2_INFINITE_TIME. If DRMAA2_ZERO_TIME is used as argument, the function returns immediately after checking the job state. If the job is not in the expected state the return value is != DRMAA2_SUCCESS (when no other error happend it is DRMAA2_INVALID_STATE). When using DRMAA2_INFINITE_TIME the function blocks possibly endlessly.

RETURN VALUES

Returns DRMAA2_SUCCESS when the job is in any or passed a started state. Otherwise an error code is returned. The error reason is saved in the contex of the calling thread and can be fetched with the drmaa2_geterror_text(3) function.

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_wait_started(3)