Skip to content

Annotation of `olb::LoadBalancer::_size`

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Annotation of `olb::LoadBalancer::_size`

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7452
    Wenyuan
    Participant

    Dear community:

    The annotation of olb::LoadBalancer<T>::_size confused me.

    _size is announced to be ‘number of cuboids after shrink -1 in appropriate thread’. However, in the defination of olb::HeuristicLoadBalancer<T>::reInit(), there’s a piece of code as follows:

    `
    int count = 0;
    for (int i = 0; i < nC; ++i) {
    if (partitionResult[i] == 0) {
    this->_glob.push_back(i);
    this->_loc[i] = count;
    count++;
    };
    this->_rank[i] = partitionResult[i];
    cuboidToThread[i] = partitionResult[i];
    }
    this->_size = count;
    `

    It seems that _size equals to the number of cubiod assigned to the current thread, which is inconsistent with the annotation. Is it my understanding or the code?

    Sincerely,
    Wenyuan

    #7467
    Adrian
    Keymaster

    _size is indeed the number of cuboids assigned to the current MPI process (the “thread” naming in the legacy comments is also misleading). Thanks for reporting this.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.