Getting Started

Getting Started

Login issues:

If you are having issues connecting to HPC using the hpc2.storrs.hpc.uconn.edu connection after connecting to the UCONN vpn, feel free to replace the hpc2 portion with login4, login5, or login6 and try again before sending in a ticket.

Example:

login4.storrs.hpc.uconn.edu

Hello world

Welcome to the Storrs High-Performance Computing (HPC) facility! This page is your friendly starting point for launching your computational research here at UConn. With instructions on everything from connecting to the HPC to submitting jobs, our step-by-step guide is tailored to make your journey into high-performance computing as smooth as possible. We’ve also designed this page to be adaptable to meet the needs of both newcomers and experts.

Let's get started so you can take advantage of everything our HPC has to offer!

Step 1: Make an account

The first step to using the HPC is to request an account. If you don't already have an account, please fill out the cluster application form. It’s free!

Setting up your account can take a bit of depending on how busy the Storrs HPC Admins are. While you’re waiting for your request to be filled, consider reading through the General HPC Guidelines. We’ll email you when your account is all set up. Then you can proceed to Step 2.

Step 2: Are you connected to UConn-Secure Wifi or an on-campus ethernet port?

Yes

Since you are on campus, you do not need to use the UConn VPN. If you’re in a rush—or excited to get on the HPC ASAP!—feel free to move directly to Step 3. If you’re up for it though, it’s probably worth reading how to log into the HPC when off campus. To learn how, just click “No” to this question.

No

To keep everyone’s data safe and secure, we only allow users to access the HPC from computers/tablets/phones that are connected to the UConn-Secure Wifi or ethernet ports at UConn. But don’t worry! You can still log in to the HPC from home! There’s just a couple of extra steps.

To connect to HPC from off campus, you will first need to connect to the UConn Virtual Private Network (VPN). The VPN makes sure you belong to the UConn community by having you log in with your netID and password. Once you connect to UConn’s VPN, you will be able to log in to the HPC.


Instructions for Setting up the UConn VPN

  1. Download the UConn VPN (instructions here).

  2. Follow the installation instructions below to install and connect to the VPN.

    1. Windows users

    2. Mac users

    3. Linux users

  3. Once you are connected to the UConn VPN, you can move to Step 3.

Step 3: What kind of computer do you have?

The instructions for logging into the HPC are slightly different depending on what kind of computer you have. Please select what kind you have from the below options:

Sometimes DUO for 2FA authentication can deny connections even though the netid password entered is correct. If this happens, it will cause a connection issue 3 times and will prevent the connection from being established to HPC. If this happens, we recommend resetting the connection and request the DUO push. Eventually DUO should allow the connection to HPC. We are aware of the issue and will decrease the 3 stage error check to 1 in a coming outage.

Windows/PC

To log in to the HPC from a Windows computer, you need to use an SSH client. The Storrs HPC Admins recommend MobaXterm. Here are some abridged instructions:

  1. Download MobaXterm

  2. Install MobaXterm

  3. Open MobaXterm

  4. Click Session (top left corner )

  5. Click SSH

  6. For “Remote Host,” enter the following address: hpc2.storrs.hpc.uconn.edu

  7. Check the “Specify username” checkbox

  8. In the text box to the right of “Specify username,” enter your UConn netID

  9. Click “OK”

  10. A new tab should pop up asking for your password

  11. Enter your password

  12. Success! You are logged into the cluster and ready to move on to Step 4.

Note: For optimal use of some programs, Windows users may also need to install VcXsrv.

Mac

To log in to the HPC from a Mac, you need to use an SSH client and an X-server. We recommend XQuartz as the X-server. Here are some abridged logging in.

  1. Download XQuartz

  2. Install XQuartz

  3. Open the app “Terminal” on your Mac

    image-20240216-222620.png
    Terminal Icon

Note: Terminal is an app that is installed by default on all Macs.

  1. Below is the basic command for logging into Terminal. Please replace “netid” with your actual netID (format: abc12345). Then hit “Enter.” It should ask for your Password.

    ssh -Y netid@hpc2.storrs.hpc.uconn.edu
  2. If it asks for your password, type in your password. Then hit enter.

  3. Once connected, you should see a terminal prompt like this:

    Welcome to the Storrs HPC cluster. If you need technical support, please read the wiki or email us at hpc@uconn.edu [netID@login4 ~]$

     

  4. Once you are connected, you can move on to Step 4.

  5. If the above instructions do not work, please see our troubleshooting instructions below.


