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
| Option | Description | Key Differences |
|---|---|---|
-help | Print command usage and exit | Provides more detailed help information |
-V | Print version | No difference |
-version | Print version information | No difference |
-G | Modify user group name | Maps to the account field |
-Gn | Clear user group name | No difference |
-P | Modify project name | Maps to the wckey field |
-Pn | Clear project name | No difference |
-r | Enable automatic requeue | No difference |
-rn | Disable automatic requeue | No difference |
-w | Modify job dependencies | Supports done(id), ended(id), exit(id,code) |
-wn | Clear job dependencies | No difference |
-cwd | Modify job working directory | No difference |
-cwdn | Clear working directory | No difference |
-o | Modify standard output file (append mode) | No difference |
-on | Clear standard output file | No difference |
-oo | Modify standard output file (overwrite mode) | No difference |
-sp | Modify job priority | No difference |
-spn | Clear job priority | No difference |
-J | Modify job name | No difference |
-Jd | Modify job description | No difference |
-Jdn | Clear job description | No difference |
-Jn | Clear job name | No difference |
-R | Replace resource requirements | Supports only rusage[mem=X] (memory MB), rusage[tmp=X] (temp disk MB), span[ptile=X] (tasks per node), span[hosts=X] (node count) |
-Rn | Clear resource requirements | No difference |
-x | Set exclusive node allocation | No difference |
-xn | Clear exclusive node allocation | No difference |
-m | Modify execution host list | No difference |
-mn | Clear execution host list | No difference |
-n | Modify task count (min_tasks[,max_tasks]) | No difference |
-nn | Clear task count | No difference |
-q | Modify queue name | No difference |
-qn | Clear queue name | No difference |
-U | Modify reservation name | No difference |
-Un | Clear reservation | No difference |
-b | Modify job start time | No difference |
-bn | Clear job start time | No difference |
-t | Modify job termination deadline | No difference |
-tn | Clear termination deadline | No difference |
-W | Modify run time limit ([hour:]minute) | No difference |
-We | Set estimated run time ([hour:]minute) | No difference |
-We+ | Increase run time ([hour:]minute) | Increases based on current TimeLimit |
-Wen | Clear estimated run time | No difference |
-Wep | Extend run time by percentage | Extends based on a percentage of current TimeLimit |
-Wn | Clear run time limit | No difference |
job_id Parameters
| Format | Description | Key Differences |
|---|---|---|
job_ID | Modify the job with the specified ID | No difference |
job_ID[index] | Modify a specific task in a job array | No difference |
job_ID[start-end] | Modify a range of tasks in a job array | No 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:
| Category | Supported Options | Notes |
|---|---|---|
| Memory resources | -R "rusage[mem=X]" | Modify memory requirements |
| Time limits | -W, -We, -We+, -Wep, -Wn, -Wen | Modify run time limits |
| Requeue | -r, -rn | Enable/disable automatic requeue |
For pending jobs (PENDING state), all supported parameters can be modified.
For completed jobs, no parameters can be modified.
Examples
-
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 -
Modify job name
bmod -J "new_name" 12345 -
Modify job queue
bmod -q normal 12345 -
Modify temporary disk requirements
bmod -R "rusage[tmp=10240]" 12345 -
Modify job dependencies
bmod -w "done(12344)" 12345 -
Enable automatic requeue
bmod -r 12345 -
Modify run time limit
bmod -W 120 12345