Class CUDAEnsemble

Nested Relationships

Class Documentation

class CUDAEnsemble

Manager for automatically executing multiple copies of a model simultaneously This can be used to conveniently execute parameter sweeps and batch validation runs

Public Functions

explicit CUDAEnsemble(const ModelDescription &model, int argc = 0, const char **argv = nullptr)

Initialise CUDA Ensemble If provided, you can pass runtime arguments to this constructor, to automatically call initialise() This is not required, you can call initialise() manually later, or not at all.

Parameters
  • model – The model description to initialise the runner to execute

  • argc – Runtime argument count

  • argv – Runtime argument list ptr

~CUDAEnsemble()

Inverse operation of constructor

void simulate(const RunPlanVec &plan)

Execute the ensemble of simulations. This call will block until all simulations have completed or MAX_ERRORS simulations exit with an error

Parameters

plan – The plan of individual runs to execute during the ensemble

inline EnsembleConfig &Config()

See

CUDAEnsemble::applyConfig() Should be called afterwards to apply changes

Returns

A mutable reference to the ensemble configuration struct

inline const EnsembleConfig &getConfig() const
Returns

An immutable reference to the ensemble configuration struct

void initialise(int argc, const char **argv)
void setStepLog(const StepLoggingConfig &stepConfig)

Configure which step data should be logged

Note

This must be for the same model description hierarchy as the CUDAEnsemble

Parameters

stepConfig – The step logging config for the CUDAEnsemble

void setExitLog(const LoggingConfig &exitConfig)

Configure which exit data should be logged

Note

This must be for the same model description hierarchy as the CUDAEnsemble

Parameters

exitConfig – The logging config for the CUDAEnsemble

inline float getEnsembleElapsedTime() const

Get the duration of the last call to simulate() in milliseconds.

const std::vector<RunLog> &getLogs()

Return the list of logs collected from the last call to simulate()

struct EnsembleConfig

Public Members

std::string out_directory = ""
std::string out_format = "json"
unsigned int concurrent_runs = 4
std::set<int> devices
bool silent = false
bool timing = false