Unity
Unity
About
Services
News
Events
Docs
Contact Us
code
search
login
Unity
Unity
About
Services
News
Events
Docs
Contact Us
dark_mode
light_mode
code login
search

Documentation

  • Requesting An Account
  • Frequently Asked Questions
  • Cluster Specifications
    • Node Features (Constraints)
    • Node List
    • Partition List
      • Gypsum
    • Storage
  • Connecting
    • SSH
    • Unity OnDemand
    • Connecting to Desktop VS Code
  • Managing Files
    • Command Line Interface (CLI)
    • FileZilla
    • Globus
    • Scratch: HPC Workspace
    • Unity OnDemand File Browser
  • Software Management
    • Conda
    • Modules
      • Module Usage
      • Module Hierarchy
    • Unity OnDemand
  • Submitting Jobs
    • Batch Jobs
      • Array Batch Jobs
    • Interactive CLI Jobs
    • Unity OnDemand
  • Tools & Software
    • ColabFold

Documentation

  • Requesting An Account
  • Frequently Asked Questions
  • Cluster Specifications
    • Node Features (Constraints)
    • Node List
    • Partition List
      • Gypsum
    • Storage
  • Connecting
    • SSH
    • Unity OnDemand
    • Connecting to Desktop VS Code
  • Managing Files
    • Command Line Interface (CLI)
    • FileZilla
    • Globus
    • Scratch: HPC Workspace
    • Unity OnDemand File Browser
  • Software Management
    • Conda
    • Modules
      • Module Usage
      • Module Hierarchy
    • Unity OnDemand
  • Submitting Jobs
    • Batch Jobs
      • Array Batch Jobs
    • Interactive CLI Jobs
    • Unity OnDemand
  • Tools & Software
    • ColabFold
  1. Unity
  2. Documentation
  3. Submitting Jobs
  4. Interactive CLI Jobs

Using SALLOC to Submit Jobs

salloc is a so-called blocking command, as in it will not let you execute other commands until this command is finished (not necessarily the job, just the allocation). For example, if you run salloc srun /bin/hostname and resources are available right away it will print the hostname of the node allocated. If resources are not available, you will be stuck in the command while you are pending in the queue. Ctrl+C will cancel the request. Note it takes two Ctrl+C within one second to cancel the job once it is started.

lightbulb
When to use sbatch
Usually, if you have to run a single application multiple times, or if you are trying to run a non-interactive application, you should use sbatch instead of salloc, since sbatch allows you to specify parameters in the file, and is non-blocking.

Please note that like sbatch, you can run a batch file using salloc.

The command syntax is salloc <options> srun [executable] <args>

Options is where you can specify the resources you want for the executable, or define. The following are some of the options available; to see all available parameters run man salloc.

  • -c <num> Number of CPUs (threads) to allocate to the job per task
  • -n <num> The number of tasks to allocate (for MPI)
  • -G <num> Number of GPUs to allocate to the job
  • --mem <num>[K|M|G|T] Memory to allocate to the job (in MB by default)
  • -p <partition> Partition to submit the job to

To run an interactive job with your default shell, just pass the resources required to salloc and do not specify a command:

salloc -c 6 -p cpu

To run an application on the cluster that uses a GUI, you must use an interactive job, in addition to the --x11 argument:

salloc -c 6 -p cpu --x11 xclock
warning
You cannot run an interactive/gui job using the sbatch command, you must use salloc.
Last modified: Friday, August 18, 2023 at 5:28 PM. See the commit on GitLab.
University of Massachusetts Amherst University of Massachusetts Amherst University of Rhode Island University of Rhode Island University of Massachusetts Dartmouth University of Massachusetts Dartmouth University of Massachusetts Lowell University of Massachusetts Lowell University of Massachusetts Boston University of Massachusetts Boston Mount Holyoke College Mount Holyoke College
search
close