[gpaw-users] Can anyone get mpi broadcast working?

Ask Hjorth Larsen askhl at fysik.dtu.dk
Sat Dec 17 13:50:57 CET 2011


Hi

One of my previous replies was by some accident not CC'ed to the list.

On Fri, 16 Dec 2011, Alex Eftimiades wrote:
> from gpaw.mpi import world
> from numpy import *
> 
> if world.rank == 0:
>     test=array([1,2,3,4])
> else:
>     test=empty([4])
> world.barrier()
> world.broadcast(test,0)
> print str(world.rank)+" says "+str(test)

The non-CC'd e-mail noted that the two test arrays in the above snippet 
have different datatypes (int from array() and float from empty()), and 
that the problem is solved by explicitly setting dtype.  MPI is not very 
nice with error messages.

Regards
Ask


More information about the gpaw-users mailing list