Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
AlpsKnowledgeBrokerMPI Class Reference

#include <AlpsKnowledgeBrokerMPI.h>

Inheritance diagram for AlpsKnowledgeBrokerMPI:
Inheritance graph
[legend]
Collaboration diagram for AlpsKnowledgeBrokerMPI:
Collaboration graph
[legend]

Public Member Functions

 AlpsKnowledgeBrokerMPI ()
 Default construtor. More...
 
 AlpsKnowledgeBrokerMPI (int argc, char *argv[], AlpsModel &model)
 Useful construtor. More...
 
 ~AlpsKnowledgeBrokerMPI ()
 Destructor. More...
 
virtual int getProcRank () const
 Query the global rank of the process. More...
 
virtual int getMasterRank () const
 Query the global rank of the Master. More...
 
virtual AlpsProcessType getProcType () const
 Query the type (master, hub, or worker) of the process. More...
 
void initializeSearch (int argc, char *argv[], AlpsModel &model)
 This function. More...
 
void search (AlpsModel *model)
 Search best solution for a given model. More...
 
void rootSearch (AlpsTreeNode *root)
 This function. More...
 
Report search results.
virtual double getIncumbentValue () const
 The process queries the quality of the incumbent this process stores. More...
 
virtual double getBestQuality () const
 The master queries the quality of the best solution it knowns. More...
 
virtual double getBestEstimateQuality ()
 Get best estimalted quality in system. More...
 
virtual void printBestSolution (char *outputFile=0) const
 Master prints out the best solution that it knows. More...
 
virtual void searchLog ()
 Log search statistics. More...
 
Knowledge sharing functions
void sendKnowledge (AlpsKnowledgeType type, int sender, int receiver, char *&msgBuffer, int msgSize, int msgTag, MPI_Comm comm, bool blocking)
 Set knowlege. More...
 
void receiveKnowledge (AlpsKnowledgeType type, int sender, int receiver, char *&msgBuffer, int msgSize, int msgTag, MPI_Comm comm, MPI_Status *status, bool blocking)
 Receive knowlege. More...
 
void requestKnowledge (AlpsKnowledgeType type, int sender, int receiver, char *&msgBuffer, int msgSize, int msgTag, MPI_Comm comm, bool blocking)
 Request knowlege. More...
 
- Public Member Functions inherited from AlpsKnowledgeBroker
 AlpsKnowledgeBroker ()
 Default constructor. More...
 
virtual ~AlpsKnowledgeBroker ()
 Destructor. More...
 
int getTreeDepth ()
 Get tree depth. More...
 
void setPeakMemory (double size)
 Set peak memory usage. More...
 
double getPeakMemory ()
 Get peak memory usage. More...
 
int getLargeSize () const
 
void registerClass (int name, AlpsKnowledge *userKnowledge)
 Every user derived knowledge class must register. More...
 
const AlpsKnowledgedecoderObject (int name)
 This method returns the pointer to an empty object of the registered class name. More...
 
AlpsPhase getPhase ()
 
void setPhase (AlpsPhase ph)
 
AlpsModelgetModel ()
 
void setModel (AlpsModel *m)
 
void setupKnowledgePools ()
 Set up knowledge pools for this broker. More...
 
void addKnowledgePool (AlpsKnowledgeType kt, AlpsKnowledgePool *kp)
 Add a knowledge pool into the Knowledge pools. More...
 
AlpsKnowledgePoolgetKnowledgePool (AlpsKnowledgeType kt) const
 Retrieve a knowledge pool in the Knowledge base. More...
 
virtual int getNumKnowledges (AlpsKnowledgeType kt) const
 Query the number of knowledge in the given type of a knowledge pool. More...
 
virtual int getMaxNumKnowledges (AlpsKnowledgeType kt) const
 Query the max number of knowledge can be stored in a given type of knowledge pools. More...
 
virtual void setMaxNumKnowledges (AlpsKnowledgeType kt, int num)
 Set the max number of knowledge can be stored in a given type o fknowledge pools. More...
 
virtual bool hasKnowledge (AlpsKnowledgeType kt) const
 Query whether there are knowledges in the given type of knowledge pools. More...
 
virtual std::pair
< AlpsKnowledge *, double > 
getKnowledge (AlpsKnowledgeType kt) const
 Get a knowledge, but doesn't remove it from the pool. More...
 
virtual void popKnowledge (AlpsKnowledgeType kt)
 Remove the a knowledge from the given type of knowledge pools. More...
 
virtual std::pair
< AlpsKnowledge *, double > 
getBestKnowledge (AlpsKnowledgeType kt) const
 Get the best knowledge in the given type of knowledge pools. More...
 
virtual void getAllKnowledges (AlpsKnowledgeType kt, std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
 Get all knowledges in the given type of knowledge pools. More...
 
virtual void addKnowledge (AlpsKnowledgeType kt, AlpsKnowledge *kl, double value)
 Add a knowledge in the given type of knowledge pools. More...
 
int getNumNodesProcessed () const
 Query the number of node processed by this process. More...
 
int getNumNodesBranched () const
 Query the number of node processed by this process. More...
 
int getNumNodesDiscarded () const
 Query the number of node processed by this process. More...
 
int getNumNodesPartial () const
 Query the number of node in the queue that are pregnant. More...
 
int getNumNodesProcessedSystem () const
 Query the number of node processed by the system. More...
 
virtual int updateNumNodesLeft ()
 Update the number of left nodes on this process. More...
 
virtual AlpsTreeNodegetBestNode () const
 Query the best node in the subtree pool. More...
 
AlpsExitStatus getSolStatus () const
 Query search termination status. More...
 
void setExitStatus (AlpsExitStatus status)
 Set terminate status. More...
 
AlpsTimertimer ()
 Query timer. More...
 
AlpsTimersubTreeTimer ()
 Query subtree timer. More...
 
AlpsTimertempTimer ()
 Query secondary timer. More...
 
int getNodeMemSize ()
 
void setNodeMemSize (int ms)
 
double getNodeProcessingTime ()
 
void setNodeProcessingTime (double npTime)
 
AlpsNodeIndex_t nextNodeIndex ()
 Query the next index assigned to a newly created node, and then increment the nextIndex_ by 1. More...
 
AlpsNodeIndex_t getNextNodeIndex () const
 Query the next index assigned to a newly created node. More...
 
void setNextNodeIndex (AlpsNodeIndex_t s)
 Set nextIndex_. More...
 
AlpsNodeIndex_t getMaxNodeIndex () const
 Queriy the upper bound of node indices. More...
 
void setMaxNodeIndex (AlpsNodeIndex_t s)
 Set the upper bound of node indices. More...
 
AlpsSearchStrategy
< AlpsSubTree * > * 
getSubTreeSelection () const
 
void setSubTreeSelection (AlpsSearchStrategy< AlpsSubTree * > *tc)
 
AlpsSearchStrategy
< AlpsTreeNode * > * 
getNodeSelection () const
 
void setNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > *nc)
 
