Running Interactive Jobs
Login nodes are primarily intended to be used for logging in, editing scripts and submitting batch jobs. Interactive work that involves substantial resources, either memory, CPU cycles or file system I/O, should be performed on the compute nodes rather than on login nodes. This page provides instructions and examples of how to run interactive jobs on the Peregrine system. Interactive jobs are those that provide a shell prompt, which allows users to execute commands and scripts as they would on the login nodes.
The Torque command qsub -I should be used to start an interactive session. You do NOT need to ssh to the node after it is assigned. The -V option exports your environment variables to the interactive job.
A valid project handle must be used when you start an interactive session.
The following command requests interactive access to one node for 20 minutes:
% qsub -I -l nodes=1 -l walltime=0:20:00 -A project-handle
If your job needs a GUI that uses X-windows, add the -X flag to the qsub command:
% qsub -I -X -l nodes=1 -l walltime=0:20:00 -A project-handle
The following command requests interactive access to two nodes from the debug queue for 10 minutes and exports environment variables to the session:
% qsub -V -I -l nodes=2:ppn=16,walltime=10:00 -A project-handle -q debug
When resources become available, interactive access is provided by a shell prompt. The user may then work interactively on the node for the time specified.
This job is held until the scheduler can allocate a node to you. You will see a message such as
qsub : waiting for job 12090.admin1 to start
When it has, you'll see a message such as
qsub: job 12090.admin1 ready
This indicates that node 0416 was allocated to the user.
You may load modules, run applications, start GUIs etc. and the commands will execute on that node instead of on the login node.
Type exit when finished using the node.
Interactive jobs are useful for many tasks. For example, to debug a job script, users may submit a request to get a set of nodes for interactive use. When the job starts, the user "lands" on a compute node, with a shell prompt. At that point, users may run scripts and programs on any of the nodes in the set associated with the job. For example:
% qsub -V -I -l nodes=2:ppn=24,walltime=10:00 -A project-handle
qsub: job 12090.admin1 ready
[icarpent@n0416 ~]$ ./run_my_script
Please note that this type of interactive use is independent of what queue a job is submitted to or how quickly resources will be available.
A "debug" queue has been set up to enable a set of nodes to be available with shorter wait times when the system is heavily utilized. This is accomplished by limiting the run time for jobs in that queue to only 1 hour and limiting the maximum number of nodes to 4 per job.
To run an interactive job on one of these nodes, add the -q debug option to the qsub command:
%qsub -V -I -q debug -l nodes=1:ppn=24,walltime=0:60:00 -A project-handle
This queue may also be used for non-interactive jobs. Simply add the -q debug option to the qsub command:
%qsub -V -q debug -l nodes=1:ppn=24,walltime=0:60:00 -A project-handle