---
title: "Parallel Guide"
canonical: "https://kb.uconn.edu/space/SH/26033587616/Parallel%20Guide"
format: markdown
---
GNU Parallel is powerful, lightweight utility for running single-threaded (i.e. serial) programs multiple times with different inputs. It parallelizes software which which was not designed for parallel execution, and works with Slurm's `srun`. GNU Parallel achieves this by creating "slots" (set by the `-j` or `--jobs` option), and as jobs in slots are completed, it runs remaining jobs.

Some of the more powerful features are:

- Tracking individual jobs in the `--joblog`
- Pausing and resuming
- [Retrying](https://www.gnu.org/software/parallel/parallel_tutorial.html#Progress) failed jobs
- Reading parameters from files or stdin
- Parsing directory `{//}`, file `{/.}` and extension `{.}` names
- Memory control with `--memfree`
- [Shebang](https://www.gnu.org/software/parallel/parallel_tutorial.html#Shebang) line for scripts

To understand how to use some of these features, it's well worth spending an hour going through the [tutorial](https://www.gnu.org/software/parallel/parallel_tutorial.html).

## Using the Parallel module with the scheduler

Clone our Git repository with the setup script and follow the instructions in the README to use GNU Parallel in your submission file:

[https://github.uconn.edu/HPC/parallel-slurm](https://github.uconn.edu/HPC/parallel-slurm)