drmaa_wait(3)                  Grid Engine DRMAA                 drmaa_wait(3)



NNAAMMEE
       drmaa_synchronize,   drmaa_wait,   drmaa_wifexited,  drmaa_wexitstatus,
       drmaa_wifsignaled, drmaa_wtermsig, drmaa_wcoredump, drmaa_wifaborted  -
       Waiting for jobs to finish


SSYYNNOOPPSSIISS
       ##iinncclluuddee ""ddrrmmaaaa..hh""

       iinntt ddrrmmaaaa__ssyynncchhrroonniizzee((
              ccoonnsstt cchhaarr **jjoobb__iiddss[[]],,
              ssiiggnneedd lloonngg ttiimmeeoouutt,,
              iinntt ddiissppoossee,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wwaaiitt((
              ccoonnsstt cchhaarr **jjoobb__iidd,,
              cchhaarr **jjoobb__iidd__oouutt,,
              ssiizzee__tt jjoobb__iidd__oouutt__lleenn,,
              iinntt **ssttaatt,,
              ssiiggnneedd lloonngg ttiimmeeoouutt,,
              ddrrmmaaaa__aattttrr__vvaalluueess__tt ****rruussaaggee,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaaggnnooiiss__lleenn
       ));;

       iinntt ddrrmmaaaa__wwiiffaabboorrtteedd((
              iinntt **aabboorrtteedd,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wwiiffeexxiitteedd((
              iinntt **eexxiitteedd,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wwiiffssiiggnnaalleedd((
              iinntt **ssiiggnnaalleedd,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wwccoorreedduummpp((
              iinntt **ccoorree__dduummppeedd,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wweexxiittssttaattuuss((
              iinntt **eexxiitt__ssttaattuuss,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;

       iinntt ddrrmmaaaa__wwtteerrmmssiigg((
              cchhaarr **ssiiggnnaall,,
              ssiizzee__tt ssiiggnnaall__lleenn,,
              iinntt ssttaatt,,
              cchhaarr **eerrrroorr__ddiiaaggnnoossiiss,,
              ssiizzee__tt eerrrroorr__ddiiaagg__lleenn
       ));;


DDEESSCCRRIIPPTTIIOONN
       The  drmaa_synchronize()  function  blocks the calling thread until all
       jobs specified in _j_o_b___i_d_s have failed or finished execution. If _j_o_b___i_d_s
       contains  'DRMAA_JOB_IDS_SESSION_ALL', then this function waits for all
       jobs submitted during this DRMAA session.  The  _j_o_b___i_d_s  pointer  array
       must be _N_U_L_L terminated.

       To  prevent  blocking indefinitely in this call, the caller may use the
       _t_i_m_e_o_u_t, 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 _t_i_m_e_o_u_t 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 _d_i_s_p_o_s_e parameter specifies how to treat reaping  information.   If
       '0'  is  passed to this parameter, job finish information will still be
       available when _d_r_m_a_a___w_a_i_t(3) is used. If '1' is  passed,  _d_r_m_a_a___w_a_i_t(3)
       will be unable to access this job's finish information.

   ddrrmmaaaa__wwaaiitt(())
       The  drmaa_wait()  function blocks the calling thread until a job fails
       or finishes execution.  This routine is modeled on  the  _w_a_i_t_4(3)  rou-
       tine.   If  the special string 'DRMAA_JOB_IDS_SESSION_ANY' is passed as
       _j_o_b___i_d, this routine will wait for any job from the session.  Otherwise
       the  _j_o_b___i_d  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 _t_i_m_e_-
       _o_u_t,  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  _t_i_m_e_o_u_t  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
       _d_r_m_a_a___w_a_i_t(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  _d_r_m_a_a___w_a_i_t(3)  multiple
       times for the same _j_o_b___i_d.

       If  _j_o_b___i_d___o_u_t  is not a null pointer, then on return from a successful
       _d_r_m_a_a___w_a_i_t(3) call, up to _j_o_b___i_d___o_u_t___l_e_n characters from the job id  of
       the failed or finished job are returned.

       If  _s_t_a_t  is  not  a  null  pointer,  then  on return from a successful
       _d_r_m_a_a___w_a_i_t(3) call, the status of the job  is  stored  in  the  integer
       pointed  to by _s_t_a_t.  _s_t_a_t indicates whether job failed or finished and
       other information. The information encoded in the integer value can  be
       accessed   via   _d_r_m_a_a___w_i_f_a_b_o_r_t_e_d(3)  _d_r_m_a_a___w_i_f_e_x_i_t_e_d(3)  _d_r_m_a_a___w_i_f_s_i_g_-
       _n_a_l_e_d(3) _d_r_m_a_a___w_c_o_r_e_d_u_m_p(3) _d_r_m_a_a___w_e_x_i_t_s_t_a_t_u_s(3) _d_r_m_a_a___w_t_e_r_m_s_i_g(3).

       If _r_u_s_a_g_e is not a null pointer,  then  on  return  from  a  successful
       _d_r_m_a_a___w_a_i_t(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
       _d_r_m_a_a___g_e_t___n_e_x_t___a_t_t_r___v_a_l_u_e(3).      Each     string     returned      by
       _d_r_m_a_a___g_e_t___n_e_x_t___a_t_t_r___v_a_l_u_e(3)  will  be  of  the  format <name>=<value>,
       where <name> and <value> specify name and amount of resources  consumed
       by  the job, respectively.  See _a_c_c_o_u_n_t_i_n_g(5) for an explanation of the
       resource information.


   ddrrmmaaaa__wwiiffaabboorrtteedd(())
       The drmaa_wifaborted() function evaluates into the integer  pointed  to
       by  _a_b_o_r_t_e_d a non-zero value if _s_t_a_t was returned from a job that ended
       before entering the running state.


   ddrrmmaaaa__wwiiffeexxiitteedd(())
       The drmaa_wifexited() function evaluates into the integer pointed to by
       _e_x_i_t_e_d a non-zero value if _s_t_a_t 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  _d_r_m_a_a___w_e_x_i_t_-
       _s_t_a_t_u_s(3)  will  not  provide exit status information. A non-zero value
       returned in _e_x_i_t_e_d indicates more detailed diagnosis can be provided by
       means   of  _d_r_m_a_a___w_i_f_s_i_g_n_a_l_e_d(3),  _d_r_m_a_a___w_t_e_r_m_s_i_g(3)  and  _d_r_m_a_a___w_c_o_r_e_-
       _d_u_m_p(3).


   ddrrmmaaaa__wwiiffssiiggnnaalleedd(())
       The drmaa_wifsignaled() function evaluates into the integer pointed  to
       by _s_i_g_n_a_l_e_d a non-zero value if _s_t_a_t 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 _d_r_m_a_a___w_t_e_r_m_s_i_g(3)
       will not provide signal information. A non-zero value returned in  _s_i_g_-
       _n_a_l_e_d  indicates  signal  information  can  be  retrieved  by  means of
       _d_r_m_a_a___w_t_e_r_m_s_i_g(3).


   ddrrmmaaaa__wwccoorreedduummpp(())
       If _d_r_m_a_a___w_i_f_s_i_g_n_a_l_e_d(3) returned  a  non-zero  value  in  the  _s_i_g_n_a_l_e_d
       parameter,  the  drmaa_wcoredump()  function evaluates into the integer
       pointed to by _c_o_r_e___d_u_m_p_e_d a non-zero value if a core image of the  ter-
       minated job was created.


   ddrrmmaaaa__wweexxiittssttaattuuss(())
       If  _d_r_m_a_a___w_i_f_e_x_i_t_e_d(3)  returned a non-zero value in the _e_x_i_t_e_d parame-
       ter,  the  drmaa_wexitstatus()  function  evaluates  into  the  integer
       pointed to by _e_x_i_t___c_o_d_e the exit code that the job passed to _e_x_i_t(2) or
       the value that the child process returned from main.


   ddrrmmaaaa__wwtteerrmmssiigg(())
       If _d_r_m_a_a___w_i_f_s_i_g_n_a_l_e_d(3) returned  a  non-zero  value  in  the  _s_i_g_n_a_l_e_d
       parameter,  the  drmaa_wtermsig()  function evaluates into _s_i_g_n_a_l up to
       _s_i_g_n_a_l___l_e_n 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.


EENNVVIIRROONNMMEENNTTAALL VVAARRIIAABBLLEESS
       SSGGEE__RROOOOTT       Specifies  the location of the Grid Engine standard con-
                      figuration files.

       SSGGEE__CCEELLLL       If 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. ddeeffaauulltt.


       SSGGEE__DDEEBBUUGG__LLEEVVEELL
                      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.

       SSGGEE__QQMMAASSTTEERR__PPOORRTT
                      If  set,  specifies the tcp port on which _s_g_e___q_m_a_s_t_e_r(8)
                      is expected to listen for communication requests.   Most
                      installations  will  use a services map entry instead to
                      define that port.

RREETTUURRNN VVAALLUUEESS
       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 _e_r_r_o_r___d_i_a_g___l_e_n characters of error related  diag-
       nosis information is then provided in the buffer _e_r_r_o_r___d_i_a_g_n_o_s_i_s.


EERRRROORRSS
       The  drmaa_synchronize(), drmaa_wait(), drmaa_wifexited(), drmaa_wexit-
       status(), drmaa_wifsignaled(), drmaa_wtermsig(), drmaa_wcoredump(), and
       drmaa_wifaborted() will fail if:

   DDRRMMAAAA__EERRRRNNOO__IINNTTEERRNNAALL__EERRRROORR
       Unexpected or internal DRMAA error, like system call failure, etc.

   DDRRMMAAAA__EERRRRNNOO__DDRRMM__CCOOMMMMUUNNIICCAATTIIOONN__FFAAIILLUURREE
       Could not contact DRM system for this request.

   DDRRMMAAAA__EERRRRNNOO__AAUUTTHH__FFAAIILLUURREE
       The  specified  request is not processed successfully due to authoriza-
       tion failure.

   DDRRMMAAAA__EERRRRNNOO__IINNVVAALLIIDD__AARRGGUUMMEENNTT
       The input value for an argument is invalid.

   DDRRMMAAAA__EERRRRNNOO__NNOO__AACCTTIIVVEE__SSEESSSSIIOONN
       Failed because there is no active session.

   DDRRMMAAAA__EERRRRNNOO__NNOO__MMEEMMOORRYY
       Failed allocating memory.

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

   DDRRMMAAAA__EERRRRNNOO__EEXXIITT__TTIIMMEEOOUUTT
       Time-out condition.

   DDRRMMAAAA__EERRRRNNOO__IINNVVAALLIIDD__JJOOBB
       The job specified by the does not exist.

       The drmaa_wait() will fail if:

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


SSEEEE AALLSSOO
       _d_r_m_a_a___s_u_b_m_i_t(3).



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