Troubleshooting for Mac Users

Sometimes the default settings for logging into HPC from a Mac can get messed up, especially after big updates to the Mac operating system (Mac OSX).

To resolve this problem, a couple of lines may need to be added to the user's ~/.ssh/config file. You will have to open and edit the file from “Terminal” using a text editor, like Vim. Vim is installed by default on all Macs. Here are some abridged instructions on how to edit the file using Vim.

  1. Open Terminal

  2. Open the file like this:

    vi ~/.ssh/config
  3. Scroll to the bottom of the file

  4. Click the letter “i”

  5. Copy and paste the lines below into the file.
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa

  6. Hit the “Esc” key.

  7. Type :wq

  8. Hit enter.

Once the above two lines are added to the local ~/.ssh/config on a Mac, you should be able to access the HPC using the normal instructions we mentioned above. If you are still experiencing issues, please feel free to reach out to the Storrs HPC Admins for help by emailing us at hpc@uconn.edu.

Linux

To log in to the HPC, aka “the cluster,” you need to use an SSH client. On Linux, open the terminal app and simply run:

ssh -Y netID@hpc2.storrs.hpc.uconn.edu

(Where 'Your_NetID' is your own NetID consisting of 3 letters and 5 numbers)

Once connected, you should see a terminal prompt like this:

Welcome to the Storrs HPC cluster. If you need technical support, please read the wiki or email us at hpc@uconn.edu [netID@login4 ~]$

If the above works, then you can move on to Step 4. If you are experiencing issues, please feel free to reach out to the Storrs HPC Admins for help by emailing us at hpc@uconn.edu.

Note: We recommend that you also set up and use SSH keys, which have improved security and allow users to login without entering their password. But it is not required.


Step 4: Have you used the “Unix shell” before?

No…. What is this “shell” you speak of…?

Great question The “Unix shell” has been around since the 1970s. It is a simple, but versatile way to interact with computers of all kinds, including the Storrs HPC. With just a few lines of code, you can do all kinds of powerful analyses, but learning how to use it is a bit like learning a new language.

Our favorite resource for learning the “Unix Shell” is an free, easy online course offered by Software Carpentry. It’ll give you a foundation in everything you need to know to use the Unix Shell.

Please run through the course at this link. Also linked below:

https://swcarpentry.github.io/shell-novice/

When you’re all done, you might want to consider printing out this quick command reference from on common Unix shell commands (also available for download ).

unix_quick_reference.png
UNIX Command Line Reference, closely modeled after other excellent UNIX guides

You’re now all set to move onto to Step 5 where we’ll talk about applying those skills on our HPC!

Yes, but I’d love a refresher.

Of course! We’d be happy to provide some materials you can use to brush up your skills using the Unix shell. Here are some resources:

1) Full UNIX Course:

If you’d like to go through an in-depth course on the Unix Shell, we recommend Software Carpentry’s course linked below.

https://swcarpentry.github.io/shell-novice/

2) UNIX Command Flash Cards:

If you just want to test your memory of common Unix commands, we recommend this set of command line flash cards.

https://flashcards.github.io/command_line/introduction.html

3) UNIX Quick Reference:

We’ve also created this quick reference on common Unix shell commands. You can also download and print the file here:

unix_quick_reference.png
UNIX Command Line Reference, closely modeled after other excellent UNIX guides

Whenever you feel comfortable with the UNIX shell again, you can proceed to Step 5 where we’ll talk about applying those skills in an HPC environment.

Yes, I use the Unix shell and command line regularly.

Wonderful! Feel free to move onto Step 5 where we talk about using the UNIX shell and other basic commands on the Storrs HPC.


Step 5: Have you used an HPC before?

No

Welcome to the exciting world of high-performance computing! Having an idea of how HPCs work will help you accomplish your research goals. HPCs have a lot of similarities with airports. Let’s talk about how:

Security and Access

Accessing an HPC is a bit like entering an airport. To get inside an airport, you have to show your ID and go through security. Similarly, you need to both have an account and use your password (or an ssh key) to access the HPC.

