Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

lsb_requeuejob()

Requeues job arrays, jobs in job arrays, and individual jobs.

DESCRIPTION

Use lsb_requeuejob()to requeue job arrays, jobs in job arrays, and individual jobs that are running, pending, done, or exited. In a job array, you can requeue all the jobs or requeue individual jobs of the array.

lsb_requeuejob()requeues jobs as if the jobs were in an array. A job not in an array is considered to be a job array composed of one job.

Jobs in a job array can be requeued independently of each other regardless of any job's status (running, pending, exited, done). A requeued job is requeued to the same queue it was originally submitted from or switched to. The job submission time does not change so a requeued job is placed at the top of the queue. Use lsb_movejob() to place a job at the bottom or any other position in a queue.

If a clean period is reached before lsb_requeuejob() is called, the cleaned jobs cannot be requeued. Set the variable CLEAN_PERIOD in your lsb.params file to determine the amount of time that job records are kept in MBD core memory after jobs have finished or terminated.

To requeue a job assign values to the data members of the jobrequeue data structure, process command line options in case the user has specified a different job, and call lsb_requeue() to requeue the job array.

Assign values to the jobID, status, and options data members of the jobrequeue data structure. Assign the job identification number to jobID. Assign JOB_STAT_PEND or JOB_STAT_PSUSP to status. Assign REQUEUE_DONE, REQUEUE_EXIT, and or REQUEUE_RUN to requeue running jobs.

SYNOPSIS

#include <lsf/lsbatch.h> 
int lsb_requeuejob(struct jobrequeue *) 
struct jobrequeue {
    LS_LONG_INT jobId;
    int status;
    int options;
}; 

PARAMETERS

jobrequeue

This structure contains the information required to requeue a job.

jobId

Specifies the jobid of a single job or an array of jobs.

status

Specifies the lsbatch status of the requeued job after it has been requeued. The job status can be JOB_STAT_PEND or JOB_STATE_PSUSP. The default status is JOB_STAT_PEND.

options

Specifies the array elements to be requeued.

<lsf/lsbatch.h> defines the following flags constructed from bits. These flags correspond to the following options:

REQUEUE_DONE

Requeues jobs that have finished running. Jobs that have exited are not re-run. Equivalent to brequeue -d command line option.

REQUEUE_EXIT

Requeues jobs that have exited. Finished jobs are not re-run. Equivalent to brequeue -e command line option.

REQUEUE_RUN

Requeues running jobs and puts them in PEND state. Equivalent to brequeue -r command line option.

RETURN VALUES

integer:0

The function is successful.

integer:-1

The function failed.

ERRORS

If the function fails, lsberrno is set to indicate the error.

SEE ALSO

Related APIs

lsb_movejob() - Changes the position of a pending job in a queue

lsb_pendreason() - Explains why a job is pending

Equivalent line command

brequeue -d

brequeue -e

brequeue -a

brequeue -r

brequeue -H

Files

lsb.params

LSB_SHAREDIR


Platform Computing Inc.
www.platform.com
Knowledge Center         Contents    Previous  Next