Interactive shell

Audience: Faculty, Postdocs, Researchers, Staff and Students

This KB Article References: High Performance Computing
This Information is Intended for: Faculty, Postdocs, Researchers, Staff, Students
Last Updated: March 20, 2018

Requesting an Interactive Session

Torque has an interactive shell that you can use to troubleshoot your code. To use an interactive shell, first make sure that torque is loaded using the module load command:

module load torque/6.0.2

To enter an interactive session you use the qsub command and the -I directive. At minimum, provide the following options to qsub to enable the interactive shell:

qsub -I -q <queue>

You can pass the same additional options to torque as you would in your portable batch script (PBS) file. Some other useful options are:

  • -N <job_name>
  • -l nodes=<num_nodes>:ppn=28, walltime=<hh:mm:ss>
  • -X 

For an interactive job, using X11 forwarding, named test1, using 1 node and 28ppn with an 8hr runtime, on the gpu queue, this would look like:

qsub -I -X -N test1 -l nodes=1:ppn=28,walltime=08:00:00 -q gpu 

Running an Interactive Job

Upon initializing the interactive shell, you will be taken away from the login node. As a result, you should re-load the modules necessary to build and run your program as normal:

module load shared
module load intel-stack

mpicc source_code.c -o my_program

mpirun ./my_program <command_line_args>

All contents sent to stdout will be printed directly to the terminal, unless otherwise directed.

Additional Information


There are no additional resources available for this article.

Getting Help


The Division of Information Technology provides support on all of our services. If you require assistance please submit a support ticket through the IT Service Management system.

Submit A Ticket

Supported By


IACS Support System