Interactive Jobs (srun)
The following commands will log you in to a compute node for interactive usage:
# Serial (1-core) interactive session srun --pty bash # Multicore (a single compute node) interactive session using several core (e.g., 4 cores) srun -p multicore -n 4 --pty bash # Note, if running python code that uses 'os.sched_getaffinity(0)' to determine the number # of available cores, you should use -c rather than -n to specify the number of cores. srun -p multicore -c 4 --pty bash # To open a GUI app directly use the --x11 flag (can also add -p, -n as above) srun --x11 myguiapp
Note that by default the above commands will inherit any environment variables you have already loaded on the login node. If you require a clean environment on the compute node (once the srun
command has logged you in to a compute node) run the following command:
module purge
You can load modulefiles on the compute node as normal using the module load
command.