snowfall-a-package: Toplevel useability wrapper for snow to make parallel...

snowfall-packageR Documentation

Toplevel useability wrapper for snow to make parallel programming even more easy and comfortable. All functions are able to run without cluster in sequential mode. Also snowfall works as connector to the cluster management program sfCluster, but can also run without it.


snowfall is designed to make setup and usage of snow more easier. It also is made ready to work together with sfCluster, a ressource management and runtime observation tool for R-cluster usage.


Package: snowfall
Type: Package
Version: 1.61
Date: 2008-11-01
License: GPL


Initalisation via sfInit must be called before the usage of any of the snowfall internal functions. sfStop stopps the current cluster. Some additional functions give access to build-in functions (like sfParallel, sfCpus etc.).


The are plenty of function to execute parallel calculations via snowfall. Most of them are wrappers to the according snow functions, but there are additional functions as well. Most likely the parallel versions of the R-buildin applies are interesting: sfLapply, sfSapply and sfApply. For better cluster take a look at the load balanced sfClusterApplyLB and the function with restore possibilities: sfClusterApplySR.


Various tools allow an easier access to parallel computing: sfLibrary and sfSource for loading code on the cluster, sfExport, sfExportAll, sfRemoveAll and sfRemoveAll for variable sperading on the cluster. And some more.


snowfall is also the R-connector to the cluster management program sfCluster. Mostly all of the communication to this tool is done implicit and directly affecting the initialisation via sfInit. Using sfCluster makes the parallel programming with snowfall even more practicable in real life environments.

For futher informations about the usage of sfCluster look at its documentation.


Jochen Knaus

Maintainer: Jochen Knaus <>,


snow (Simple Network of Workstations):

sfCluster (Unix management tool for snowfall clusters):

See Also

Snowfall Initialisation: snowfall-init
Snowfall Calculation: snowfall-calculation
Snowfall Tools: snowfall-tools

Optional links to other man pages, e.g. snow-cluster


## Not run: 
  # Init Snowfall with settings from sfCluster

  # Init Snowfall with explicit settings.
  sfInit( parallel=TRUE, cpus=2 )

  if( sfParallel() )
    cat( "Running in parallel mode on", sfCpus(), "nodes.\n" )
    cat( "Running in sequential mode.\n" )

  # Define some global objects.
  globalVar1 <- c( "a", "b", "c" )
  globalVar2 <- c( "d", "e" )
  globalVar3 <- c( 1:10 )
  globalNoExport <- "dummy"

  # Define stupid little function.
  calculate <- function( x ) {
    cat( x )
    return( 2 ^ x )

  # Export all global objects except globalNoExport
  # List of exported objects is listed.
  # Work both parallel and sequential.
  sfExportAll( except=c( "globalNoExport" ) )

  # List objects on each node.
  sfClusterEvalQ( ls() )

  # Calc something with parallel sfLappy
  cat( unlist( sfLapply( globalVar3, calculate ) ) )

  # Remove all variables from object.
  sfRemoveAll( except=c( "calculate" ) )

## End(Not run)

snowfall documentation built on Nov. 26, 2023, 5:07 p.m.