The Rlgi package is an integration of the R Programming languages that allows R users to programatically integrate their R models with a Leiden Grid Infrastructure.
This implementation of Rlgi is an adaptation of the Rsge package (which is based on the Rlsf package, etc..). Thanks to all the authors of these package to make this possible.
The program functions as follows:
(lgi.submit is similar, but does not split data and is asynchronous)
IMPORTANT NOTE: This is no more than a prototype version that works with simple cases. Someone with some R knowledge should probably make it more robust (large datasets, for example).
This code is licensed under GPL, use it, modify it, change it, but most of all, enjoy it.
To install this package, first ensure that snow and RCurl are installed, then run the following.
R CMD INSTALL Rlgi
This package requires that the LGI user configuration is setup in ~/LGI.cfg or ~/.LGI. Please refer to QUICKSTART and the documentation for lgi.readConfig() for more information.
Nodes where this package is installed are referred to as submit nodes. Nodes where this package will distribute data for computation are referred to as compute nodes.
SubmitNode:
R packages snow, RCurl and Rlgi installed.
ComputeNode
To get more information about how to use this package, either see:
For more on global configuration, see help(lgi.options)
library(Rlgi) Loading required package: snow Loading required package: XML Welcome to Rlgi Version: 0.0.7
set defaults, when needed
options(lgi.application='R-2.12')
non-cluster-aware call
sapply(c(10:20), function(x){x^3}) [1] 1000 1331 1728 2197 2744 3375 4096 4913 5832 6859 8000
use Rlgi's function to do sapply, but run locally for testing
lgi.parSapply(c(10:20), function(x){x^3}, cluster=FALSE) [Rlgi] Running locally [1] 1000 1331 1728 2197 2744 3375 4096 4913 5832 6859 8000
now run remotely, blocking until all computations are finished
lgi.parSapply(c(10:20), function(x){x^3}) [Rlgi] Submitting 1 jobs... [Rlgi] All jobs submitted, waiting for completion. [Rlgi] Waiting for jobs: 0 queued; 0 running; 1 other
[1] 1000 1331 1728 2197 2744 3375 4096 4913 5832 6859 8000