image by macrovector on Freepik

Once you get inside, you hang around the terminal until your flight starts boarding. The HPC equivalent of the terminal is called the login node. There are some basic things you can do on login nodes---move files (luggage), edit documents, etc.---but you shouldn’t run any really computationally programs or analyses on the login nodes. It’d be like blatantly cutting in front of everyone in line at the airport Starbuck’s. Not only would it be disrespectful to everyone else in line (i.e., on the login node), when the Starbuck’s staff (i.e., Storrs HPC Admins) saw what happened, that person would be kicked out of the cafe.

Intense computational programs or analyses, a.k.a. jobs, should be run on compute nodes. In this analogy, jobs are groups of passengers (e.g., families) and compute nodes are planes. Just as planes have a limited number of seats, compute nodes have a limited number of cores (a.k.a. CPUs). Jobs can only get onto compute nodes that have enough cores (i.e., “seats”) available.

Image by pch.vector on Freepik

People who buy tickets (submit jobs) ahead of time generally have their seats reserved ahead of people who just show up at the gate looking for a seat (requesting an interactive job). But there are exceptions. When a flight is overbooked (more cores requested than the HPC has available), people who are part of an airline’s frequent flyer program (have priority access on the HPC) get first dibs on (HPC resources).

Okay, this analogy works well for how individuals relate to the HPC, but we have to use a different analogy to understand the structure of HPCs and how they operate as a whole.

Structure and Organization

To understand the broader structure of HPCs and how they work, we can look at how airports are organized. All major airports have an air traffic control tower and an air traffic controller (ATC) working inside it. The HPC’s equivalent of the ATC tower is called the head node and the role of the ATC is played by a program called SLURM. The ATC’s (SLURM’s) main job is directing which planes (jobs) get to use the runways (compute nodes) because there are usually more planes flying in the air (running jobs) and waiting on the ground (pending jobs) than there are runways (nodes) available.

35049-20240404-203331.jpg
Image by macrovector on Freepik

The ATC (SLURM) takes many things into account when deciding which planes (jobs) get to use a given runway (node) next. Here a few that are similar to HPCs.

  • how long a plane (job) has been waiting on the ground (pending in the job queue)

  • the size of the plane (how many cores the job is requesting)

In general, SLURM will let a job that has been waiting for 6 hours will get on the next open node before a job that has been waiting for 1 hour. But there are exceptions. If a job is massive, smaller jobs may get on before it.

Here’s where SLURM differs from an airport’s ATC. Access to airport runways generally operate on a first come-first served basis, but SLURM adds another consideration to prevent a single HPC user from monopolizing all of the HPC’s resources. It takes into account the number (and size) of jobs a given user has submitted recently. A user who has submitted thousands of jobs in the last week will be pushed down the list to give all users fair access to HPC resources.

The last important consideration for an HPC which doesn’t generally apply to airports is that users can buy priority access to HPC resources. Priority access is like TSA PreCheck. Priority users still wait in line, but it’s a much shorter line and they tend to get through it faster.

Wrapping up

So, that’s how HPCs generally work as a whole. Next we’ll talk about the basics of starting interactive jobs on the HPC.

Yes

Wonderful. Feel free to move onto the next step where we’ll talk about the basics of starting interactive jobs on the HPC.


Step 6: Does the command srun mean anything to you?

No / I am familiar with the command but would like a refresher.

srun is the command we use to start interactive jobs on the HPC. Interactive jobs allow users to interact with applications in real-time within the HPC environment, just as you would on your laptop/desktop for coding applications like Jupyter Notebooks/VSCode, or even fancier applications like MATLAB.

There are lots of additional options, but here’s a simple command you can use to start an interactive job on the HPC.

