Question

In SGE , we have

qsub -now yes/no <command>

By "-now yes" the job is scheduled immediately(if possible) or not at all . We are not put in pending queue .

By "-now no " the job is put in pending queue if it cannot be executed immediately .

But in LSF , we have qsub's equivalent as bsub .

in bsub, we are put in pending queue, if it cannot be executed immediately. We don't have option as "-now yes" as in qsub .

Do we something in bsub as "qsub -now"

P.S : One solution is that we can check for some time(some secondss) after running bsub, if we are scheduled or not and then exit . I am searching for a more elegant way .

Was it helpful?

Solution 2

I found the answer in an LSF way.

LSF does provide a way to quit a job if we its unable to schedule the resource. We hava a environment variable LSF_NIOS_PEND_TIMEOUT(specified in minutes) which quits the job, if its still in pending queue.

 env LSF_NIOS_PEND_TIMEOUT=1 bsub -Is -m host /bin/bash

From Somewhere on the web:
LSF_NIOS_PEND_TIMEOUT
Syntax
LSF_NIOS_PEND_TIMEOUT=minutes
Description
Applies only to interactive batch jobs.
Maximum amount of time that an interactive batch job can remain pending.
If this parameter is defined, and an interactive batch job is pending for longer than the specified time, the interactive batch job is terminated.
Valid values
Any integer greater than zero

OTHER TIPS

LSF doesn't have the same thing. You could use expect w/ a timeout. LSF will output something like this when the job starts. Your expect script could expect <<Starting on. (But this is basically what your P.S. says.)

$ bsub -Is -m hostA /bin/bash
Job <7536> is submitted to default queue <interactive>.
<<Waiting for dispatch ...>>
<<Starting on hostA>>
hostA$ 

You could maybe use lsrun. But it won't work with the batch system to allocate a slot or other resource.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top