AlpsSearchStrategy
< AlpsTreeNode * > * 
getRampUpNodeSelection () const
 
void setRampUpNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > *nc)
 
void passInMessageHandler (CoinMessageHandler *handler)
 Pass in Message handler (not deleted at end). More...
 
void newLanguage (CoinMessages::Language language)
 Set language. More...
 
void setLanguage (CoinMessages::Language language)
 Pass in Message handler (not deleted at end). More...
 
CoinMessageHandlermessageHandler () const
 Return handler. More...
 
CoinMessages messages ()
 Return messages. More...
 
CoinMessagesmessagesPointer ()
 Return pointer to messages. More...
 
int getMsgLevel ()
 Return msg level. More...
 
int getHubMsgLevel ()
 Return msg level. More...
 
int getMasterMsgLevel ()
 Return msg level. More...
 
int getlogFileLevel ()
 Return log file level. More...
 
int getNumNodeLog () const
 Get times that node log has been printed. More...
 
void setNumNodeLog (int num)
 Get times that node log has been printed. More...
 

Protected Member Functions

void init ()
 Initialize member data. More...
 
AlpsReturnStatus doOneUnitWork (int unitWork, double unitTime, AlpsExitStatus &exitStatus, int &numNodesProcessed, int &numNodesBranched, int &numNodesDiscarded, int &numNodesPartial, int &depth, bool &betterSolution)
 Explore a subtree from subtree pool for certain units of work/time. More...
 
void processMessages (char *&buffer, MPI_Status &status, MPI_Request &request)
 Processing messages. More...
 
void rootInitMaster (AlpsTreeNode *root)
 Static load balancing: Root Initialization. More...
 
void rootInitHub ()
 
void rootInitWorker ()
 
void spiralMaster (AlpsTreeNode *root)
 Static load balancing: spiral. More...
 
void spiralHub ()
 
void spiralWorker ()
 
void deleteSubTrees ()
 Delete subTrees in pools and the active subtree. More...
 
void forwardModelKnowledge ()
 
void sendModelKnowledge (MPI_Comm comm, int receiver=-1)
 Set generated knowlege (related to model) to receiver. More...
 
void receiveModelKnowledge (MPI_Comm comm)
 Receive generated knowlege (related to model) from sender. More...
 
void masterForceHubTerm ()
 Master tell hubs to terminate due to reaching limits or other reason. More...
 
void hubForceWorkerTerm ()
 Hub tell workers to terminate due to reaching limits or other reason. More...
 
void changeWorkingSubTree (double &changeWorkThreshold)
 Change subtree to be explored if it is too worse. More...
 
void sendErrorCodeToMaster (int errorCode)
 Send error code to master. More...
 
void recvErrorCode (char *&bufLarge)
 Receive error code and set solution status. More...
 
void spiralRecvProcessNode ()
 Unpack the node, explore it and send load info to master. More...
 
void spiralDonateNode ()
 Unpack msg and donate a node. More...
 
Core member functions for master, hubs and workers.
void masterMain (AlpsTreeNode *root)
 Master generates subtrees and sends them to hubs in Round-Robin way. More...
 
void hubMain ()
 Hub generates subtrees and sends them to workers in Round-Robin way. More...
 
void workerMain ()
 Worker first receive subtrees, then start to explore them. More...
 
Load balancing member functions
void masterAskHubDonate (int donorID, int receiverID, double receiverWorkload)
 Master asks a hub to donate its workload to another hub. More...
 
void hubAskWorkerDonate (int donorID, int receiverID, double receiverWorkload)
 Hub asks a worker to donate its workload to another worker. More...
 
void updateWorkloadInfo ()
 Calculate the work quality and quantity on this process. More...
 
virtual int getNumNodeLeftSystem ()
 Master asks a hub to donate its workload to another hub. More...
 
void donateWork (char *&buf, int tag, MPI_Status *status, int recvID=-1, double recvWL=0.0)
 A worker donate its workload to the specified worker. More...
 
void hubAllocateDonation (char *&buf, MPI_Status *status)
 Hub allocates the donated workload to its workers. More...
 
void hubBalanceWorkers ()
 Hub balances the workloads of its workers. More...
 
void hubSatisfyWorkerRequest (char *&buf, MPI_Status *status)
 Hub satisfies the workload rquest from a worker. More...
 
void hubReportStatus (int tag, MPI_Comm comm)
 A hub reports its status (workload and msg counts) to the master. More...
 
void hubUpdateCluStatus (char *&buf, MPI_Status *status, MPI_Comm comm)
 A hub unpacks the status of a worker from buffer. More...
 
void hubsShareWork (char *&buf, MPI_Status *status)
 Two hubs share their workload. More...
 
void masterBalanceHubs ()
 Master balance the workload of hubs. More...
 
void masterUpdateSysStatus (char *&buf, MPI_Status *status, MPI_Comm comm)
 Master unpack the status of a hub from buf and update system status. More...
 
void refreshSysStatus ()
 The master re-calculate the system status. More...
 
void refreshClusterStatus ()
 A hub adds its status to the cluster's status. More...
 
void workerReportStatus (int tag, MPI_Comm comm)
 A worker report its status (workload and msg counts) to its hub. More...
 
Node index functions // msg counts is modified inside
void workerAskIndices ()
 A worker ask for node index from master. More...
 
void workerRecvIndices (char *&bufLarge)
 A worker receive node index from master. More...
 
