drmaa_wait(3)                  Grid Engine DRMAA                 drmaa_wait(3)



[1mNAME[0m
       drmaa_synchronize,   drmaa_wait,   drmaa_wifexited,  drmaa_wexitstatus,
       drmaa_wifsignaled, drmaa_wtermsig, drmaa_wcoredump, drmaa_wifaborted  -
       Waiting for jobs to finish


[1mSYNOPSIS[0m
       [1m#include "drmaa.h"[0m

       [1mint drmaa_synchronize([0m
              [1mconst char *job_ids[],[0m
              [1msigned long timeout,[0m
              [1mint dispose,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wait([0m
              [1mconst char *job_id,[0m
              [1mchar *job_id_out,[0m
              [1msize_t job_id_out_len,[0m
              [1mint *stat,[0m
              [1msigned long timeout,[0m
              [1mdrmaa_attr_values_t **rusage,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diagnois_len[0m
       [1m);[0m

       [1mint drmaa_wifaborted([0m
              [1mint *aborted,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wifexited([0m
              [1mint *exited,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wifsignaled([0m
              [1mint *signaled,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wcoredump([0m
              [1mint *core_dumped,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wexitstatus([0m
              [1mint *exit_status,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m

       [1mint drmaa_wtermsig([0m
              [1mchar *signal,[0m
              [1msize_t signal_len,[0m
              [1mint stat,[0m
              [1mchar *error_diagnosis,[0m
              [1msize_t error_diag_len[0m
       [1m);[0m


[1mDESCRIPTION[0m
       The  drmaa_synchronize()  function  blocks the calling thread until all
       jobs specified in [4mjob_ids[24m have failed or finished execution. If [4mjob_ids[0m
       contains  'DRMAA_JOB_IDS_SESSION_ALL', then this function waits for all
       jobs submitted during this DRMAA session.  The  [4mjob_ids[24m  pointer  array
       must be [4mNULL[24m terminated.

       To  prevent  blocking indefinitely in this call, the caller may use the
       [4mtimeout[24m, specifying how many seconds to wait for this call to  complete
       before  timing out. The special value DRMAA_TIMEOUT_WAIT_FOREVER can be
       used to wait indefinitely for a result. The special  value  DRMAA_TIME-
       OUT_NO_WAIT  can  be  used  to  return  immediately.  If the call exits
       before [4mtimeout[24m seconds, all the specified jobs have  completed  or  the
       calling  thread  received an interrupt.  In both cases, the return code
       is DRMAA_ERRNO_EXIT_TIMEOUT.

       The [4mdispose[24m parameter specifies how to treat reaping  information.   If
       '0'  is  passed to this parameter, job finish information will still be
       available when [4mdrmaa_wait[24m(3) is used. If '1' is  passed,  [4mdrmaa_wait[24m(3)
       will be unable to access this job's finish information.

   [1mdrmaa_wait()[0m
       The  drmaa_wait()  function blocks the calling thread until a job fails
       or finishes execution.  This routine is modeled on  the  [4mwait4[24m(3)  rou-
       tine.   If  the special string 'DRMAA_JOB_IDS_SESSION_ANY' is passed as
       [4mjob_id[24m, this routine will wait for any job from the session.  Otherwise
       the  [4mjob_id[24m  must be the job identifier of a job or array job task that
       was submitted during the session.

       To prevent blocking indefinitely in this call, the caller may use [4mtime-[0m
       [4mout[24m,  specifying  how  many  seconds  to wait for this call to complete
       before timing out. The special value DRMAA_TIMEOUT_WAIT_FOREVER can  be
       to  wait  indefinitely  for  a  result.  The  special value DRMAA_TIME-
       OUT_NO_WAIT can be used to  return  immediately.   If  the  call  exits
       before  [4mtimeout[24m  seconds  have passed, all the specified jobs have com-
       pleted or the calling thread received an interrupt.  In both cases, the
       return code is DRMAA_ERRNO_EXIT_TIMEOUT.

       The routine reaps jobs on a successful call, so any subsequent calls to
       [4mdrmaa_wait[24m(3) will  fail  returning  a  DRMAA_ERRNO_INVALID_JOB  error,
       meaning  that  the job has already been reaped.  This error is the same
       as if the job were unknown. Returning due to an elapsed timeout  or  an
       interrupt  does not cause the job information to be reaped.  This means
       that, in this case, it is  possible  to  issue  [4mdrmaa_wait[24m(3)  multiple
       times for the same [4mjob_id[24m.

       If  [4mjob_id_out[24m  is not a null pointer, then on return from a successful
       [4mdrmaa_wait[24m(3) call, up to [4mjob_id_out_len[24m characters from the job id  of
       the failed or finished job are returned.

       If  [4mstat[24m  is  not  a  null  pointer,  then  on return from a successful
       [4mdrmaa_wait[24m(3) call, the status of the job  is  stored  in  the  integer
       pointed  to by [4mstat[24m.  [4mstat[24m indicates whether job failed or finished and
       other information. The information encoded in the integer value can  be
       accessed   via   [4mdrmaa_wifaborted[24m(3)  [4mdrmaa_wifexited[24m(3)  [4mdrmaa_wifsig-[0m
       [4mnaled[24m(3) [4mdrmaa_wcoredump[24m(3) [4mdrmaa_wexitstatus[24m(3) [4mdrmaa_wtermsig[24m(3).

       If [4mrusage[24m is not a null pointer,  then  on  return  from  a  successful
       [4mdrmaa_wait[24m(3)  call, a summary of the  resources used by the terminated
       job is returned in form of a DRMAA  values  string  vector. The entries
       in   the   DRMAA   values   string   vector   can  be  extracted  using
       [4mdrmaa_get_next_attr_value[24m(3).      Each     string     returned      by
       [4mdrmaa_get_next_attr_value[24m(3)  will  be  of  the  format <name>=<value>,
       where <name> and <value> specify name and amount of resources  consumed
       by  the job, respectively.  See [4maccounting[24m(5) for an explanation of the
       resource information.


   [1mdrmaa_wifaborted()[0m
       The drmaa_wifaborted() function evaluates into the integer  pointed  to
       by  [4maborted[24m a non-zero value if [4mstat[24m was returned from a job that ended
       before entering the running state.


   [1mdrmaa_wifexited()[0m
       The drmaa_wifexited() function evaluates into the integer pointed to by
       [4mexited[24m a non-zero value if [4mstat[24m was returned from a job that terminated
       normally. A zero value can also indicate that although the job has ter-
       minated  normally,  an  exit status is not available, or that it is not
       known whether the job terminated normally.  In both cases  [4mdrmaa_wexit-[0m
       [4mstatus[24m(3)  will  not  provide exit status information. A non-zero value
       returned in [4mexited[24m indicates more detailed diagnosis can be provided by
       means   of  [4mdrmaa_wifsignaled[24m(3),  [4mdrmaa_wtermsig[24m(3)  and  [4mdrmaa_wcore-[0m
       [4mdump[24m(3).


   [1mdrmaa_wifsignaled()[0m
       The drmaa_wifsignaled() function evaluates into the integer pointed  to
       by [4msignaled[24m a non-zero value if [4mstat[24m was returned for a job that termi-
       nated due to the receipt of a signal. A zero value  can  also  indicate
       that  although  the  job has terminated due to the receipt of a signal,
       the signal is not available, or it is not known whether the job  termi-
       nated  due  to the receipt of a signal. In both cases [4mdrmaa_wtermsig[24m(3)
       will not provide signal information. A non-zero value returned in  [4msig-[0m
       [4mnaled[24m  indicates  signal  information  can  be  retrieved  by  means of
       [4mdrmaa_wtermsig[24m(3).


   [1mdrmaa_wcoredump()[0m
       If [4mdrmaa_wifsignaled[24m(3) returned  a  non-zero  value  in  the  [4msignaled[0m
       parameter,  the  drmaa_wcoredump()  function evaluates into the integer
       pointed to by [4mcore_dumped[24m a non-zero value if a core image of the  ter-
       minated job was created.


   [1mdrmaa_wexitstatus()[0m
       If  [4mdrmaa_wifexited[24m(3)  returned a non-zero value in the [4mexited[24m parame-
       ter,  the  drmaa_wexitstatus()  function  evaluates  into  the  integer
       pointed to by [4mexit_code[24m the exit code that the job passed to [4mexit[24m(2) or
       the value that the child process returned from main.


   [1mdrmaa_wtermsig()[0m
       If [4mdrmaa_wifsignaled[24m(3) returned  a  non-zero  value  in  the  [4msignaled[0m
       parameter,  the  drmaa_wtermsig()  function evaluates into [4msignal[24m up to
       [4msignal_len[24m characters of a string representation  of  the  signal  that
       caused the termination of the job. For signals declared by POSIX.1, the
       symbolic names are returned (e.g., SIGABRT, SIGALRM). For  signals  not
       declared by POSIX, any other string may be returned.


[1mENVIRONMENTAL VARIABLES[0m
       [1mSGE_ROOT       [22mSpecifies  the location of the Grid Engine standard con-
                      figuration files.

       [1mSGE_CELL       [22mIf 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. [1mdefault[22m.


       [1mSGE_DEBUG_LEVEL[0m
                      If set, specifies that debug information should be writ-
                      ten to stderr. In addition the level of detail in  which
                      debug information is generated is defined.

       [1mSGE_QMASTER_PORT[0m
                      If  set,  specifies the tcp port on which [4msge_qmaster[24m(8)
                      is expected to listen for communication requests.   Most
                      installations  will  use a services map entry instead to
                      define that port.

[1mRETURN VALUES[0m
       Upon successful completion, drmaa_run_job(), drmaa_run_bulk_jobs(), and
       drmaa_get_next_job_id()  return DRMAA_ERRNO_SUCCESS. Other values indi-
       cate an error.  Up to [4merror_diag_len[24m characters of error related  diag-
       nosis information is then provided in the buffer [4merror_diagnosis[24m.


[1mERRORS[0m
       The  drmaa_synchronize(), drmaa_wait(), drmaa_wifexited(), drmaa_wexit-
       status(), drmaa_wifsignaled(), drmaa_wtermsig(), drmaa_wcoredump(), and
       drmaa_wifaborted() will fail if:

   [1mDRMAA_ERRNO_INTERNAL_ERROR[0m
       Unexpected or internal DRMAA error, like system call failure, etc.

   [1mDRMAA_ERRNO_DRM_COMMUNICATION_FAILURE[0m
       Could not contact DRM system for this request.

   [1mDRMAA_ERRNO_AUTH_FAILURE[0m
       The  specified  request is not processed successfully due to authoriza-
       tion failure.

   [1mDRMAA_ERRNO_INVALID_ARGUMENT[0m
       The input value for an argument is invalid.

   [1mDRMAA_ERRNO_NO_ACTIVE_SESSION[0m
       Failed because there is no active session.

   [1mDRMAA_ERRNO_NO_MEMORY[0m
       Failed allocating memory.

       The drmaa_synchronize() and drmaa_wait() functions will fail if:

   [1mDRMAA_ERRNO_EXIT_TIMEOUT[0m
       Time-out condition.

   [1mDRMAA_ERRNO_INVALID_JOB[0m
       The job specified by the does not exist.

       The drmaa_wait() will fail if:

   [1mDRMAA_ERRNO_NO_RUSAGE[0m
       This error code is returned by drmaa_wait() when a job has finished but
       no rusage and stat data could be provided.


[1mSEE ALSO[0m
       [4mdrmaa_submit[24m(3).



GE 6.0                   $Date: 2004/11/12 15:40:05 $            drmaa_wait(3)
