A thread that launches all the various replicates requested.
More...
#include <ReplicateRunner.h>
|
| | ReplicateRunner (int replicate, MESolverFactory solverFactory, map< string, string > *parameters, lm::io::ReactionModel *reactionModel, lm::io::DiffusionModel *diffusionModel, uint8_t *lattice, size_t latticeSize, uint8_t *latticeSites, size_t latticeSitesSize, ResourceAllocator::ComputeResources resources) |
| | Create a new replicate runner.
|
| virtual | ~ReplicateRunner () |
| virtual void | wake () |
| | Wake the thread from sleep.
|
| virtual int | run () |
| | Run the thread.
|
| virtual int | getReplicate () |
| | Get the current replicate number.
|
| virtual bool | hasReplicateFinished () |
| | Tell whether the previously running replicate has finished running.
|
| virtual int | getReplicateExitCode () |
| | Get the exit code for the last replicate to finish.
|
| | Worker () |
| | Creates thread and attaches it to the manager.
|
| virtual | ~Worker () |
| | Removes thread from manager and deletes thread.
|
| virtual void | abort () |
| | Set the aborted status for a thread and wakes thread.
|
| virtual void | checkpoint () |
| | Checkpoint (currently unimplemented)
|
| | Thread () |
| | Creates a pthread locking mechanism and initializes "Thread".
|
| virtual | ~Thread () |
| | Destory the Thread.
|
| virtual void | start () |
| | If no thread exists, creates a new thread and begins execution.
|
| virtual void | stop () |
| | Joins the thread with the parent waiting if necessary.
|
| virtual pthread_t | getId () |
| | Returns the pthread based id for the Thread.
|
| virtual void | setAffinity (int cpuNumber) |
| | Binds the thread to a CPU core.
|
A thread that launches all the various replicates requested.
◆ ReplicateRunner()
| lm::main::ReplicateRunner::ReplicateRunner |
( |
int | replicate, |
|
|
MESolverFactory | solverFactory, |
|
|
map< string, string > * | parameters, |
|
|
lm::io::ReactionModel * | reactionModel, |
|
|
lm::io::DiffusionModel * | diffusionModel, |
|
|
uint8_t * | lattice, |
|
|
size_t | latticeSize, |
|
|
uint8_t * | latticeSites, |
|
|
size_t | latticeSitesSize, |
|
|
ResourceAllocator::ComputeResources | resources ) |
Create a new replicate runner.
- Parameters
-
| replicate | The number of the first replicate |
| solverFactory | The factory used to create a solver object for each replicate |
| parameters | A map of parameters for the simulation |
| reactionModel | An object to take care of reactions |
| diffusionModel | An object to take care of diffusion |
| lattice | The actual data representing the lattice |
| latticeSize | The size of the lattice in bytes |
| latticeSitesSize | The size of the lattice sites in bytes |
| resources | A manager for the resources that handles GPUs and CPUs |
◆ ~ReplicateRunner()
| lm::main::ReplicateRunner::~ReplicateRunner |
( |
| ) |
|
|
virtual |
◆ getReplicate()
| virtual int lm::main::ReplicateRunner::getReplicate |
( |
| ) |
|
|
inlinevirtual |
Get the current replicate number.
◆ getReplicateExitCode()
| int lm::main::ReplicateRunner::getReplicateExitCode |
( |
| ) |
|
|
virtual |
Get the exit code for the last replicate to finish.
◆ hasReplicateFinished()
| bool lm::main::ReplicateRunner::hasReplicateFinished |
( |
| ) |
|
|
virtual |
Tell whether the previously running replicate has finished running.
◆ run()
| int lm::main::ReplicateRunner::run |
( |
| ) |
|
|
virtual |
◆ wake()
| void lm::main::ReplicateRunner::wake |
( |
| ) |
|
|
virtual |
◆ diffusionModel
| lm::io::DiffusionModel* lm::main::ReplicateRunner::diffusionModel |
|
protected |
◆ lattice
| uint8_t* lm::main::ReplicateRunner::lattice |
|
protected |
◆ latticeSites
| uint8_t* lm::main::ReplicateRunner::latticeSites |
|
protected |
◆ latticeSitesSize
| size_t lm::main::ReplicateRunner::latticeSitesSize |
|
protected |
◆ latticeSize
| size_t lm::main::ReplicateRunner::latticeSize |
|
protected |
◆ parameters
| map<string,string>* lm::main::ReplicateRunner::parameters |
|
protected |
◆ reactionModel
| lm::io::ReactionModel* lm::main::ReplicateRunner::reactionModel |
|
protected |
◆ replicate
| int lm::main::ReplicateRunner::replicate |
|
protected |
◆ replicateExitCode
| volatile int lm::main::ReplicateRunner::replicateExitCode |
|
protected |
◆ replicateFinished
| volatile bool lm::main::ReplicateRunner::replicateFinished |
|
protected |
◆ resources
◆ solverFactory
The documentation for this class was generated from the following files: