Search Docs by Keyword

Table of Contents

IQSS: How to Specify Resources and Choose a Cluster Partition

This document covers the cluster resources that are common to all applications you can launch from the CANNON and FASSE dashboards.

Resources

Imagine you need to rent a vehicle because yours isn’t appropriate for the task at hand (or you’re away from home).  You have some choices to make:

  • How big a vehicle do you need?  (How many seats or doors?  How much cargo capacity?)
  • What performance capabilities do you need?  (Box truck, pickup truck, cargo van, passenger van, SUV, full size car, midsize car, sports car?)
  • How long do you need the vehicle?  (A few hours, a day, a week, longer?)

You need to use CANNON or FASSE to do your research because your local computer isn’t appropriate (“big enough”) for the task.  You have similar choices to make:

  • How much memory do you need?  (measured in gigabytes of RAM)
  • How much performance do you need?  (measured in CPUs/Cores and possibly GPUs)
  • How long will your job take to run?  (measured in minutes, hours, or days)

Before you can dive into your research work, you have to ask the cluster for resources.

Resources for Applications

The CANNON and FASSE dashboards for launching applications gather settings for these resources:

  • Partition
  • Memory
  • Cores
  • GPUs
  • Maximum runtime
  • optional items (that aren’t really resources)
  • other options specific to the application you are launching (such as screen resolution, software version, etc.)

Application-Specific Resources

For tips about specifying resources that are unique to a specific application, please see the appropriate document:

IQSS: Specify Resources for Containerized FAS-RC Remote Desktop on CANNON or FASSE
IQSS: Specify Resources for Jupyter Notebook / JupyterLab on CANNON or FASSE
IQSS: Specify Resources for MATLAB on CANNON or FASSE
IQSS: Specify Resources for PostgreSQL on CANNON or FASSE
IQSS: Specify Resources for RStudio on CANNON or FASSE
IQSS: Specify Resources for SAS on CANNON or FASSE
IQSS: Specify Resources for Stata on CANNON or FASSE

How to Specify a Cluster Partition

On both CANNON and FASSE, a partition is a group of resources set up to run certain kinds of jobs.  Some partitions have lots of memory, some let you run jobs for a long time,  and some have GPUs (general purpose Graphical Processing Units).

Partition

Unlike other resources that give you choices, Partition is not a drop-down list.  You must type the name of the partition you want to use for your job.

Getting Started tip:  Be sure to spell the name of the partition correctly.  If the name is wrong, you get an error when you try to launch the application.

List of Partitions on CANNON

Here is an overview of the partitions provided on CANNON.  See “Slurm partitions for more details.  (Slurm is the job scheduler used by both CANNON and FASSE.)

Partition name notable attributes
shared maximum runtime is 7 days
bigmem large amounts of memory (192 GB and up)
gpu GPUs (general purpose Graphical Processing Units)
unrestricted no time limit
test maximum runtime is 8 hours
job is likely to start quickly
gpu_test  maximum runtime is 8 hours
job is likely to start quickly
remoteviz GPUs (general purpose Graphical Processing Units)
serial_requeue allows people to use idle resources of lab-purchased environments
gpu_requeue allows people to use idle resources of lab-purchased environments
PI/Lab nodes  private environments purchased by specific labs

Getting Started tip:  Start with test because your job is likely to start quickly.  Move to another partition if/when you discover you need more memory, more runtime, or GPUs.

List of Partitions on FASSE

Here is an overview of the partitions provided on FASSE.  See “SLURM and Partitions” for more details.  (Slurm is the job scheduler used by both CANNON and FASSE.)

Partition name notable attributes
fasse maximum runtime is 7 days
fasse_bigmem large amounts of memory
fasse_gpu GPUs (general purpose Graphical Processing Units)
test maximum runtime is 8 hours
job is likely to start quickly
remoreviz GPUs (general purpose Graphical Processing Units)
serial_requeue allows people to use idle resources of lab-purchased environments
PI/Lab nodes private environments purchased by specific labs

Getting Started tip:  Start with test because your job is likely to start quickly.  Move to another partition if/when you discover you need more memory, more runtime, or GPUs.

How to Specify Memory

Every application requires memory to run and to hold data while it is being used.

Memory

Getting Started tip:  Start with 16 GB which may be more memory than your local computer has.

If you specify too little memory, your job will run poorly or possibly even crash.

If you specify too much memory, your job may have to wait longer to start (until the memory is available) and/or you are “hogging” (wasting) resources that others could be using.

About Cores

What is a core?

Originally, a CPU (Central Processing Unit) had just one core and could do just one thing at a time.  Today, CPUs have multiple cores. On your personal computer, one core can run the operating system (e.g. Windows, MacOS, or Linux) while another runs an application.  On CANNON and FASSE, multiple researchers can run their applications simultaneously thanks to the huge number of available cores.

Why might I want more than one core?

Some applications can use multiple cores in order to process data more quickly, for example by doing computations in parallel.  If what you’re doing is parallelizable, having multiple cores available in your interactive session may allow you to speed up your computation with little additional effort.  Many people do this instead of submitting batch jobs.

How do I know if my work is parallelizable?

