Accessing HPC

HPC-part-1

NYU High Performance Computing (NYU HPC) provides access to state of the art supercomputer hardware and cloud services to eligible faculty and students across all of NYU.

Most of the blog is adapted from this page


🎬 Getting started

Before accessing the HPC cluster, you need to have an account. If you don’t have one yet, please obtain one by following step 1 and step 2 in this page.


⚙️ Network configurations

Now that you should have an HPC account, we need to configure your network settings to access the HPC cluster.

If you are on the NYU network, you can access the HPC cluster directly without any extra configurations.

Otherwise, you have two options to access the HPC cluster:

  • NYU VPN: You can use the NYU VPN to connect to the NYU network. This is often default option for most users.
  • HPC gateway: If in some cases you cannot use the NYU VPN, you can use the HPC gateway gw.hpc.nyu.edu (example below) to connect. Note that it is only a portal-like server, and you cannot run any jobs on it.

> Command line

1. Gateway

(Ignore this step if you are using NYU VPN or on the NYU network)

Connect to the HPC gateway using SSH:

ssh <NetID>@gw.hpc.nyu.edu

2. SSH

Connect to the HPC cluster using SSH:

ssh <NetID>@greene.hpc.nyu.edu

3. Save password

(Optional) Once you logged in to HPC, you can set up an SSH key to avoid typing your password every time you log in.

⚠️ Only do this on your trusted computer.

First, generate a SSH key pair on your local machine (disconnecting from HPC):

ssh-keygen -t rsa

Then, copy the public key to the HPC cluster:

ssh-copy-id <NetID>@greene.hpc.nyu.edu

Now you can log in to HPC without typing your password.


📝 Editor

This section is optional but highly recommended. You can use any editor you like to edit scripts on HPC, here I recommend using VS Code.

1. Install

Download and install VS Code from here.

2. Install Remote - SSH extension

After open VS Code, search for SSH in the extension market and install Remote - SSH.

ssh
Remote - SSH extension

3. Connect to HPC

Click the button in the bottom left corner of VS Code and select Connect to Host.... Then, follow the instructions to connect to HPC.


Conclusion

Now you should be able to access the HPC cluster and edit scripts on it.


Related posts

Xinhao Liu
Xinhao Liu
Ph.D. student in Computer Science

Extraordinarilly ordinary.