SLURM + OpenMPI (mpi4py) in remote server

Viewed 9

So I have a script written with mpi4py that I run using:

mpiexec -n python script.py

And I want to launch it on a remote server using SLURM. Righ now I am using the following configuration, but getting errors saying no slots are available to run the code in parallel:

#!/bin/bash
#SBATCH --ntasks=16
#SBATCH --cpus-per-task=1
#SBATCH --gres=gpu:1

mpiexec -n 16 python script.py

What should be the correct configuration to run the script with 16 parallel workers? Thank you!

0 Answers
Related