class BbParaNodeMpi More...
#include <bbParaNodeMpi.h>
Public Member Functions | |
| BbParaNodeMpi () | |
| default constructor More... | |
| BbParaNodeMpi (TaskId inNodeId, TaskId inGeneratorNodeId, int inDepth, double inDualBoundValue, double inOriginalDualBoundValue, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
| constructor More... | |
| ~BbParaNodeMpi () | |
| destructor More... | |
| BbParaNodeMpi * | clone (ParaComm *comm) |
| clone this BbParaNodeMpi More... | |
| int | bcast (ParaComm *comm, int root) |
| broadcast this object More... | |
| int | send (ParaComm *comm, int destination) |
| send this object More... | |
| int | receive (ParaComm *comm, int source) |
| receive this object More... | |
| int | sendNewSubtreeRoot (ParaComm *comm, int destination) |
| send new subtree root node More... | |
| int | sendSubtreeRootNodeId (ParaComm *comm, int destination, int tag) |
| send subtree root to be removed More... | |
| int | sendReassignSelfSplitSubtreeRoot (ParaComm *comm, int destination) |
| send subtree root to be reassigned More... | |
| int | receiveNewSubtreeRoot (ParaComm *comm, int source) |
| receive this object More... | |
| int | receiveSubtreeRootNodeId (ParaComm *comm, int source, int tag) |
| receive this object More... | |
| int | receiveReassignSelfSplitSubtreeRoot (ParaComm *comm, int source) |
| receive this object node Id More... | |
Public Member Functions inherited from BbParaNode | |
| BbParaNode () | |
| default constructor More... | |
| BbParaNode (TaskId inNodeId, TaskId inGeneratorNodeId, int inDepth, double inDualBoundValue, double inOriginalDualBoundValue, double inEstimatedValue, ParaDiffSubproblem *inDiffSubproblem) | |
| constructor More... | |
| virtual | ~BbParaNode () |
| destructor More... | |
| int | getDepth () |
| getter of depth More... | |
| void | setDepth (int inDepth) |
| setter of depth More... | |
| double | getDualBoundValue () |
| getter of dual bound value More... | |
| double | getInitialDualBoundValue () |
| getter of initial dual bound value More... | |
| void | setDualBoundValue (double inDualBoundValue) |
| setter of dual bound value More... | |
| void | setInitialDualBoundValue (double inTrueDualBoundValue) |
| setter of initial dual bound value More... | |
| void | resetDualBoundValue () |
| reset dual bound value More... | |
| BbParaDiffSubproblem * | getDiffSubproblem () |
| getter of diffSubproblem More... | |
| void | setDiffSubproblem (BbParaDiffSubproblem *inDiffSubproblem) |
| setter of diffSubproblem */ More... | |
| ParaTaskGenealogicalPtr * | getAncestor () |
| getter of ancestor More... | |
| void | setAncestor (ParaTaskGenealogicalPtr *inAncestor) |
| setter of ancestor More... | |
| void | removeDescendant (TaskId removeNodeId) |
| remove a descendant More... | |
| bool | hasDescendant () |
| check if this node has descendant or not More... | |
| void | addDescendant (ParaTaskGenealogicalPtr *inDescendant) |
| add a descendant More... | |
| void | updateInitialDualBoundToSubtreeDualBound () |
| update initial dual bound value by checking descendant dual bound values More... | |
| double | getMinimumDualBoundInDesendants (double value) |
| get minimum dual bound value in descendants More... | |
| virtual BbParaNode * | clone (ParaComm *comm)=0 |
| clone this BbParaNode 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 int | sendNewSubtreeRoot (ParaComm *comm, int destination)=0 |
| send new subtree root node More... | |
| virtual int | sendSubtreeRootNodeId (ParaComm *comm, int destination, int tag)=0 |
| send subtree root to be removed More... | |
| virtual int | receiveNewSubtreeRoot (ParaComm *comm, int source)=0 |
| receive this object More... | |
| virtual int | receiveSubtreeRootNodeId (ParaComm *comm, int source, int tag)=0 |
| receive this object node Id More... | |
| void | write (gzstream::ogzstream &out) |
| write to checkpoint file More... | |
| bool | read (ParaComm *comm, gzstream::igzstream &in, bool onlyBoundChanges) |
| read from checkpoint file More... | |
| const std::string | toString () |
| stringfy BbParaNode More... | |
| const std::string | toSimpleString () |
| stringfy BbParaNode as simple string More... | |
| void | setMergeNodeInfo (BbParaMergeNodeInfo *mNode) |
| set merge node information to this BbParaNode object More... | |
| BbParaMergeNodeInfo * | getMergeNodeInfo () |
| get merge node information struct More... | |
| void | setMergingStatus (int status) |
| set merging status More... | |
| int | getMergingStatus () |
| get merging status More... | |
| bool | areNodesCollected () |
| check if nodes are collected or not More... | |
| void | collectsNodes () |
| set all nodes are collected TODO: this function has to be investigated More... | |
| bool | isSameNodeIdAs (const BbParaNode &inNode) |
| check if this node's id is the same as that of argument ParaNode's task id More... | |
Public Member Functions inherited from ParaTask | |
| 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... | |
Private Member Functions | |
| MPI_Datatype | createDatatype () |
| create BbParaNode datatype More... | |
| MPI_Datatype | createDatatypeForNodeId () |
| create BbParaNode datatype More... | |
Additional Inherited Members | |
Public Attributes inherited from BbParaNode | |
| BbParaNode * | next |
| this pointer is used in case of self-split ramp-up in LC this field is not transferred More... | |
Public Attributes inherited from ParaTask | |
| 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 inherited from BbParaNode | |
| int | depth |
| depth from the root node of original tree More... | |
| double | dualBoundValue |
| dual bound value More... | |
| double | initialDualBoundValue |
| dual bound value when this node is created This value is updated to precise one when there is guarantee More... | |
| int | basisInfo |
| indicate if basis information is including or not More... | |
| int | mergingStatus |
| merging status: -1 - no merging node, 0 - checking, 1 - merged (representative) 2 - merged to the other node 3 - cannot be merged 4 - merging representative was deleted More... | |
| BbParaMergeNodeInfo * | mergeNodeInfo |
| pointer to mergeNodeInfo. Not zero means merging More... | |
| bool | nodesAreCollected |
| subproblems generated from this nodes are collected at interruption. this field is not transferred More... | |
Protected Attributes inherited from ParaTask | |
| 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 BbParaNodeMpi
Definition at line 52 of file bbParaNodeMpi.h.
| BbParaNodeMpi | ( | ) |
default constructor
Definition at line 71 of file bbParaNodeMpi.h.
Referenced by BbParaNodeMpi::clone().
| BbParaNodeMpi | ( | TaskId | inNodeId, |
| TaskId | inGeneratorNodeId, | ||
| int | inDepth, | ||
| double | inDualBoundValue, | ||
| double | inOriginalDualBoundValue, | ||
| double | inEstimatedValue, | ||
| ParaDiffSubproblem * | inDiffSubproblem | ||
| ) |
constructor
| inNodeId | node id |
| inGeneratorNodeId | generator node id |
| inDepth | depth in global search tree |
| inDualBoundValue | dual bound value |
| inOriginalDualBoundValue | original dual bound value when the node is generated |
| inEstimatedValue | estimated value |
| inDiffSubproblem | pointer to ParaDiffSubproblem object |
Definition at line 79 of file bbParaNodeMpi.h.
| ~BbParaNodeMpi | ( | ) |
destructor
Definition at line 95 of file bbParaNodeMpi.h.
|
virtual |
broadcast this object
| comm | communicator used |
| root | root rank of broadcast |
Implements BbParaNode.
Definition at line 236 of file bbParaNodeMpi.cpp.
References ParaDiffSubproblem::bcast(), comm, BbParaNodeMpi::createDatatype(), DEF_PARA_COMM, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, TaskId::subtaskId, and ParaTask::taskId.
|
virtual |
clone this BbParaNodeMpi
| comm | communicator used |
Implements BbParaNode.
Definition at line 104 of file bbParaNodeMpi.h.
References BbParaNodeMpi::BbParaNodeMpi(), ParaDiffSubproblem::clone(), comm, BbParaNode::depth, ParaTask::diffSubproblem, BbParaNode::dualBoundValue, ParaTask::generatorTaskId, BbParaNode::initialDualBoundValue, and ParaTask::taskId.
|
private |
create BbParaNode datatype
Definition at line 43 of file bbParaNodeMpi.cpp.
References BbParaNode::basisInfo, BbParaNode::depth, ParaTask::diffSubproblemInfo, BbParaNode::dualBoundValue, ParaTask::estimatedValue, ParaTask::generatorTaskId, SubtaskId::globalSubtaskIdInLc, BbParaNode::initialDualBoundValue, SubtaskId::lcId, BbParaNode::mergingStatus, MPI_CALL, TaskId::seqNum, SubtaskId::solverId, TaskId::subtaskId, and ParaTask::taskId.
Referenced by BbParaNodeMpi::bcast(), BbParaNodeMpi::receive(), BbParaNodeMpi::receiveNewSubtreeRoot(), BbParaNodeMpi::send(), and BbParaNodeMpi::sendNewSubtreeRoot().
|
private |
create BbParaNode datatype
Definition at line 158 of file bbParaNodeMpi.cpp.
References ParaTask::generatorTaskId, SubtaskId::globalSubtaskIdInLc, SubtaskId::lcId, MPI_CALL, TaskId::seqNum, SubtaskId::solverId, TaskId::subtaskId, and ParaTask::taskId.
Referenced by BbParaNodeMpi::receiveSubtreeRootNodeId(), and BbParaNodeMpi::sendSubtreeRootNodeId().
|
virtual |
receive this object
| comm | communicator used |
| source | source rank |
Implements BbParaNode.
Definition at line 361 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatype(), DEF_PARA_COMM, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, ParaDiffSubproblem::receive(), TaskId::subtaskId, UG::TagTask, and ParaTask::taskId.
|
virtual |
receive this object
| comm | communicator used |
| source | source rank |
Implements BbParaNode.
Definition at line 386 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatype(), DEF_PARA_COMM, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, ParaDiffSubproblem::receive(), TaskId::subtaskId, UG::TagNewSubtreeRootNode, and ParaTask::taskId.
| int receiveReassignSelfSplitSubtreeRoot | ( | ParaComm * | comm, |
| int | source | ||
| ) |
receive this object node Id
| comm | communicator used |
| source | source rank |
|
virtual |
receive this object
| comm | communicator used |
| source | source rank |
| tag | tag of message |
Implements BbParaNode.
Definition at line 415 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatypeForNodeId(), DEF_PARA_COMM, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, TaskId::subtaskId, and ParaTask::taskId.
|
virtual |
send this object
| comm | communicator used |
| destination | destination rank |
Implements BbParaNode.
Definition at line 268 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatype(), DEF_PARA_COMM, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, ParaDiffSubproblem::send(), TaskId::subtaskId, UG::TagTask, and ParaTask::taskId.
|
virtual |
send new subtree root node
| comm | communicator used |
| destination | destination rank |
Implements BbParaNode.
Definition at line 292 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatype(), DEF_PARA_COMM, ParaTask::diffSubproblem, ParaTask::diffSubproblemInfo, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, ParaDiffSubproblem::send(), TaskId::subtaskId, UG::TagNewSubtreeRootNode, and ParaTask::taskId.
| int sendReassignSelfSplitSubtreeRoot | ( | ParaComm * | comm, |
| int | destination | ||
| ) |
send subtree root to be reassigned
| comm | communicator used |
| destination | destination rank |
|
virtual |
send subtree root to be removed
| comm | communicator used |
| destination | destination rank |
| tag | tag of message |
Implements BbParaNode.
Definition at line 316 of file bbParaNodeMpi.cpp.
References comm, BbParaNodeMpi::createDatatypeForNodeId(), DEF_PARA_COMM, SubtaskId::lcId, MPI_CALL, PARA_COMM_CALL, TaskId::subtaskId, and ParaTask::taskId.