mpi.spawn.Rslaves(Rmpi)
mpi.spawn.Rslaves()所属R语言包:Rmpi
Spawn and Close R Slaves
“SpawN和关闭ŕ奴隶”
译者:生物统计家园网 机器人LoveR
描述----------Description----------
mpi.spawn.Rslaves spawns R slaves to those hosts automatically chosen by MPI or specific hosts assigned by the argument hosts. Those R slaves are running in R BATCH mode with a specific Rscript file. The default Rscript file "slavedaemon.R" provides interactive R slave environments.
mpi.spawn.Rslaves产卵ŕ这些主机自动选择MPI或特定主机分配的参数hosts的奴隶。这些R奴隶在R批处理模式下运行的与一个特定的Rscript文件。默认的的Rscript的文件“slavedaemon.R”提供互动ŕ从环境。
mpi.close.Rslaves shuts down R slaves spawned by mpi.spawn.Rslaves.
mpi.close.Rslaves关闭ŕ所衍生出的mpi.spawn.Rslaves的奴隶。
tailslave.log view (from tail) R slave log files (assuming they are all in one working directory).
tailslave.log视图(尾)ŕ从log文件(假设他们都在一个工作目录)。
用法----------Usage----------
mpi.spawn.Rslaves(Rscript=system.file("slavedaemon.R", package="Rmpi"),
nslaves=mpi.universe.size(), root = 0, intercomm = 2,
comm = 1, hosts = NULL, needlog = TRUE, mapdrive=TRUE, quiet = FALSE)
mpi.close.Rslaves(dellog = TRUE, comm = 1)
tailslave.log(nlines = 3, comm = 1)
参数----------Arguments----------
参数:Rscript
an R script file used to run R in BATCH mode.
R脚本文件,用于在批处理模式下运行R。
参数:nslaves
number of slaves to be spawned.
产生的奴隶。
参数:root
the rank number of the member who spawns R slaves.
排名数的成员派生ŕ奴隶。
参数:intercomm
an intercommunicator number
intercommunicator数
参数:comm
a communicator number merged from an intercomm.
一个传播者的InterComm从数合并。
参数:hosts
NULL or LAM node numbers to specify where R slaves to be spawned.
NULL或林节点号,指定,其中R奴隶所产生的。
参数:needlog
a logical. If TRUE, R BATCH outputs will be saved in log files. If FALSE, the outputs will send to /dev/null.
一个逻辑。如果是TRUE,R的批次输出将被保存在log文件。如果为FALSE时,输出将发送到/ dev / null的。
参数:mapdrive
a logical. If TRUE and master's working dir is on a network, mapping network drive is attemped on remote nodes under windows platform.
一个逻辑。如果为true,主的工作目录是在网络上,映射的网络驱动器attemped在Windows平台下的远程节点上。
参数:quiet
a logical. If TRUE, do not print anything unless an error occurs.
一个逻辑。如果是TRUE,没有打印任何东西,除非有错误发生。
参数:dellog
a logical specifying if R slave's log files are deleted or not.
逻辑指定ŕ奴隶的log文件被删除或不。
参数:nlines
number of lines to view from tail in R slave's log files.
一些线尾ŕ奴隶的log文件中查看。
Details
详细信息----------Details----------
The R slaves that mpi.spawn.Rslaves spawns are really running a shell program which can be found in system.file("Rslaves.sh",package="Rmpi") which takes a Rscript file as one of its arguments. Other arguments are used to see if a log file (R output) is needed and how to name it. The master process id and the comm number, along with host names where R slaves are running are used to name these log files.
的Rmpi.spawn.Rslaves产卵的奴隶,真正运行一个shell程序,可以发现在system.file("Rslaves.sh",package="Rmpi")这需要一个Rscript的文件作为它的一个参数。其他参数的使用,看看一个log文件(R输出)是必要的,如何命名它。主进程ID和通讯的数量,以及其中R从站的运行与主机名来命名这些log文件。
Once R slaves are successfully spawned, the mergers from an intercomm (default "intercomm = 2") to a comm (default "comm = 1") are automatically done on master and slaves (should be done if the default Rscript is replaced). If additional sets of R slaves are needed, please use "comm = 3", "comm = 4", etc to spawn them. At most a comm number up to 10 can be used. Notice that the default comm number for R slaves (using slavedaemon.R) is always 1 which is saved as .comm.
ŕ奴隶一旦成功产卵,合并的InterComm(默认的InterComm = 2),通讯(默认的通讯= 1)会自动在主站和从站(做应该做的,如果默认Rscript被替换)。 ,如果额外的R奴隶套是必要的,请使用“通讯= 3,通讯= 4,等产卵他们。在大多数的comm数可达10都可以使用。请注意,默认的通讯数为R奴隶(使用slavedaemon.R)永远是1。通讯被保存为。
To spawn R slaves to specific hosts, please use the argument hosts with a list of those node numbers (an integer vector). Total node numbers along their host names can be found by using lamhosts. Notice that this is LAM-MPI specific.
产卵ŕ到特定主机的奴隶,请使用参数hosts的列表,这些节点的数字(整数向量)。可以通过使用lamhosts总节点号以及他们的主机名。请注意,这是LAM-MPI具体的。
值----------Value----------
Unless quiet = TRUE, mpi.spawn.Rslaves prints to stdio how many slaves are successfully spawned and where they are running.
除非quiet = TRUE,mpi.spawn.Rslaves输出到stdio多少奴隶被成功地催生和在何处运行。
mpi.close.Rslaves return 1 if success and 0 otherwise.
mpi.close.Rslaves如果成功返回1,否则为0。
tailslave.log returns last lines of R slave's log files.
tailslave.log返回ŕ奴隶的log文件的最后一行。
(作者)----------Author(s)----------
Hao Yu
参见----------See Also----------
mpi.comm.spawn, lamhosts.
mpi.comm.spawn,lamhosts。
实例----------Examples----------
## Not run: [#不运行:]
mpi.spawn.Rslaves(nslaves=2)
tailslave.log()
mpi.remote.exec(rnorm(10))
mpi.close.Rslaves()
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|