#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 void | write (gzstream::ogzstream &out)=0 |
| write to checkpoint file 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.
References ParaTask::diffSubproblem, and ParaTask::diffSubproblemInfo.
|
virtual |
| void addDescendant | ( | ParaTaskGenealogicalPtr * | inDescendant | ) |
add a descendant
| inDescendant | descendant ParaTaskGenealogicalPtr |
Definition at line 939 of file paraTask.h.
References ParaTask::descendants, 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 BbParaNodeMpi, BbParaNodeTh, and BbParaNode.
Referenced by BbParaSolver::restartRacing(), BbParaSolver::run(), and BbParaLoadCoordinator::run().
clone this ParaTask
| comm | communicator used |
Implemented in BbParaNodeMpi, BbParaNodeTh, and BbParaNode.
| ParaTaskGenealogicalPtr * getAncestor | ( | ) |
getter of ancestor
Definition at line 876 of file paraTask.h.
References ParaTask::ancestor.
Referenced by BbParaSolverPool::getGoodSolverSolvingEssentialNode().
| ParaDiffSubproblem * getDiffSubproblem | ( | ) |
getter of diffSubproblem
Definition at line 854 of file paraTask.h.
References ParaTask::diffSubproblem, and ParaTask::diffSubproblemInfo.
Referenced by ScipParaSolver::createSubproblem(), ScipParaSolver::freeSubproblem(), ScipParaSolver::getOffsetDepth(), ScipParaSolver::getParentDiffSubproblem(), ScipParaSolver::solve(), and ScipParaSolver::writeSubproblem().
| double getEstimatedValue | ( | ) |
getter of estimated value
Definition at line 834 of file paraTask.h.
References ParaTask::estimatedValue.
| TaskId getGeneratorTaskId | ( | ) |
getter of generator task id
Definition at line 814 of file paraTask.h.
References ParaTask::generatorTaskId.
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, TaskId::subtaskId, and ParaTask::taskId.
Referenced by BbParaSolver::sendSolverState().
| int getLcId | ( | ) |
getter of LoadCoordinator id
Definition at line 742 of file paraTask.h.
References SubtaskId::lcId, TaskId::subtaskId, and ParaTask::taskId.
Referenced by BbParaSolver::sendSolverState().
| int getSolverId | ( | ) |
getter of Solver id
Definition at line 774 of file paraTask.h.
References SubtaskId::solverId, TaskId::subtaskId, and ParaTask::taskId.
| TaskId getTaskId | ( | ) |
getter of task id
Definition at line 794 of file paraTask.h.
References ParaTask::taskId.
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.
References ParaTask::descendants.
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, TaskId::subtaskId, and ParaTask::taskId.
Referenced by BbParaSolverPoolElement::addSubtreeRoot(), ScipParaSolver::createSubproblem(), BbParaLoadCoordinator::processTagSolverState(), ScipParaObjCommPointHdlr::scip_exec(), ScipParaDiffSubproblem::ScipParaDiffSubproblem(), BbParaNodeTh::sendNewSubtreeRoot(), and ScipParaSolver::solve().
| 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, TaskId::subtaskId, and ParaTask::taskId.
| 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 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, TaskId::subtaskId, and ParaTask::taskId.
| 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 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 ParaTask::generatorTaskId, and 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 BbParaNodeMpi, BbParaNodeTh, and BbParaNode.
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 ParaTask::descendants, 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 BbParaNodeMpi, BbParaNodeTh, and BbParaNode.
| void setAncestor | ( | ParaTaskGenealogicalPtr * | inAncestor | ) |
setter of ancestor
| inAncestor | ancestor ParaTaskGenealogicalPtr |
Definition at line 885 of file paraTask.h.
References ParaTask::ancestor.
Referenced by BbParaNode::~BbParaNode().
| void setDiffSubproblem | ( | ParaDiffSubproblem * | inDiffSubproblem | ) |
setter of diffSubproblem */
| inDiffSubproblem | pointer to ParaDiffSubproblem object |
Definition at line 864 of file paraTask.h.
References ParaTask::diffSubproblem, and ParaTask::diffSubproblemInfo.
| void setEstimatedValue | ( | double | inEstimatedValue | ) |
setter of estimated value
| inEstimatedValue | estimated value |
Definition at line 843 of file paraTask.h.
References ParaTask::estimatedValue.
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.
References ParaTask::generatorTaskId.
| 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, TaskId::subtaskId, and ParaTask::taskId.
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, TaskId::subtaskId, and ParaTask::taskId.
| void setTaskId | ( | TaskId | inTaskId | ) |
setter of task id
| inTaskId | task id |
Definition at line 803 of file paraTask.h.
References ParaTask::taskId.
|
virtual |
stringfy ParaTask as simple string
Reimplemented in BbParaNode.
Definition at line 1015 of file paraTask.h.
References ParaTask::generatorTaskId, ParaTask::taskId, and 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 ParaTask::diffSubproblem, ParaTask::estimatedValue, ParaTask::generatorTaskId, ParaTask::taskId, TaskId::toString(), and ParaDiffSubproblem::toString().
|
pure virtual |
| ParaTaskGenealogicalPtr* ancestor |
pointer to ancestor ParaTask : This field is not transferred
Definition at line 551 of file paraTask.h.
Referenced by ParaTask::getAncestor(), BbParaNode::getAncestor(), ParaTask::ParaTask(), ParaTask::setAncestor(), 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 ParaTask::addDescendant(), BbParaNode::addDescendant(), BbParaNode::getMinimumDualBoundInDesendants(), ParaTask::hasDescendant(), BbParaNode::hasDescendant(), BbParaNode::removeDescendant(), ParaTask::removeDescendant(), and BbParaNode::~BbParaNode().
|
protected |
difference between solving instance data and subproblem data
Definition at line 558 of file paraTask.h.
Referenced by BbParaNodeMpi::bcast(), BbParaNodeTh::bcast(), BbParaNodeMpi::clone(), BbParaNodeTh::clone(), ParaTask::getDiffSubproblem(), BbParaNode::getDiffSubproblem(), ParaTask::ParaTask(), BbParaNode::read(), BbParaNodeMpi::receive(), BbParaNodeTh::receive(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::send(), BbParaNodeMpi::sendNewSubtreeRoot(), BbParaNode::setDiffSubproblem(), ParaTask::setDiffSubproblem(), BbParaNode::toSimpleString(), ParaTask::toString(), BbParaNode::toString(), BbParaNode::write(), BbParaNode::~BbParaNode(), and ParaTask::~ParaTask().
|
protected |
1: with diffSubproblem, 0: no diffSubproblem
Definition at line 557 of file paraTask.h.
Referenced by BbParaNodeMpi::bcast(), BbParaNodeTh::bcast(), BbParaNodeMpi::createDatatype(), ParaTask::getDiffSubproblem(), ParaTask::ParaTask(), BbParaNode::read(), BbParaNodeMpi::receive(), BbParaNodeTh::receive(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::send(), BbParaNodeMpi::sendNewSubtreeRoot(), ParaTask::setDiffSubproblem(), and BbParaNode::write().
|
protected |
estimate value
Definition at line 556 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::createDatatype(), ParaTask::getEstimatedValue(), ParaTask::ParaTask(), BbParaNode::read(), BbParaNodeTh::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), ParaTask::setEstimatedValue(), ParaTask::toString(), BbParaNode::toString(), and BbParaNode::write().
| TaskId generatorTaskId |
subtree root task id of generator
Definition at line 550 of file paraTask.h.
Referenced by BbParaNodeTh::bcast(), BbParaNodeMpi::clone(), BbParaNodeTh::clone(), BbParaNodeMpi::createDatatype(), BbParaNodeMpi::createDatatypeForNodeId(), ParaTask::getGeneratorTaskId(), BbParaNode::isSameNodeIdAs(), ParaTask::isSameParetntTaskIdAs(), ParaTask::isSameParetntTaskSubtaskIdAs(), ParaTask::ParaTask(), BbParaNode::read(), BbParaNodeTh::receive(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeTh::receiveSubtreeRootNodeId(), ParaTask::setGeneratorTaskId(), ParaTask::toSimpleString(), BbParaNode::toSimpleString(), ParaTask::toString(), BbParaNode::toString(), and BbParaNode::write().
| TaskId taskId |
solving task information
solving task id
Definition at line 549 of file paraTask.h.
Referenced by BbParaNodeMpi::bcast(), BbParaNodeTh::bcast(), BbParaNodeMpi::clone(), BbParaNodeTh::clone(), BbParaNodeMpi::createDatatype(), BbParaNodeMpi::createDatatypeForNodeId(), ParaTask::getGlobalSubtaskIdInLc(), ParaTask::getLcId(), ParaTask::getSolverId(), ParaTask::getTaskId(), ParaTask::isRootTask(), ParaTask::isSameGlobalSubtaskIdInLcAs(), ParaTask::isSameLcIdAs(), BbParaNode::isSameNodeIdAs(), ParaTask::isSameSubtaskIdAs(), ParaTask::isSameTaskIdAs(), BbParaSolver::keepParaNode(), ParaTask::ParaTask(), BbParaNode::read(), BbParaNodeMpi::receive(), BbParaNodeTh::receive(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeTh::receiveNewSubtreeRoot(), BbParaNodeMpi::receiveSubtreeRootNodeId(), BbParaNodeTh::receiveSubtreeRootNodeId(), BbParaNodeMpi::send(), BbParaNodeMpi::sendNewSubtreeRoot(), BbParaSolver::sendParaNode(), BbParaNodeMpi::sendSubtreeRootNodeId(), ParaTask::setGlobalSubtaskId(), ParaTask::setSolverId(), ParaTask::setTaskId(), ParaTask::toSimpleString(), BbParaNode::toSimpleString(), ParaTask::toString(), BbParaNode::toString(), BbParaNode::write(), and BbParaNode::~BbParaNode().