TABLE OF CONTENTS


::pwtk::LSF

PURPOSE

The master command for the LSF batch queuing. It manages the submission to LSF.

USAGE

     LSF { ...script code... }
     LSF file.pwtk
 or
     LSF options { ...script code... }
     LSF options file.pwtk
 or
     LSF profile ?options? { ...script code... }
     LSF profile ?options? file.pwtk

DESCRIPTION

The above "profile" is a user defined profile for LSF, i.e., a set of "#BSUB" directives, whereas the above "options" are the LSF options, specified with the standard Tcl syntax of "-option value", i.e.:

     -option1 value1  -option2  -option3 value3

Here is an example of the usage of the LSF command:

    LSF -n 16 -W 24:00 { import job.pwtk }    (N.B. ...script code... version)

or

    LSF -n 16 -W 24:00 job.pwtk               (N.B. file.pwtk version)

If "profile" is omitted, the "default" profile is used, which is guaranteed to exist because it is defined in the $PWTK/config/lsf.tcl file.

Here is an example of two user defined profiles, named "parallel" and "long":

     lsf_profile parallel {
         #!/bin/sh
         #BSUB -q parallel
         #BSUB -n 8
         #BSUB -W 6:00
     }

     lsf_profile long {
         #!/bin/sh
         #BSUB -q long
         #BSUB -n 64
         #BSUB -W 24:00
     }

It is a good practice to also define the PWTK specifics (aka pwtk_profile) associated with the LSF profiles. For example, for the above "long" profile with -n 64, it would be reasonable to use "mpirun -n 64" as a default. This can be achieved with:

    lsf_pwtk_profile long { prefix mpirun -n 64 }

There is also a compact version which defines the LSF profile and the associated PWTK profile simultaneously, i.e.:

    lsf_profile long {
         #!/bin/sh
         #BSUB -q long
         #BSUB -n 64
         #BSUB -W 24:00
    } {
        prefix mpirun -n 64
    }

Here, the 2nd argument to the 'lsf_profile' command is the LSF profile and the last argument is the associated PWTK profile. This form is recommended because it avoid typos/mismatches between profile and pwtk_profile names.

IMPORTANT

A typical place where to store LSF profiles for frequent use is in the ~/.pwtk/lsf.tcl configuration file (N.B. in the ~/.pwtk/lsf.tcl configuration file, the prefix 'lsf_' can be omitted).

FURTHER DESCRIPTION

The 'lsf_profile' command can be used to define profiles on the fly within the PWTK script, e.g.:

   lsf_profile n24 {
         #!/bin/sh
         #BSUB -n 24
         #BSUB -W 12:00
   } {
        prefix mpirun -np 24
   }

   LSF n24 job.pwtk

The final effect of the LSF command is to submit either the script code encapsulated inside the LSF { ... } command or the script file specified with the LSF command (e.g. LSF file.pwtk) to the LSF job scheduling system via the bsub command.