How to Run Interactive Jobs

Interactive jobs are used to manually run processes at the command line on the compute nodes. There are two ways to accomplish this:

In both cases, the scheduler will create a job that, when started, will provide a shell prompt on the compute node associated with what would be MPI rank 0 (aka the head node).

To request an interactive session that matches the configuration of an existing PBS file, run the qsub command with the -I parameter. For example, to start an interactive job using a PBS file named pbs.bash that starts with the following directives:

#!/bin/bash

#PBS -j oe

#PBS -l select=1:ncpus=1:mpiprocs=1:ngpus=1:mem=16gb

#PBS -l walltime=00:15:00

Run the following qsub command:

gaea% qsub -I pbs.bash

qsub: waiting for job 10512.cm to start

qsub: job 10512.cm ready

metis@cn18%

Note that the 'waiting for job XXX to start' can take an arbitrary time as the resources may not be currently available. This is no different than any jobs you might run on metis.

As you can see, a shell prompt is provided where you may manually execute any commands that might otherwise have been put into a PBS file.

Note: The PBS file mentioned in the 'qsub -I' that created this interactive job will NOT be executed. The /only/ function it provides is to allow the qsub command to look at its resource specifications (the #PBS lines at the top) to determine how to configure your interactive job.

To request an interactive job without using an existing PBS file to specify the resources needed, you can either create one and use the -I parameter or you can specify the resources as part of the qsub command itself. For example, to start a job that is identical to the above PBS file example:

qsub -I -l select=1:ncpus=1:mpiprocs=1:ngpus=1:mem=16gb,walltime=00:15:00 -j oe

Note that the PBS file contains PBS directives that start with -j and -l and the all-command-line version for an equivalent job uses the same -j and -l options.

Prospective user?

Request an account.

Back to top