snow-startstop             package:snow             R Documentation

_S_t_a_r_t_i_n_g _a_n_d _S_t_o_p_p_i_n_g _S_N_O_W _C_l_u_s_t_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions to start and stop a SNOW cluster and to set default
     cluster options.

_U_s_a_g_e:

     makeCluster(spec, type = getClusterOption("type"), ...)
     stopCluster(cl)

     setDefaultClusterOptions(...)

     makeSOCKcluster(names, ..., options = defaultClusterOptions)
     makePVMcluster(count, ..., options = defaultClusterOptions)
     makeMPIcluster(count, ..., options = defaultClusterOptions)
     getMPIcluster()

_A_r_g_u_m_e_n_t_s:

    spec: cluster specification

   count: number of nodes to create

   names: character vector of node names

 options: cluster options object

      cl: cluster object

     ...: cluster option specifications

    type: character; specifies cluster type.

_D_e_t_a_i_l_s:

     'makeCluster' starts a cluster of the specified or default type
     and returns a reference to the cluster.  Supported cluster types
     are '"SOCK"', '"PVM"', and '"MPI"'.  For '"PVM"' and '"MPI"'
     clusters the 'spec' argument should be an integer specifying the
     number of slave nodes to create.  For '"SOCK"' clusters 'spec'
     should be a character vector naming the hosts on which slave nodes
     should be started; one node is started for each element in the
     vector.

     'stopCluster' should be called to properly shut down the cluster
     before exiting R.  If it is not called it may be necessary to use
     external means to ensure that all slave processes are shut down.

     'setDefaultClusterOptions' can be used to specify alternate values
     for default cluster options.  There are many options.  The most
     useful ones are 'type' and 'homogeneous'.  The default value of
     the 'type' option is currently set to "MPI" if 'Rmpi' is on the
     search path.  Otherwise it is set to '"PVM"' if the 'rpvm' package
     is available, to '"MPI"' if 'Rmpi' is available but 'rpvm' is not,
     and to '"SOCK"' if neither of these packages is found.

     The 'homogeneous' option should be set to 'FALSE' to specify that
     the startup procedure for inhomogeneous clusters is to be used;
     this requires some additional configuration. The default setting
     is 'TRUE' unless the environment variable 'R_SNOW_LIB' is defined
     on the master host with a non-empty value.

     The option'outfile' can be used to specify the file to which slave
     node output is to be directed.  The default is '/dev/null'; during
     debugging of an installation it can be useful to set this to a
     proper file.

     The functions 'makeSOCKcluster', 'makePVMcluster', and
     'makeMPIcluster' can be used to start a cluster of the
     corresponding type.

     In MPI configurations where process spawning is not available and
     something like 'mpirun' is used to start a master and a set of
     slaves the corresponding cluster will have been pre-constructed
     and can be obtained with 'getMPIcluster'.  It is also possible to
     obtain a reference to the running cluster using 'makeCluster' or
     'makeMPIcluster'.  In this case the 'count' argument can be
     omitted; if it is supplied, it must equal the number of nodes in
     the cluster.  This interface is still experimental and subject to
     change.

     For more details see <URL:
     http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html>.

_E_x_a_m_p_l_e_s:

       ## Not run: 
     cl <- makeCluster(c("localhost","localhost"), type = "SOCK")
     clusterApply(cl, 1:2, get("+"), 3)
       
     ## End(Not run)

