Class AbstractSimRunner
Defined in File AbstractSimRunner.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Types
public flamegpu::detail::MPISimRunner
(Class MPISimRunner)public flamegpu::detail::SimRunner
(Class SimRunner)
Class Documentation
-
class AbstractSimRunner
Common interface and implementation shared between SimRunner and MPISimRunner
Subclassed by flamegpu::detail::MPISimRunner, flamegpu::detail::SimRunner
Public Functions
Constructor, creates and initialises the underlying thread
- 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)
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
-
inline virtual ~AbstractSimRunner()
Virtual class requires polymorphic destructor
Protected Functions
Protected Attributes
-
const std::shared_ptr<const ModelData> model
Each sim runner takes it’s own clone of model description hierarchy, so it can manipulate environment without conflict
-
const int device_id
CUDA Device index of runner
-
const unsigned int runner_id
Per instance unique runner id
-
const unsigned int total_runners
Total number of runners executing This is used to calculate the progress on job completion
-
std::atomic<unsigned int> &err_ct
Reference to an atomic integer for tracking how many errors have occurred
-
std::atomic<unsigned int> &next_run
Atomic counter for safely selecting the next run plan to execute across multiple threads This is used differently by each class of runner
-
const RunPlanVector &plans
Reference to the vector of run configurations to be executed
-
const std::shared_ptr<const StepLoggingConfig> step_log_config
Config specifying which data to log per step
-
const std::shared_ptr<const LoggingConfig> exit_log_config
Config specifying which data to log at run exit
-
std::queue<unsigned int> &log_export_queue
The queue of logs to exported to disk
-
std::mutex &log_export_queue_mutex
This mutex must be locked to access log_export_queue
-
std::condition_variable &log_export_queue_cdn
The condition is notified every time a log has been added to the queue
-
std::vector<ErrorDetail> &err_detail
Error details will be stored here
-
const bool isSWIG
If true, the model is using SWIG Python interface
Friends
- friend class flamegpu::CUDAEnsemble
-
struct ErrorDetail