[Pympi-users] Correct syntax for mpi.gather to concatenate items into a global list?
Status: Alpha
Brought to you by:
patmiller
From: Julian C. <rjc...@cs...> - 2005-01-28 22:26:20
|
Can someone tell me what is wrong with the following short script. I'm trying to gather an item from a local list in each node into the global list. >>> import mpi,os >>> machine = os.uname() >>> machines[1],mpi.rank ('ale', 0) ('ale', 1) ('ale', 2) ('ale', 3) # machine[1] is the node name >>> if mpi.rank ==0: ... gr = mpi.gather(machines[1])# just get the node name # at this point pyMPI hangs. I ve tried declaring gr as gr = [] everwhere, just in the master and also tried not declaring it. pyMPI always hangs. Usually you cannot assign items to a list, you have to append them, but possible gather does that under the hood anyway.. |