Interactive jobs
Tip
Contact Secretariat System Administrators with HPC Questions!
vshanka@clemson.edu,jopoole@clemson.edu,madonay@clemson.edu
Contact IHG Research Cores with Research Questions!
ihgcores@clemson.edu
Attention
When testing code on Secretariat, it is important that you not run your commands on the head node (secretariat-master).
When you follow the instructions on the Logging in page, you are connecting to the head node. To make sure that you are testing your code appropriately, please read the following.
srun
To create an interactive session on Secretariat, use srun.
Attention
You should use srun only to test your code. Once your code works, you should transfer it to a script. For more information on this, see the Batch jobs page.
Consider the sbatch header in the example script from the Batch jobs page:
1#!/bin/bash
2#
3#SBATCH --job-name=fastp_ex
4#SBATCH --cpus-per-task=1
5#SBATCH --partition=compute
6#SBATCH --time=00:30:00
7#SBATCH --mem=2G
8#SBATCH --output=/opt/ohpc/pub/workshop/toyout/logs/fastp_ex.%j.out
9#SBATCH --error=/opt/ohpc/pub/workshop/toyout/logs/fastp_ex.%j.err
When initiating your session, you should specify your resource requests in your command. Make sure that you specify parameters for the options in lines 4-7, at least:
srun --cpus-per-task=1 --partition=compute --time=00:30:00 --mem=2G --pty bash
where
--pty: instructssrunto run in “pseudo terminal mode”
bash: creates an “interactive bash shell”
Every option that you could include in your sbatch header should be possible to include in an srun command. Please see the Slurm documentation for more details.