aboutsummaryrefslogtreecommitdiff
path: root/R/multistart.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/multistart.R')
-rw-r--r--R/multistart.R7
1 files changed, 5 insertions, 2 deletions
diff --git a/R/multistart.R b/R/multistart.R
index 61ef43dc..bdfbfe63 100644
--- a/R/multistart.R
+++ b/R/multistart.R
@@ -100,9 +100,12 @@ multistart.saem.mmkin <- function(object, n = 50, cores = 1,
}
if (is.null(cluster)) {
- res <- parallel::mclapply(1:n, fit_function, mc.cores = cores)
+ res <- parallel::mclapply(1:n, fit_function,
+ mc.cores = cores, mc.preschedule = FALSE)
} else {
- res <- parallel::parLapply(cluster, 1:n, fit_function)
+ res <- parallel::parLapplyLB(cluster, 1:n, fit_function,
+ mc.preschedule = FALSE
+ )
}
attr(res, "orig") <- object
attr(res, "start_parms") <- start_parms

Contact - Imprint