1. drmaa2_jsession_wait_any_started(3)
  2. DRMAA2
  3. drmaa2_jsession_wait_any_started(3)


drmaa2_jsession_wait_any_started - drmaa2_jsession_wait_any_started, Blocks until one of the jobs is started.


#include "drmaa2.h"

define DRMAA2_ZERO_TIME ((time_t) 0)

define DRMAA2_INFINITE_TIME ((time_t) -1)

drmaa2_j drmaa2_jsession_wait_any_started(const drmaa2_jsession jsession, const drmaa2_j_list joblist, const time_t timeout);


This function blocks until one of the given jobs is in or passed any started state. It also immediately returns when any 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. All given jobs must be part of the job session given as argument. The job session must be open.


Returns one of the given job objects if it is (or passed) the required state. The returned object is not a copy. In case of a timeout or an error NULL 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_jsession_wait_any_terminated(3), 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), drmaa2_close_jsession(3), drmaa2_open_jsession(3), drmaa2_destroy_jsession(3), drmaa2_create_jsession(3), drmaa2_jsession_free(3), drmaa2_jsession_get_jobs(3), drmaa_jsession_get_job_categories(3), drmaa2_jsession_run_job(3), drmaa2_jsession_run_bulk_jobs(3), drmaa2_jsession_wait_any_started(3), drmaa2_jsession_wait_any_terminated(3), drmaa2_jsession_get_contact(3), drmaa2_jsession_get_session_name(3), drmaa2_jsession_get_job_array(3)


Copyright Univa Corporation 2013

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