Interactive Job
It is helpful to run your work and see the response of the
commands right away to check if there is any error in your work flow. To
use the interactive mode with resources more than the limit imposed on
the dev nodes, HPCC users can submit an interactive job using the interact
powertool, or the salloc
/srun
commands, with options of resource requests.
interact
powertool
The interact
powertool provides sensible defaults to launch interactive jobs
on the HPCC. It is loaded as part of the default modules. Alternatively you can
access it with module load powertools
. The default resource request when you
run interact
is 1 task on 1 core on 1 node for 1 hour. Your job will be queued.
Do not close your terminal. Once the job has queued, you will be transported to a
command prompt on the compute node assigned to your job. You can close your
terminal and reconnect to the interactive session following the information at
Connections to compute nodes.
Specifying other resources
To request resources beyond the defaults, you can use the following options:
Option | Alternate | Description |
---|---|---|
-t <Time> |
--time |
Set a limit on the total run time. |
-gpu |
--gpu |
Allocate 1 gpu and 16 CPUs |
-N <Nodes> |
--nodes |
Number of nodes |
-c <ncores> |
Number of cores | |
-n <ntasks> |
Number of tasks (spread over all Nodes) | |
--ntasks-per-node=<ntasks> |
Number of tasks, 1 per core per node. | |
--mem=<MB> |
Real memory required per node in MegaBytes |
You can view the other options that interact
accepts using the command
interact -h
.
salloc command
For salloc, the command line
1 |
|
will allocate a job with resources of 1 node, 2 cores and walltime 1 hour. The execution will first wait until the job controller can provide the resources.
1 2 3 |
|
Once that happens, the terminal will be transported to a command prompt on a compute node assigned to the job.
1 2 3 4 5 |
|
where "test-skl-000" after the symbol @ is the name of the assigned compute node.
salloc and GPUs
GPUs requested for an interactive job can now be used without submitting an additional srun. See our pages on our GPU resources and requesting GPUs for more information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
srun command
A similar way can also be used with srun command:
1 2 3 4 5 |
|
As we can see, the specification "--pty /bin/bash" is required for srun command to request an interactive mode. Any command executed in this kind of interactive jobs will be launched parallelly with the number of task requested. srun can also be used in a command line without the specification "--pty /bin/bash". You may refer to the srun web site for more details.
Job with graphical application
To schedule an interactive job able to use graphical user
interface (GUI) software, the specification --x11
for X11 forwarding
needs to be specified with the command (salloc or srun). You must use
the -X
parameter with ssh
to allow X11 forwarding when connecting to both gateway
and development nodes prior to running the salloc command. If you are
using Mac Terminal, you must have Xquartz installed.
If you are on Windows and using Moba Xterm to log in, these instructions
will work with the -X
parameter. Putty does not support X11
and so this will not work with putty.
The other option is to first log into our web-based remote desktop, and run the terminal there. See Web Site Access to HPCC for GUI software.
1 2 3 4 5 6 7 8 9 10 |
|