1. drmaa2_j_wait_terminated(3)
  2. DRMAA2
  3. drmaa2_j_wait_terminated(3)


drmaa2_j_wait_terminated - drmaa2_j_wait_terminated, Blocks until the job is terminated.


#include "drmaa2.h"

define DRMAA2_ZERO_TIME ((time_t) 0)

define DRMAA2_INFINITE_TIME ((time_t) -1)

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


This function blocks until the given job is in any terminated state. It also immediately returns when the job is in unknown state (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.


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.


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)


Copyright Univa Corporation 2013

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