Hello all,
I've just started my new job in New York City and will shortly be active in
the pyMPI world again.
To answer Luigi's question, scatter takes any container (supports length and
slice) and
splits it into nearly equal pieces (the low ranks get extras). Each piece
is sent in a
single message to the target rank. So, with np=2
A = [11,22,33,44,55]
localA = mpi.scatter(A)
on rank 0, localA is [11,22,33]
on rank 1, localA is [44,55]
Notice this works for anything that looks vaguely like a list. So you can
scatter a dictionary
with D.iteritems() for instance. The localA is always a list, however, the
original type is not
preserved.
Pat
|