Skip to content

Commit

Permalink
cluster() now defaults to workers = availableWorkers() [#118]
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jan 6, 2017
1 parent 036ba6e commit b738349
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' and \code{\link{\%<-\%}} will create \emph{cluster futures}.
#'
#' @export
cluster <- function(expr, envir=parent.frame(), substitute=TRUE, lazy=FALSE, globals=TRUE, persistent=FALSE, workers=NULL, user=NULL, revtunnel=TRUE, homogeneous=TRUE, gc=FALSE, earlySignal=FALSE, label=NULL, ...) {
cluster <- function(expr, envir=parent.frame(), substitute=TRUE, lazy=FALSE, globals=TRUE, persistent=FALSE, workers=availableWorkers(), user=NULL, revtunnel=TRUE, homogeneous=TRUE, gc=FALSE, earlySignal=FALSE, label=NULL, ...) {
## BACKWARD COMPATIBILITY
args <- list(...)
if ("cluster" %in% names(args)) {
Expand Down
2 changes: 1 addition & 1 deletion man/availableCores.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/cluster.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/nbrOfWorkers.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for (strategy in strategies) {
} ## for (strategy ...)


strategies <- c("multiprocess", "multisession", "multicore")
strategies <- c("cluster", "multiprocess", "multisession", "multicore")
strategies <- intersect(strategies, supportedStrategies())
cores <- availableCores()
message("Number of available cores: ", cores)
Expand Down

0 comments on commit b738349

Please sign in to comment.