找回密码
 注册
查看: 384|回复: 0

R语言 runjags包 install.mgrid()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 23:44:14 | 显示全部楼层 |阅读模式
install.mgrid(runjags)
install.mgrid()所属R语言包:runjags

                                        Install the mgrid script to extend the functionality of the Apple Xgrid related functions
                                         安装MGRID脚本来扩展其功能的苹果的Xgrid的相关功能

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function installs the mgrid script included in the runjags package to /usr/local/bin/mgrid to allow the multiple task features of the xgrid related functions to be used.  The mgrid script also provides other useful options, see the details section.  This function will only run on Mac OS X, and is only useful for those wishing to access an Xgrid distributed computing cluster.
此功能将安装在runjags包MGRID脚本的/ usr /本地/ BIN / MGRID允许多个任务的功能,要使用的的Xgrid的相关功能。 MGRID脚本还提供其他有用的选项的详细信息,请参阅“一节。此功能只在Mac OS X上运行,并且只适用于那些希望访问Xgrid的分布式计算聚类。

Please note that installation of the mgrid script will require an administrators password.  If you are uncomfortable with entering this into an R function, then you can manually install the mgrid script by opening a Terminal at the runjags/xgrid folder and typing 'sudo chmod 755 mgrid.sh' followed by 'sudo cp mgrid.sh /usr/local/bin/mgrid'
请注意,MGRID脚本的安装将需要一个管理员密码。如果你不舒服,进入到一个R函数,那么你可以手动安装MGRID脚本打开一个终端在runjags /的Xgrid的文件夹,然后输入“sudo的文件模式755 mgrid.sh其次是须藤CP mgrid.sh的/ usr / local / bin中/ MGRID


用法----------Usage----------


install.mgrid(libpath=.Library, ask=TRUE)



参数----------Arguments----------

参数:libpath
the path to the library where runjags is installed.  Unless specified when installing the package, this will be the default provided by .Library.
路径到库安装runjags是。除非指定的安装包时,这将是默认提供的。图书馆。


参数:ask
option to confirm the old and new versions of mgrid and ask to continue before overwriting the old version with the new version.  Default TRUE.
选项以确认老版本和新版本的MGRID,并要求继续之前的新版本覆盖旧版本。默认为true。


Details

详细信息----------Details----------

The xgrid related functions within runjags allow arbitrary R code to be run on Xgrid distributed computing clusters from within R.  All the functionality could be replicated by saving all necessary objects to files and using the Xgrid command line utility to submit and retrieve the job manually; these functions merely provide the convenience of not having to do this manually.  Xgrid support is only available on Mac OS X machines.  
内runjags“的Xgrid的相关功能允许任意的R代码上运行Xgrid的分布式计算聚类内R.的所有功能都可以被复制,保存所有必要的文件和使用对象的Xgrid的命令行实用程序提交和手工检索作业;这些功能只是提供了方便,不必手动执行此操作。 Xgrid的支持仅适用于Mac OS X的机器。

All functions can be run using the built-in xgrid commands, however some added functionality (including multi-tasks jobs to enable the 'separatetasks' method) is provided by the 'mgrid.sh' BASH shell script which is included with the runjags package (in the 'inst/xgrid' folder for the package source or the 'xgrid' folder for the installed package). This function automatically installs the mgrid script from this location.
所有的功能都可以运行Xgrid的命令,但一些附加功能(包括多任务工作,使“separatetasks”方法)所提供的“mgrid.sh”的bash shell脚本,包括的runjags包在“安装/ XGRID”文件夹中的包的源或“XGRID”文件夹中已安装的软件包。此功能会自动安装脚本从这个位置MGRID。

The xgrid controller hostname and password must be set as environmental variables. The command line version of R knows about environmental variables set in the .profile file, but unfortunately the GUI version does not and requires them to be set from within R using:
Xgrid控制器的主机名和密码,必须设置环境变量。 。profile文件中设置环境变量的命令行版本的R知道,但不幸的是,GUI版本并不需要来设置,使用在R:

