Modify running jobs

About this task

Once you submit a job and it is running, you can modify some of the job options, including resource reservation, CPU limit, memory limit, swap limit, and others.
Restriction:

You cannot modify remote running jobs in a MultiCluster environment.

Procedure

Modify resource reservation

About this task

A job is usually submitted with a resource reservation for the maximum amount required. Use this command to decrease the reservation, allowing other jobs access to the resource.

Note:

You can modify additional job options by setting LSB_MOD_ALL_JOBS in lsf.conf.

Procedure

Run bmod -R to modify the resource reservation for a running job.

For example, to set the resource reservation for job 101 to 25MB of memory and 50 MB of swap space:

bmod -R "rusage[mem=25:swp=50]" 101

Modify job options

Before you begin

Set LSB_MOD_ALL_JOBS is specified in lsf.conf. You must be the job owner or an LSF administrator to modify a running job.

Additionally, you must set the following parameters for each type of modification type:

  • To modify the CPU limit of running jobs, LSB_JOB_CPULIMIT=Y must be defined in lsf.conf.

  • To modify the memory limit of running jobs, LSB_JOB_MEMLIMIT=Y must be defined in lsf.conf.

  • To modify the name of job error file for a running job, you must use bsub -e or bmod -e to specify an error file before the job starts running.

About this task

The modified resource limits cannot exceed the resource limits defined in the queue.

Restriction:

You cannot use these options in combination with other bmod options. An error message is issued and the modification fails if these options are used on running jobs in combination with other bmod options.

Procedure

Run bmod with the appropriate option:
  • CPU limit: -c [hour:]minute[/host_name | /host_model] | -cn

  • Memory limit: -M mem_limit | -Mn

  • Rerunnable jobs: -r | -rn

  • Standard error file name: -e error_file | -en

  • Standard output file name: -o output_file | -on

  • Run limit: -W run_limit[/host_name | /host_model] | -Wn

  • Swap limit: -v swap_limit job_id | -vn job_id