snowfallInit(ADaCGH2)
snowfallInit()所属R语言包:ADaCGH2
Initialize a cluster of workstations using snowfall
初始化使用降雪工作站的聚类
译者:生物统计家园网 机器人LoveR
描述----------Description----------
With either MPI or sockets, use snowfall to initialize a cluster to have ADaCGH2 run in parallel. Check possible errors during
与MPI或插座,使用降雪初始化聚类ADaCGH2并联运行。检查期间可能出现的错误
用法----------Usage----------
snowfallInit(universeSize = NULL, wdir = getwd(),
minUniverseSize = 2, exit_on_fail = FALSE,
maxnumcpus = 500, typecluster = "SOCK",
socketHosts = NULL,
RNG = "RNGstream")
参数----------Arguments----------
参数:universeSize
Desired size of cluster (number of CPUs). Can be set to NULL. See details.
聚类所需的大小(CPU的数量)。可以设置为NULL。查看详情。
参数:wdir
The common —e.g., NFS mounted resource, a directory in your machine if running on only one computer, etc — directory. We need a common directory for the graphics and ff files so that they are all found in the same location.
常见的,例如,NFS安装的资源,在您的机器上的一个目录,如果只有一台电脑,等运行 - 目录。我们需要的图形和FF文件,使他们都在同一地点发现一个共同的目录。
参数:minUniverseSize
The minimal LAM/MPI universe for the function to return successfully. If the function determines that the available number of slaves is smaller than minUniverseSize it will fail (if exit\_on\_fail = TRUE) or give a warning.
成功返回函数的最小LAM / MPI的宇宙。如果函数确定,奴隶数目是比minUniverseSize小,它会失败(如果退出\ _on \ _fail = TRUE时),或给予警告。
参数:exit_on_fail
If TRUE, kills R session if it cannot run succesfully. Setting it to TRUE is something you probably only want to do when running as an unattended service.
如果是TRUE,杀死R会话,如果不能成功地运行。它设置为TRUE,是你可能只需要运行时,作为一个无人看管的服务做的事情。
参数:maxnumcpus
Passed directly to snowfall. This is the new value of sfSetMaxCPUs set to a very large number to allow us to use large clusters.
直接传递到降雪。这是sfSetMaxCPUs设置为一个很大的数字,以使我们能够使用的大型聚类的新的价值。
参数:typecluster
Either "MPI" or "SOCK". To use MPI, BEFORE calling this function you must configure your MPI environment properly and then load the R package Rmpi.
“MPI”或“袜子”。使用MPI,调用此函数之前,你必须配置你的MPI环境正确,然后加载R包Rmpi。
参数:socketHosts
Passed to snowfall-init.
传递snowfall-init。
参数:RNG
The type of random number generator. One of "RNGstream" (to use rlecuyer) or "SPRNG" (to use the rsprng package). If the generator requested is not available, the function tries to use the other one (givin a warning). To use either of these you need to have the appropriate package installed. </table>
随机数发生器的类型。之一(使用rlecuyer)“RNGstream”或“SPRNG”(使用rsprng包)。如果发电机的要求是不提供的,该函数尝试使用另外一个(得到安宁警告)。使用这些,你需要有相应的包安装。 </ TABLE>
Details
详情----------Details----------
This function is designed to be used mainly with MPI, but clusters with sockets might be easier to create in any operating system without additional software. Moreover, installing Rmpi in Windows and Mac is not easy. Thus, by default, the cluster is one of sockets, and Rmpi is listed in "Enhances" (not "Depends" nor "Suggests"). But this function will fail if you try to use an MPI cluster and do not have Rmpi loaded. Moreover, even if you successfully install and load Rmpi, note that the cluster that gets created by default might not be the want you want (e.g., you might end up with a universe size of one), so it is up to you to configure and, if appropriate, start/boot your MPI environment before loading Rmpi.
此功能主要用于MPI,但与插座的聚类可能在任何操作系统无需额外的软件更容易创建。此外,安装在Windows和Mac Rmpi是不容易的。因此,默认情况下,聚类是一个插座,Rmpi在“增强”(不是“依赖”或“建议”)中列出。但这个函数将失败如果您尝试使用MPI的聚类并没有Rmpi加载。此外,即使您成功地安装和加载Rmpi,注意,被默认创建的聚类可能是想你所想的(例如,你可能会结束了一个宇宙的大小),因此它是给你配置,如果适当的话,启动/引导加载Rmpi之前,你的MPI环境。
When using MPI, the recommended usage is to set only minUniverseSize, leaving "universeSize" as NULL. Then, the cluster will use as many nodes as available to MPI (found from "mpi.universe.size()"), or fail if the available number of nodes is less than minUniverseSize. This usage makes sense in many clusters where the actual number of nodes available can vary, but you definitely do not want to run a job unless a minimal number of nodes can be used. (Moreover, mpi.universe.size returning a very small number can be an indication of a configuration file problem).
使用MPI时,建议使用设置只有minUniverseSize,离开“universeSize”为NULL。然后,聚类将使用MPI(发现“mpi.universe.size()”)中的许多节点,或失败,如果节点数目比minUniverseSize。这种用法使得许多聚类节点上可用的实际数量可能有所不同的意义,但你绝对不希望运行一个作业,除非可以用最小的节点数量。 (此外,mpi.universe.size返回一个非常小的数目可以是一个配置文件的问题的指示)。
If "universeSize" is set, this will be the number of nodes of the cluster (unless you are using MPI and mpi.universe.size is smaller, in which case the function will fail).
如果设置“universeSize”,这将是聚类节点(除非你使用MPI和mpi.universe.size较小,在这种情况下,该函数将失败)。
值----------Value----------
This function is used to create a cluster.
此函数用于创建一个聚类。
作者(S)----------Author(s)----------
Ramon Diaz-Uriarte <a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a>
举例----------Examples----------
snowfallInit(universeSize = 2, typecluster = "SOCK")
## Not run: [#无法运行:]
## If you are using MPI, a better approach would be[#如果你正在使用MPI,一个更好的做法是]
snowfallInit(minUniverseSize = 4, typecluster = "MPI")
## where minUniverseSize is set to whatever[#其中minUniverseSize被设置到任何]
## you regard as an unacceptable minimum[#您认为不可接受的最低]
## End(Not run)[#结束(不运行)]
## Better to explicitly stop cluster after you are done[#明确停止聚类后,你做]
sfStop()
## Not needed. To prevent Windoze from crashing in CMD check.[#没有必要。为了防止Windoze从撞毁在CMD检查。]
Sys.sleep(2)
## To prevent CMD check from crashing after cleanEx[#为了防止崩溃后cleanEx加利福尼亚检查]
detach("package:rlecuyer", unload = TRUE)
Sys.sleep(2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|