Skip to content

How to use with MPI jobs? #103

@bilke

Description

@bilke

Imagine I have a rule which should run mytool via MPI on 8 processes.

Locally I would start this with e.g.: mpirun -np 8 mytool.

On a slurm cluster I would write a submit script and then inside the script start with srun, e.g.:

#!/bin/bash
#SBATCH --job-name=myjob1
#SBATCH -n 20
...
srun mytool

For MPI and slurm it is crucial to start the parallelized application (mytool) via srun, see also https://slurm.schedmd.com/mpi_guide.html.


I assumed that when using this profile to submit jobs to a slurm cluster using Snakemake the following would happen:

  • A similar submit script like above is created
  • The submit script is submitted via sbatch

But instead Snakemake does the following:


So my questions are:

  • Is it possible to modify this profile to get a similar behavior I originally assumed (directly executing srun inside the job)?
  • Have others successfully run MPI parallelized jobs on multiple nodes with Snakemake?

Explicitly pinging @jdblischak because you may have experience on this topic as well.

cc: @TobiasMeisel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions