Skip to content

Commit

Permalink
Merge pull request #375 from ecmerkle/master
Browse files Browse the repository at this point in the history
ensure maxcpu is at least 1, for #374
  • Loading branch information
yrosseel authored Aug 1, 2024
2 parents 5c2065f + 8f7e3c8 commit a6bc2a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/lav_options_default.R
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ lav_options_default <- function() {
elm("parallel", "no", chr = c(
"no", "multicore", "snow"
))
maxcpu <- parallel::detectCores() - 1L
maxcpu <- max(1L, parallel::detectCores() - 1L)
elm("ncpus", maxcpu, nm = paste0("[1,", maxcpu, "]"))
elm("cl", NULL, oklen = c(0L, 1L))
elm("iseed", NULL, oklen = c(0L, 1L))
Expand Down

0 comments on commit a6bc2a5

Please sign in to comment.