qalter(1B)
π qalter(1B) β alter PBS job, bestie edition π
PBS Professional's qalter(1B) manual page is here to help you tweak batch jobs. Think of it as the edit button for your job's attributes β but, like, with rules. β¨
πΈ NAME πΈ
qalter β alter PBS job.
β¨ SYNOPSIS β¨
qalter [-a <date and time>] [-A <account string>]
[-c <checkpoint spec>] [-e <error path>] [-h <hold list>] [-j
<join>] [-k <discard>] [-l <resource list>] [-m <mail events>]
[-M <user list>] [-N <name>] [-o <output path>] [-p <priority>]
[-P <project>] [-r <y|n>] [-S <path list>] [-u <user list>] [-W
<additional attributes>] <job ID> [<job ID> ...]
qalter --version
π¦ DESCRIPTION π¦
The qalter command is used to alter one or more PBS batch jobs. Each of certain job attributes can be modified using the qalter option for that attribute. π
π Required Privilege π
A non-privileged user can alter their own jobs, whether they are queued or running. An Operator or Manager can alter any job, whether it is queued or running.
A non-privileged user can only lower resource requests. A Manager or Operator can raise or lower resource requests.
π₯ Modifying resources and job placement π₯
A Manager or Operator may lower or raise requested resource limits, except for per-process limits such as pcput and pmem, because these are set when the process starts, and enforced by the kernel. A non-privileged user can only lower resource requests.
The qalter command cannot be used by a non-privileged user to alter a custom resource which has been created to be invisible or read-only for users.
If a job is running, the only resources that can be modified are mppnodes, mppt, cput, walltime, min_walltime, and max_walltime.
If a job is queued, any resource mentioned in the options to the qalter command can be modified, but requested modifications must fit within the limits set at the server and queue for the amount of each resource allocated for queued jobs. If a requested modification does not fit within these limits, the modification is rejected. π«
A job's resource request must fit within the queue's and server's resource run limits. If a modification to a resource exceeds the amount of the resource allowed by the queue or server to be used by running jobs, the job is never run. π
Requesting resources includes setting limits on resource usage and controlling how the job is placed on vnodes.
π§ Syntax for Modifying Resources and Job Placement π§
Resources are modified by using the -l option, either in chunks inside of selection statements, or in job-wide requests using <resource name>=<value> pairs. The selection statement is of the form:
-l select=[<N>:]<chunk>[+[<N>:]<chunk> ...]
where N specifies how many of that chunk, and a chunk is of the form:
<resource name>=<value>[:<resource name>=<value> ...]
Job-wide <resource name>=<value> requests are of the form:
-l <resource name>=<value>[,<resource name>=<value> ...]
π The Place Statement π
You choose how your chunks are placed using the place statement. The place statement can contain the following elements, in any order:
-l place=[<arrangement>][:<sharing>][:<grouping>]
where
arrangementβ Whether this chunk is willing to share this vnode or host with other chunks from the same job. One offree|pack|scatter|vscatter.freeβ Place job on any vnodes.packβ All chunks are taken from one host.scatterβ Only one chunk with any MPI processes is taken from a host. A chunk with no MPI processes may be taken from the same vnode as another chunk.vscatterβ Only one chunk is taken from any vnode. Each chunk must fit on a vnode.
sharingβ Whether this chunk is willing to share this vnode or host with other jobs. One ofexcl|shared|exclhost.exclβ Only this job uses the vnodes chosen.sharedβ This job can share the vnodes chosen.exclhostβ The entire host is allocated to the job.
groupingβ Whether the chunks from this job should be placed on vnodes that all have the same value for a resource. Can have only one instance ofgroup=<resource name>.group=<resource name>β Chunks are grouped according to a resource. All vnodes in the group must have a common value for resource, which can be either the built-in resourcehostor a custom vnode-level resource. The resource name must be a string or a string array.
The place statement cannot begin with a colon. Colons are delimiters; use them only to separate parts of a place statement, unless they are quoted inside resource values.
For more on resource requests, usage limits and job placement, see pbs_resources(7B).
π Modifying Attributes π
The user alters job attributes via options to the qalter command. Each qalter option changes a job attribute. See pbs_job_attributes(7B).
The behavior of the qalter command may be affected by any site hooks. Site hooks can modify the job's attributes, change its routing, etc. π
To modify the max_run_subjobs attribute, use qalter -Wmax_run_subjobs=<new value> <job ID>.
π Caveats and Restrictions for Altering Jobs π
When you lengthen the walltime of a running job, make sure that the new walltime will not interfere with any existing reservations etc.
β οΈ If any of the modifications to a job fails, none of the job's attributes is modified.
A job that is in the process of provisioning cannot be altered.
π OPTIONS π
-a <date and time>β Changes the point in time after which the job is eligible for execution. Given in pairs of digits. Sets job'sExecution_Timeattribute to date and time. Format:[[[[CC]YY]MM]DD]hhmm[.SS]
where CC is the century, YY is the year, MM is the month, DD is the day of the month, hh is the hour, mm is the minute, and SS is the seconds.
Each portion of the date defaults to the current date, as long as the next-smaller portion is in the future. For example, if today is the 3rd of the month and the specified day DD is the 5th, the month MM is set to the current month.
If a specified portion has already passed, the next-larger portion is set to one after the current date. For example, if the day DD is not specified, but the hour hh is specified to be 10:00 a.m. and the current time is 11:00 a.m., the day DD is set to tomorrow.
The job's Execution_Time attribute can be altered after the job has begun execution, in which case it will not take effect until the job is rerun.
-A <account string>β Replaces the accounting string associated with the job. Used for labeling accounting data. Sets job'sAccount_Nameattribute to account string. This attribute cannot be altered once the job has begun execution.
Format: String
-c <checkpoint spec>β Changes when the job will be checkpointed. Sets job'sCheckpointattribute. An$actionscript is required to checkpoint the job. See thepbs_mom(8B)man page. This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
The argument checkpoint spec can take one of the following values:
cβ Checkpoint at intervals, measured in CPU time, set on job's execution queue. If no interval set at queue, job is not checkpointed.c=<minutes of CPU time>β Checkpoint at intervals of specified number of minutes of job CPU time. This value must be greater than zero. If interval specified is less that that set on job's execution queue, queue's interval is used. Format: Integerwβ Checkpoint at intervals, measured in walltime, set on job's execution queue. If no interval set at queue, job is not checkpointed.w=<minutes of walltime>β Checkpoint at intervals of the specified number of minutes of job walltime. This value must be greater than zero. If the interval specified is less than that set on the job's execution queue, the queue's interval is used. Format: Integernβ No checkpointing.sβ Checkpoint only when the server is shut down.uβ Unset. Defaults to behavior when interval argument is set tos.
Default: u Format: String
-e <error path>β Replaces the path to be used for the job's standard error stream. Sets job'sError_Pathattribute to error path. Overridden by-koption. Format:[<hostname>:]<path>
The error path is interpreted as follows:
pathβ If path is relative, it is taken to be relative to the current working directory of theqaltercommand, where it is executing on the current host.
If path is absolute, then it is taken to be an absolute path on the current host where the qalter command is executing.
hostname:pathβ If path is relative, it is taken to be relative to the user's home directory on the host named hostname.
If path is absolute, it is the absolute path on the host named hostname.
If path does not include a filename, the default filename is <job ID>.ER.
If the -e option is not specified, PBS writes standard error to the default filename, which has this form: <job name>.e<sequence number>.
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
If you use a UNC path, the hostname is optional. If you use a non-UNC path, the hostname is required.
-h <hold list>β Updates the job's hold list. Adds hold list to the job'sHold_Typesattribute. The hold list is a string of one or more characters. The following table shows the holds and the privilege required to set each:
Hold β Meaning β Who Can Set
uβ Meaning: User β Who can set: Job owner, Operator, Manager, administrator, root
okay so the rest of that access table is giving:
oβ Other β Operator, Manager, administrator, rootsβ System β Manager, administrator, root, PBS (dependency)nβ None β Job owner, Operator, Manager, administrator, rootpβ Bad password β Administrator, root
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
-j <join>β Changes whether and how to join the job's standard error and standard output streams. Sets the job'sJoin_Pathattribute to join. π
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
The join argument can take the following values:
oeβ Standard error and standard output are merged into standard output.eoβ Standard error and standard output are merged into standard error.nβ Standard error and standard output are not merged.
Default: n; not merged
-k <discard>β Changes whether and which of the standard output and standard error streams is left behind on the execution host, and whether they are written to their final destinations. Sets the job'sKeep_Filesattribute to discard. π
This attribute cannot be altered once the job has begun execution. no cap, lock it in before it starts.
In the case where output and/or error is retained on the execution host in a job-specific staging and execution directory created by PBS, these files are deleted when PBS deletes the directory.
Default: n; neither is retained, and files are not written to final destinations
The discard argument can take the following values:
eβ The standard error stream is retained on the execution host, in the job's staging and execution directory. The filename is:<job name>.e<sequence number>oβ The standard output stream is retained on the execution host, in the job's staging and execution directory. The filename is:<job name>.o<sequence number>eo,oeβ Both standard output and standard error streams are retained on the execution host, in the job's staging and execution directory.dβ Output and/or error are written directly to their final destination. Overrides the action of leaving files behind on the execution host.nβ Neither stream is retained.
-l <resource list>β Allows the user to change requested resources and job placement. Sets job'sResource_listattribute to resource list. Uses resource request syntax. Requesting a resource places a limit on its usage. Users without manager or operator privilege cannot alter a custom resource which was created to be invisible or read-only for users. β¨
For syntax, see Syntax for Modifying Resources and Job Placement above.
If a requested modification to a resource would exceed the server's or job queue's limits, the resource request is rejected. Which resources can be altered is system-dependent.
If the job was submitted with an explicit -l select=, vnode-level resources must be qaltered using the -l select= form. In this case a vnode level resource <resource> cannot be qaltered with the -l <resource name> form.
The place statement cannot begin with a colon. periodt.
For example:
Submit the job:
% qsub -l select=1:ncpus=2:mem=512mb jobscript
Job's ID is 230
qalter the job using "-l <resource name>" form:
% qalter -l ncpus=4 230
Error reported by qalter:
qalter: Resource must only appear in "select"
specification when select is used: ncpus 230
qalter the job using the "-l select=" form:
% qalter -l select=1:ncpus=4:mem=512mb 230
No error reported by qalter:
%
For more on resource requests, usage limits and job placement, see pbs_resources(7B).
-m <mail events>β Changes the set of conditions under which mail about the job is sent. Sets job'sMail_Pointsattribute to mail events. The mail events argument can be one of the following: the single charactern; any combination ofa,b, ande, with optionalj. π¬
The following table lists the sub-options to the -m option:
nβ No mail is sentaβ Mail is sent when the job is aborted by the batch systembβ Mail is sent when the job begins executioneβ Mail is sent when the job terminatesjβ Mail is sent for subjobs. Must be combined with one or more of thea,b, oresub-options
Can be used with job arrays but not subjobs.
Format: String Syntax: n | [j](one or more of a, b, e) Example: -m ja Default: a
-M <user list>β Alters list of users to whom mail about the job is sent. Sets job'sMail_Usersattribute to user list. π
Format:
<username>[@<hostname>][,<username>[@<hostname>],...]
Default: job owner
-N <name>β Renames the job. Sets job'sJob_Nameattribute to name. π·οΈ
Format: Job Name Default: if a script is used to submit the job, the job's name is the name of the script. If no script is used, the job's name is STDIN.
-o <output path>β Alters path to be used for the job's standard output stream. Sets job'sOutput_Pathattribute to output path. Overridden by-koption.
Format:
[<hostname>:]<path>
The output path is interpreted as follows:
pathβ If path is relative, it is taken to be relative to the current working directory of the command, where it is executing on the current host.
If path is absolute, it is taken to be an absolute path on the current host where the command is executing.
hostname:pathβ If path is relative, it is taken to be relative to the user's home directory on the host named hostname.
If path is absolute, it is the absolute path on the host named hostname.
If path does not include a filename, the default filename is <job ID>.OU
If the -o option is not specified, PBS writes standard output to the default filename, which has this form: <job name>.o<sequence_number>
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
If you use a UNC path, the hostname is optional. If you use a non-UNC path, the hostname is required.
-p <priority>β Alters priority of the job. Sets job'sPriorityattribute to priority. π₯
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
Format: Host-dependent integer Range: [-1024, +1023] inclusive Default: Zero
-P <project>β Specifies a project for the job. Sets job'sprojectattribute to specified value. π
Format: Project Name Default: _pbs_project_default
-r <y|n>β Changes whether the job is rerunnable. Sets job'sRerunableattribute to the argument. Does not affect how the job is handled when the job is unable to begin execution. See theqrerun(1B)command. π
Format: Single character, y or n
yβ Job is rerunnable.nβ Job is not rerunnable.
Default: y
Interactive jobs are not rerunnable. Job arrays are always rerunnable.
R <remove options>β Changes whether standard output and/or standard error files are automatically removed upon job completion. Sets job'sRemove_Filesattribute to remove options. Overrides default path names for these streams. Overrides-oand-eoptions. ποΈ
This attribute cannot be altered once the job has begun execution.
Default: Unset; neither is removed
The remove options argument can take the following values:
eβ The standard error stream is removed (deleted) upon job completionoβ The standard output stream is removed (deleted) upon job completioneo,oeβ Both standard error and standard output streams are removed (deleted) upon job completionunsetβ Neither stream is removed
-S <path list>β Specifies the interpreter or shell path for the job script. Sets job'sShell_Path_Listattribute to path list. π
The path_list argument is the full path to the interpreter or shell including the executable name.
Only one path may be specified without a hostname. Only one path may be specified per named host. The path selected is the one whose hostname is that of the server on which the job resides.
This attribute can be altered after the job has begun execution, in which case the new value will not take effect until the job is rerun.
Format:
<path>[@<hostname>][,<path>@<hostname> ...]
If the path contains spaces, it must be quoted, for example:
qsub -S "C:Program Files\PBS Pro\bin\pbs_python.exe"
<script name>
Default: User's login shell on execution node
Example of using bash via a directive:
#PBS -S /bin/bash@mars,/usr/bin/bash@jupiter
Example of using a Python script from the command line on Linux:
qsub -S $PBS_EXEC/bin/pbs_python <script name>
Example of using a Python script from the command line on Windows:
qsub -S PBS_EXEC\bin\pbs_python.exe <script name>
-u <user list>β changes the whole list of usernames the job can run as, and sets the job'sUser_Listattribute. π
Only one username may be specified without a hostname. Only one username may be specified per named host. When the server picks, it goes in this order: first the username whose hostname matches the server name, and if that doesn't exist, the username with no hostname specified. The usernames on the server and the execution hosts have to be the same, and the job owner needs authorization to run as the specified user. π
This attribute cannot be altered once the job has begun execution β so like, decide early, bestie. π
Format:
<username>[@<hostname>][,<username>@<hostname> ...]
Default: job owner (the username on the submit host).
-W <additional attributes>β each sub-option under-Wlets you change one specific job attribute. π
Format:
-W <attribute name>=<value>[,<attribute name>=<value>...]
If white space occurs inside the additional attributes argument, or the equal sign = occurs inside an attribute value string, you gotta wrap that argument or string in single or double quotes. π
PBS supports these attributes via the -W option:
depend=<dependency list>
Defines dependencies between this job and other jobs. Sets the job's depend attribute to the dependency list. That list has the form:
<type>:<arg list>[,<type>:<arg list> ...]
where, except for the on type, the arg list is one or more PBS job IDs in the form:
<job ID>[:<job ID> ...]
The types and their argument lists can be:
after:<arg list>β this job may be scheduled for execution at any point after all jobs in arg list have started execution. πafterok:<arg list>β this job may be scheduled for execution only after all jobs in arg list have terminated with no errors. See "Warning about exit status with csh" in EXIT STATUS. β¨afternotok:<arg list>β this job may be scheduled for execution only after all jobs in arg list have terminated with errors. See "Warning about exit status with csh" in EXIT STATUS. πafterany:<arg list>β this job may be scheduled for execution after all jobs in arg list have finished execution, with any exit status (with or without errors). Heads up: this job will not run if a job in the arg list was deleted without ever having been run. πbefore:<arg list>β jobs in arg list may begin execution once this job has begun execution.beforeok:<arg list>β jobs in arg list may begin execution once this job terminates without errors. See "Warning about exit status with csh" in EXIT STATUS. π¦beforenotok:<arg list>β if this job terminates execution with errors, jobs in arg list may begin. See "Warning about exit status with csh" in EXIT STATUS. πbeforeany:<arg list>β jobs in arg list may begin execution once this job terminates execution, with or without errors.on:countβ this job may be scheduled for execution aftercountdependencies on other jobs have been satisfied. This type is used in conjunction with one of thebeforetypes listed above.countis an integer greater than0. π’
Restrictions β job IDs in the arg list of before types must have been submitted with a type of on.
To use the before types, the user must have the authority to alter the jobs in arg list. Otherwise the dependency is rejected and the new job is aborted. π¨
Error processing of the existence, state, or condition of the job on which the newly submitted job depends happens after the job is queued. If an error is detected, the new job is deleted by the server, and mail is sent to the job submitter stating the error. π¬
Dependency examples:
qalter -W depend=afterok:123.host1.domain.com /tmp/script
qalter -W depend=before:234.host1.com:235.host1.com /tmp/script
group_list=<group list>
Alters the list of group names; the job will run under a group name from this list. Sets the job's group_List attribute to group list. πΈ
Only one group name may be specified without a hostname. Only one group name may be specified per named host. The server on which the job resides selects first the group name whose hostname is the same as the server name; failing that, the next selection is the group name with no specified hostname. The group names on the server and the execution hosts must be the same. π«Ά
Format:
<group>[@<hostname>][,<group>@<hostname> ...]
Default: no default.
release_nodes_on_stageout=<value>
When set to True, all of the job's vnodes that are not on the primary execution host are released when stageout begins. π
Cannot be used with vnodes tied to Cray X* series systems.
When cgroups is enabled and this is used with some but not all vnodes from one MoM, resources on those vnodes that are part of a cgroup are not released until the entire cgroup is released. π¬
The job's stageout attribute must be set for the release_nodes_on_stageout attribute to take effect.
Format: Boolean Default: False
run_count=<count>
Sets the number of times the server thinks it has run the job. Sets the job's run_count attribute to count. π
Can be set while the job is running.
Job is held when the value of this attribute goes over 20. β οΈ
Format: integer greater than or equal to zero
sandbox=<sandbox spec>
Changes which directory PBS uses for the job's staging and execution. Sets the job's sandbox attribute to the value of sandbox spec. π
Format: String
Allowed values for sandbox spec:
PRIVATEβ PBS creates a job-specific directory for staging and execution.HOMEor unset β PBS uses the user's home directory for staging and execution.
stagein=<path list>
stageout=<path list>
Changes files or directories to be staged in before execution, or staged out after execution is complete. Sets the job's stagein and stageout attributes to the specified path lists. On completion of the job, all staged-in and staged-out files and directories are removed from the execution host(s). π§Ή
A path list has the form:
<filespec>[,<filespec>]
where filespec is
<execution path>@<hostname>:<storage path>
regardless of the direction of the copy. The execution path is the name of the file or directory on the primary execution host. It can be relative to the staging and execution directory on the execution host, or it can be an absolute path. π€οΈ
The @ character separates the execution path from the storage path.
The storage path is the path on hostname. The name can be relative to the staging and execution directory on the primary execution host, or it can be an absolute path.
If the path list has more than one filespec β i.e. it contains commas β it must be enclosed in double quotes. π
If you use a UNC path, the hostname is optional. If you use a non-UNC path, the hostname is required.
umask=<value>
Alters the umask with which the job is started. Controls the umask of the job's standard output and standard error. Sets the job's umask attribute to value. π
Format: one to four digits; typically two Default: 077
The following example allows group and world read of the job's output and error:
-W umask=33
--versionβqalterreturns its PBS version information and exits. This option can only be used alone. π
β¨ OPERANDS β¨
The qalter command accepts a job ID list as its operand. The job ID list is a space-separated list of one or more job IDs, for normal jobs or array jobs. π
Subjobs and ranges of subjobs are not alterable. π«
Job IDs have the form:
<sequence number>[.<server name>][@<server name>]
<sequence number>[][.<server name>][@<server name>]
Ngl, some shells require that you enclose a job array ID in double quotes. Just a lil heads up. π
π STANDARD ERROR π
The qalter command writes a diagnostic message to standard error for each error occurrence.
π EXIT STATUS π
- Zero β upon successful processing of input β
- Greater than zero β upon failure π
Warning about exit status with csh
If a job is run in csh and a .logout file exists in the home directory in which the job executes, the exit status of the job is that of the .logout script β not the job script. And likeβ¦ this may impact any inter-job dependencies. π¬ Fr fr, watch out for that one.
π¦ SEE ALSO π¦
pbs_job_attributes(7B), pbs_resources(7B), qdel(1B), qhold(1B), qmove(1B), qmsg(1B), qrerun(1B), qrls(1B), qselect(1B), qstat(1B), qsub(1B)
K that's the whole page, bestie β you're officially a qalter girlie now. π
β¨ This one's the Local flavor, dated 25 January 2021, and it's qalter(1B) all the way down. Go forth and alter responsibly π«Άπ
π¦ where this page comes from
- nixos 26.05: openpbs 23.06.06-unstable-2026-04-02
- nixpkgs unstable: openpbs 23.06.06-unstable-2026-04-02
- Copyright (C) 1994-2021 Altair Engineering, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms