2

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 .

baky
  • 631
  • 1
  • 8
  • 17
  • Would you use if for only interactive jobs? Can you provide a bit more detail about your use case? – Michael Closson Feb 28 '13 at 16:38
  • i would be using it for non-interactive jobs as-well. Case: I would simply like to run jobs on the cluster but i don't want to wait. For interactive jobs, it would be better if LSF displays that couldn't schedule the resource.(as SGE does) . Thanks for your response. :) – baky Mar 04 '13 at 09:33

2 Answers2

1

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.

Michael Closson
  • 902
  • 8
  • 13
  • Hi, while using bsub the job-id is displayed. but for interactive jobs the job-id is not displayed and by default put in pending queue. Is there any way i can know the job-id for the interactive job while still it is in pending queue ? ? – baky Mar 12 '13 at 13:07
  • In the above example, the job id is 7536. Is that enough? – Michael Closson Mar 12 '13 at 16:50
  • 1
    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 – baky Mar 15 '13 at 11:30
1

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

baky
  • 631
  • 1
  • 8
  • 17