Top Site Navigation

Primary Site Navigation

HomeProductsREvolution R Enterprise › Parallel R

ParallelR—About Sleigh

 

Sleigh is an R class that makes it very easy to write simple parallel programs. A sleigh consists of multiple workers that can be controlled from the master process that created the sleigh. Users can easily start up a team or "sleigh" of worker R processes with a shared distributed-memory workspace from within their R sessions and scripts. The workers can be started on the local machine or across networks through a wide variety of invocation mechanisms including enterprise schedulers, again all from within the R environment.

 

To enable the master to communicate with workers, Sleigh supports several mechanisms to launch workers to run jobs.

 

The local launch mechanism is the default option to start up workers. It starts three workers by default on the local machine. You may choose to change the number of workers by specifying the workerCount argument in the sleigh constructor.

 

Sleigh encapsulates the coordination mechanism and provides three functions (sleigh, eachWorker, and eachElem) that you can use to create parallel applications very quickly:

  • The sleigh function creates the workers and returns the Sleigh object that is used to
    maintain the state of the computation.
  • The eachElem function executes a specified function multiple times in parallel with a
    varying set of arguments, returning a list of length equal to the number of executions
    containing the results of those computations.
  • The eachWorker function executes a specified function exactly once on each worker in
    the sleigh. A common use of eachWorker is to provide an initial state for a computation,
    for example, by loading packages or data. It can be used in other ways, however—for
    example, to run simulations in parallel.

With Sleigh, once you’ve identified a computation or portion of a computation that can be executed in parallel, you can simply encapsulate that computation in a function that can be executed by eachElem or eachWorker.

 

Contact us for more information and pricing on fully supported REvolution R Enterprise.

Have questions regarding any product or service? Contact our sales team for more information.

 

 

 

Legal   |   Contact Us © 2010 REvolution Computing