Skip to content

Running RMG in parallel with a SLURM scheduler

NICK VANDEWIELE edited this page May 27, 2016 · 1 revision

An example job submission script for a RMG-Py job with a SLURM scheduler

The job named min_par reserves 24 CPUs on a single node (-np 24), but uses only 12 workers (= 12 CPUs) in parallel during the RMG-Py simulation.

Make sure that:

  • the queue named debug exists on your SLURM scheduler.
  • you modify the path to the parent folder of the RMG-Py installation folder
  • you have an anaconda environment named rmg_env that contains RMG-Py's dependencies
  • make sure that the working directory from which you launched the job contains the RMG-Py input file input.py

-v adds verbosity to the output log file.

#!/bin/bash
#SBATCH -p debug
#SBATCH -J min_par
#SBATCH -n 24

hosts=$(srun bash -c hostname)

WORKERS=12

RMG_WS=/path/to/RMG/parent/folder
export PYTHONPATH=$PYTHONPATH:$RMG_WS/RMG-Py/

source activate rmg_env
python -m scoop -n $WORKERS --host $hosts -v $RMG_WS/RMG-Py/rmg.py input.py
source deactivate

Clone this wiki locally