#include <paraTask.h>
Public Member Functions | |
ParaTask () | |
default constructor More... | |
ParaTask (const ParaTask ¶Task) | |
copy constructor More... | |
ParaTask (TaskId inTaskId, TaskId inGeneratorTaskId, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
constructor More... | |
virtual | ~ParaTask () |
destructor More... | |
bool | isRootTask () |
check if root task or not More... | |
bool | isSameTaskIdAs (const ParaTask &inTask) |
check if this task id is the same as argument ParaTask's task id More... | |
bool | isSameParetntTaskIdAs (const ParaTask &inTask) |
check if this task's parent id is the same as that of argument ParaTask's task id More... | |
bool | isSameParetntTaskSubtaskIdAs (const TaskId &inTaskId) |
check if this task's parent subtree id is the same as that of argument ParaTask's task id More... | |
bool | isSameSubtaskIdAs (const ParaTask &inTask) |
check if this task's subtask id is the same as that of argument ParaTask's task id More... | |
bool | isSameLcIdAs (const ParaTask &inTask) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id More... | |
bool | isSameLcIdAs (const int lcId) |
check if this task's global subtask LC id is the same as LC id of argument More... | |
bool | isSameGlobalSubtaskIdInLcAs (const ParaTask &inTask) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id More... | |
bool | isSameGlobalSubtaskIdInLcAs (const int globalSubtaskIdInLc) |
check if this task's global subtask id in LC is the same as that of argument More... | |
int | getLcId () |
getter of LoadCoordinator id More... | |
int | getGlobalSubtaskIdInLc () |
getter of global subtask id in Solvers managed by LoadCoordinator More... | |
void | setGlobalSubtaskId (int lcId, int subtaskId) |
setter of global subtask id More... | |
int | getSolverId () |
getter of Solver id More... | |
void | setSolverId (int id) |
setter of Solver id More... | |
TaskId | getTaskId () |
getter of task id More... | |
void | setTaskId (TaskId inTaskId) |
setter of task id More... | |
TaskId | getGeneratorTaskId () |
getter of generator task id More... | |
void | setGeneratorTaskId (TaskId inGeneratorTaskId) |
setter of generator task id More... | |
double | getEstimatedValue () |
getter of estimated value More... | |
void | setEstimatedValue (double inEstimatedValue) |
setter of estimated value More... | |
ParaDiffSubproblem * | getDiffSubproblem () |
getter of diffSubproblem More... | |
void | setDiffSubproblem (ParaDiffSubproblem *inDiffSubproblem) |
setter of diffSubproblem */ More... | |
ParaTaskGenealogicalPtr * | getAncestor () |
getter of ancestor More... | |
void | setAncestor (ParaTaskGenealogicalPtr *inAncestor) |
setter of ancestor More... | |
void | removeDescendant (TaskId removeTaskId) |
remove a descendant More... | |
bool | hasDescendant () |
check if this task has descendant or not More... | |
void | addDescendant (ParaTaskGenealogicalPtr *inDescendant) |
add a descendant More... | |
virtual ParaTask * | clone (ParaComm *comm)=0 |
clone this ParaTask More... | |
virtual int | bcast (ParaComm *comm, int root)=0 |
broadcast this object More... | |
virtual int | send (ParaComm *comm, int destination)=0 |
send this object More... | |
virtual int | receive (ParaComm *comm, int source)=0 |
receive this object More... | |
virtual const std::string | toString () |
stringfy ParaTask More... | |
virtual const std::string | toSimpleString () |
stringfy ParaTask as simple string More... | |
Public Attributes | |
TaskId | taskId |
solving task information More... | |
TaskId | generatorTaskId |
subtree root task id of generator More... | |
ParaTaskGenealogicalPtr * | ancestor |
pointer to ancestor ParaTask : This field is not transferred More... | |
std::map< TaskId, ParaTaskGenealogicalPtrPtr > | descendants |
collection of pointers to descendants : This filed is not transferred More... | |
Protected Attributes | |
double | estimatedValue |
estimate value More... | |
int | diffSubproblemInfo |
1: with diffSubproblem, 0: no diffSubproblem More... | |
ParaDiffSubproblem * | diffSubproblem |
difference between solving instance data and subproblem data More... | |
class ParaTask
Definition at line 541 of file paraTask.h.
ParaTask | ( | ) |
default constructor
Definition at line 565 of file paraTask.h.
copy constructor
Definition at line 579 of file paraTask.h.
References ParaTask::ancestor, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, ParaTask::estimatedValue, ParaTask::generatorTaskId, and ParaTask::taskId.
ParaTask | ( | TaskId | inTaskId, |
TaskId | inGeneratorTaskId, | ||
double | inEstimatedValue, | ||
ParaDiffSubproblem * | inDiffSubproblem | ||
) |
constructor
inTaskId | task id |
inGeneratorTaskId | generator task id |
inEstimatedValue | estimated value |
inDiffSubproblem | pointer to ParaDiffSubproblem object |
Definition at line 594 of file paraTask.h.
|
virtual |
destructor
Definition at line 614 of file paraTask.h.
void addDescendant | ( | ParaTaskGenealogicalPtr * | inDescendant | ) |
add a descendant
inDescendant | descendant ParaTaskGenealogicalPtr |
Definition at line 939 of file paraTask.h.
References comm, and ParaTaskGenealogicalPtr::getTaskId().
Referenced by BbParaLoadCoordinator::processTagTask(), and BbParaNode::~BbParaNode().
|
pure virtual |
broadcast this object
comm | communicator used |
root | root rank of broadcast |
Implemented in BbParaNode, BbParaNodeMpi, and BbParaNodeTh.
Referenced by BbParaSolver::restartRacing(), BbParaLoadCoordinator::run(), and BbParaSolver::run().
clone this ParaTask
comm | communicator used |
Implemented in BbParaNode, BbParaNodeMpi, and BbParaNodeTh.
ParaTaskGenealogicalPtr* getAncestor | ( | ) |
getter of ancestor
Definition at line 876 of file paraTask.h.
ParaDiffSubproblem* getDiffSubproblem | ( | ) |
getter of diffSubproblem
Definition at line 854 of file paraTask.h.
Referenced by ScipParaSolver::createSubproblem(), ScipParaSolver::freeSubproblem(), ScipParaSolver::solve(), and ScipParaSolver::writeSubproblem().
double getEstimatedValue | ( | ) |
TaskId getGeneratorTaskId | ( | ) |
getter of generator task id
Definition at line 814 of file paraTask.h.
Referenced by ScipParaSolver::setBakSettings().
int getGlobalSubtaskIdInLc | ( | ) |
getter of global subtask id in Solvers managed by LoadCoordinator
Definition at line 752 of file paraTask.h.
References SubtaskId::globalSubtaskIdInLc, and TaskId::subtaskId.
Referenced by BbParaSolver::sendSolverState().
int getLcId | ( | ) |
getter of LoadCoordinator id
Definition at line 742 of file paraTask.h.
References SubtaskId::lcId, and TaskId::subtaskId.
Referenced by BbParaSolver::sendSolverState().
int getSolverId | ( | ) |
getter of Solver id
Definition at line 774 of file paraTask.h.
References SubtaskId::solverId, and TaskId::subtaskId.
TaskId getTaskId | ( | ) |
getter of task id
Definition at line 794 of file paraTask.h.
Referenced by BbParaLoadCoordinator::processTagTask(), BbParaLoadCoordinator::sendParaTasksToIdleSolvers(), and ScipParaSolver::setBakSettings().
bool hasDescendant | ( | ) |
check if this task has descendant or not
Definition at line 930 of file paraTask.h.
Referenced by BbParaSolverPool::currentSolvingNodehaeDescendant().
bool isRootTask | ( | ) |
check if root task or not
Definition at line 624 of file paraTask.h.
References SubtaskId::globalSubtaskIdInLc, SubtaskId::lcId, TaskId::seqNum, SubtaskId::solverId, and TaskId::subtaskId.
Referenced by BbParaSolverPoolElement::addSubtreeRoot(), ScipParaSolver::createSubproblem(), BbParaLoadCoordinator::processTagSolverState(), ScipParaObjCommPointHdlr::scip_exec(), ScipParaDiffSubproblem::ScipParaDiffSubproblem(), BbParaNodeTh::sendNewSubtreeRoot(), and ScipParaSolver::solve().
bool isSameGlobalSubtaskIdInLcAs | ( | const ParaTask & | inTask | ) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id
inTask | ParaTask |
Definition at line 715 of file paraTask.h.
References SubtaskId::globalSubtaskIdInLc, TaskId::subtaskId, and ParaTask::taskId.
bool isSameGlobalSubtaskIdInLcAs | ( | const int | globalSubtaskIdInLc | ) |
check if this task's global subtask id in LC is the same as that of argument
globalSubtaskIdInLc | global subtask id in LC |
Definition at line 729 of file paraTask.h.
References SubtaskId::globalSubtaskIdInLc, and TaskId::subtaskId.
bool isSameLcIdAs | ( | const ParaTask & | inTask | ) |
check if this task's global subtask id in LC is the same as that of argument ParaTask's task id
inTask | ParaTask |
Definition at line 688 of file paraTask.h.
References SubtaskId::lcId, TaskId::subtaskId, and ParaTask::taskId.
bool isSameLcIdAs | ( | const int | lcId | ) |
check if this task's global subtask LC id is the same as LC id of argument
lcId | LC id |
Definition at line 702 of file paraTask.h.
References SubtaskId::lcId, and TaskId::subtaskId.
bool isSameParetntTaskIdAs | ( | const ParaTask & | inTask | ) |
check if this task's parent id is the same as that of argument ParaTask's task id
inTask | ParaTask |
Definition at line 651 of file paraTask.h.
References ParaTask::generatorTaskId.
bool isSameParetntTaskSubtaskIdAs | ( | const TaskId & | inTaskId | ) |
check if this task's parent subtree id is the same as that of argument ParaTask's task id
inTaskId | ParaTask id |
Definition at line 663 of file paraTask.h.
References TaskId::subtaskId.
Referenced by BbParaLoadCoordinator::sendParaTasksToIdleSolvers().
bool isSameSubtaskIdAs | ( | const ParaTask & | inTask | ) |
check if this task's subtask id is the same as that of argument ParaTask's task id
inTask | ParaTask |
Definition at line 675 of file paraTask.h.
References TaskId::subtaskId, and ParaTask::taskId.
bool isSameTaskIdAs | ( | const ParaTask & | inTask | ) |
check if this task id is the same as argument ParaTask's task id
inTask | ParaTask |
Definition at line 639 of file paraTask.h.
References ParaTask::taskId.
|
pure virtual |
receive this object
comm | communicator used |
source | source rank |
Implemented in BbParaNode, BbParaNodeMpi, and BbParaNodeTh.
Referenced by BbParaSolver::processTagTask().
void removeDescendant | ( | TaskId | removeTaskId | ) |
remove a descendant
not implemented yet
removeTaskId | task id to remove |
Definition at line 896 of file paraTask.h.
References ParaTaskGenealogicalPtr::getTaskId(), UG::ParaTaskLocalPtr, THROW_LOGICAL_ERROR1, and TaskId::toString().
Referenced by BbParaNode::~BbParaNode().
|
pure virtual |
send this object
comm | communicator used |
destination | destination rank |
Implemented in BbParaNode, BbParaNodeMpi, and BbParaNodeTh.
void setAncestor | ( | ParaTaskGenealogicalPtr * | inAncestor | ) |
setter of ancestor
inAncestor | ancestor ParaTaskGenealogicalPtr |
Definition at line 885 of file paraTask.h.
Referenced by BbParaNode::~BbParaNode().
void setDiffSubproblem | ( | ParaDiffSubproblem * | inDiffSubproblem | ) |
setter of diffSubproblem */
inDiffSubproblem | pointer to ParaDiffSubproblem object |
Definition at line 864 of file paraTask.h.
void setEstimatedValue | ( | double | inEstimatedValue | ) |
setter of estimated value
inEstimatedValue | estimated value |
Definition at line 843 of file paraTask.h.
Referenced by BbParaLoadCoordinator::restartRacing().
void setGeneratorTaskId | ( | TaskId | inGeneratorTaskId | ) |
setter of generator task id
inGeneratorTaskId | generator task id |
Definition at line 823 of file paraTask.h.
void setGlobalSubtaskId | ( | int | lcId, |
int | subtaskId | ||
) |
setter of global subtask id
lcId | LoadCorrdinaor id |
subtaskId | subtask id |
Definition at line 761 of file paraTask.h.
References SubtaskId::globalSubtaskIdInLc, SubtaskId::lcId, and TaskId::subtaskId.
Referenced by BbParaLoadCoordinator::processTagTask().
void setSolverId | ( | int | id | ) |
setter of Solver id
id | solver id |
Definition at line 783 of file paraTask.h.
References SubtaskId::solverId, and TaskId::subtaskId.
void setTaskId | ( | TaskId | inTaskId | ) |
|
virtual |
stringfy ParaTask as simple string
Reimplemented in BbParaNode.
Definition at line 1015 of file paraTask.h.
References TaskId::toString().
Referenced by BbParaLoadCoordinator::processTagSelfSlpitNodeCalcuationState(), BbParaLoadCoordinator::processTagSolverState(), and BbParaLoadCoordinator::writeSubtreeInfo().
|
virtual |
stringfy ParaTask
Reimplemented in BbParaNode.
Definition at line 996 of file paraTask.h.
References ParaDiffSubproblem::toString(), and TaskId::toString().
ParaTaskGenealogicalPtr* ancestor |
pointer to ancestor ParaTask : This field is not transferred
Definition at line 551 of file paraTask.h.
Referenced by BbParaNode::getAncestor(), ParaTask::ParaTask(), BbParaNode::setAncestor(), and BbParaNode::~BbParaNode().
std::map< TaskId, ParaTaskGenealogicalPtrPtr > descendants |
collection of pointers to descendants : This filed is not transferred
Definition at line 552 of file paraTask.h.
Referenced by BbParaNode::addDescendant(), BbParaNode::getMinimumDualBoundInDesendants(), BbParaNode::hasDescendant(), BbParaNode::removeDescendant(), and BbParaNode::~BbParaNode().
|
protected |
difference between solving instance data and subproblem data
Definition at line 558 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::bcast(), BbParaNodeTh::clone(), BbParaNodeMpi::clone(), BbParaNode::getDiffSubproblem(), ParaTask::ParaTask(), BbParaNodeTh::receive(), BbParaNodeMpi::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeMpi::send(), BbParaNodeMpi::sendNewSubtreeRoot(), BbParaNode::setDiffSubproblem(), BbParaNode::toSimpleString(), BbParaNode::toString(), and BbParaNode::~BbParaNode().
|
protected |
1: with diffSubproblem, 0: no diffSubproblem
Definition at line 557 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::bcast(), BbParaNodeMpi::createDatatype(), ParaTask::ParaTask(), BbParaNodeTh::receive(), BbParaNodeMpi::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeMpi::send(), and BbParaNodeMpi::sendNewSubtreeRoot().
|
protected |
estimate value
Definition at line 556 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::createDatatype(), ParaTask::ParaTask(), BbParaNodeTh::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), and BbParaNode::toString().
TaskId generatorTaskId |
subtree root task id of generator
Definition at line 550 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeTh::clone(), BbParaNodeMpi::clone(), BbParaNodeMpi::createDatatype(), BbParaNodeMpi::createDatatypeForNodeId(), BbParaNode::isSameNodeIdAs(), ParaTask::isSameParetntTaskIdAs(), ParaTask::ParaTask(), BbParaNodeTh::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeTh::receiveSubtreeRootNodeId(), BbParaNode::toSimpleString(), and BbParaNode::toString().
TaskId taskId |
solving task information
solving task id
Definition at line 549 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::bcast(), BbParaNodeTh::clone(), BbParaNodeMpi::clone(), BbParaNodeMpi::createDatatype(), BbParaNodeMpi::createDatatypeForNodeId(), ParaTask::isSameGlobalSubtaskIdInLcAs(), ParaTask::isSameLcIdAs(), BbParaNode::isSameNodeIdAs(), ParaTask::isSameSubtaskIdAs(), ParaTask::isSameTaskIdAs(), BbParaSolver::keepParaNode(), ParaTask::ParaTask(), BbParaNodeTh::receive(), BbParaNodeMpi::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeTh::receiveSubtreeRootNodeId(), BbParaNodeMpi::receiveSubtreeRootNodeId(), BbParaNodeMpi::send(), BbParaNodeMpi::sendNewSubtreeRoot(), BbParaSolver::sendParaNode(), BbParaNodeMpi::sendSubtreeRootNodeId(), BbParaNode::toSimpleString(), BbParaNode::toString(), and BbParaNode::~BbParaNode().