The Command settings tab includes all settings related to workload manager commands, i.e., job querying and removal commands.
Go to the Command settings tab.
The settings described here are the same for pre-configured and user-defined workload managers.
Define job commands
The first three commands will poll jobs from a host and will populate the corresponding tabs in the Cluster monitor window.
Job polling commands support the following aliases:
{project} – current project’s name
{author} – name of researcher from General settings page of Pirana settings
{username} – Grid user name from remote host settings (refer to the “Remote hosts” section). If not set, then the current user’s login is used.
In the Poll scheduled jobs field, type the command to retrieve jobs waiting to start execution.
In the Poll running jobs field, type the command to retrieve jobs that are currently executing.
In the Poll finished jobs field, type the command to retrieve finished jobs.
In the Job info field, type the command to retrieve information about a selected job.
If this option is not set, only the Stop jobs option on the right-click menu in the Cluster Monitor window will be available.
In the Delete a job field, type the command to delete unfinished jobs related to a search that is stopped.
Job Info and Delete a job support the alias {job}, which is substituted with selected jobs IDs. Usually this is not necessary and, if the alias is not used, job IDs will be added as a space-separated list to the end of the command (e.g., for SGE: qdel will become qdel 101 102 103, qstat -j will be sent as qstat -j 104). But if the workload manager requires arguments of such commands to be enclosed, e.g., within quotes, it may be entered as: delete_job_command --job={job}
In the Delete all jobs field, type the command to delete all unfinished jobs.
This option is typically used to delete jobs submitted by the current user. It supports the aliases:
{project} – current project’s name
{author} – name of researcher from General settings page of Pirana settings
{username} – Grid user name from remote host settings (refer to the “Remote hosts” section). If not set, then the current user’s login is used.
Define commands for node and queue information
In the Get nodes field, type the command to retrieve information about grid nodes.
In the Get queues field, type the command to retrieve information about grid queues.
Define argument names for priority, job name, and PsN prepend flags
In the Run priority argument field, type the argument to use for the run priority.
The alias {val} can be used in cases where the priority cannot be set as a simple -p argument (e.g., for Slurm: --priority={val}).
In the Job name argument field, type argument to use for the job name.
The aliases {val} and {refined_val} are supported. {refined_val} replaces all non-letters and non-digits in {val} with underscores. For example, if {val} is “Project 1-model2.2”, then {refined_val} is “Project_1_model2_2”.
In the PsN prepend flags argument field, type the argument to use when setting the PsN prepend flags (e.g., for SGI: -sge_prepend_flags).
In the Exclusive PsN arguments field, type any additional PsN arguments to use (e.g., for SGI: -run_on_sge).
These last two arguments will be deleted from the PsN command line when switching job schedulers. For example, if the PsN command for SGE is:
custom_command1; execute -run_on_sge -sge_prepend_flags=’flag1;
flag2 -flag3’ run4.mod
switching to a different job scheduler, such as a custom grid, will change the PsN command to:
execute run4.mod
Use the Defaults button to reload the command settings default values specific to the workload manager. All values are cleared, and, for pre-configured managers, the values shown in the following table are loaded.
Option | SGE | Slurm | Torque/jsub-Torque |
---|---|---|---|
Poll scheduled jobs | qstat -s p | squeue -l -a | grep "\bPENDING\b" | qstat -a | grep "\b [HQSTW] " |
Poll running jobs | qstat -s r | squeue -l -a | grep "\bRUNNING\b" | qstat -a | grep "\b R " |
Poll finished jobs | qstat -s z | squeue -l -a | grep "\bCOMPLETED\b" | qstat -a | grep "\b [CE] " |
Job info | qstat -j | scontrol show job | qstat -f |
Delete a job | qdel | scancel | qdel |
Delete all jobs | qdel -u {username} | scancel -u {username} | qselect -u {username} | xargs qdel |
Get nodes | qhost | scontrol show nodes | pbsnodes |
Get queues | qstat -g c | sinfo -o "%12P %26N %8a %8t %10O %6c" | qstat -Q -f |
Run priority argument | -p | --priority={val} | -p |
Job name argument | -N | -J | -N |
PsN prepend flags argument | -sge_prepend_flags | -slurm_prepend_flags | |
Exclusive PsN arguments | -sge_prepend_flags | -run_on_slurm | -run_on_torque |