# NOT RUN {
message(paste("Available workers:",
paste(sQuote(availableWorkers()), collapse = ", ")))
# }
# NOT RUN {
options(mc.cores = 2L)
message(paste("Available workers:",
paste(sQuote(availableWorkers()), collapse = ", ")))
# }
# NOT RUN {
# }
# NOT RUN {
## Always use two workers on host 'n1' and one on host 'n2'
options(parallelly.availableWorkers.custom = function() {
c("n1", "n1", "n2")
})
message(paste("Available workers:",
paste(sQuote(availableWorkers()), collapse = ", ")))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab