Class SimRunner
Defined in File SimRunner.h
Inheritance Relationships
Base Type
public flamegpu::detail::AbstractSimRunner
(Class AbstractSimRunner)
Class Documentation
-
class SimRunner : public flamegpu::detail::AbstractSimRunner
A thread class which executes RunPlans on a single GPU
This class is used by CUDAEnsemble, it creates one SimRunner instance per GPU, each executes in a separate thread. There may be multiple instances per GPU, if running small models on large GPUs.
Public Functions
Constructor, creates and initialise a new SimRunner
- Parameters:
_model – A copy of the ModelDescription hierarchy for the RunPlanVector, this is used to create the CUDASimulation instances.
_err_ct – Reference to an atomic integer for tracking how many errors have occurred
_next_run – Atomic counter for safely selecting the next run plan to execute across multiple threads
_plans – The vector of run plans to be executed by the ensemble
_step_log_config – The config of which data should be logged each step
_exit_log_config – The config of which data should be logged at run exit
_device_id – The GPU that all runs should execute on
_runner_id – A unique index assigned to the runner
_verbosity – Verbosity level (Verbosity::Quiet, Verbosity::Default, Verbosity::Verbose)
_fail_fast – If true, the SimRunner will kill other runners and throw an exception on error
run_logs – Reference to the vector to store generate run logs
log_export_queue – The queue of logs to exported to disk
log_export_queue_mutex – This mutex must be locked to access log_export_queue
log_export_queue_cdn – The condition is notified every time a log has been added to the queue
err_detail – Structure to store error details on fast failure for main thread rethrow
_total_runners – Total number of runners executing
_isSWIG – Flag denoting whether it’s a Python build of FLAMEGPU