On 8 October 2015 at 14:54, simona bellavista <afy...@gmail.com> wrote:
>

>>
>> I cannot figure out how spawn would work with a string-command. I tried
>> MPI.COMM_SELF.Spawn(cmd, args=None,maxproc=4) and it just hangs
>

MPI.COMM_SELF.Spawn("/bin/echo", args=["Hello",
"World!"],maxprocs=1).Disconnect()

Could you try the line above and confirm whether it hangs?

>
> I couldn't figure out how to run Spawn with a string-like command, in fact
> the command that I want to run varies for each processor.

Use maxprocs=1 and make different spawn calls.

However, I have to insist. If you are using mpi4py as a tool to spawn
a bunch of different processes that work in isolation and then collect
result at the end, then mpi4py is likely not the right tool for the
task, at least if you do not have previous experience with MPI
programming.


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459

Reply via email to