mpi.reduce(Rmpi)
mpi.reduce()所属R语言包:Rmpi
MPI\_Reduce and MPI\_Allreduce APIs
MPI \ _Reduce和MPI \ _Allreduce的API
译者:生物统计家园网 机器人LoveR
描述----------Description----------
mpi.reduce and mpi.allreduce are global reduction operations. mpi.reduce combines each member's result, using the operation op, and returns the combined value(s) to the member specified by the argument dest. mpi.allreduce is the same as mpi.reduce except that all members receive the combined value(s).
mpi.reduce和mpi.allreduce是全球范围内减少操作。 mpi.reduce结合每个成员的结果,使用操作op,并返回合并后的值(S)的参数dest指定的成员。 mpi.allreduce是一样mpi.reduce除非所有成员获得的总价值(S)。
用法----------Usage----------
mpi.reduce(x, type=2, op=c("sum","prod","max","min","maxloc","minloc"),
dest = 0, comm = 1)
mpi.allreduce(x, type=2, op=c("sum","prod","max","min","maxloc","minloc"),
comm = 1)
参数----------Arguments----------
参数:x
data to be reduced. Must be the same dim and the same type for all members.
要减少的数据。必须是相同的暗淡和相同类型的所有成员。
参数:type
1 for integer and 2 for double. Others are not supported.
1整数和2双。其他不被支持。
参数:op
one of "sum", "prod", "max", "min", "maxloc", or "minloc".
的“总和”,“产品”,“最大”,“最小”,“maxloc”,或“minloc”。
参数:dest
rank of destination
排名的目的
参数:comm
a communicator number
一个通信号
Details
详细信息----------Details----------
It is important that all members in a comm call either all mpi.reduce or all mpi.allreduce even though the master may not be in computation. They must provide exactly the same type and dim vectors to be reduced. If the operation "maxloc" or "minloc" is used, the combined vector is twice as long as the original one since the maximum or minimum ranks are included.
重要的是,一个通讯呼叫中的所有成员全部是mpi.reduce或所有mpi.allreduce即使主可能不计算。他们必须提供完全相同的类型和昏暗的向量就可以减少。如果操作的的“maxloc”或“minloc”被使用时,合成矢量是两倍,只要以来的最大或最小的行列包括原来的1。
----------Value----------
mpi.reduce returns the combined value(s) to the member specified by dest. mpi.allreduce returns the combined values(s) to every member in a comm. The combined value(s) may be the summation, production, maximum, or minimum specified by the argument op. If the op is either "maxloc" or "minloc", then the maximum (minimum) value(s) along the maximum (minimum) rank(s) will be returned.
mpi.reduce返回的组合值(S)成员指定的dest。 mpi.allreduce返回的每一个成员的组合值(S)的通讯。合并后的值(S)可能是指定的参数op的总和,生产,最大或最小。如果op无论是“maxloc的”或“minloc”的,那么,最大(小)值(S)沿最大(最小)的排名(s)将被退回。
(作者)----------Author(s)----------
Hao Yu
参考文献----------References----------
http://www-unix.mcs.anl.gov/mpi/www/www3/
----------See Also----------
mpi.gather.
mpi.gather。
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|