Ignore:
Timestamp:
01/10/17 14:36:29 (7 years ago)
Author:
oabramkina
Message:

Intermeadiate version for merging with new server functionalities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/grid.cpp

    r1009 r1021  
    299299         } 
    300300 
    301          this->isChecked = true; 
     301//         this->isChecked = true; 
     302         if (!(this->hasTransform() && !this->isTransformed())) 
     303          this->isChecked = true; 
    302304         return; 
    303305       } 
     
    316318          this->computeIndex(); 
    317319       } 
    318        this->isChecked = true; 
     320//       this->isChecked = true; 
     321       if (!(this->hasTransform() && !this->isTransformed())) 
     322        this->isChecked = true; 
     323 
     324       if (!(this->hasTransform() && (!this->isGenerated()))) 
     325        this->isChecked = true; 
    319326     } 
    320327   } 
     
    10941101          } 
    10951102 
     1103          storeIndex_fromSrv.insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer))); 
    10961104          listMsg.push_back(CMessage()); 
    10971105          listMsg.back() << getId( )<< isDataDistributed_ << isCompressible_ << listOutIndex.back(); 
     
    11021110      } 
    11031111      else 
     1112      { 
     1113        const std::list<int>& ranks = client->getRanksServerNotLeader(); 
     1114        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     1115        { 
     1116          int rank = *itRank; 
     1117          int nb = 1; 
     1118          storeIndex_fromSrv.insert(std::make_pair(rank, CArray<int,1>(nb))); 
     1119          CArray<int, 1>& outLocalIndexToServer = storeIndex_fromSrv[rank]; 
     1120          for (int k = 0; k < nb; ++k) 
     1121          { 
     1122            outLocalIndexToServer(k)  = 0; 
     1123          } 
     1124        } 
    11041125        client->sendEvent(event); 
     1126      } 
    11051127    } 
    11061128  } 
     
    11361158          } 
    11371159 
    1138           //int nbClient = client->clientSize; // This stupid variable signals the servers the number of client connect to them 
    11391160          const std::list<int>& ranks = client->getRanksServerLeader(); 
    11401161          for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
    11411162          { 
    11421163            storeIndex_toSrv.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 
     1164            storeIndex_fromSrv.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 
    11431165            listOutIndex.push_back(CArray<size_t,1>(outGlobalIndexOnServer)); 
    11441166 
     
    11511173        } 
    11521174        else 
    1153           client->sendEvent(event); 
     1175        { 
     1176           int indexSize = globalLocalIndexSendToServer.size(); 
     1177           CArray<int,1> outLocalIndexToServer(indexSize); 
     1178           for (int idx = 0; itIndex != iteIndex; ++itIndex, ++idx) 
     1179           { 
     1180             outLocalIndexToServer(idx) = itIndex->second; 
     1181           } 
     1182 
     1183           const std::list<int>& ranks = client->getRanksServerNotLeader(); 
     1184           for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     1185           { 
     1186             storeIndex_fromSrv.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 
     1187           } 
     1188           client->sendEvent(event); 
     1189         } 
    11541190      } 
    11551191      else 
     
    11771213        } 
    11781214 
    1179 //        for (int ns = 0; ns < connectedServerRank_.size(); ++ns) 
    1180         for (int ns = 0; ns < client->serverSize; ++ns) 
     1215        for (int ns = 0; ns < connectedServerRank_.size(); ++ns) 
     1216//        for (int ns = 0; ns < client->serverSize; ++ns) 
    11811217        { 
    11821218          rank = connectedServerRank_[ns]; 
     
    11971233          } 
    11981234 
     1235          storeIndex_fromSrv.insert(make_pair(rank, CArray<int,1>(outLocalIndexToServer))); 
    11991236          listMsg.push_back(CMessage()); 
    12001237          listMsg.back() << getId() << isDataDistributed_ << isCompressible_ << listOutIndex.back(); 
Note: See TracChangeset for help on using the changeset viewer.