Skip to content

Interact

What is Interact

The goal of interact is to make it simple to open an interactive session on the HPC. By default, it will start a job using two processors on one node of the batch queue that will last up to an hour. All of these settings can be changed within certain limits.

If you need to exceed the limits that interact imposes, it's possible to create the interactive session by hand, and request the resources that you need for the job.

Starting Interact

In the simplest form, you can run interact from one of the login nodes, accepting the defaults by running the following:

[barney@hpcprdssh02 ~]$ interact
##############################################################################
#
#  Interactive Job Settings:
#  =========================
#
#     NODES:       1
#     NTASKS:      2
#     TIME LIMIT:  1:00:00
#     QUEUE:       batch
#     GPU Usage:   off
#     X11 Mode:    off
#
##############################################################################

qsub: waiting for job 65445.roland to start
qsub: job 65445.roland ready

Module Shell: bash
[barney@node70 ~]$

The biggest limitation of any interactive job on the HPC is that you cannot submit additional jobs from within the session. You'll need to exit the interactive session and start a new job from the login node (or open another ssh session to the HPC and do it from there).

Interact Syntax

The interact command accepts several options that control the job that you create. Here is the online help about interact:

[barney@hpcprdssh02 ~]$ interact -h
Create an interactive session on the HPC cluster.
Usage: /usr/local/bin/interact [-N|--nodes <arg>] [-n|--ntasks <arg>] [-Q|--queue <arg>] 
            [-R|--res <arg>] [-t|--time <arg>] [-G|--(no-)gpu] [-X|--(no-)x11] [-d|--(no-)debug] 
            [-h|--help] [-v|--version]
        -N, --nodes: Number of nodes (default: '1')
        -n, --ntasks: Number of tasks per node (default: '2')
        -Q, --queue: Queue you want to run the job on (default: 'batch')
        -R, --res: Reservation you would like to run on (no default)
        -t, --time: Set a limit on run-time.  Formats include mins, mins:secs, hours:mins:secs. 
                    (default: '1:00:00')
        -G, --gpu, --no-gpu: Allocate 1 GPU in the GPU queue (off by default)
        -X, --x11, --no-x11: Enable X11 Passthru Mode (off by default)
        -d, --debug, --no-debug: Enable debug mode (off by default)
        -h, --help: Prints help
        -v, --version: Prints version

Here are some more details about some of the common options:

Option Description
-N <arg> This tells the scheduler how many nodes to allocate for this job. It defaults to one and has a maximum of two.
-n <arg> This tells the scheduler how many processors to allocate for this job. It defaults to two and has a maximum or four.
-Q <arg> This tells the scheduler which queue to run the job on. The batch queue is the default, and is the queue most jobs need to be submitted to. Other options are gpuq and himem for the GPU and High Memory queues, respectively.
-t <arg> This tells the scheduler the maximum amount of time this session should run. The default is one hour and it has a maximum of eight hours. The time can be specified by using minutes (-t 60), minutes and seconds (-t 60:00) or hours, minutes, and seconds (-t 1:00:00).
-G This tells the scheduler to allocate one GPU to this job. It will also change the queue to the gpuq automatically.

Ending Interact

If you're ready to end your session before it expires, simply type exit at the command prompt, and you will be returned to the login node:

[barney@node70 ~]$ exit
logout

qsub: job 65445.roland completed

[barney@hpcprdssh02 ~]$