Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

HPC Tutorial

Vanda is one of the HPC clusters provided by NUS IT. It is suitable for a wide range of computational tasks and is accessible to all NUS students and staff with an HPC account. This guide will help you set up and verify your access to the NUS HPC cluster Vanda, which we will use for computational tasks in this course. We will utilize the OnDemand web portal for ease of use.

First Time Setup

  1. Register your NUS HPC account. If you already have an HPC account, you can skip this step.

  2. Activate account settings on Vanda via SSH (one time only):

    • Use Terminal, PuTTY, or MobaXterm on macOS/Windows to connect to vanda.nus.edu.sg; e.g. ssh USERNAME@vanda.nus.edu.sg where USERNAME is your NUSNETID.

    • Enter your NUSNETID password when prompted (note: no characters will be shown while typing)

    • This initializes your account on the cluster

  3. Read the introductory guide for new HPC users

For Ongoing Use

How to Access Vanda

Open VS Code via OnDemand

We need to start a VS Code Server session on Vanda via OnDemand portal and then connect it remotely. Here are the steps to do so:

  1. Open your web browser and go to the OnDemand portal: https://vanda.nus.edu.sg/

  2. Log in using your NUSNETID and password if prompted.

  3. Once logged in, you will see the OnDemand dashboard where you can access various tools and resources.

  4. To use Visual Studio Code, click on the Code Server icon in the dashboard.

  5. You need to set how many hours you want your session to last. Choose an appropriate duration based on your needs. You can also setup your working directory if needed (default is your home directory).

  6. Click “Launch” to start your Visual Studio Code session.

  7. After a few moments, you can click Connect to VS Code. This will open Visual Studio Code in a new browser tab.

There are also other Apps available such as: Jupyter Notebook, R Studio Server, Matlab etc. You can find the list here.

Interactive Sessions

If you close your browser or tab, your session will continue to run on the cluster until the specified time limit is reached. You can always see your active sessions in the OnDemand dashboard under My Interactive Sessions.

Ending Your VS Code Session

Remember to properly end your VS Code session when you’re done. You can do this by clicking on the End Session button in the OnDemand dashboard. This will free up resources on the cluster and ensure that your work is saved.

Uploading and Downloading Files

You can upload and download files between your local machine and the Vanda cluster using the OnDemand file manager. To access the file manager, click on the Home Directory icon in the OnDemand and navigate to the desired directory. You can then use the upload and download buttons to transfer files. You can also use VS Code’s built-in file explorer to manage files directly within your VS Code session, see the next section for more details.

Interactive Shell via OnDemand

If you need to run commands directly on the login node, you can click Vanda Shell Access in the OnDemand dashboard. This will open an interactive shell session on a login node, where you can execute commands, manage files, and submit jobs. Interactive shell sessions are free to use, but remember that login nodes are not meant for heavy computations. Always use compute nodes for running your code.

Resource Quota and Usage

When you log in to Vanda, you will be in your home directory (/home/svu/USERID) by default. This directory is private to you and has a storage quota (40 GB). You can create subdirectories within your home directory to organize your files. If you need more storage space, you can use the /scratch directory, which is intended for temporary files and has a larger quota (500 GB). However, files in the /scratch/USERID directory may be deleted after 60 days of inactivity, so make sure to back up important files to your home directory or other storage solutions.

You can use command in the interactive shell to check your disk usage and quota:

hpc quota

You might need to type amgr login and type your password first and then run the above command to check your disk usage and quota.

For remaining computing resources, you can check the available resources on Vanda by running:

hpc project