Basics

Overview

The vast majority of the calculations we run are carried out on supercomputers, including those at Princeton. You should bookmark the  Princeton Research Computing Knowledge Base , which has many excellent guides for using the high-performance computing (HPC) clusters.

Courtesy

The most important rule is to treat the research computing staff with respect. Abide by the rules, when reporting issues do so with a complete and reproducible example, and be both kind and thankful. They are our colleagues, and you should treat them as such even if you have not met them before in person. Anyone found being rude or disrespectful to a computing staff member will have their compute access temporarily revoked.

Command Line

Looking for tutorials on how to use Unix or the command line? Check out the  Command Line Guide  for a very basic intro, " The Art of the Command Line " for a quick summary, or the  Software Carpentry  resources for a more involved tutorial.
The command line is how you will interact with the various compute clusters and run calculations. If you are on Linux, you already have a native command line. If you are on a Mac, you also have a native command line, although there are some promising new options like  warp . If you are on Windows, I recommend using  MobaXterm .

Logging In

The Princeton Research Computing webpage has a guide for logging into the HPC clusters via SSH:
Please set up  SSH keys  for increased security and convenience.
For some clusters, there are also web browser options:

File Transfers

To access and/or transfer files on an HPC machine, the easiest option is to install an SFTP client. For Windows, I strongly recommend  WinSCP . Additional options can be found below:
In general, you will likely find it convenient to mount the remote drives to your local machine so that you can use your machine's built-in file explorer:

Remote Code Editing

See the link below on editing code remotely on the clusters using VS Code.

Slurm

Slurm is the job scheduling system on the Princeton HPC machines and most clusters we use. Details about Slurm can be found in  this guide  by Princeton research computing. The  Slurm documentation  also has a useful list of commands.

Background Processes

To run a lightweight process in the background on the login node (e.g. to submit jobs), you can use tmux to preserve the process even when the SSH session is terminated.

Running tmux new -s launcher will create a new tmux session named launcher. To exit the tmux session while still preserving any running jobs on the login node, press ctrl+b followed by d. To re-enter thetmuxsession, run tmux attach -t launcher. Additional tmux commands can be found on the  tmux cheatsheet .

GUI Applications

To view and interact with GUI applications on the cluster, refer to the instructions below:

Removing Tedium

There can be a fair amount of tedious things with HPC clusters. Check out Princeton's  Removing Tedium  guide to make your life a bit easier.