Skip to main content

bmod

Overview

bmod modifies parameters of submitted jobs.

warning
  • Reducing requested resources while a job is running does not reduce actual usage, so other jobs may cause node load to become too high.

Parameters

OptionDescriptionKey Differences
-helpPrint command usage and exitProvides more detailed help information
-VPrint versionNo difference
-versionPrint version informationNo difference
-GModify user group nameMaps to the account field
-GnClear user group nameNo difference
-PModify project nameMaps to the wckey field
-PnClear project nameNo difference
-rEnable automatic requeueNo difference
-rnDisable automatic requeueNo difference
-wModify job dependenciesSupports done(id), ended(id), exit(id,code)
-wnClear job dependenciesNo difference
-cwdModify job working directoryNo difference
-cwdnClear working directoryNo difference
-oModify standard output file (append mode)No difference
-onClear standard output fileNo difference
-ooModify standard output file (overwrite mode)No difference
-spModify job priorityNo difference
-spnClear job priorityNo difference
-JModify job nameNo difference
-JdModify job descriptionNo difference
-JdnClear job descriptionNo difference
-JnClear job nameNo difference
-RReplace resource requirementsSupports only rusage[mem=X] (memory MB), rusage[tmp=X] (temp disk MB), span[ptile=X] (tasks per node), span[hosts=X] (node count)
-RnClear resource requirementsNo difference
-xSet exclusive node allocationNo difference
-xnClear exclusive node allocationNo difference
-mModify execution host listNo difference
-mnClear execution host listNo difference
-nModify task count (min_tasks[,max_tasks])No difference
-nnClear task countNo difference
-qModify queue nameNo difference
-qnClear queue nameNo difference
-UModify reservation nameNo difference
-UnClear reservationNo difference
-bModify job start timeNo difference
-bnClear job start timeNo difference
-tModify job termination deadlineNo difference
-tnClear termination deadlineNo difference
-WModify run time limit ([hour:]minute)No difference
-WeSet estimated run time ([hour:]minute)No difference
-We+Increase run time ([hour:]minute)Increases based on current TimeLimit
-WenClear estimated run timeNo difference
-WepExtend run time by percentageExtends based on a percentage of current TimeLimit
-WnClear run time limitNo difference

job_id Parameters

FormatDescriptionKey Differences
job_IDModify the job with the specified IDNo difference
job_ID[index]Modify a specific task in a job arrayNo difference
job_ID[start-end]Modify a range of tasks in a job arrayNo difference

Cluster Configuration

Modify the following configuration to use the plugin select/cons_tres_ex for changing resource requests of running tasks.

SelectType=select/cons_tres_ex

Limits for Modifying Running Jobs

For running jobs (RUNNING state), bmod only supports modifying the following parameters:

CategorySupported OptionsNotes
Memory resources-R "rusage[mem=X]"Modify memory requirements
Time limits-W, -We, -We+, -Wep, -Wn, -WenModify run time limits
Requeue-r, -rnEnable/disable automatic requeue

For pending jobs (PENDING state), all supported parameters can be modified.

For completed jobs, no parameters can be modified.

Examples

  1. Modify memory requirements for a running job

    [root@head-1 ~]# bsub -R "rusage[mem=8000]" sleep 300
    Job <303> is submitted to default queue.
    [root@head-1 ~]# bsub -R "rusage[mem=8000]" sleep 300
    Job <304> is submitted to default queue.
    [root@head-1 ~]# bjobs
    JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
    303 root RUN partition- head-1 compute-1 sleep 300 Dec 5 14:52
    304 root PEND partition- head-1 sleep 300 Dec 5 14:52
    [root@head-1 ~]# bmod -R "rusage[mem=1000]" 303
    Parameters of job <303> are being changed
    [root@head-1 ~]# bjobs -l

    Job <303>, User <root>, Project <*>, Status <RUN>, Queue <partition-9C3RA>, Command <sleep
    300>
    Dec 5 14:52: Submitted from host <head-1>, CWD </root>, Output File </dev/null>, Error File
    </dev/null>, Requested Resources <rusage[mem=1000]>;
    Dec 5 14:52: Started 1 Task(s) on Host(s) <compute-1>, Allocated 1 Slot(s) on Host(s)
    <compute-1>, Execution Home </root>, Execution CWD </root>
    Dec 5 14:55: Resource usage collected.
    MEM: 0 Mbytes; NTHREAD: 3
    PGID: 16165; PIDS: 16165
    PGID: 16172; PIDS: 16172 16174

    MEMORY USAGE:
    MAX MEM: 0 Mbytes
    ------------------------------------------------------------------------------

    Job <304>, User <root>, Project <*>, Status <RUN>, Queue <partition-9C3RA>, Command <sleep
    300>
    Dec 5 14:52: Submitted from host <head-1>, CWD </root>, Output File </dev/null>, Error File
    </dev/null>, Requested Resources <rusage[mem=8000]>;
    Dec 5 14:53: Started 1 Task(s) on Host(s) <compute-1>, Allocated 1 Slot(s) on Host(s)
    <compute-1>, Execution Home </root>, Execution CWD </root>
    Dec 5 14:55: Resource usage collected.
    MEM: 0 Mbytes; NTHREAD: 3
    PGID: 16192; PIDS: 16192
    PGID: 16199; PIDS: 16199 16201

    MEMORY USAGE:
    MAX MEM: 0 Mbytes
  2. Modify job name

    bmod -J "new_name" 12345
  3. Modify job queue

    bmod -q normal 12345
  4. Modify temporary disk requirements

    bmod -R "rusage[tmp=10240]" 12345
  5. Modify job dependencies

    bmod -w "done(12344)" 12345
  6. Enable automatic requeue

    bmod -r 12345
  7. Modify run time limit

    bmod -W 120 12345