void masterSendIndices (char *&bufLarge)
 Master send a batch of node indices to the receiving worker. More...
 
Other message passing member functions
void broadcastModel (const int id, const int source)
 Broadcast the model from source to other processes. More...
 
void sendIncumbent ()
 Sent the incumbent value and rank to its two child if eixt. More...
 
bool unpackSetIncumbent (char *&buf, MPI_Status *status)
 unpack the incumbent value, then store it and the id of the process having the incumbent in AlpsDataPool. More...
 
void collectBestSolution (int destination)
 Send the best solution from the process having it to destination. More...
 
void tellMasterRecv ()
 Inform master that a proc has received workload during a load balance initialized by master. More...
 
void tellHubRecv ()
 Inform hub that a proc has received workload during a load balance initialized by a hub. More...
 
void packEncoded (AlpsEncoded *enc, char *&buf, int &size, int &position, MPI_Comm comm)
 Pack an AlpsEncoded instance into buf. More...
 
AlpsEncodedunpackEncoded (char *&buf, int &position, MPI_Comm comm, int size=-1)
 Unpack the given buffer into an AlpsEncoded instance. More...
 
void receiveSizeBuf (char *&buf, int sender, int tag, MPI_Comm comm, MPI_Status *status)
 Receive the size of buffer, allocate memory for buffer, then receive the message and put it in buffer. More...
 
void receiveRampUpNode (int sender, MPI_Comm comm, MPI_Status *status)
 First receive the size and the contend of a node, then construct a subtree with this received node. More...
 
void receiveSubTree (char *&buf, int sender, MPI_Status *status)
 Receive a subtree from the sender process and add it into the subtree pool. More...
 
void sendSizeBuf (char *&buf, int size, int position, const int target, const int tag, MPI_Comm comm)
 Send the size and content of a buffer to the target process. More...
 
void sendRampUpNode (const int target, MPI_Comm comm)
 Send the size and the content of the best node of a given subtree to the target process. More...
 
void sendNodeModelGen (int receiver, int doUnitWork)
 Send a node from rampUpSubTree's node pool and generated model knowledge. More...
 
bool sendSubTree (const int target, AlpsSubTree *&st, int tag)
 Send a given subtree to the target process. More...
 
void sendFinishInit (const int target, MPI_Comm comm)
 Send finish initialization signal to the target process. More...
 
Change message counts functions
void incSendCount (const char *how, int s=1)
 Increment the number of sent message. More...
 
void decSendCount (const char *how, int s=1)
 Decrement the number of sent message. More...
 
void incRecvCount (const char *how, int s=1)
 Increment the number of received message. More...
 
void decRecvCount (const char *how, int s=1)
 Decrement the number of sent message. More...
 

Protected Attributes

bool forceTerminate_
 Terminate due to reaching limits (time and node) or other reason. More...
 
bool blockTermCheck_
 Indicate whether do termination check. More...
 
bool blockHubReport_
 Indicate whether a hub need to report state to master. More...
 
bool blockWorkerReport_
 Indicate whether a worker need to report state to its hub. More...
 
bool blockAskForWork_
 Indicate whether a worker need to as for work from its hub. More...
 
char * attachBuffer_
 Buffer attached to MPI when sharing generated knowledge. More...
 
char * largeBuffer_
 Large message buffer. More...
 
char * largeBuffer2_
 Large message buffer. More...
 
char * smallBuffer_
 Small message buffer. More...
 
double masterBalancePeriod_
 The period that master do load balancing. More...
 
double hubReportPeriod_
 The period that a hub load balancing and report cluster status. More...
 
int modelGenID_
 The global rank of the process that share generated model knowledge. More...
 
int modelGenPos_
 Size of the shared knowledge. More...
 
AlpsSubTreerampUpSubTree_
 A subtree used in during up. More...
 
int unitWorkNodes_
 Number of nodes in one unit of work. More...
 
int haltSearch_
 Temporily halt search. More...
 
Process information
int processNum_
 The Number of processes launched. More...
 
int hubNum_
 The Number of hubs. More...
 
int globalRank_
 The rank of the process in MPI_COMM_WORLD. More...
 
MPI_Comm clusterComm_
 Communicator of the cluster to which the process belongs. More...
 
MPI_Comm hubComm_
 Communicator consists of all hubs. More...
 
MPI_Group hubGroup_
 MPI_Group consists of all hubs. More...
 
int clusterSize_
 The actual size of the cluster to which the process belongs. More...
 
int userClusterSize_
 The user reqested size of a cluster. More...
 
int clusterRank_
 The local rank of the process in clusterComm_. More...
 
int * hubRanks_
 The global ranks of the hubs. More...
 
int myHubRank_
 The global rank of its hub for a worker. More...
 
int masterRank_
 The global rank of the master. More...
 
AlpsProcessType processType_
 The AlpsProcessType of this process. More...
 
AlpsProcessTypeprocessTypeList_
 The AlpsProcessType of all process. More...
 
bool hubWork_
 Whether hub should also work as a worker. More...
 
MPI_Request subTreeRequest_
 Send subtree request. More...
 
MPI_Request solRequestL_
 Send model knoledge request. More...
 
MPI_Request solRequestR_
 The Number of processes launched. More...
 
MPI_Request modelKnowRequestL_
 Send model knoledge request. More...
 
MPI_Request modelKnowRequestR_
 The Number of processes launched. More...
 
MPI_Request forwardRequestL_
 Forward model knoledge request. More...
 
MPI_Request forwardRequestR_
 The Number of processes launched. More...
 
Incumbent data
double incumbentValue_
 Incumbent value. More...
 
int incumbentID_
 The process id that store the incumbent. More...
 
bool updateIncumbent_
 Indicate whether the incumbent value is updated between two checking point. More...
 
Workload balancing
double workQuality_
 The workload quality of the process. More...
 
double clusterWorkQuality_
 The workload quality of the cluster to which the process belong. More...
 
double systemWorkQuality_
 The workload quality of the whole system. More...
 
double * hubWorkQualities_
 The workload qualities of hubs. More...
 
double * workerWorkQualities_
 The workload qualities of workers in the cluster to which this proces belongs. More...
 
double workQuantity_
 The workload quantity of the workload on the process. More...
 
double clusterWorkQuantity_
 The workload quantity of the cluster to which the process belongs. More...
 
double systemWorkQuantity_
 The workload quantity of the whole system. More...
 
double systemWorkQuantityForce_
 The workload quantity of the whole system before forcing termination. More...
 
double * hubWorkQuantities_
 The workload quantities of all clusters/hubs. More...
 
double * workerWorkQuantities_
 The workload quantities of workers in the cluster to which this proces belongs. More...
 
bool * workerReported_
 Indicate which worker has been reported its work. More...
 
bool * hubReported_
 Indicate which hub has been reported its work. More...
 
bool allHubReported_
 Indicate whether all hubs have reported status to master at least once. More...
 
int masterDoBalance_
 Whether master do load balance. More...
 
int hubDoBalance_
 Whether a hub do load balance. More...
 
int * workerNodeProcesseds_
 To record how many nodes processed for each worker in a cluster. More...
 
int clusterNodeProcessed_
 To record how many nodes by a cluster. More...
 
int * hubNodeProcesseds_
 To record how many nodes processed for each hub. More...
 
Message counts
int sendCount_
 The number of new messages sent by the process after last survey. More...
 
int recvCount_
 The number of new messages received by the process after last survey. More...
 
int clusterSendCount_
 The number of new messages sent by the processes in clusterComm_ after last survey. More...
 
int clusterRecvCount_
 The number of new messages received by the processes in clusterComm_ after last survey. More...
 
int systemSendCount_
 The total number of messages sent by the all processes. More...
 
int systemRecvCount_
 The total number of messages sent by the all processes. More...
 
Node index
int masterIndexBatch_
 
Parallel statistics
AlpsTimer masterTimer_
 Master timer. More...
 
AlpsTimer hubTimer_
 Hub timer. More...
 
AlpsTimer workerTimer_
 Worker timer. More...
 
double rampUpTime_
 The time spent in ramp up. More...
 
double rampDownTime_
 The time spent in ramp down. More...
 
double idleTime_
 The time spent waiting for work. More...
 
double msgTime_
 The time spent processing messages (include idle). More...
 
AlpsPsStats psStats_
 More statistics. More...
 
- Protected Attributes inherited from AlpsKnowledgeBroker
std::string instanceName_
 The instance name. More...
 
AlpsModelmodel_
 Pointer to model. More...
 
AlpsPhase phase_
 Alps phase. More...
 
int nodeMemSize_
 The approximate memory size (bytes) of a node with full description. More...
 
double nodeProcessingTime_
 The approximately CPU time to process a node. More...
 
int largeSize_
 The size of largest message buffer can be sent or received. More...
 
bool userBalancePeriod_
 Has user input balance period. More...
 
int numNodeLog_
 Times that node log is printed. More...
 
AlpsSubTreePoolsubTreePool_
 A subtree pool holding a collection of subtrees. More...
 
AlpsSolutionPoolsolPool_
 A solution pool containing the solutions found. More...
 
std::map< AlpsKnowledgeType,
AlpsKnowledgePool * > * 
pools_
 The collection of pools managed by the knowledge broker. More...
 
AlpsSubTreeworkingSubTree_
 Point to the subtree that being explored. More...
 
bool needWorkingSubTree_
 Indicate whether need a new subtree. More...
 
AlpsNodeIndex_t nextIndex_
 The index to be assigned to a new search tree node. More...
 
AlpsNodeIndex_t maxIndex_
 The maximum index can been assigned on this process. More...
 
AlpsTimer timer_
 Main timer. More...
 
AlpsTimer subTreeTimer_
 Subtree timer. More...
 
AlpsTimer tempTimer_
 Secondary timer. More...
 
int solNum_
 The number of solutions found. More...
 
int nodeProcessedNum_
 The number of nodes that have been processed. More...
 
int nodeBranchedNum_
 The number of nodes that have been branched. More...
 
int nodeDiscardedNum_
 The number of nodes that have been discarded before processing. More...
 
int nodePartialNum_
 The number of nodes that are pregnant. More...
 
int systemNodeProcessed_
 To record how many nodes processed by the system (used in parallel code). More...
 
int nodeLeftNum_
 The number of nodes left. More...
 
int treeDepth_
 The depth of the tree. More...
 
int bestSolNode_
 The number of nodes pocessed to find the solution. More...
 
double peakMemory_
 Peak memory usage. More...
 
AlpsExitStatus exitStatus_
 The status of search when terminated. More...
 
AlpsSearchStrategy
< AlpsSubTree * > * 
treeSelection_
 Tree selection criterion. More...
 
AlpsSearchStrategy
< AlpsTreeNode * > * 
nodeSelection_
 Node selection criterion. More...
 
AlpsSearchStrategy
< AlpsTreeNode * > * 
rampUpNodeSelection_
 Node selection criterion. More...
 
CoinMessageHandlerhandler_
 Message handler. More...
 
CoinMessages messages_
 Alps messages. More...
 
int msgLevel_
 The leve of printing message to screen of the master and general message. More...
 
int hubMsgLevel_
 The leve of printing message to screen of hubs. More...
 
int workerMsgLevel_
 The leve of printing message to screen of workers. More...
 
int logFileLevel_
 The degree of log file. More...
 
std::string logfile_
 The log file. More...
 

Private Member Functions

 AlpsKnowledgeBrokerMPI (const AlpsKnowledgeBrokerMPI &)
 Disable copy construct and assignment operator. More...
 
AlpsKnowledgeBrokerMPIoperator= (const AlpsKnowledgeBrokerMPI &)
 

Detailed Description

Definition at line 41 of file AlpsKnowledgeBrokerMPI.h.

Constructor & Destructor Documentation

AlpsKnowledgeBrokerMPI::AlpsKnowledgeBrokerMPI ( const AlpsKnowledgeBrokerMPI )
private

Disable copy construct and assignment operator.

AlpsKnowledgeBrokerMPI::AlpsKnowledgeBrokerMPI ( )
inline

Default construtor.

NOTE: must call initializeSearch() later.

Definition at line 579 of file AlpsKnowledgeBrokerMPI.h.

AlpsKnowledgeBrokerMPI::AlpsKnowledgeBrokerMPI ( int  argc,
char *  argv[],
AlpsModel model 
)
inline

Useful construtor.

Definition at line 587 of file AlpsKnowledgeBrokerMPI.h.

AlpsKnowledgeBrokerMPI::~AlpsKnowledgeBrokerMPI ( )

Destructor.

Member Function Documentation

AlpsKnowledgeBrokerMPI& AlpsKnowledgeBrokerMPI::operator= ( const AlpsKnowledgeBrokerMPI )
private
void AlpsKnowledgeBrokerMPI::init ( )
protected

Initialize member data.

void AlpsKnowledgeBrokerMPI::masterMain ( AlpsTreeNode root)
protected

Master generates subtrees and sends them to hubs in Round-Robin way.

Master periodically do inter-cluster load balancing, and termination check.

void AlpsKnowledgeBrokerMPI::hubMain ( )
protected

Hub generates subtrees and sends them to workers in Round-Robin way.

Hub do intra-cluster load balancing.

void AlpsKnowledgeBrokerMPI::workerMain ( )
protected

Worker first receive subtrees, then start to explore them.

Worker also peroidically check message and process message.

AlpsReturnStatus AlpsKnowledgeBrokerMPI::doOneUnitWork ( int  unitWork,
double  unitTime,
AlpsExitStatus exitStatus,
int &  numNodesProcessed,
int &  numNodesBranched,
int &  numNodesDiscarded,
int &  numNodesPartial,
int &  depth,
bool &  betterSolution 
)
protected

Explore a subtree from subtree pool for certain units of work/time.

void AlpsKnowledgeBrokerMPI::processMessages ( char *&  buffer,
MPI_Status &  status,
MPI_Request &  request 
)
protected

Processing messages.

void AlpsKnowledgeBrokerMPI::rootInitMaster ( AlpsTreeNode root)
protected

Static load balancing: Root Initialization.

void AlpsKnowledgeBrokerMPI::rootInitHub ( )
protected
void AlpsKnowledgeBrokerMPI::rootInitWorker ( )
protected
void AlpsKnowledgeBrokerMPI::spiralMaster ( AlpsTreeNode root)
protected

Static load balancing: spiral.

void AlpsKnowledgeBrokerMPI::spiralHub ( )
protected
void AlpsKnowledgeBrokerMPI::spiralWorker ( )
protected
void AlpsKnowledgeBrokerMPI::masterAskHubDonate ( int  donorID,
int  receiverID,
double  receiverWorkload 
)
protected

Master asks a hub to donate its workload to another hub.

void AlpsKnowledgeBrokerMPI::hubAskWorkerDonate ( int  donorID,
int  receiverID,
double  receiverWorkload 
)
protected

Hub asks a worker to donate its workload to another worker.

void AlpsKnowledgeBrokerMPI::updateWorkloadInfo ( )
protected

Calculate the work quality and quantity on this process.

virtual int AlpsKnowledgeBrokerMPI::getNumNodeLeftSystem ( )
inlineprotectedvirtual

Master asks a hub to donate its workload to another hub.

Reimplemented from AlpsKnowledgeBroker.

Definition at line 373 of file AlpsKnowledgeBrokerMPI.h.

void AlpsKnowledgeBrokerMPI::donateWork ( char *&  buf,
int  tag,
MPI_Status *  status,
int  recvID = -1,
double  recvWL = 0.0 
)
protected

A worker donate its workload to the specified worker.

void AlpsKnowledgeBrokerMPI::hubAllocateDonation ( char *&  buf,
MPI_Status *  status 
)
protected

Hub allocates the donated workload to its workers.

void AlpsKnowledgeBrokerMPI::hubBalanceWorkers ( )
protected

Hub balances the workloads of its workers.

void AlpsKnowledgeBrokerMPI::hubSatisfyWorkerRequest ( char *&  buf,
MPI_Status *  status 
)
protected

Hub satisfies the workload rquest from a worker.

void AlpsKnowledgeBrokerMPI::hubReportStatus ( int  tag,
MPI_Comm  comm 
)
protected

A hub reports its status (workload and msg counts) to the master.

void AlpsKnowledgeBrokerMPI::hubUpdateCluStatus ( char *&  buf,
MPI_Status *  status,
MPI_Comm  comm 
)
protected

A hub unpacks the status of a worker from buffer.

void AlpsKnowledgeBrokerMPI::hubsShareWork ( char *&  buf,
MPI_Status *  status 
)
protected

Two hubs share their workload.

void AlpsKnowledgeBrokerMPI::masterBalanceHubs ( )
protected

Master balance the workload of hubs.

void AlpsKnowledgeBrokerMPI::masterUpdateSysStatus ( char *&  buf,
MPI_Status *  status,
MPI_Comm  comm 
)
protected

Master unpack the status of a hub from buf and update system status.

void AlpsKnowledgeBrokerMPI::refreshSysStatus ( )
protected

The master re-calculate the system status.

void AlpsKnowledgeBrokerMPI::refreshClusterStatus ( )
protected

A hub adds its status to the cluster's status.

void AlpsKnowledgeBrokerMPI::workerReportStatus ( int  tag,
MPI_Comm  comm 
)
protected

A worker report its status (workload and msg counts) to its hub.

void AlpsKnowledgeBrokerMPI::workerAskIndices ( )
protected

A worker ask for node index from master.

void AlpsKnowledgeBrokerMPI::workerRecvIndices ( char *&  bufLarge)
protected

A worker receive node index from master.

void AlpsKnowledgeBrokerMPI::masterSendIndices ( char *&  bufLarge)
protected

Master send a batch of node indices to the receiving worker.

void AlpsKnowledgeBrokerMPI::broadcastModel ( const int  id,
const int  source 
)
protected

Broadcast the model from source to other processes.

void AlpsKnowledgeBrokerMPI::sendIncumbent ( )
protected

Sent the incumbent value and rank to its two child if eixt.

bool AlpsKnowledgeBrokerMPI::unpackSetIncumbent ( char *&  buf,
MPI_Status *  status 
)
protected

unpack the incumbent value, then store it and the id of the process having the incumbent in AlpsDataPool.

