mpi.iapplyLB(Rmpi)
mpi.iapplyLB()所属R语言包:Rmpi
(Load balancing) parallel apply with nonblocking features
(负载平衡),并行应用与非阻塞的功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
(Load balancing) parallellapply and related functions.
(负载平衡)平行lapply和相关的功能。
用法----------Usage----------
mpi.iapplyLB(x, fun, ..., apply.seq=NULL, comm=1, sleep=0.001)
mpi.iparApply(x, MARGIN, fun, ..., job.num = mpi.comm.size(comm)-1,
apply.seq=NULL, comm=1, sleep=0.001)
mpi.iparLapply(x, fun, ..., job.num=mpi.comm.size(comm)-1, apply.seq=NULL,
comm=1,sleep=0.001)
mpi.iparSapply(x, fun, ..., job.num=mpi.comm.size(comm)-1, apply.seq=NULL,
simplify=TRUE, USE.NAMES = TRUE, comm=1, sleep=0.001)
mpi.iparRapply(x, fun, ..., job.num=mpi.comm.size(comm)-1, apply.seq=NULL,
comm=1, sleep=0.001)
mpi.iparCapply(x, fun, ..., job.num=mpi.comm.size(comm)-1, apply.seq=NULL,
comm=1,sleep=0.001)
mpi.iparReplicate(n, expr, job.num=mpi.comm.size(comm)-1, apply.seq=NULL,
simplify = TRUE, comm=1,sleep=0.001)
mpi.iparMM(A, B, comm=1, sleep=0.001)
参数----------Arguments----------
参数:x
an array or matrix.
阵列或矩阵。
参数:MARGIN
vector specifying the dimensions to use.
向量确定的尺寸来使用。
参数:fun
a function.
一个函数。
参数:simplify
logical; should the result be simplified to a vector or matrix if possible?
逻辑,结果被简化为一个向量或矩阵如果可能的话吗?
参数:USE.NAMES
logical; if TRUE and if x is character, use x as names for the result unless it had names already.
逻辑;如果TRUE和x是字符,请使用xnames的结果,除非它的名称。
参数:n
number of replications.
复制数量。
参数:A
a matrix
矩阵
参数:B
a matrix
矩阵
参数:expr
expression to evaluate repeatedly.
表达反复评估。
参数:job.num
Total job numbers. If job numbers is bigger than total slave numbers (default value), a load balancing approach is used.
总就业数字。如果工作数大于总的站号(默认值),负载均衡的方法是使用。
参数:apply.seq
if reproducing the same computation (simulation) is desirable, set it to the integer vector .mpi.applyLB generated in previous computation (simulation).
如果复制相同的计算(模拟)是可取的,将其设置为整数向量。mpi.applyLB在以前的计算(模拟)。
参数:...
optional arguments to fun
可选参数fun
参数:comm
a communicator number
一个通信号
参数:sleep
a sleep interval on master node (in sec)
一个主节点睡眠的时间间隔(以秒为单位)
Details
详细信息----------Details----------
mpi.iparApply, mpi.iparLapply, mpi.iparSapply, mpi.iparRapply, mpi.iparCapply, mpi.iparSapply, mi.iparReplicate, and mpi.iparMM are nonblocking versions of mpi.parApply, mpi.parLapply, mpi.parSapply, mpi.parRapply, mpi.parCapply, mpi.parSapply, mpi.parReplicate, and mpi.parMM respectively. The main difference is that mpi.iprobe and Sys.sleep are used so that master node consumes almost no CPU cycles while waiting for slaves results. However, due to frequent wake/sleep cycles on master, those functions are not suitable for running small jobs on slave nodes. If anticipated computing time for each job is relatively long, e.g., minutes or hours, setting sleep to be 1 second or longer will further reduce load on master (only slightly).
mpi.iparApply,mpi.iparLapply,mpi.iparSapply,mpi.iparRapply,mpi.iparCapply,mpi.iparSapply,mi.iparReplicate和mpi.iparMM是非阻塞mpi.parApply,mpi.parLapply,mpi.parSapply,mpi.parRapply,mpi.parCapply,mpi.parSapply,mpi.parReplicate和mpi.parMM版本的分别。主要的区别是mpi.iprobe和Sys.sleep使用,使主节点消耗几乎不占用CPU周期,同时等待为奴隶的结果。然而,由于频繁的唤醒/睡眠周期主,这些功能是不适合小工作从节点。如果预期计算每个作业的时间是比较长的,例如,分钟或小时的睡眠,设置为1秒或更长的时间将进一步减少负载,在主(略)。
参见----------See Also----------
mpi.iapply
mpi.iapply
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|