Sys.setenv(XGRID_CONTROLLER_HOSTNAME="<hostname>")
Sys.setenv(XGRID_CONTROLLER_HOSTNAME =“<HOSTNAME>”)

Sys.setenv(XGRID_CONTROLLER_PASSWORD="<password>")
Sys.setenv(XGRID_CONTROLLER_PASSWORD =“<密码>”)

(These lines could be copied into your .Rprofile file for a 'set and forget' solution)
(这些行复制到。Rprofile文件“设置和忘记的解决方案)

You can look at the possible arguments to mgrid by typing 'mgrid' in the Terminal or system('mgrid') within R.  The output is also shown  below for convinience:
你可以看一下可能的参数来MGRID键入“MGRID在终端或系统(MGRID”)内R.输出也为优雅,如下图所示:

mgrid &ndash; version 3.01, June 2010
MGRID  -  3.01版,2010年6月

by Matthew Denwood
由马修·Denwood

SYNOPSIS
内容简介

A bash script that provides a replacement for xgrid -job submit using batch file submission with support for multi-task jobs, scheduler hinting, environmental variables, and built-in ART scripts for selection of intel or ppc machines.
Xgrid的工作提供了替代一个bash脚本,提交使用批处理文件提交的,支持多任务作业,调度暗示,环境变量和内置的在选择英特尔或PPC机器的ART脚本中。

USAGE
USAGE

mgrid [-s stdin] [-i indir] [-d jobid] [-e email-address]  [-a art-path | -z art-path] [-b batchname] [-c arch] [-v "env_variable=env_value [...]" ] [-q] [-h node_name] [-f]  [-r ram_required_(MB)] [-n name] [-t number_of_tasks]  cmd [arg1 [...] ['$task']]
MGRID [-S标准输入] [-I间接] [-D的JobID] [-E email地址] [-A的艺术路径|-Z的艺术路径] [-B batchname] [-C拱] [-V“ env_variable = env_value [...]] [-Q] [-H节点名] [-F] [-R ram_required_(MB)] [-N名称] [-T number_of_tasks] CMD [ARG1 [...] 任务]]

mgrid -l [-m] [-u]
MGRID-L [-M] [-U]

mgrid -?
MGRID  - ?

OPTIONS
OPTIONS

The following options are equivaent to those given for xgrid -job submit:
下面的的选项equivaent Xgrid的工作提交给:

-s  Use supplied file as standard input (equivalent to -si)
-s使用标准输入(相当于-SI提供的文件)

-i  Input supplied directory (equivalent to -in)
-I输入提供的目录(相当于中)

-d  Wait for the dependant job ID to finish (equivalent to -dids, with the  limitation that only 1 dependant job can be specified)
-D等相关的工作ID来完成(相当于-DIDS的限制,只有1相关的工作,可以指定)

-e  Use supplied email address to report status changes (equivalent to -email)
-e使用提供的电子邮件地址,报告状态改变(相当于电子邮件)

-a  Use supplied file as an ART script (equivalent to -art)
-a使用提供的文件作为的ART脚本(相当于最先进的)

Other options for xgrid -job submit are not supported.  The following options  are unique for this script:
Xgrid的工作提交的其他选项不支持。下面的选项是唯一的这个脚本:

-z  Use supplied file as an ART script, and also calculate the node ranking  scores using the supplied script rather than the inbuilt script or a script  in 'Application Support/mgrid/scoring.rb'.  The disadvantage of using an  ART script to calculate node ranking in this way is that for multi-task  jobs, the score is not altered to take into account previous task  allocations.  For an alternative method which preserves this feature see: 'runjags/inst/xgrid/node_scoring_example.rb'.  For users outside the University of Glasgow or not using node ranking, the -r option is identical  to the -a option.  Supplying " " or "none" as the argument. disables node ranking and the ranking ART script for submission of this job.
-Z作为一种艺术的脚本,使用提供的文件和计算节点使用提供的脚本,而不是内置的脚本或脚本的应用程序支持/ MGRID机构/ scoring.rb“的排名分数。使用ART的脚本来计算节点的排名在这样的缺点是,对于多任务的工作中,将比分没有改变,考虑到以前的任务分配。对于保留此功能,请参阅:“runjags /安装/ XGRID / node_scoring_example.rb”的另一种方法。格拉斯哥大学或不使用节点排名以外的用户,使用-r选项是相同的选项。供应“”或“无”的说法。禁用节点排名和排名ART脚本的提交这份工作。

