aboutsummaryrefslogtreecommitdiff
path: root/R/multistart.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2023-02-13 05:19:08 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2023-02-13 05:19:08 +0100
commit8d1a84ac2190538ed3bac53a303064e281595868 (patch)
treeacb894d85ab7ec87c4911c355a5264a77e08e34b /R/multistart.R
parent51d63256a7b3020ee11931d61b4db97b9ded02c0 (diff)
parent4200e566ad2600f56bc3987669aeab88582139eb (diff)
Merge branch 'main' into custom_lsoda_call
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