Command arguments for job submission and execution controls

esub arguments provide flexibility for filtering and modifying job submissions by letting you specify options for esub executables. As of LSF release 9.1.1.1, bsub –a supports arguments for a given esub executable. Users can customize their esub applications, put them under LSF_SERVERDIR, and then submit jobs as bsub –a “application_name” user_job.

Specifying esub arguments means it is unnecessary to write scripts for different permutations of input. For example, to check if the resource requirements exceed some bound, an argument for specifying the bound can be passed to the esub executable. It is not necessary to write a separate script for every bound.

As another example, in the case of Energy Aware Scheduling, a user may want to specify a certain energy or performance goal. Instead of providing and maintaining a separate esub for each possible choice (for example, bsub -a energy_hi energy_low enery_max_performance etc.), one esub can handle all the related options (for example, “-a eas=a,b,c”).

You can:
  • Specify arguments for esub executables with command bsub -a
  • Modify arguments for esub executables for a submitted job with command bmod -a
  • Specify arguments for esub executables when restarting a job with command brestart -a
The following are some examples of how to specify arguments for esub executables:
  • To specify a single argument for a single esub executable, use:

    bsub –a “application_name(var1)” user_job

  • To specify multiple arguments for a single esub executable, use:

    bsub –a “application_name(var1,var2,...,varN)” user_job

  • To specify multiple arguments including a string argument for a single esub executable, use:

    bsub –a “application_name(var1,var2 is a string,...,varN)” user_job

  • To specify arguments for multiple esub, use:

    bsub –a “application_name1(var1,var2) esubname2(var1,var2)” user_job

  • To specify no argument to an esub, use:

    bsub –a “application_name1” user_job

The variables you define in the esub arguments can include environment variables and command output substitution.

Valid esub arguments can contain alphanumeric characters, spaces, special characters (`"\$!) and other characters (~@#%^&*()-=_+[]|{};':,./<>?). Special patterns like variables (e.g., $PATH) and program output (e.g., `ls`) in an esub argument will also be processed.

For example, if you use bsub -a “esub1 ($PATH, `ls`)” user_job, the first argument passed to esub1 would be the value of variable PATH, and the second argument passed to esub1 would be the output of command ls.

You can include a special character in an esub argument with an escape character or a pair of apostrophes (''). The usage may vary among different shells. You can specify an esub argument containing separators ('(', ')', ',') and space characters (' ').

You can also use an escape character '\' to specify arguments containing special characters, separators and space characters. For example:

bsub –a “esubname1(var1,var2 contains \(\)\,)” user_job

For fault tolerance, extra space characters are allowed between entities including esub, separators and arguments. For example, the following is valid input:

bsub -a “ esub1 ( var1 , var2 ) ” user_job

The maximum length allowed for an esub argument is 1024 characters. The maximum number of arguments allowed for an esub is 128.

Note: The same arguments that are passed to esub are also passed to epsub. You cannot pass different arguments to an esub file and an epsub file with the same application name.