void AlpsKnowledgeBrokerMPI::collectBestSolution ( int  destination)
protected

Send the best solution from the process having it to destination.

void AlpsKnowledgeBrokerMPI::tellMasterRecv ( )
protected

Inform master that a proc has received workload during a load balance initialized by master.

void AlpsKnowledgeBrokerMPI::tellHubRecv ( )
protected

Inform hub that a proc has received workload during a load balance initialized by a hub.

void AlpsKnowledgeBrokerMPI::packEncoded ( AlpsEncoded enc,
char *&  buf,
int &  size,
int &  position,
MPI_Comm  comm 
)
protected

Pack an AlpsEncoded instance into buf.

Return filled buf and size of packed message. position: where to start if buf is allocated.

AlpsEncoded* AlpsKnowledgeBrokerMPI::unpackEncoded ( char *&  buf,
int &  position,
MPI_Comm  comm,
int  size = -1 
)
protected

Unpack the given buffer into an AlpsEncoded instance.

void AlpsKnowledgeBrokerMPI::receiveSizeBuf ( char *&  buf,
int  sender,
int  tag,
MPI_Comm  comm,
MPI_Status *  status 
)
protected

Receive the size of buffer, allocate memory for buffer, then receive the message and put it in buffer.

void AlpsKnowledgeBrokerMPI::receiveRampUpNode ( int  sender,
MPI_Comm  comm,
MPI_Status *  status 
)
protected

First receive the size and the contend of a node, then construct a subtree with this received node.

void AlpsKnowledgeBrokerMPI::receiveSubTree ( char *&  buf,
int  sender,
MPI_Status *  status 
)
protected

Receive a subtree from the sender process and add it into the subtree pool.

void AlpsKnowledgeBrokerMPI::sendSizeBuf ( char *&  buf,
int  size,
int  position,
const int  target,
const int  tag,
MPI_Comm  comm 
)
protected

Send the size and content of a buffer to the target process.

void AlpsKnowledgeBrokerMPI::sendRampUpNode ( const int  target,
MPI_Comm  comm 
)
protected

Send the size and the content of the best node of a given subtree to the target process.

void AlpsKnowledgeBrokerMPI::sendNodeModelGen ( int  receiver,
int  doUnitWork 
)
protected

Send a node from rampUpSubTree's node pool and generated model knowledge.

bool AlpsKnowledgeBrokerMPI::sendSubTree ( const int  target,
AlpsSubTree *&  st,
int  tag 
)
protected

Send a given subtree to the target process.

void AlpsKnowledgeBrokerMPI::sendFinishInit ( const int  target,
MPI_Comm  comm 
)
protected

Send finish initialization signal to the target process.

void AlpsKnowledgeBrokerMPI::deleteSubTrees ( )
protected

Delete subTrees in pools and the active subtree.

void AlpsKnowledgeBrokerMPI::forwardModelKnowledge ( )
protected
void AlpsKnowledgeBrokerMPI::sendModelKnowledge ( MPI_Comm  comm,
int  receiver = -1 
)
protected

Set generated knowlege (related to model) to receiver.

void AlpsKnowledgeBrokerMPI::receiveModelKnowledge ( MPI_Comm  comm)
protected

Receive generated knowlege (related to model) from sender.

void AlpsKnowledgeBrokerMPI::incSendCount ( const char *  how,
int  s = 1 
)
protected

Increment the number of sent message.

void AlpsKnowledgeBrokerMPI::decSendCount ( const char *  how,
int  s = 1 
)
protected

Decrement the number of sent message.

void AlpsKnowledgeBrokerMPI::incRecvCount ( const char *  how,
int  s = 1 
)
protected

Increment the number of received message.

void AlpsKnowledgeBrokerMPI::decRecvCount ( const char *  how,
int  s = 1 
)
protected

Decrement the number of sent message.

void AlpsKnowledgeBrokerMPI::masterForceHubTerm ( )
protected

Master tell hubs to terminate due to reaching limits or other reason.

void AlpsKnowledgeBrokerMPI::hubForceWorkerTerm ( )
protected

Hub tell workers to terminate due to reaching limits or other reason.

void AlpsKnowledgeBrokerMPI::changeWorkingSubTree ( double &  changeWorkThreshold)
protected

Change subtree to be explored if it is too worse.

void AlpsKnowledgeBrokerMPI::sendErrorCodeToMaster ( int  errorCode)
protected

Send error code to master.

void AlpsKnowledgeBrokerMPI::recvErrorCode ( char *&  bufLarge)
protected

Receive error code and set solution status.

void AlpsKnowledgeBrokerMPI::spiralRecvProcessNode ( )
protected

Unpack the node, explore it and send load info to master.

void AlpsKnowledgeBrokerMPI::spiralDonateNode ( )
protected

Unpack msg and donate a node.

virtual int AlpsKnowledgeBrokerMPI::getProcRank ( ) const
inlinevirtual

Query the global rank of the process.

Reimplemented from AlpsKnowledgeBroker.

Definition at line 601 of file AlpsKnowledgeBrokerMPI.h.

virtual int AlpsKnowledgeBrokerMPI::getMasterRank ( ) const
inlinevirtual

Query the global rank of the Master.

Reimplemented from AlpsKnowledgeBroker.

Definition at line 604 of file AlpsKnowledgeBrokerMPI.h.

virtual AlpsProcessType AlpsKnowledgeBrokerMPI::getProcType ( ) const
inlinevirtual

Query the type (master, hub, or worker) of the process.

Reimplemented from AlpsKnowledgeBroker.

Definition at line 607 of file AlpsKnowledgeBrokerMPI.h.

void AlpsKnowledgeBrokerMPI::initializeSearch ( int  argc,
char *  argv[],
AlpsModel model 
)
virtual

This function.

  • initializes the message environment;
  • the master reads in ALPS and user's parameter sets. If the model data is input from file, then it reads in the model data.
  • sets up user params and model;
  • broadcast parameters from the master to all other processes;
  • creates MPI communicators and groups;
  • classifies process types, sets up subtree and pools
  • determines their hub's global rank for workers

Implements AlpsKnowledgeBroker.

