View source: R/beowulf_cluster.R
| beowulf_cluster | R Documentation |
Creates a Beowulf cluster configuration from machine IPs, core counts, and user credentials.
beowulf_cluster(
cluster.ips = NULL,
cluster.cores = NULL,
cluster.user = Sys.info()[["user"]],
cluster.port = "11000",
outfile = NULL
)
cluster.ips |
Character vector of machine IP addresses in the cluster. The first IP is the main node (typically the machine running this code). Default: |
cluster.cores |
Integer vector of core counts for each machine. Must match the length of |
cluster.user |
Character string for the user name across all machines. Default: current system user. |
cluster.port |
Character string specifying the communication port. Default: |
outfile |
Character string or |
Network requirements: Firewalls on all machines must allow traffic on the specified port.
Usage workflow:
Create cluster with this function
Register with doParallel::registerDoParallel()
Run parallelized code (e.g., foreach loops)
Stop cluster with parallel::stopCluster()
Cluster object created by parallel::makeCluster(), ready for registration with doParallel::registerDoParallel().
Other utilities:
.vif_to_df(),
auc(),
objects_size(),
optimization_function(),
prepare_importance_spatial(),
rescale_vector(),
root_mean_squared_error(),
setup_parallel_execution(),
standard_error(),
statistical_mode(),
thinning(),
thinning_til_n()
## Not run:
# Create cluster with 3 machines
beowulf.cluster <- beowulf_cluster(
cluster.ips = c(
"192.168.1.10", # main node
"192.168.1.11",
"192.168.1.12"
),
cluster.cores = c(7, 4, 4),
cluster.user = "username",
cluster.port = "11000"
)
# Register cluster for parallel processing
doParallel::registerDoParallel(cl = beowulf.cluster)
# Run parallelized code (e.g., foreach loop)
# your_parallel_code_here
# Stop cluster when done
parallel::stopCluster(cl = beowulf.cluster)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.