A Slurm script generator for running OpenFOAM jobs in HPC clusters
This article was published 591 days ago, and the content may be outdated.
Introduction
The Slurm
(aka Simple Linux Utility for Resource Management
or SLURM
) job scheduler is employed by many of the HPC clusters. It is annoying when modifying the Slurm script for OpenFOAM parallel cases. Then, a Slurm script generator based on the Bash
language has been developed.
Slurm Script Generator
The Bash commands shown below will generate a Slurm job script which requests a parallel job with 32
threads spread over 2
node and 12
hours. Some individual items, e.g., email
, flow_solver
or proj
, need to be modified before running the generator.
1 |
|
It should be noted that the reconstructPar
utility only support a serial job, which means it will waste your Service Unit budget if you run it in a parallel request.
Usage
The usage of the generator is simple. Save the commands as xxxx
(any name you like) and run the following commands in the terminal:
1 | bash xxxx |