void AlpsKnowledgeBrokerMPI::search ( AlpsModel model)
virtual

Search best solution for a given model.

Reimplemented from AlpsKnowledgeBroker.

void AlpsKnowledgeBrokerMPI::rootSearch ( AlpsTreeNode root)
virtual

This function.

  • broadcasts model data from the master to all other processes;
  • calls its associated main function to explore the sub tree;
  • collects the best solution found.

Implements AlpsKnowledgeBroker.

virtual double AlpsKnowledgeBrokerMPI::getIncumbentValue ( ) const
inlinevirtual

The process queries the quality of the incumbent this process stores.

Implements AlpsKnowledgeBroker.

Definition at line 638 of file AlpsKnowledgeBrokerMPI.h.

virtual double AlpsKnowledgeBrokerMPI::getBestQuality ( ) const
inlinevirtual

The master queries the quality of the best solution it knowns.

Implements AlpsKnowledgeBroker.

Definition at line 650 of file AlpsKnowledgeBrokerMPI.h.

virtual double AlpsKnowledgeBrokerMPI::getBestEstimateQuality ( )
inlinevirtual

Get best estimalted quality in system.

Reimplemented from AlpsKnowledgeBroker.

Definition at line 665 of file AlpsKnowledgeBrokerMPI.h.

virtual void AlpsKnowledgeBrokerMPI::printBestSolution ( char *  outputFile = 0) const
virtual

Master prints out the best solution that it knows.

Implements AlpsKnowledgeBroker.

virtual void AlpsKnowledgeBrokerMPI::searchLog ( )
virtual

Log search statistics.

Implements AlpsKnowledgeBroker.

void AlpsKnowledgeBrokerMPI::sendKnowledge ( AlpsKnowledgeType  type,
int  sender,
int  receiver,
char *&  msgBuffer,
int  msgSize,
int  msgTag,
MPI_Comm  comm,
bool  blocking 
)

Set knowlege.

void AlpsKnowledgeBrokerMPI::receiveKnowledge ( AlpsKnowledgeType  type,
int  sender,
int  receiver,
char *&  msgBuffer,
int  msgSize,
int  msgTag,
MPI_Comm  comm,
MPI_Status *  status,
bool  blocking 
)

Receive knowlege.

void AlpsKnowledgeBrokerMPI::requestKnowledge ( AlpsKnowledgeType  type,
int  sender,
int  receiver,
char *&  msgBuffer,
int  msgSize,
int  msgTag,
MPI_Comm  comm,
bool  blocking 
)

Request knowlege.

Member Data Documentation

int AlpsKnowledgeBrokerMPI::processNum_
protected

The Number of processes launched.

Definition at line 55 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::hubNum_
protected

The Number of hubs.

Definition at line 58 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::globalRank_
protected

The rank of the process in MPI_COMM_WORLD.

Definition at line 61 of file AlpsKnowledgeBrokerMPI.h.

MPI_Comm AlpsKnowledgeBrokerMPI::clusterComm_
protected

Communicator of the cluster to which the process belongs.

Definition at line 64 of file AlpsKnowledgeBrokerMPI.h.

MPI_Comm AlpsKnowledgeBrokerMPI::hubComm_
protected

Communicator consists of all hubs.

Definition at line 67 of file AlpsKnowledgeBrokerMPI.h.

MPI_Group AlpsKnowledgeBrokerMPI::hubGroup_
protected

MPI_Group consists of all hubs.

Definition at line 70 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::clusterSize_
protected

The actual size of the cluster to which the process belongs.

Definition at line 73 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::userClusterSize_
protected

The user reqested size of a cluster.

Definition at line 76 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::clusterRank_
protected

The local rank of the process in clusterComm_.

Definition at line 79 of file AlpsKnowledgeBrokerMPI.h.

int* AlpsKnowledgeBrokerMPI::hubRanks_
protected

The global ranks of the hubs.

Definition at line 82 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::myHubRank_
protected

The global rank of its hub for a worker.

Definition at line 85 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::masterRank_
protected

The global rank of the master.

Definition at line 88 of file AlpsKnowledgeBrokerMPI.h.

AlpsProcessType AlpsKnowledgeBrokerMPI::processType_
protected

The AlpsProcessType of this process.

Definition at line 91 of file AlpsKnowledgeBrokerMPI.h.

AlpsProcessType* AlpsKnowledgeBrokerMPI::processTypeList_
protected

The AlpsProcessType of all process.

Definition at line 94 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::hubWork_
protected

Whether hub should also work as a worker.

Definition at line 97 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::subTreeRequest_
protected

Send subtree request.

Definition at line 100 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::solRequestL_
protected

Send model knoledge request.

Definition at line 103 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::solRequestR_
protected

The Number of processes launched.

Definition at line 104 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::modelKnowRequestL_
protected

Send model knoledge request.

Definition at line 107 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::modelKnowRequestR_
protected

The Number of processes launched.

Definition at line 108 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::forwardRequestL_
protected

Forward model knoledge request.

Definition at line 111 of file AlpsKnowledgeBrokerMPI.h.

MPI_Request AlpsKnowledgeBrokerMPI::forwardRequestR_
protected

The Number of processes launched.

Definition at line 112 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::incumbentValue_
protected

Incumbent value.

Definition at line 120 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::incumbentID_
protected

The process id that store the incumbent.

Definition at line 123 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::updateIncumbent_
protected

Indicate whether the incumbent value is updated between two checking point.

Definition at line 127 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::workQuality_
protected

The workload quality of the process.

Definition at line 135 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::clusterWorkQuality_
protected

The workload quality of the cluster to which the process belong.

Definition at line 138 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::systemWorkQuality_
protected

The workload quality of the whole system.

Definition at line 141 of file AlpsKnowledgeBrokerMPI.h.

double* AlpsKnowledgeBrokerMPI::hubWorkQualities_
protected

The workload qualities of hubs.

Definition at line 144 of file AlpsKnowledgeBrokerMPI.h.

double* AlpsKnowledgeBrokerMPI::workerWorkQualities_
protected

The workload qualities of workers in the cluster to which this proces belongs.

Number of nodes is used as the quantities criteria.

Definition at line 148 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::workQuantity_
protected

