qsub is a command-line tool used for submitting batch jobs to the queue management system TORQUE. TORQUE (Terascale Open-source Resource and QUEue Manager) is a widely used open-source tool that manages the distribution of computational jobs across a cluster or network of computers.
Using qsub, you can submit a script file containing a series of commands to the TORQUE queue. When the script is submitted, it is added to the queue and executed by the available compute nodes in the cluster according to a set of specified rules and priorities.
If you encounter the below error while running the command qsub:
qsub: command not found
you may try installing the below package as per your choice of distribution:
Distribution | Command |
---|---|
Debian | apt-get install slurm-llnl-torque |
Ubuntu | apt-get install slurm-llnl-torque |
Kali Linux | apt-get install slurm-wlm-torque |
Fedora | dnf install gridengine |
Raspbian | apt-get install torque-client-x11 |
qsub Command Examples
1. Submit a script with default settings (depends on TORQUE settings):
# qsub script.sh
2. Submit a script with a specified wallclock runtime limit of 1 hour, 2 minutes and 3 seconds:
# qsub -l walltime=1:2:3 script.sh
3. Submit a script that is executed on 2 nodes using 4 cores per node:
# qsub -l nodes=2:ppn=4 script.sh
4. Submit a script to a specific queue. Note that different queues can have different maximum and minimum runtime limits:
# qsub -q queue_name script.sh
Summary
It is important to note that qsub is just one component of the larger TORQUE system, and requires a properly configured TORQUE installation in order to function. Additionally, submitting jobs to a TORQUE queue requires some knowledge of cluster computing and batch job management.
Overall, qsub is a powerful tool for submitting batch jobs to a cluster or network of computers, and is widely used in scientific computing and other applications that require distributed computing resources.