If you are uncertain whether your code is parallelizable, speak to a data scientist familiar with the application and parallelization.

Which applications can use multiple cores?

Jupyter Notebook / JupyterLab

The Python programming language will not use multiple cores unless your code installs a specific package that will allow you to use multiple cores.  There are packages available, each with their pros and cons.  In general, you don’t have to modify your code to take advantage of multiple cores.  The packages act like a resource manager, automatically determining how many cores you have and using them effectively.

MATLAB

Since Release 2008a, some functions in MATLAB automatically use multiple cores. See https://www.mathworks.com/discovery/matlab-multicore.html.

PostgreSQL

Some PostgreSQL queries can use multiple cores but many cannot. Queries return just a few rows of data from a large set will typically benefit most.

For information go to https://www.postgresql.org/docs/, choose your version of PostgreSQL, and look for Parallel Query.

RStudio

By default, R will not use multiple cores unless you load a specific package that will allow you to do so.  There are many such packages, each with their pros and cons.  In general, you don’t have to modify your code to take advantage of multiple cores.  The packages act like a resource manager, automatically determining how many cores you have and using them effectively.

SAS

Since version 9.0, some SAS Procedures have been able to use multiple cores.

Stata

When using Stata, you can specify multiple cores.

How to Specify Cores

Cores

Getting Started tip:  Start with 1 Core.  Increase the number of cores as you learn what your research data and application require.

The maximum number of cores you can specify (32, 48, or 64 at the time of this writing) depends on the partition you choose.  Check the column “Cores per node” in the list of CANNON’s partitions or FASSE’s partitions.

How to Specify GPUs

Some applications can take advantage of general-purpose GPUs (Graphical Processing Units).

GPUs

Getting Started tip:  Start with 0 because your chosen application may not be able to take advantage of a GPU.  If you are sure that your application and data will benefit, Start with 1 and increase the number of GPUs as you learn what your research data and application require or can use.

Whether or not you can specify GPUs and the maximum number you can specify (4 at the time of this writing) depend on the partition you choose.  Check the column “GPU Capable?” in the list of CANNON’s partitions or FASSE’s partitions.

You get an error when you try to launch the application if you specify 1 or more GPUs and specify a partition that does not have any.

How to Specify Maximum Runtime

Allocated Time

Getting Started tip:  Start with 08:00:00 (8 hours) because when you specify 8 hours (or less) your job can run on any partition.

If you specify more than 8 hours, your job cannot run on test or gpu_test.  Slurm will reject your job.

Increase your runtime as you learn what your research data and application require.

Notes:

  • MM means minutes, for example 0 to 59.
  • HH means hours, for example 0 to 23.
  • SS means seconds, for example 0 to 59.
  • DD means days, for example from 0 and up.  If you specify DD, the first separator is a hyphen (-).  The separators between HH, MM, and SS are colons (:).  You cannot specify both DD and SS.
    For example, 06-08:00 means 6 days and 8 hours

DO NOT SPECIFY LESS THAN 10 MINUTES!  The Slurm job scheduler needs time to launch your application while also handling the work of all the other users.  If you specify less than 10 minutes of runtime, your job could end before it actually gets to do any work.

 

Optional Items (that aren’t really resources)

Every application launch page includes these optional items that aren’t really resources.

Email notification when the session starts

The Slurm job scheduler can send you an email when your job has finished waiting in the queue and has started running.

Email address and request for notification

To receive the notification, enter the email address where you want the notification to go and put a check in the box.  If the box is unchecked, you will not receive an email, even if you specified an address.

If you don’t want the notification, you can leave the field blank and/or leave the box unchecked.

Reservation

This option is for advanced users.  If you are new to the clusters, you can safely ignore this.

Reservation

Slurm Account

This option is for advanced users.  If you are new to the clusters, you can safely ignore this.

Slurm account

What if I don’t specify enough resources?

If you don’t specify enough resources — especially CPUs and RAM— your job may not run well.  As stated above, if you specify too little memory, your job will run poorly or possibly even crash.

If you specify too little runtime, your job is terminated when the time runs out and your job won’t achieve everything you needed.

In some cases, may get an error if you don’t specify enough resources!  For example, if you specify partition bigmem on CANNON or fasse_bigmem on FASSE and specify less than 190 GB of RAM, you will get an error when you try to launch the job (because you don’t really need “big memory”).

What if I specify too many resources?

If you specify more memory or more cores than your job actually needs, your job runs just fine.  However, you’re “hogging” (wasting) resources that other users could be using and your PI could be charged for this.  Their jobs might have to wait in the queue until yours finishes and releases the “extra” resources.  If you find that your jobs wait to run, it might be because other people are hogging the resources that you need.

Specifying “too much” runtime is not that big of a problem.  If the application has finished its work on your data, it’s just idle.  You can and should delete the job to free up resources for other users.

Technically speaking, when you specify too many resources you and your entire lab group are “punished” with a lower Fairshare score than you would have received if you had chosen wisely.  See “Fairshare and Job Accounting” for more details.  Your lab group’s next job (or jobs) may not start as quickly in order to be “nicer” to other users who don’t waste resources.

If you need assistance, contact Support.

© The President and Fellows of Harvard College
Except where otherwise noted, this content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.