The workload quantity of the workload on the process.

Definition at line 151 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::clusterWorkQuantity_
protected

The workload quantity of the cluster to which the process belongs.

Definition at line 154 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::systemWorkQuantity_
protected

The workload quantity of the whole system.

Definition at line 157 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::systemWorkQuantityForce_
protected

The workload quantity of the whole system before forcing termination.

Definition at line 160 of file AlpsKnowledgeBrokerMPI.h.

double* AlpsKnowledgeBrokerMPI::hubWorkQuantities_
protected

The workload quantities of all clusters/hubs.

Definition at line 163 of file AlpsKnowledgeBrokerMPI.h.

double* AlpsKnowledgeBrokerMPI::workerWorkQuantities_
protected

The workload quantities of workers in the cluster to which this proces belongs.

Definition at line 167 of file AlpsKnowledgeBrokerMPI.h.

bool* AlpsKnowledgeBrokerMPI::workerReported_
protected

Indicate which worker has been reported its work.

Definition at line 170 of file AlpsKnowledgeBrokerMPI.h.

bool* AlpsKnowledgeBrokerMPI::hubReported_
protected

Indicate which hub has been reported its work.

Definition at line 173 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::allHubReported_
protected

Indicate whether all hubs have reported status to master at least once.

Definition at line 176 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::masterDoBalance_
protected

Whether master do load balance.

0: do; >0: blocked.

Definition at line 179 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::hubDoBalance_
protected

Whether a hub do load balance.

0: do; >0: blocked.

Definition at line 182 of file AlpsKnowledgeBrokerMPI.h.

int* AlpsKnowledgeBrokerMPI::workerNodeProcesseds_
protected

To record how many nodes processed for each worker in a cluster.

Definition at line 185 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::clusterNodeProcessed_
protected

To record how many nodes by a cluster.

Definition at line 188 of file AlpsKnowledgeBrokerMPI.h.

int* AlpsKnowledgeBrokerMPI::hubNodeProcesseds_
protected

To record how many nodes processed for each hub.

Definition at line 191 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::sendCount_
protected

The number of new messages sent by the process after last survey.

Definition at line 199 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::recvCount_
protected

The number of new messages received by the process after last survey.

Definition at line 202 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::clusterSendCount_
protected

The number of new messages sent by the processes in clusterComm_ after last survey.

Definition at line 206 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::clusterRecvCount_
protected

The number of new messages received by the processes in clusterComm_ after last survey.

Definition at line 210 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::systemSendCount_
protected

The total number of messages sent by the all processes.

Definition at line 213 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::systemRecvCount_
protected

The total number of messages sent by the all processes.

Definition at line 216 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::masterIndexBatch_
protected

Definition at line 223 of file AlpsKnowledgeBrokerMPI.h.

AlpsTimer AlpsKnowledgeBrokerMPI::masterTimer_
protected

Master timer.

Definition at line 231 of file AlpsKnowledgeBrokerMPI.h.

AlpsTimer AlpsKnowledgeBrokerMPI::hubTimer_
protected

Hub timer.

Definition at line 234 of file AlpsKnowledgeBrokerMPI.h.

AlpsTimer AlpsKnowledgeBrokerMPI::workerTimer_
protected

Worker timer.

Definition at line 237 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::rampUpTime_
protected

The time spent in ramp up.

Definition at line 240 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::rampDownTime_
protected

The time spent in ramp down.

Definition at line 243 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::idleTime_
protected

The time spent waiting for work.

Definition at line 246 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::msgTime_
protected

The time spent processing messages (include idle).

Definition at line 249 of file AlpsKnowledgeBrokerMPI.h.

AlpsPsStats AlpsKnowledgeBrokerMPI::psStats_
protected

More statistics.

Definition at line 252 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::forceTerminate_
protected

Terminate due to reaching limits (time and node) or other reason.

Definition at line 256 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::blockTermCheck_
protected

Indicate whether do termination check.

Definition at line 259 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::blockHubReport_
protected

Indicate whether a hub need to report state to master.

Definition at line 262 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::blockWorkerReport_
protected

Indicate whether a worker need to report state to its hub.

Definition at line 265 of file AlpsKnowledgeBrokerMPI.h.

bool AlpsKnowledgeBrokerMPI::blockAskForWork_
protected

Indicate whether a worker need to as for work from its hub.

Definition at line 268 of file AlpsKnowledgeBrokerMPI.h.

char* AlpsKnowledgeBrokerMPI::attachBuffer_
protected

Buffer attached to MPI when sharing generated knowledge.

Definition at line 271 of file AlpsKnowledgeBrokerMPI.h.

char* AlpsKnowledgeBrokerMPI::largeBuffer_
protected

Large message buffer.

Definition at line 274 of file AlpsKnowledgeBrokerMPI.h.

char* AlpsKnowledgeBrokerMPI::largeBuffer2_
protected

Large message buffer.

Used for sharing model knowledge

Definition at line 277 of file AlpsKnowledgeBrokerMPI.h.

char* AlpsKnowledgeBrokerMPI::smallBuffer_
protected

Small message buffer.

Definition at line 280 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::masterBalancePeriod_
protected

The period that master do load balancing.

It changes as search progresses.

Definition at line 284 of file AlpsKnowledgeBrokerMPI.h.

double AlpsKnowledgeBrokerMPI::hubReportPeriod_
protected

The period that a hub load balancing and report cluster status.

It changes as search progresses.

Definition at line 288 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::modelGenID_
protected

The global rank of the process that share generated model knowledge.

Definition at line 291 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::modelGenPos_
protected

Size of the shared knowledge.

Definition at line 294 of file AlpsKnowledgeBrokerMPI.h.

AlpsSubTree* AlpsKnowledgeBrokerMPI::rampUpSubTree_
protected

A subtree used in during up.

Definition at line 297 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::unitWorkNodes_
protected

Number of nodes in one unit of work.

Definition at line 300 of file AlpsKnowledgeBrokerMPI.h.

int AlpsKnowledgeBrokerMPI::haltSearch_
protected

Temporily halt search.

Definition at line 303 of file AlpsKnowledgeBrokerMPI.h.


The documentation for this class was generated from the following file: