Search code examples
mpihostsmpichslots

mpirun: token slots not supported


I try to run a programme with:

~/mpich3/bin/mpirun --hostfile hosts_8_12.txt python simulation.py

but I get this error:

[mpiexec@pomegranate] HYDU_process_mfile_token (utils/args/args.c:296): token slots not supported at this time
[mpiexec@pomegranate] HYDU_parse_hostfile (utils/args/args.c:343): unable to process token
[mpiexec@pomegranate] mfile_fn (ui/mpich/utils.c:336): error parsing hostfile
[mpiexec@pomegranate] match_arg (utils/args/args.c:152): match handler returned error
[mpiexec@pomegranate] HYDU_parse_array (utils/args/args.c:174): argument matching returned error
[mpiexec@pomegranate] parse_args (ui/mpich/utils.c:1596): error parsing input array
[mpiexec@pomegranate] HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1648): unable to parse user arguments
[mpiexec@pomegranate] main (ui/mpich/mpiexec.c:153): error parsing parameters

Here is my hostfile:

c00 slots=12
c01 slots=12
c02 slots=12
c03 slots=12
c04 slots=12
c05 slots=12
c06 slots=12
c07 slots=12

I am using mpich-3.1.3. When I run the programme without specifying the slots in my hostfile it works well. Do you have an idea where the problem could come from?


Solution

  • I believe the slots keyword is used in Open MPI, not MPICH. The hostfile is a non-standard thing that each implementation specified in its own way. For MPICH, you can see the details here, but the short version is that your file should look like this:

    c00:12
    c01:12
    c02:12
    c03:12
    c04:12
    c05:12
    c06:12
    c07:12