srun --x11 -n 1 -t 1:00:00 --pty bash
  • --x11 = this is important for some programs (We'll talk about why later 🙂)

  • -n = asking for 1 core

  • -t = asking for 1 hour

  • --pty bash = gives a terminal you can type bash commands in

It is important that --pty bash comes last in the command.

There are MANY more options you can use in an srun command to tailor it your needs, but that will come later For now, let’s just talk about a few big ones to get you started. Here are a few additional flags you can add before the --pty bash to customize your interactive jobs.

  • -n 10 -N 1 = combining these two flags means you get 10 cores on a single node

  • --mem=10G = asking for 10 gigabytes of memory

  • --gres=gpu:1 = asking for 1 graphics card or GPU

When you are done, please be sure to close your interactive job with the exit command.

Now, that we’ve talked about how to start a job, let’s discuss how to submit jobs on the HPC.

Yes, I have a long history of starting interactive jobs with various srun options on HPCs.

Wonderful! We have a brief run-through on interactive jobs in our SLURM Guide as well as an in-depth chart of all the relevant srun flags you can use on the Storrs HPC here if you’d like to review.

Next, we’ll talk about submitting jobs on the HPC.


Step 7: Are you familiar with how batch jobs work on HPCs?

I’m a beginner

What are batch jobs?

On the HPC, batch jobs are tasks you give to the HPC to do later. You tell the HPC (SLURM) what you want to do, like run a program, and it does it when it's ready. You don't have to wait around for it to finish. Here’s an example:

How to submit your first job

  1. SSH into the HPC

  2. Make a file named my_first_job.sh

    touch my_first_job.sh
  3. Read the annotated script below. The notes on the right say what each command does. The first line indicates the script is written in bash.

    #!/bin/bash #SBATCH -J my_first_job # name of job #SBATCH -o my_first_job.out # name job's out file #SBATCH -n 1 # asking for 1 core #SBATCH --time=5:00 # asking for 5 minutes # example of a script printf "Hello world \n" # print "Hello world" printf "Today's date and time is \n" # print "Today's date and time is" echo $(date) # print the date and time sleep 2m # do nothing for 2 minutes printf "Now the time is \n" # print "Now, the time is" echo $(date) # print the date and time # exiting batch job printf "Exiting job now :) \n" # print "Exiting job now :)" exit
  4. If you haven’t used a text editor before, consider skimming our page on them here We’ll be using Vim

  5. Open the file in Vim

    vi my_first_job.sh
  6. Press the “i” key to edit the file. (literally, just the letter i on your keyboard)

  7. Copy the contents of the script above and paste it into the Vim window where you have my_first_job.sh open.

  8. Save the document by clicking the <Esc> key and then typing:

    :wq!
  9. Submit the script using sbatch

    sbatch my_first_job.sh

Congrats! You’ve submitted your first job!

You can use the squeue --me to keep an eye on the job. Under the column which says “ST” (job state), it will say “PD” if the job is pending and “R” if the job is running. You’ll know the job has finished running when it’s no longer in the squeue --me output.

Then, you can use the cat my_first_job.out command to see how the job went. It should look something like this:

[jth41424@login5 ~]$ cat my_first_job.out Hello world Today's date and time is Fri Apr 5 15:57:58 EDT 2024 Now the time is Fri Apr 5 15:59:58 EDT 2024 Exiting job now :)

This script is just the beginning! To learn more about submitting jobs with sbatch, please read our SLURM Guide. Now, we’ll talk about the kinds of programs we have on the HPC.

Yes, but I’d like a brief refresher

If you're already familiar with submitting jobs on an HPC but need a quick refresher on submitting batch jobs, here's a rundown:

  1. Log in: Start by logging into the cluster using SSH:

    ssh -Y NetID@hpc2.storrs.hpc.uconn.edu
  2. Create a Job Script: Use a text editor like Vim or nano to create a job submission script. Here's a simple example:

    #!/bin/bash #SBATCH --ntasks=1 # Job only requires 1 CPU core #SBATCH --time=5:00 # Job should run for no more than 5 minutes echo "Hello, World" # The actual command to run
  3. Submit Your Job: Save your script and submit it with sbatch:

    [jth41424@login5 ~]$ sbatch myJob.sh Submitted batch job 6671265
  4. Check Job Status: You can check the status of your job using squeue --me:

    [jth41424@login5 ~]$ squeue --me JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 6672265 general medium_s jdt10005 PD 0:00 1 (Priority)
  5. Check Job Output: You can make sure the job output “Hello, World” using cat and the job’s *.out file:

    [jth41424@login5 ~]$ cat slurm-6672265.out Hello, World

This gives you a quick overview of how to use sbatch to submit batch jobs. Remember, you can customize your job script to fit your specific requirements and use cases. For more info, please see the following resources:

Once you’re ready, feel free to move onto Step 8 where we’ll talk about how to load programs on the HPC.

Yes, I have significant experience using sbatch to submit SLURM jobs

Magnificent! Should you ever need it, we have documentation about SLURM and customizing job submissions including:

Next, we’ll talk about how to see what programs are available and load what you need on the HPC.


Step 8: Are you familiar with the modules system for loading software?

No

What are Modules? Modules help you pick and use different software on a computer cluster. They let you choose which software you want and which version of it.

Viewing Modules: To see what software is available on the Storrs HPC, type module avail. To see versions of a specific software, use module avail <software_name>.

Loading Software: To use a software, load it with module load <software_name>. If you want to stop using it, unload it with module unload <software_name>. To clear everything out, use module purge.

If you would like to learn more, please check out our Modules Guide.

We also have a collection of guides on how to use various applications on the HPC available if you’d like to take a look Otherwise, let’s get into what kind of computational resources are available on the HPC!

I would like a refresher

What are Modules? Modules are used to select and manage software on a cluster. They facilitate choosing specific software versions and adding software paths to your environment.

Viewing Modules: Once connected via SSH, available modules can be viewed using the command module avail, which lists out ALL of the available applications on the Storrs HPC. To see available versions of a specific program use module avail <software_name>, where <software_name> is replaced with the desired module name and version.

Loading Your Environment: Modules are loaded using the command module load <software_name>, where <software_name> is replaced with the desired module name and version. Tab completion is supported for module names. Dependencies of loaded modules are automatically handled. The command module list displays the currently loaded modules. Conflicts between modules prevent loading conflicting versions simultaneously, requiring unloading of conflicting modules before loading another version.

Conclusion: Modules are a crucial aspect of managing software environments on clusters, allowing users to select and load specific software versions seamlessly. Understanding how to view, load, and manage modules is essential for efficient usage of cluster resources. Additionally, users can create their own module files to customize their environment further.

If you would like to learn more, please check out our Modules Guide.

We also have a collection of guides on how to use various applications on the HPC available if you’d like to take a look Otherwise, let’s get into what kind of computational architectures and resources are available on the HPC!

Yes

Splendid! If you want to review the modules system on the Storrs HPC at anytime, please feel free to look at our Modules Guide. We also have a collection of guides on how to use various applications on the HPC available if you’d like to take a look

Now we’ll get into what kind of computational architectures and resources are available on the HPC!


Step 9: Summary of Resources Available on the Storrs HPC

Standard Cluster Nodes

There are two main classes of standard nodes (i.e., without graphics cards a.k.a GPUs) available on the HPC cluster.

Name

Nodes

Available cores per node**

Cores Total

RAM (GB)

Names

Name

Nodes

Available cores per node**

Cores Total

RAM (GB)

Names

Epyc64

41

62

2,542

503

cn410-447,453-455

Epyc128

148

126

18,648

503

cn456-603

**2 cores are reserved per node for the OS and storage processes.

GPU Cluster Nodes

There are a variety of GPU nodes available on the Storrs HPC as well. Most of our GPU nodes are Epyc64 nodes with between 1 and 3 GPUs.

For info on the types of nodes available on Storrs HPC, please see this in-depth chart. And for guidance on how to target different types of nodes please see our SLURM Guide and/or Cheatsheet.

Partitions

Storrs HPC has several different “partitions,” groups of nodes with similar hardware and usage types. All users have access to general partitions, while additional access to priority nodes can be purchased. The HPC provides various computational setups (a.k.a. “architectures”) with different strengths too—such as high core count, ample RAM, or GPUs—allowing users to select the best hardware for their research.


Step 10: Closing Thoughts

Please read our usage policy and General HPC Guidelines.

If you’re new to HPCs, also consider checking out our glossary where we explain the components of an HPC and the basics of how SLURM works.

HPC applications

We have created helpful software guides to demonstrate how to effectively use popular scientific applications on the HPC cluster.

Troubleshooting

If you have trouble using the HPC, please view our troubleshooting guide where we explain how to document errors and get help from Storrs HPC Admins (i.e., “submit a ticket”). Another good stop is our Frequently Asked Questions (FAQ) page where we address many common errors.