[CHiPPS] Problem About record Nodeleft

Yan Xu Yan.Xu at sas.com
Mon Jul 16 21:34:14 EDT 2012


I really can’t comment too much on why you get different numbers of left nodes. If you do something similar to
int
AlpsKnowledgeBroker::updateNumNodesLeft()
{
    nodeLeftNum_ = 0;

    if (workingSubTree_ != 0) {
        nodeLeftNum_ += workingSubTree_->getNumNodes();
    }

    std::vector<AlpsSubTree*> subTreeVec =
        subTreePool_->getSubTreeList().getContainer();

    std::vector<AlpsSubTree*>::iterator pos1 = subTreeVec.begin();
    std::vector<AlpsSubTree*>::iterator pos2 = subTreeVec.end();

    for ( ; pos1 != pos2; ++pos1) {
        nodeLeftNum_ += (*pos1)->getNumNodes();
    }

    return nodeLeftNum_;
}

should get right numbers.

From: chipps-bounces at list.coin-or.org [mailto:chipps-bounces at list.coin-or.org] On Behalf Of ???
Sent: Thursday, July 12, 2012 5:52 AM
To: chipps at list.coin-or.org
Cc: geogrid at gmail.com
Subject: [CHiPPS] Problem About record Nodeleft

Dear Professors,
     I now can record the node processed.
     I would like to record the information of nodes left in the nodepool and divenodepool,

     I did this just like the faction updateNumNodesLeft() does.
     Then I will send the information to hub using MPI_Pack.
     And hub add information of its own nodes left to the collection then send to master.
     master will add its own nodes left to its cluster, and then to the system.
     I did this in the same pattern of sending Numnodesporcessed and quality.
     At last I wrote the information to a file(clear former information before writing) when force terminate or reach reportInterval.

     But I find that when the number of processed nodes I record is almost the same of that in the Alps log in stdout
     the nodeleft of my recording is much more than that of the Alps log in stdout.

     The node processed information and the node left information is record at the same time.
     But some of the tree nodes' sons is not in the nodeleft information file.

     So there is much information repeated and missing in my file.
     I don't know why.

     I want to get the nodes processed and the nodeleft of the same time,
     so that I can get the relation of the nodes of processed and left of the whole search tree.

     Can you give me some advice to record the information?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/chipps/attachments/20120717/e61afff4/attachment.html>


More information about the CHiPPS mailing list