[mpich-discuss] Can i use MPI_REDUCE(with MPI_MIN) to get a "min array"?

Matthieu Dorier matthieu.dorier at irisa.fr
Sun Feb 16 11:50:21 CST 2014


You can use MPI_Op_create to create the appropriate operation (see here: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Op_create.html ) then use it in MPI_Reduce (instead of MPI_MIN). 

Matthieu Dorier 
PhD student at ENS Rennes 
http://people.irisa.fr/Matthieu.Dorier 
----- Mail original -----

> De: "Wesley B. Bland" <wbland at anl.gov>
> À: discuss at mpich.org
> Envoyé: Dimanche 16 Février 2014 06:43:25
> Objet: Re: [mpich-discuss] Can i use MPI_REDUCE(with MPI_MIN) to get
> a "min array"?

> It depends on how you define min array. Do you want to get the
> minimum value at each index? The full array with the minimum sum?
> Something else?

> On Feb 15, 2014, at 6:22 AM, 维洛逐风 < wu_0317 at qq.com > wrote:

> > HI.
> 

> > Say,I have 10 process,each one has a array called gbest, I want to
> > get the min array(with a compare operation I want to define).
> 
> > Is there a way to use MPI_REDUCE to do this?As I know, MPI_MIN
> > specifies datatypes(without arrays).
> 

> > ------------------
> 
> > Jie-Jun Wu
> 
> > Department of Computer Science,
> 
> > Sun Yat-sen University,
> 
> > Guangzhou,
> 
> > P.R. China
> 
> > _______________________________________________
> 
> > discuss mailing list discuss at mpich.org
> 
> > To manage subscription options or unsubscribe:
> 
> > https://lists.mpich.org/mailman/listinfo/discuss
> 
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140216/623327e5/attachment.html>


More information about the discuss mailing list