From db9ae6a0c9cecb92048fde6f06af1da183c09b5f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 19 Nov 2020 15:41:24 +0100 Subject: Depend on parallel, doc improvements By depending on parallel instead of importing it, functions to set up and stop a cluster are always available when mkin is loaded. The use of multicore processing in mmkin on Windows is now documented in the help file, which brings mkin closer to a version 1.0 #9. --- docs/dev/reference/mmkin.html | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'docs/dev/reference/mmkin.html') diff --git a/docs/dev/reference/mmkin.html b/docs/dev/reference/mmkin.html index b0ca90f0..4786b02e 100644 --- a/docs/dev/reference/mmkin.html +++ b/docs/dev/reference/mmkin.html @@ -227,9 +227,9 @@ plotting.

time_default
#> user system elapsed -#> 4.706 0.488 1.375
time_1 +#> 4.664 0.433 1.317
time_1
#> user system elapsed -#> 5.232 0.005 5.238
+#> 5.326 0.001 5.330
endpoints(fits.0[["SFO_lin", 2]])
#> $ff #> parent_M1 parent_sink M1_M2 M1_sink @@ -252,7 +252,29 @@ plotting.

# Plotting with mmkin (single brackets, extracting an mmkin object) does not # allow to plot the observed variables separately plot(fits.0[1, 1]) -
# } +
+# On Windows, we can use multiple cores by making a cluster using the parallel +# package, which gets loaded with mkin, and passing it to mmkin, e.g. +cl <- makePSOCKcluster(12) +f <- mmkin(c("SFO", "FOMC", "DFOP"), + list(A = FOCUS_2006_A, B = FOCUS_2006_B, C = FOCUS_2006_C, D = FOCUS_2006_D), + cluster = cl, quiet = TRUE) +print(f) +
#> <mmkin> object +#> Status of individual fits: +#> +#> dataset +#> model A B C D +#> SFO OK OK OK OK +#> FOMC C OK OK OK +#> DFOP OK OK OK OK +#> +#> OK: No warnings +#> C: Optimisation did not converge: +#> false convergence (8)
# We get false convergence for the FOMC fit to FOCUS_2006_A because this +# dataset is really SFO, and the FOMC fit is overparameterised +stopCluster(cl) +# }
-- cgit v1.2.1