makeCluster(spec, type = getClusterOption("type"), ...) makeTERRcluster(nnodes = getOption("mc.cores", 2L), outfile=NULL, affinity = NULL, verbose = FALSE, ...) makeTSSScluster(nnodes=4, URL = "", userName = "", password = "", outfile = NULL, verbose = FALSE, ...) makePSOCKcluster(names, ...) makeForkCluster(nnodes = getOption("mc.cores", 2L), ...) stopCluster(cl = NULL) setDefaultCluster(cl = NULL)
spec | the cluster specification. The form of this specification depends on the cluster type. In TIBCO Enterprise Runtime for R, spec must be the number of nodes to be created. In open-source R, spec could also be a vector of node names. |
type | a character string specifying the type of cluster. In TIBCO Enterprise Runtime for R, this must be the string "TERR" (to call makeTERRcluster) or the string "TSSS" (to call makeTSSScluster). The string "TERR" is used as the default value if this argument is not given. (In open-source R, this must be one of "PSOCK", "FORK", "SOCK", "PVM", "MPI" or "NWS", with the default of "PSOCK".) |
... | the cluster options. Must be given in the pair-list format tag = value. These arguments are passed to the function that creates the cluster, such as makeTERRcluster or makeTSSScluster. |
outfile | a character string or NULL specifying how to handle text output printed by the nodes. If this is NULL, node text output is silently discarded. If this is "", node text output is printed as it is received. If this is any other string, this is a file name, and node text output is written to this file. |
affinity | an integer vector giving the CPU cores where each node should run on a Windows machine with multiple cores. |
verbose | a logical value. If TRUE, debugging information is printed. |
URL | a character string giving the address of the server, such as "http://z600:8966/SplusServer". |
userName | a character string, giving the user name for connecting to the server. |
password | a character string, giving the user password for connecting to the server. |
names | a character vector specifying the names of the cluster nodes to be created, or an integer specifying the number of times to replicate "localhost" as the node name. |
nnodes | an integer specifying the number of nodes to be created. Must not be less than 1. |
cl | a cluster object. |
makeCluster | Creates a cluster of engine nodes to use for parallel computating using functions such as clusterApply. The spec argument must be the number of nodes to be created. The type argument gives the particuar type of cluster. If this is "TERR" or is not given, makeTERRcluster is called. If this is "TSSS", makeTSSScluster is called. |
makeTERRcluster | Creates one or more engine node processes
on the same machine.
When TIBCO Enterprise Runtime for R creates engine node processes on a Windows machine with multiple cores, it attempts to assign processor affinities so different nodes run on different cores. Normally, this default behavior should be satisfactory. However, it is possible to specify the affinities explicitly by setting the affinity argument. This should be a vector of integers giving the CPU (from 1 to the number of cores available) where each node should run, or zero if the node should run without core affinity. Thus, makeCluster(3, affinity=c(1,3,5)) runs three nodes on cores 1, 3, and 5 respectively. |
makeTSSScluster | Creates a cluster that executes on TIBCO Enterprise Runtime for R engines
running on a remote TIBCO Spotfire Statistics Services server.
The URL argument gives the address of the server, such as
"http://z600:8966/SplusServer". If the server has
authentication enabled, it might be necessary to specify the
userName and password arguments.
When using a "TSSS" cluster, the "nodes" do not represent particular TIBCO Enterprise Runtime for R engines. Instead, they indicate the number of simultaneous tasks that can be sent to the TIBCO Spotfire Statistics Services server, which handle scheduling computations on one or more TIBCO Enterprise Runtime for R engines. Note: When using a "TSSS" cluster, it is not possible to guarantee that a given computation is executed on a given engine. When one uses a "TERR" cluster, one can call clusterEvalQ multiple times to set variables on the cluster engines before a subsequent call to clusterApply. In contrast, when one uses a "TSSS" cluster, all necessary initialization should be done in the function passed to clusterApply, because you cannot guarantee on which engine it is executed. One form of initialization is performed automatically: if clusterSetRNGStream is called on a "TSSS" cluster, any subsequent computations performed by this cluster sets the random number generator to ensure that the parallel computations use independent random number streams. Note: When executing code in TIBCO Enterprise Runtime for R on a TIBCO Spotfire Statistics Services server, it is possible to call makeCluster with type="TERR" to spawn one or more TIBCO Enterprise Runtime for R processes on the same server machine. These processes compete for resources with the TIBCO Enterprise Runtime for R processes spawned by the server, which may degrade performance for the server. |
makePSOCKcluster and makeForkCluster | Defined to be compatible with open-source R, but TIBCO Enterprise Runtime for R does not support these types of clusters. If they are called, they generate an error. |
stopCluster | Stops the engine nodes in the cluster cl. |
setDefaultCluster | Registers a cluster as the default for the current session. If a cluster is registered as the default cluster, and a function such as clusterApply is called with its cl argument set to NULL, the default cluster is used. |
makeCluster | returns a cluster object. |
stopCluster | returns NULL invisibly. |
setDefaultCluster | returns cl invisibly. |
## Not run: # Create TERR cluster with 2 nodes cl <- makeCluster(2) setDefaultCluster(cl) stopCluster(cl) ## End(Not run)## Not run: # Create TSSS cluster with 2 nodes cl <- makeCluster(2, type="TSSS", URL="http://z600:8966/SplusServer") stopCluster(cl) ## End(Not run)