Ignore:
Timestamp:
05/16/17 10:28:58 (4 years ago)
Author:
oabramkina
Message:

Fixing a bug appearing during client/server initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/server.cpp

    r1130 r1133  
    8585        map<unsigned long, int> colors ; 
    8686        map<unsigned long, int> leaders ; 
     87        map<unsigned long, int> lastProcesses ;  // needed in case of two server levels 
    8788        map<unsigned long, int>::iterator it ; 
    8889 
     
    9596            c++ ; 
    9697          } 
     98          if (hashAll[i+1] != hashAll[i]) 
     99            lastProcesses[hashAll[i]]=i ; 
    97100        } 
    98101 
     
    102105        { 
    103106          int serverRank = rank_ - leaders[hashServer]; // server proc rank starting 0 
    104           serverSize_ = size - leaders[hashServer]; 
     107          serverSize_ = lastProcesses[hashServer] - leaders[hashServer] + 1; 
     108//          serverSize_ = lastProcesses - leaders[hashServer]; 
    105109          nbPools = serverSize_ * CXios::ratioServer2 / 100; 
    106110          if ( serverRank < (serverSize_ - nbPools) ) 
Note: See TracChangeset for help on using the changeset viewer.