launching python in parallel

T

Toon Knapen

Dear all,

I'm looking into launching python in parallel using MPI. There are many
projects already doing this but I would like to understand how this can
be done in a portable way.

For instance, is it possible to launch myscript.py (which calls MPI_Init
through an extension module) like:

mpirun -np 2 /path/to/python myscript.py

Using mpichgm this works, using stock mpich-1.2.5.2 (ch_p4) however,
this does not work.

I have been looking into the implemenation of p4 and the behavious (as
described above) is understandable. The reason is that p4 creates the
remote processes _in_ the MPI_Init of the master. The MPI_Init performs
and execlp specifying the name of the executable only. Once the 'slave'
is launched and also calls the MPI_Init, the command-line arguments are
passed on to the slave. But the slave will thus only launch python, not
the myscript.py. Therefore it will never call MPI_Init.

I would like to know how other parallel python projects handle this.

Thanks in advance,

Toon Knapen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top