Specify the number of threads for ensemble simulations in Julia. This will not overwrite your current global setting for JULIA_NUM_THREADS. Note that this does not affect regular simulations with simulate()
.
Usage
use_threads(n = parallel::detectCores() - 1, stop = FALSE)
See also
Other simulate:
ensemble()
,
export_plot()
,
plot.sdbuildR_ensemble()
,
plot.sdbuildR_sim()
,
sim_specs()
,
simulate()
,
solvers()
,
use_julia()
Examples
if (FALSE) # requires Julia setup
if (JuliaConnectoR::juliaSetupOk()) {
# Use Julia with 4 threads
use_julia()
use_threads(n = 4)
# Stop using threads
use_threads(stop = TRUE)
# Stop using Julia
use_julia(stop = TRUE)
}
# \dontrun{}