View source: R/run_comsie_sim_hpc.R
run_comsie_sim_hpc | R Documentation |
Calls 'run_comsie_sim.bash' and passes arguments to [comsie::run_simulation()], submits the simulation jobs through [ssh] to Peregrine.
run_comsie_sim_hpc( nb_gens, params_array, nb_replicates = 1, sampling_on_event = FALSE, sampling_freq = ifelse(sampling_on_event, NA, 200), sampling_frac = 0.05, seeds = sample(1:50000, nb_replicates * nrow(params_array)), walltime = "00:57:00", check_pkgs_version = TRUE, brute_force_opt = "simd_omp" )
nb_gens |
integer, how many generations should the simulation be run for? Length must be either 1 (all jobs are given the same number of generations) or 'nrow(params_array)' (custom value for each job). walltime for each job). |
params_array |
a data frame containing all combinations of 'comsie' parameters to submit. One column per parameter, one row for each unique combination of values. Tip: use [create_comsie_params()] to provide the parameter values, then combine the output with [base::expand.grid()] as in the default. |
nb_replicates |
numeric, number of replicate simulations to run. Each unique combination of parameters in 'params_array' will be submitted 'nb_replicates' times. |
sampling_on_event |
logical. If 'TRUE', the community is sampled every time a speciation or extinction happens, and 'sampling_freq' is ignored and must be set to 'NA'. |
sampling_freq |
numeric |
sampling_frac |
numeric (between 0 and 1), fraction of the community (in terms of individuals) written to output at every sampled generation. A truncation is operated. |
seeds |
numeric vector of integers, to seed simulations with. Length must be 'nrow(params_array) * nb_replicates', i.e each job receives a unique seed. This is because each simulation job is run in an independent session, so simulations run with the same seed will be identical. Use this to repeat simulations, otherwise use the default. |
walltime |
character, maximum time allocated by the HPC to a job. Format must be either 'HH:MM:SS' or 'D-HH:MM:SS'. Length must be either 1 (all jobs are given the same walltime) or 'nrow(params_array)' (custom walltime for each job). |
check_pkgs_version |
logical. If 'TRUE', 'fabrika' compares installed versions of 'comrad' and 'comsie' on HPC vs local before running the simulations, and return an error if they mismatch. |
brute_force_opt |
a string specifying which brute force option to use to speed up the calculation of competition coefficients. Defaults to "simd_omp". Other options are "omp", for multithreading with OpenMP, "simd" for single instruction, multiple data (SIMD) via the C++ library ['xsimd'](https://github.com/xtensor-stack/xsimd); and "simd_omp" for both. |
Théo Pannetier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.