-b  Produce a batch file with the specified file name and stop (does not  submit to xgrid).  This option also prints the (ranked) scores and nodes to screen.  If the batchname specified is "profile" (or "/dev/null") then more detailed information about the scoring is shown, no batch file is produced and cmd is ignored (and may be omitted).
-B制作一个批处理文件中指定的文件名和停止(,不提交到XGRID)。此选项(排名)分数和节点输出到屏幕上。如果指定的batchname的是“个人档案”(或“/ dev / null的”),然后计分的更详细的信息显示,没有批处理文件和cmd被忽略(且可省略)。

-c  Ensure that jobs are run only on intel or ppc machines - should be  'intel' or 'ppc'.
-C确保作业只能运行在英特尔或PPC机器的 - 应该是“英特尔”或“PPC”。

-v  A space seperated string of environmental variable(s) in the form of  "var_1=value_1 var_2=value_2" to be set locally before running the command.
-V的空间分隔字符串的形式“VAR_1 =值1 VAR_2 = VALUE_2”,在运行命令之前,在本地设置的环境变量(S)。

-q  Wait for nodes running OS X server to become available rather than running  jobs on desktop nodes.
-Q等节点上运行OS X服务器成为桌面上的节点,而不是正在运行的作业。

-h  Don't run the ranking script, and use the provided node name(s) instead.   For multiple tasks, separate node names with a colon (no space).  Entire  string must be quoted if any node name contains a space.  Colons in node names will produce either an error or unexpected results.  If the node name  does not match any of the available nodes then the first available node  will be chosen (unless the -f option is also specified in which case the  job/task will hang).  Supplying a blank node name (-h ) produces a job or  batch file with no schedule hinting (this also effectively turns off node  ranking for University of Glasgow users, although the ranking script is  still passed as an ART script to the job - see the -r option for a way to disable both).
-H无法运行的排名脚本,并使用所提供的节点名称(S)。对于多任务,单独的节点名称之间用冒号(中间没有空格)。如果有任何节点名称中包含空格,则整个字符串必须用引号引起来。在节点名中的冒号会产生错误或意外的结果。如果节点名称不匹配任何可用的节点,然后将第一个可用节点选择(除非使用-f选项指定在这种情况下,工作/任务将挂起)。提供没有时间表的提示(这也有效地关闭节点排名大学格拉斯哥用户的,虽然排名脚本仍然通过脚本来的工作作为一种艺术 - 看到一个空节点名(-h)生产作业或批处理文件-r选项的方式,以停用)。

-f  Force the controller to assign the job to the highest ranked (or specified  using -t) node by using an ART script rather than schedule hinting.   Note that ALL tasks will be run on the same node.
-f强制的控制器分配工作的最高排名(或指定使用-t)节点使用ART的脚本,而不是时间表暗示。请注意,所有任务都运行在同一节点上。

-r  The minimum amount of free RAM in MB that is required for the job.  If not  supplied, 10MB is used as a default amount to prevent machines that have  free processors but no free RAM from accepting jobs.
-R以MB为单位的工作所需要的最低限度的自由RAM。如果没有提供一个默认的量,以防止机器上,从接受任务的处理器,但没有免费的RAM,10MB作为。

-n  The name to give the job (appears on xgrid admin etc).  If none is supplied, the command is used as the name.
-N的名称给工作(上出现XGRID管理等)。如果没有被供给时,命令被用于作为名称。

