High-Performance Computing (HPC) Cluster Guide

BSIC operates a scientific computational resource to help BSIC users to preprocess and analyze neuroimaging data. Due to high load on this resource, we recommend that users postpone their jobs until evening and weekend hours.

Introduction

What is it?

An HPC cluster is a collection of interconnected computers (nodes) that work together to perform complex computational tasks. The BSIC HPC cluster is designed to provide researchers with the computational power needed to analyze large datasets, such as those generated in neuroimaging studies. The cluster consists of multiple compute nodes, each equipped with powerful processors and large amounts of memory, allowing users to run computationally intensive analyses efficiently. Users can submit their jobs to the cluster’s job scheduler, which manages the allocation of resources and ensures that jobs are executed in an orderly manner. The cluster also provides access to a large temporary storage pool, allowing users to store intermediate results and large datasets during their analyses.

Below is a simplified topology of the BSIC HPC cluster.

hpc-overview

After logging into the head node, you can submit jobs to the job scheduler (PBS) that will run on the compute nodes. Lastly, nodes have access to a large temporary storage pool.

Why use it?

The BSIC HPC cluster provides a powerful computational environment for neuroimaging data analysis. It allows users to run complex analyses on large datasets that would be impractical to run on a personal computer. The cluster’s high-performance computing capabilities enable faster processing times, making it possible to analyze data more efficiently and effectively.

How do I get an account?

Please see William Burroughs or Peter Kochunov if additional computation capacity is needed, it maybe available through collaborative agreement with the institute for genomic science or off-campus vendors.

Getting Started

Logging in

You will receive an email with instructions on how to log into the cluster. Please refer to that email for the specific instructions.

Education/Tutorials

What is Linux?

Linux is an open-source operating system that is widely used in scientific computing. It provides a stable, performant, and lightweight environment for running computationally intensive tasks, making it an ideal choice for high-performance computing clusters.

Basic Linux Commands

TaskCommandNotes/ Example
Print working directorypwd
List files (detailed)ls -lhhuman-readable sizes
List including hiddenls -lah
Change directorycd /path/to/dircd ~ for home, cd - previous
Make directorymkdir -p /path/to/dir-p creates parents
Copy file/dircp file dest
cp -r dir dest
Move/renamemv src dest
Remove filerm file
Remove directoryrm -rf diruse with caution
View file start/endhead file / tail file-n 50 to set lines; tail -f follow
Concatenate filescat file
Pagerless filenavigate large files (q to quit)
Disk usage (dir)du -sh /pathsummary human-readable
Disk free (FS)df -h

File Permissions & Ownership

TaskCommandNotes
Show permissionsls -l
Change permissionschmod 640 filesymbolic: chmod u+rwx,g+rx,o-r
Change ownerchown user:group filerequires permissions (root or sudo)
TaskCommandNotes / Example
Search textgrep -n "pattern" file-r recursive, -i ignore case
Count lines/words/charswc -l filewc -w words
Sort linessort filesort -k2,2 -n numeric on column 2
Unique linesuniqoften used with sort
Filter and viewawk '{print $1,$3}' filefield-based processing
Stream editingsed 's/old/new/g' file

Compression & Transfer

TaskCommandNotes
Create tar.gztar czf archive.tar.gz /pathc create, z gzip, f file
Extract tar.gztar xzf archive.tar.gz
Compress gzipgzip file / gunzip file.gz
scp copy (remote)scp file user@host:/path
rsync (efficient)rsync -avP local/ user@host:/path-P shows progress & partials
Transfer with portscp -P 2222 file user@host:/path

Environment & Modules

TaskCommandNotes
Show running processesps aux | grep myprog
Interactive process viewertop or htophtop often not installed

Useful Shortcuts & Tips

  • Background job: command & ; bring to foreground: fg
  • Time a command: /usr/bin/time -v ./program (detailed resource usage)
  • Edit files: vim file

What is PBS?

