[slurm-users] srun and mpirun

Peter Kjellström cap at nsc.liu.se
Fri Apr 13 08:28:53 MDT 2018

On Fri, 13 Apr 2018 13:49:56 +0430
Mahmood Naderan <mahmood.nt at gmail.com> wrote:

> Hi,
> I see some old posts on the web about performance comparison of srun
> vs. mpirun. Is that still an issue? Both the following scripts works
> for test programs and surely the performance concerns is not visible
> here.
> #SBATCH --time=10:00
> mpirun mpihello
> #SBATCH --time=10:00
> srun mpihello

The difference will depend on the MPI implementation.

For example for some MPIs the mpirun will run ssh (which may end up
placing processes really badly wrt job cgroups etc) while others may
auto-detect slurm and use srun to spawn ranks or proxies.

Then there's very different performance aspects that can be affected
(or at least work differently). For example launch and setup is one
thing but process pinning behavior is another...

It's not a very simple question in the general case.

/Peter K

More information about the slurm-users mailing list