-t  The number of tasks being run.  The arguments should include one containing '$task' which denotes the task number (this MUST be enclosed in single quotes or the $ sign escaped), otherwise the task number will be passed as  the last argument to the command.   
-T的数量正在运行的任务。这些参数应包括一个包含“任务”,这表示任务数(必须用单引号或$符号转义),否则将被传递任务数作为最后一个参数的命令。

-l  Display a list of jobs currently on xgrid and exit.  The following two arguments can also be given:
-l显示的作业列表,目前利用Xgrid和出口。也可以给出以下两个参数:

-m  Include the current status of the jobs.
米中包括的当前状态的作业。

-u  Include the username and hostame of whoever submitted the job (provided the jobs were submitted using mgrid).
-U包含用户名和hostame,谁提交作业提供的就业机会提交的MGRID。

All other arguments are ignored.
所有其它参数将被忽略。

-?  Print a help/usage message and exit.  All other arguments are ignored.
- ?打印帮助/用法信息并退出。所有其它参数将被忽略。

ARGUMENTS
ARGUMENTS

cmd is the command to be run on xgrid, and the remaining arguments are passed as arguments to this command.  The special argument '$task' is used to denote  the task number, and is appended to (any) other commands if ntasks is specified  (even if it is 1) and '$task' is not found among the other arguments.  The  '$task' variable can be embedded in other text to form an argument that changes  with the task number, for example mgrid -t 2 /usr/bin/cal -y '200$task' would  print 2001 for task 1 and 2002 for task 2.  *NB* If using the '$task' special variable in this way, ensure that the argument is enclosed in single quotes (NOT double quotes), or use backslash to escape it (as in "\$"), as the  shell will otherwise evaluate "$task" to "" on passing the argument to mgrid.
cmd是命令上运行XGRID,而其余的参数作为该命令的参数传递。特殊参数$任务是用来表示任务编号,被追加到如果ntasks指定的(任何)的其他命令(即使它是1)和$任务之间的其他的参数还没有发现。 “$任务的变量可以被嵌入到其他文本参数,将打印任务数的变化,例如MGRID-T 2 / usr / bin中/ CAL-Y 200 $任务的2001年任务1年和2002年形成任务2。 *注:*如果使用$的任务,在这样的特殊变量,确保该参数包含在单引号(不包括双引号),或使用反斜杠来逃避(如“\ $”),作为外壳否则评估“任务”,“上传递的参数MGRID。

REQUIREMENTS
要求

Requires XGRID_CONTROLLER_HOSTNAME and XGRID_CONTROLLER_PASSWORD to be set as  environmental variables (these cannot currently be specified as arguments).
需要XGRID_CONTROLLER_HOSTNAME,并XGRID_CONTROLLER_PASSWORD被设置为环境变量(这些目前还不能被指定为参数)。

ABOUT
关于

This script is a replacement for xgrid -job submit that provides some extra features, including support for jobs with multiple tasks, use of  environmental variables and easier targeting of the job to named nodes or  ppc vs intel machines.  For use within the University of Glasgow only, the  script also uses schedule hints to automatically target nodes with higher ART  scores.  This is basically an ugly workaround for the fact that ART doesn't  (currently) rank nodes correctly when prioritising jobs.  It is possible to  implement this feature for use with other xgrid setups; please email me if you  are interested in doing so. Please also feel free to email me if you would be  willing to clean up and add better documention to my woefully cobbled together  code so that it might be more useful to others....
这个脚本是Xgrid的工作提交的替代品,它提供了一些额外的功能,包括支持多个任务,使用环境变量,更容易的工作目标来命名的节点或PPC与英特尔机的工作。在大学格拉斯哥只使用,脚本也可以使用进度提示,自动目标节点具有较高的艺术成绩。这基本上是一个丑陋的事实,艺术不(目前)级节点优先考虑工作时,正确的解决方法。这是可以实现此功能用于与其他Xgrid的设置;请给我发电子邮件,如果你有兴趣这样做。也请随时给我发电子邮件,如果你愿意,清理和更好的文件数量添加到我的可悲拼凑起来的代码,因此,它可能是有用的人......

