Interact
What is Interact
The goal of interact
is to make it simple to open an
interactive session on the VHPC. By default, it will start a
job using two processors on one node of the defq 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@vhpcprdssh01 ~]$ interact -A some_project
##############################################################################
#
# Interactive Job Settings:
# =========================
#
# ACCOUNT: some_project (Command Line)
# NODES: 1
# NTASKS: 2
# TIME LIMIT: 1:00:00
# QUEUE: defq
# GPU Usage: off
# GPU CMode: exclusive
# X11 Mode: off
# Shell: /bin/bash
#
##############################################################################
salloc: Granted job allocation 4728
salloc: Waiting for resource configuration
salloc: Nodes g001 are ready for job
[barney@g001 ~]$
The biggest limitation of any interactive job on the VHPC 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 VHPC 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@vhpcprdssh01 ~]$ interact -h
Create an interactive session on the HPC cluster.
Usage: /usr/local/bin/interact [-A|--account <arg>] [-N|--nodes <arg>] [-n|--ntasks <arg>] [-Q|--queue <arg>] [-R|--res <arg>] [-t|--time <arg>] [-s|--shell <arg>] [-C|--cmode <CMODE>] [-G|--(no-)gpu] [-X|--(no-)x11] [-d|--(no-)debug] [-h|--help] [-v|--version]
-A, --account: Account to associate this to (default: 'none')
-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: 'defq')
-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')
-s, --shell: Set your login shell. (default: '/bin/bash')
-C, --cmode: Sets the GPU Compute Mode.. Can be one of: 'shared' and 'exclusive' (default: 'exclusive')
-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 tasks 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 defq queue is the default, and is the queue most jobs need to be submitted to. |
-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. |
-A |
This specifies the billing Account to associate this interactive session with. If you don't specify an account it will look at the SALLOC_ACCOUNT , SBATCH_ACCOUNT , and SRUN_ACCOUNT environment variables (in that order). If neither the -A option is specified nor one of the environment variables exists, the job will not start. |
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@g001 ~]$ exit
exit
salloc: Relinquishing job allocation 4730
[barney@vhpcprdssh01 ~]$