[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mpi-21] [mpi-3] Some thoughts on MPI 2.1, 2.2, 3.0



On Wed, Jan 09, 2008 at 02:38:08PM +0100, Dries Kimpe wrote:
> 
> 
> * Jesper Larsson Traeff <traff@xxxxxxxxxxxx> [2008-01-09 12:09:20]:
> 
> > It would be tempting to use the MPI pair-datatypes for segmented
> > scans/reductions (start of each segment is marked), selective
> > reductions (only marked elements are reduced), and for the following
> > problem: find out whether all processes have contributed the same value
> > (this seems to require - correct me if I'm wrong - two MPI_Allreduce's,
> > first to find a global min or max, second to determine if all processes
> > did contribute this value). Operators like
> Maybe a user defined operation could do this?:
> 
> func(A,B)
> 
> If A == B return A otherwise return 0/-1/whatever/invalid
> 
> This special invalid value would then propagate op to the root of the
> tree, and every rank just needs to check if the return value is the
> special value or not.
>
another possibility, yes (which would need some ugly invalid values, though). 
All the suggested examples can of course be implemented by user-defined ops. 
The point was only whether it is worth discussing having such things as 
(presumably more efficient) built-in operators - there could be other 
candidates

Jesper