On Fri, 2018-08-10 at 11:03 -0400, Ray Sheppard wrote:
> As a dumb scientist, I would just bcast the value I get back to the 
> group and ask whoever owns it to kindly reply back with its rank.
>       Ray
> 
Depends how many times one needs to run this--your solution involves
quite a bit of extra communication.  It should be easy to write a
little function that does a binary reduction (loop over bits in the
rank numbers) where each node sends its value and rank to its neighbor,
each recipient picks the larger and in the next round of the reduction
(the nodes with ones in the last dimension drop out) sends that value
and rank to the neighbor in the next dimension, until the value and rank
of the highest value all end up at rank 0 (or wherever you program it).
George Reeke


_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to