Example: Interactive job (srun)

An interactive job is launched on a compute node and provides you with a command line prompt. Interactive jobs are useful when debugging or interacting with an application. You will use thesruncommand to launch an interactive job. Once the job has started, commands can be executed utilizing resources on the local node.

$ srun --pty /bin/bash
$ hostname
p04.hpcc.dartmouth.edu
$

Jobs submitted with srun –pty /bin/bash will be assigned the cluster default values of 1 CPU and 1024MB of memory. The account must also be specified; the job will not run otherwise. If additional resources are required, they can be requested as options to the srun command. The following example job is assigned 2 nodes with 2 CPUS and 4GB of memory each:

srun --nodes=2 --ntasks-per-node=4 --mem-per-cpu=1GB --cpus-per-task=1 --pty /bin/bash
q06 ~]$ 

Details

Article ID: 132192
Created
Thu 5/6/21 3:11 PM
Modified
Mon 6/28/21 1:02 PM