[Pympi-users] Fixed gather syntax where pyMPI hangs

I fixed the previous post by removing if mpi.rank == 0:, I was thinking that
the global (gathering) code should only be executed by the master. This code
works (using 2 instances of pyMPI on one server):
>>> import mpi,os
>>> machine = os.uname()
>>> machine_name = []
>>> machine_name.append(machine[1])
# now gather
>>> global_name = mpi.gather(machine_name)
['ale']
>>> global_name
[ 'ale' , 'ale' ]
The only odd part is that you get output from ">>> global_name =
mpi.gather(machine_name)", which is not really correct..
Julian Cook

Thread view

I fixed the previous post by removing if mpi.rank == 0:, I was thinking that
the global (gathering) code should only be executed by the master. This code
works (using 2 instances of pyMPI on one server):
>>> import mpi,os
>>> machine = os.uname()
>>> machine_name = []
>>> machine_name.append(machine[1])
# now gather
>>> global_name = mpi.gather(machine_name)
['ale']
>>> global_name
[ 'ale' , 'ale' ]
The only odd part is that you get output from ">>> global_name =
mpi.gather(machine_name)", which is not really correct..
Julian Cook