[mpich-discuss] mpiexec ignoring host setting in configfile

Kenneth Raffenetti raffenet at mcs.anl.gov
Thu Jun 22 12:57:49 CDT 2017

On 06/22/2017 11:16 AM, Alexander Rast wrote:
> On Thu, Jun 22, 2017 at 4:14 PM, Kenneth Raffenetti 
> <raffenet at mcs.anl.gov <mailto:raffenet at mcs.anl.gov>> wrote:
>     -host(s) is a global option. You can only specify it once.
> ? This doesn't make sense to me. Example 8.13 from the MPI specification 
> has:
> mpiexec myprog infile1 : myprog infile2 : myprog infile3, corresponding 
> to Form A
> mpiexec {<above arguments>} : {...} : {...} : ... : { ...}
> which invokes potentially multiple programs with different arguments (of 
> which host is one)
> and then mentions that Form B: mpiexec -configfile <filename> has lines 
> of the form separated by the colons in Form A.
> So there's no reason, I would think, that a Form B file can't have 
> multiple lines with different hosts specified for the same executable.

The reason is that Hydra does not support it. You are allowed one 
-host(s) argument. If you want to submit a patch to allow more than one 
instance, we will consider it.

>     Further, your configfile does not make much sense since your are
>     using the same program on both lines. You could rather just do:
>        mpiexec -n 4 -ppn 2 -hosts Shakespeare,Burns ./mpi_io_test
> I have not seen the -ppn switch listed anywhere. What does this do? Is 
> this intended to be a 'limit number of processes to n on the hosts 
> specified?

$ mpiexec -h | grep ppn
     -ppn                             processes per node

> Notwithstanding this isn't what is needed anyway, because what if I want 
> specifically to run at most 2 processes on Shakespeare but 5 on Burns 
> (imagine, for example, that Shakespeare is already loaded with other 
> processes, so I need to limit it for the executable in concern)?

Irregular mappings like this can be done with a hostfile.

> In any case the point is, using the same program on both lines to me 
> seems straightforward enough given that there are numerous instances (as 
> ex. 8.13 above) where various switches and options might be different.
> I note also that -hosts is different from the -host switch listed as 
> pre-defined for mpiexec.

Hydra supports both -host and -hosts. They mean the same thing.

> In my case we have a system where the objective is to direct specific 
> instances of an application or possibly several to specific hosts - so 
> that the mapping can be fixed. In the limit this might consist of -n 1 
> -host <x> <executable> lines, each directing a specific instance of the 
> executable to a specific host.

Again, this will not work with today's Hydra. I would suggest playing 
around some more with the available options to see if another solution 
might work for your use-case.

discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:

More information about the discuss mailing list