Spawn MPI in x-platform way

Issue #1 new
Jacob Hinkle repo owner created an issue

This is related to the discussion on the PyCA issues list here. Essentially the problem is that currently, Compute.Compute spawns mpi processes using the mpiexec executable along with a call to os.system. However, that executable is not always close at hand, for instance on windows machines, in which case the system call craps out.

mpi4py has a facility to spawn mpi processes, but I don't know how to give it a host list and constrain the number of processes. Basically I need to better understand that aspect of mpi4py and replace the current crappy system call with the builtin support for spawning.

Comments (1)

  1. Jacob Hinkle reporter

    ok, so you can do the following, for example (from the docs)

    comm = MPI.COMM_SELF.Spawn(sys.executable,
                               args=['cpi.py'],
                               maxprocs=5)
    

    I'm not sure how to also supply a nodehosts list like you can with mpiexec, but for now I will launch using the above unless multiple other hosts are provided.

  2. Log in to comment