For use with hydra.vet.gla.ac.uk only:
对于使用与hydra.vet.gla.ac.uk只有:

By default, an inbuilt script is used to rank the available nodes for job/task allocation.  This scoring is performed based on the number of processors per node, the number of jobs already running, and whether or not the node is a  server (running Mac OS X server).  The first task is assigned to the node with  the highest score before incrementing the number of jobs running on that node  to account for the extra task, and re-calculating the score for that node.   This process is then repeated for all remaining tasks.  Additional information  detailing the amount of RAM, processor speed and 32/64 bit availability on the  nodes is collected but not used by default, except for the amount of RAM free  which is used to score a node 0 if it is less than the given minimum.  To change  the way that tasks are distributed among the available nodes, modify the code as  desired in the file included with the runjags package (found in: 'runjags/inst/xgrid/node_scoring_example.rb'), rename the file either 'scoring.rb' or 'scoring.sh', and save either in the working directory or in  '/Library/Application Support/mgrid/'.  Alternatively, a simple scoring script can be specified using the -r option, however this score will not be updated  after assigning each task to account for the extra task, so all tasks will be  assigned to the node with the highest score at the start.  If the number of  tasks exceeds the number of available processors on that node, the remaining  tasks will be allocated to nodes chosen by the xgrid controller.  For jobs with only a single task this option should produce the same results as the more  complex method described above.
默认情况下,一个内置的脚本是用来排序的工作/任务分配的可用节点。得分是根据每个节点的处理器的数量,工作的数量已经运行,以及是否该节点是一个服务器(运行Mac OS X服务器)。第一项任务是得分最高的前分配给节点的数目增加就业机会,考虑到该节点上的额外任务,并重新计算该节点的分数。此过程重复进行,所有剩余的任务。列明金额的RAM,处理器速度和32/64位可用的节点上收集的其他信息,但不使用默认情况下,除了得分节点0,如果是小于给定的最小量的RAM免费使用。要改变的方式,任务分布在可用的节点,修改代码,需要在该文件中包含的runjags包(发现:“runjags /的安装/ XGRID / node_scoring_example.rb”),重命名文件的得分。 RB或scoring.sh“,并保存在工作目录或”/资源库/应用程序支持/ MGRID /。另外,脚本可以使用-r选项指定一个简单的评分,这个分数将不会被更新后,每个任务分配到额外的任务,因此所有的任务将被分配到节点开始得分最高。如果任务数超过在该节点上的可用处理器的数量,余下的任务将被分配到节点Xgrid控制器的选择。的职位只有一个单一的任务,这个选项应该产生更复杂的方法,上述相同的结果。

NOTES
注意事项

This script is distributed 'as is', both FREELY and WITHOUT CHARGE, under the GNU general public license (see http://www.gnu.org/copyleft/gpl.html).  I am therefore not liable for any damage to your computer, xgrid cluster, or sanity caused by using it.  
此脚本分发“是”,自由而CHARGE,在GNU通用公共许可证下(见http://www.gnu.org/copyleft/gpl.html)。因此,我不承担任何损坏您的计算机,XGRID聚类,或使用所造成的理智。


值----------Value----------

The version of mgrid installed is returned invisibly.
MGRID安装的版本,则返回无形。


(作者)----------Author(s)----------


Matthew Denwood <a href="mailto:matthew.denwood@glasgow.ac.uk">matthew.denwood@glasgow.ac.uk</a>



参见----------See Also----------

xgrid.run.jags for functions to run JAGS models on Xgrid, and xgrid.run for running arbitrary functions on Xgrid.
xgrid.run.jags为函数来运行JAGS的模式对Xgrid的,xgrid.run利用Xgrid上运行任意功能。

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-28 06:42 , Processed in 0.020162 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表