Ignore:
Timestamp:
05/26/15 16:13:46 (9 years ago)
Author:
rlacroix
Message:

Allow using more servers than clients.

This will be useful later when implementing server to client communications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/file.cpp

    r591 r595  
    617617         msg<<this->getId() ; 
    618618         msg<<id ; 
    619          event.push(client->getServerLeader(),1,msg) ; 
     619         const std::list<int>& ranks = client->getRanksServerLeader(); 
     620         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     621           event.push(*itRank,1,msg); 
    620622         client->sendEvent(event) ; 
    621623       } 
     
    642644         msg<<this->getId() ; 
    643645         msg<<id ; 
    644          event.push(client->getServerLeader(),1,msg) ; 
     646         const std::list<int>& ranks = client->getRanksServerLeader(); 
     647         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     648           event.push(*itRank,1,msg); 
    645649         client->sendEvent(event) ; 
    646650       } 
     
    744748         msg<<this->getId() ; 
    745749         msg<<id ; 
    746          event.push(client->getServerLeader(),1,msg) ; 
     750         const std::list<int>& ranks = client->getRanksServerLeader(); 
     751         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     752           event.push(*itRank,1,msg); 
    747753         client->sendEvent(event) ; 
    748754       } 
     
    769775         msg<<this->getId() ; 
    770776         msg<<id ; 
    771          event.push(client->getServerLeader(),1,msg) ; 
     777         const std::list<int>& ranks = client->getRanksServerLeader(); 
     778         for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     779           event.push(*itRank,1,msg); 
    772780         client->sendEvent(event) ; 
    773781       } 
Note: See TracChangeset for help on using the changeset viewer.