diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2023-02-13 05:19:08 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2023-02-13 05:19:08 +0100 |
commit | 8d1a84ac2190538ed3bac53a303064e281595868 (patch) | |
tree | acb894d85ab7ec87c4911c355a5264a77e08e34b /R/multistart.R | |
parent | 51d63256a7b3020ee11931d61b4db97b9ded02c0 (diff) | |
parent | 4200e566ad2600f56bc3987669aeab88582139eb (diff) |
Merge branch 'main' into custom_lsoda_call
Diffstat (limited to 'R/multistart.R')
-rw-r--r-- | R/multistart.R | 7 |
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 |