Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mpiexec difference between -n and -np?

Tags:

mpi

mpiexec

I'm new to the MPI world and there is a question that is really annoying me. What's the real difference between -n and -np?

like image 651
olegario Avatar asked Dec 08 '16 15:12

olegario


1 Answers

The MPI standard does not specify how MPI ranks are started and leaves it to the particular implementation to provide a mechanism for that. It only recommends (see Section 8.8 of the MPI 3.1 standard for details) that a launcher (if at all necessary) called mpiexec is provided and -n #procs is among the accepted methods to specify the initial number of MPI processes. Therefore, the question as posed makes no sense unless you specify exactly which MPI implementation you are using. As I already said in my comment, with most implementations both options are synonymous.

Note that some MPI implementations can integrate with batch scheduling systems such as Slurm, Torque, etc., and those might provide their own mechanisms to start an MPI job. For example, Open MPI provides the orterun process launcher, symlinked as mpirun and mpiexec, which understands both -n and -np options. When running within a Slurm job though, srun is used instead and it only understands -n (it actually has a completely different set of options).

like image 175
Hristo Iliev Avatar answered Oct 19 '22 21:10

Hristo Iliev