Portable Batch System (PBS) is a job scheduling system commonly used on high-performance computing clusters. It allows users to submit computational jobs to a queue, which are then executed on the cluster’s compute nodes when resources become available. PBS provides a way to manage and allocate cluster resources efficiently, ensuring that multiple users can run their jobs without conflicts. Users can specify resource requirements (e.g., number of CPUs, memory, etc.) for their jobs, and PBS will handle the scheduling and execution based on these requirements.

PBS Job Examples

See the following examples.

Transferring Files

There are several ways to transfer files to and from the BSIC HPC cluster.

Using a command-line terminal

All Operating Systems (Windows, MacOS, Linux) have built-in command-line terminals that can be used to transfer files using the scp command. The scp command allows you to securely copy files between your local machine and the cluster.

Below are examples of how to use scp to transfer files. Substitute user with your username and cluster with the hostname or IP address of the cluster.

  • To copy a file from your local machine to the cluster:
    scp /path/to/local/file user@cluster:/path/to/remote/directory
    
  • To copy a file from the cluster to your local machine:
    scp user@cluster:/path/to/remote/file /path/to/local/directory
    
  • To copy a directory from your local machine to the cluster:
    scp -r /path/to/local/directory user@cluster:/path/to/remote/directory
    
  • To copy a directory from the cluster to your local machine:
    scp -r user@cluster:/path/to/remote/directory /path/to/local/directory
    

Using a graphical file transfer (GUI) tool

FileZilla is a popular graphical file transfer tool that supports the SFTP protocol, which can be used to transfer files to and from the BSIC HPC cluster. To use FileZilla, you will need to configure it with the hostname or IP address of the cluster, your username, and your password. Once connected, you can easily drag and drop files between your local machine and the cluster.

Once you have FileZilla installed, follow these steps to connect to the BSIC HPC cluster:

  1. Open FileZilla and go to “File” > “Site Manager”.
  2. Click “New Site” and enter a name for the connection (e.g., “BSIC HPC Cluster”).
  3. In the “Host” field, enter the hostname or IP address of the cluster.
  4. Set the “Port” to 22 (the default for SFTP).
  5. Set the “Protocol” to “SFTP – SSH File Transfer Protocol”.

It is recommended to NOT save your password in FileZilla. Lastly, click “Connect” to establish the connection. You will be prompted to enter your password each time you connect. Once connected, you can navigate the file system of the cluster and transfer files by dragging and dropping them between the local and remote panes.

Software on the Cluster

BSIC maintains a large library of scientific software. The software can be categorized into two main groups:

  • Administrator installed software:
    • $FREEWARE: A collection of commonly used scientific software that is available to all users. This includes software such as MATLAB, FSL, AFNI, FreeSurfer, and many others. This is a variable holding a path to the directory where the software is installed.
    • System directories (/usr/bin, etc.): A collection of software that is available to all users. This includes software such as Python, R, and various bioinformatics tools.
    • module command: Some software may be available as modules that can be loaded using the module command. This allows users to easily switch between different versions of software and manage their environment.
  • User installed software:
    • User $HOME directories: Users are welcome to install software in their home directories. However, there is a disk quota and urls are blocked on the cluster, so they may need to download their software on their local machine and then transfer it to the cluster.

When searching for software, it is recommended to check in the following order:

  1. By using the module command.
    • example: module avail matlab
  2. By using the whichwhereis, and locate commands.
    • examples:
      • which matlab to see if matlab is in your PATH.
      • whereis matlab to see if matlab is installed and where it is located.
      • locate matlab to see if matlab is installed and where it is located.
  3. By checking the $FREEWARE directory.
    • example: ls $FREEWARE to see what software is available in the freeware directory.

If you’ve gone through these steps and still cannot find the software you need, please contact William Burroughs to see if it can be installed on the cluster.

Containerization

Some analysis software may be available as container images. The cluster supports running containerized software using singularity. Some containers have been built already and are available by using the module command. Others may be available in the $FREEWARE directory. If a software that you need references using docker or any other containerization software, then you need to build a singularity image from the docker image. If you need help with building the image, please contact William Burroughs.