Logo Search packages:      
Sourcecode: pbs-drmaa version File versions

int drmaa_run_bulk_jobs ( drmaa_job_ids_t **  jobids,
const drmaa_job_template_t *  jt,
int  start,
int  end,
int  incr,
char *  error_diagnosis,
size_t  error_diag_len 
)

The drmaa_run_bulk_jobs() function submits a set of parametric jobs which can be run concurrently. The attributes defined in the job template, jt are used for every parametric job in the set. Each job in the set is identical except for it's index. The first parametric job has an index equal to start. The next job has an index equal to start + incr, and so on. The last job has an index equal to start + n * incr, where n is equal to (end - start) / incr. Note that the value of the last job's index may not be equal to end if the difference between start and end is not evenly divisble by incr. The smallest valid value for start is 1. The largest valid value for end is 2147483647 (2^31-1). The start value must be less than or equal to the end value, and only positive index numbers are allowed. The index number can be determined by the job in an implementation specific fashion. On success, an opaque job id string vector containing job identifiers for all submitted jobs SHALL be returned into job_ids. The job identifiers in the opaque job id string vector can be extracted using the drmaa_get_next_job_id() function. The caller is responsible for releasing the opaque job id string vector returned into job_ids using the drmaa_release_job_ids() function.

Definition at line 398 of file drmaa_base.c.

References fsd_drmaa_session_get().

{
      DRMAA_API_BEGIN
      fsd_drmaa_session_t *volatile session = NULL;
      fsd_log_enter(( "(jt=%p, start=%d, end=%d, incr=%d)",
            (void*)jt, start, end, incr ));
      TRY
       {
            if( incr > 0 )
             {
                  if( !(0 < start  &&  start <= end) )
                        fsd_exc_raise_code( FSD_ERRNO_INVALID_ARGUMENT );
             }
            else if( incr < 0 )
             {
                  if( !(start >= end  &&  end > 0) )
                        fsd_exc_raise_code( FSD_ERRNO_INVALID_ARGUMENT );
             }
            else
                  fsd_exc_raise_code( FSD_ERRNO_INVALID_ARGUMENT );

            session = fsd_drmaa_session_get();
            *job_ids = (drmaa_job_ids_t*)session->run_bulk(
                        session, (fsd_template_t*)jt,
                        start, end, incr
                        );
       }
      EXCEPT_DEFAULT
       {
            *job_ids = NULL;
            fsd_exc_reraise();
       }
      FINALLY
       {
            if( session )
                  session->release( session );
       }
      END_TRY
      fsd_log_return(( " =0" ));
      DRMAA_API_END
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index