- Timestamp:
- 12/16/19 19:22:59 (4 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/client_server_mapping.cpp
r1639 r1794 27 27 \param [in] nClient number of clients 28 28 \param [in] clientIntraComm MPI communication of clients 29 \param [in] connectedServerRank Rank of servers connected to oneclient29 \param [in] connectedServerRank Rank of servers connected to the current client 30 30 */ 31 31 std::map<int,int> CClientServerMapping::computeConnectedClients(int nbServer, int nbClient, -
XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/source_filter.cpp
r1637 r1794 34 34 packet->status = CDataPacket::NO_ERROR; 35 35 36 packet->data.resize(grid->storeIndex_client .numElements());36 packet->data.resize(grid->storeIndex_client_.numElements()); 37 37 38 38 if (compression) … … 80 80 packet->status = CDataPacket::NO_ERROR; 81 81 82 if (data.size() != grid->storeIndex_fromSrv .size())82 if (data.size() != grid->storeIndex_fromSrv_.size()) 83 83 ERROR("CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data)", 84 84 << "Incoherent data received from servers," 85 << " expected " << grid->storeIndex_fromSrv .size() << " chunks but " << data.size() << " were given.");85 << " expected " << grid->storeIndex_fromSrv_.size() << " chunks but " << data.size() << " were given."); 86 86 87 packet->data.resize(grid->storeIndex_client .numElements());87 packet->data.resize(grid->storeIndex_client_.numElements()); 88 88 std::map<int, CArray<double, 1> >::const_iterator it, itEnd = data.end(); 89 89 for (it = data.begin(); it != itEnd; it++) 90 90 { 91 CArray<int,1>& index = grid->storeIndex_fromSrv [it->first];91 CArray<int,1>& index = grid->storeIndex_fromSrv_[it->first]; 92 92 for (int n = 0; n < index.numElements(); n++) 93 93 packet->data(index(n)) = it->second(n); -
XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/spatial_transform_filter.cpp
r1784 r1794 174 174 gridTransformation->computeAll(dataAuxInputs, packet->timestamp); 175 175 } 176 packet->data.resize(gridTransformation->getGridDestination()->storeIndex_client .numElements());176 packet->data.resize(gridTransformation->getGridDestination()->storeIndex_client_.numElements()); 177 177 if (0 != packet->data.numElements()) 178 178 (packet->data)(0) = defaultValue; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
r1784 r1794 162 162 if (client->isServerLeader()) 163 163 { 164 for (it = grid->storeIndex_toSrv [client].begin(); it != grid->storeIndex_toSrv[client].end(); it++)164 for (it = grid->storeIndex_toSrv_[client].begin(); it != grid->storeIndex_toSrv_[client].end(); it++) 165 165 { 166 166 int rank = it->first; … … 182 182 else 183 183 { 184 for (it = grid->storeIndex_toSrv [client].begin(); it != grid->storeIndex_toSrv[client].end(); it++)184 for (it = grid->storeIndex_toSrv_[client].begin(); it != grid->storeIndex_toSrv_[client].end(); it++) 185 185 { 186 186 int rank = it->first; … … 194 194 195 195 list_msg.back() << getId() << data_tmp; 196 event.push(rank, grid->nbSenders [receiverSize][rank], list_msg.back());196 event.push(rank, grid->nbSenders_[receiverSize][rank], list_msg.back()); 197 197 } 198 198 client->sendEvent(event); … … 231 231 if (0 == recvDataSrv.numElements()) 232 232 { 233 CArray<int,1>& storeClient = grid->storeIndex_client ;233 CArray<int,1>& storeClient = grid->storeIndex_client_; 234 234 235 235 // Gather all data from different clients … … 248 248 if (opeDate <= currDate) 249 249 { 250 for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient .begin(); it != grid->outLocalIndexStoreOnClient.end(); ++it)250 for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient_.begin(); it != grid->outLocalIndexStoreOnClient_.end(); ++it) 251 251 { 252 252 CArray<double,1> tmp; … … 445 445 else 446 446 { 447 for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient .begin();448 it != grid->outLocalIndexStoreOnClient .end(); ++it)447 for (map<int, CArray<size_t, 1> >::iterator it = grid->outLocalIndexStoreOnClient_.begin(); 448 it != grid->outLocalIndexStoreOnClient_.end(); ++it) 449 449 { 450 450 CArray<size_t,1>& indexTmp = it->second; … … 472 472 } 473 473 474 event.push(it->first, grid->nbReadSenders [client][it->first], msg);474 event.push(it->first, grid->nbReadSenders_[client][it->first], msg); 475 475 } 476 476 client->sendEvent(event); … … 498 498 if (0 == recvDataSrv.numElements()) 499 499 { 500 CArray<int,1>& storeClient = grid->storeIndex_client ;500 CArray<int,1>& storeClient = grid->storeIndex_client_; 501 501 recvDataSrv.resize(storeClient.numElements()); 502 502 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp
r1787 r1794 695 695 int nbStoreGridMask = clientDistribution_->getLocalMaskIndexOnClient().size(); 696 696 // nbStoreGridMask = nbStoreIndex if grid mask is defined, and 0 otherwise 697 storeIndex_client .resize(nbStoreIndex);698 storeMask_client .resize(nbStoreGridMask);699 for (int idx = 0; idx < nbStoreIndex; ++idx) storeIndex_client (idx) = (clientDistribution_->getLocalDataIndexOnClient())[idx];700 for (int idx = 0; idx < nbStoreGridMask; ++idx) storeMask_client (idx) = (clientDistribution_->getLocalMaskIndexOnClient())[idx];697 storeIndex_client_.resize(nbStoreIndex); 698 storeMask_client_.resize(nbStoreGridMask); 699 for (int idx = 0; idx < nbStoreIndex; ++idx) storeIndex_client_(idx) = (clientDistribution_->getLocalDataIndexOnClient())[idx]; 700 for (int idx = 0; idx < nbStoreGridMask; ++idx) storeMask_client_(idx) = (clientDistribution_->getLocalMaskIndexOnClient())[idx]; 701 701 702 702 if (0 == serverDistribution_) isDataDistributed_= clientDistribution_->isDataDistributed(); 703 703 else 704 704 { 705 // Mapping global index received from clients to the storeIndex_client 705 // Mapping global index received from clients to the storeIndex_client_ 706 706 CDistributionClient::GlobalLocalDataMap& globalDataIndex = clientDistribution_->getGlobalDataIndexOnClient(); 707 707 CDistributionClient::GlobalLocalDataMap::const_iterator itGloe = globalDataIndex.end(); 708 map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient .begin(),709 ite = outGlobalIndexFromClient .end(), it;708 map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient_.begin(), 709 ite = outGlobalIndexFromClient_.end(), it; 710 710 711 711 for (it = itb; it != ite; ++it) 712 712 { 713 713 int rank = it->first; 714 CArray<size_t,1>& globalIndex = outGlobalIndexFromClient [rank];715 outLocalIndexStoreOnClient .insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements())));716 CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient [rank];714 CArray<size_t,1>& globalIndex = outGlobalIndexFromClient_[rank]; 715 outLocalIndexStoreOnClient_.insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements()))); 716 CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient_[rank]; 717 717 size_t nbIndex = 0; 718 718 … … 772 772 connectedDataSize_.erase(receiverSize); 773 773 globalIndexOnServer_.erase(receiverSize); 774 nbSenders .erase(receiverSize);774 nbSenders_.erase(receiverSize); 775 775 } 776 776 … … 872 872 } 873 873 874 nbSenders [receiverSize] = clientServerMap_->computeConnectedClients(receiverSize, client->clientSize, client->intraComm, connectedServerRank_[receiverSize]);874 nbSenders_[receiverSize] = clientServerMap_->computeConnectedClients(receiverSize, client->clientSize, client->intraComm, connectedServerRank_[receiverSize]); 875 875 } 876 876 } … … 911 911 if (serverDistribution_!=0) serverDistribution_->partialClear() ; 912 912 if (clientDistribution_!=0) clientDistribution_->partialClear() ; 913 outGlobalIndexFromClient .clear() ;913 outGlobalIndexFromClient_.clear() ; 914 914 } 915 915 } … … 1310 1310 TRY 1311 1311 { 1312 const StdSize size = storeIndex_client .numElements();1312 const StdSize size = storeIndex_client_.numElements(); 1313 1313 1314 1314 stored.resize(size); 1315 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client (i)];1315 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client_(i)]; 1316 1316 } 1317 1317 CATCH … … 1320 1320 TRY 1321 1321 { 1322 const StdSize size = storeIndex_client .numElements();1323 1324 for(StdSize i = 0; i < size; i++) data[storeIndex_client (i)] = stored(i);1322 const StdSize size = storeIndex_client_.numElements(); 1323 1324 for(StdSize i = 0; i < size; i++) data[storeIndex_client_(i)] = stored(i); 1325 1325 } 1326 1326 CATCH … … 1328 1328 void CGrid::maskField_arr(const double* const data, CArray<double, 1>& stored) const 1329 1329 { 1330 const StdSize size = storeIndex_client .numElements();1330 const StdSize size = storeIndex_client_.numElements(); 1331 1331 stored.resize(size); 1332 1332 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 1333 1333 1334 if (storeMask_client .numElements() != 0)1335 for(StdSize i = 0; i < size; i++) stored(i) = (storeMask_client (i)) ? data[storeIndex_client(i)] : nanValue;1334 if (storeMask_client_.numElements() != 0) 1335 for(StdSize i = 0; i < size; i++) stored(i) = (storeMask_client_(i)) ? data[storeIndex_client_(i)] : nanValue; 1336 1336 else 1337 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client (i)];1337 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client_(i)]; 1338 1338 } 1339 1339 … … 1356 1356 clientDistribution_ = new CDistributionClient(rank, this); 1357 1357 1358 storeIndex_client .resize(1);1359 storeIndex_client (0) = 0;1358 storeIndex_client_.resize(1); 1359 storeIndex_client_(0) = 0; 1360 1360 1361 1361 if (0 != serverDistribution_) 1362 1362 { 1363 map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient .begin(),1364 ite = outGlobalIndexFromClient .end(), it;1363 map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient_.begin(), 1364 ite = outGlobalIndexFromClient_.end(), it; 1365 1365 for (it = itb; it != ite; ++it) 1366 1366 { 1367 1367 int rank = it->first; 1368 CArray<size_t,1>& globalIndex = outGlobalIndexFromClient [rank];1369 outLocalIndexStoreOnClient .insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements())));1370 CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient [rank];1368 CArray<size_t,1>& globalIndex = outGlobalIndexFromClient_[rank]; 1369 outLocalIndexStoreOnClient_.insert(make_pair(rank, CArray<size_t,1>(globalIndex.numElements()))); 1370 CArray<size_t,1>& localIndex = outLocalIndexStoreOnClient_[rank]; 1371 1371 if (1 != globalIndex.numElements()) 1372 1372 ERROR("void CGrid::computeClientIndexScalarGrid()", … … 1406 1406 connectedDataSize_.erase(receiverSize); 1407 1407 globalIndexOnServer_.erase(receiverSize); 1408 nbSenders .erase(receiverSize);1408 nbSenders_.erase(receiverSize); 1409 1409 } 1410 1410 … … 1418 1418 connectedServerRank_[receiverSize].push_back(rank); 1419 1419 connectedDataSize_[receiverSize][rank] = nb; 1420 nbSenders [receiverSize][rank] = nb;1420 nbSenders_[receiverSize][rank] = nb; 1421 1421 } 1422 1422 } … … 1430 1430 connectedServerRank_[receiverSize].push_back(rank); 1431 1431 connectedDataSize_[receiverSize][rank] = nb; 1432 nbSenders [receiverSize][rank] = nb;1432 nbSenders_[receiverSize][rank] = nb; 1433 1433 } 1434 1434 } … … 1443 1443 { 1444 1444 CContext* context = CContext::getCurrent(); 1445 storeIndex_toSrv .clear();1445 storeIndex_toSrv_.clear(); 1446 1446 std::list<CContextClient*>::iterator it; 1447 1447 … … 1462 1462 int rank = *itRank; 1463 1463 int nb = 1; 1464 storeIndex_toSrv [client].insert(std::make_pair(rank, CArray<int,1>(nb)));1464 storeIndex_toSrv_[client].insert(std::make_pair(rank, CArray<int,1>(nb))); 1465 1465 listOutIndex.push_back(CArray<size_t,1>(nb)); 1466 1466 1467 CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv [client][rank];1467 CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv_[client][rank]; 1468 1468 CArray<size_t, 1>& outGlobalIndexOnServer = listOutIndex.back(); 1469 1469 … … 1475 1475 1476 1476 if (context->hasClient && !context->hasServer) 1477 storeIndex_fromSrv .insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer)));1477 storeIndex_fromSrv_.insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer))); 1478 1478 1479 1479 listMsg.push_back(CMessage()); … … 1498 1498 1499 1499 if (context->hasClient && !context->hasServer) 1500 storeIndex_fromSrv .insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer)));1500 storeIndex_fromSrv_.insert(std::make_pair(rank, CArray<int,1>(outLocalIndexToServer))); 1501 1501 } 1502 1502 client->sendEvent(event); … … 1510 1510 { 1511 1511 CContext* context = CContext::getCurrent(); 1512 storeIndex_toSrv .clear();1512 storeIndex_toSrv_.clear(); 1513 1513 std::list<CContextClient*>::iterator it; 1514 1514 … … 1543 1543 for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 1544 1544 { 1545 storeIndex_toSrv [client].insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));1545 storeIndex_toSrv_[client].insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 1546 1546 if (context->hasClient && !context->hasServer) 1547 storeIndex_fromSrv .insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));1547 storeIndex_fromSrv_.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 1548 1548 1549 1549 listOutIndex.push_back(CArray<size_t,1>(outGlobalIndexOnServer)); … … 1568 1568 for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 1569 1569 { 1570 storeIndex_fromSrv .insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer)));1570 storeIndex_fromSrv_.insert(std::make_pair(*itRank, CArray<int,1>(outLocalIndexToServer))); 1571 1571 } 1572 1572 client->sendEvent(event); … … 1604 1604 nb = globalIndexTmp[rank].size(); 1605 1605 1606 storeIndex_toSrv [client].insert(make_pair(rank, CArray<int,1>(nb)));1606 storeIndex_toSrv_[client].insert(make_pair(rank, CArray<int,1>(nb))); 1607 1607 listOutIndex.push_back(CArray<size_t,1>(nb)); 1608 1608 1609 CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv [client][rank];1609 CArray<int, 1>& outLocalIndexToServer = storeIndex_toSrv_[client][rank]; 1610 1610 CArray<size_t, 1>& outGlobalIndexOnServer = listOutIndex.back(); 1611 1611 … … 1616 1616 } 1617 1617 1618 storeIndex_fromSrv .insert(make_pair(rank, CArray<int,1>(outLocalIndexToServer)));1618 storeIndex_fromSrv_.insert(make_pair(rank, CArray<int,1>(outLocalIndexToServer))); 1619 1619 listMsg.push_back(CMessage()); 1620 1620 listMsg.back() << getId() << isDataDistributed_ << isCompressible_ << listOutIndex.back(); 1621 1621 1622 event.push(rank, nbSenders [receiverSize][rank], listMsg.back());1622 event.push(rank, nbSenders_[receiverSize][rank], listMsg.back()); 1623 1623 } 1624 1624 … … 1654 1654 connectedServerRankRead_ = ranks; 1655 1655 1656 nbReadSenders .clear();1656 nbReadSenders_.clear(); 1657 1657 CContextServer* server = context->server ; 1658 1658 CContextClient* client = context->client; … … 1750 1750 CArray<size_t,1> outIndex; 1751 1751 buffer >> outIndex; 1752 outGlobalIndexFromClient .insert(std::make_pair(rank, outIndex));1752 outGlobalIndexFromClient_.insert(std::make_pair(rank, outIndex)); 1753 1753 connectedDataSizeRead_[rank] = outIndex.numElements(); 1754 1754 … … 1811 1811 if (isScalarGrid()) return; 1812 1812 1813 nbReadSenders [client] = CClientServerMappingDistributed::computeConnectedClients(context->client->serverSize, context->client->clientSize, context->client->intraComm, ranks);1813 nbReadSenders_[client] = CClientServerMappingDistributed::computeConnectedClients(context->client->serverSize, context->client->clientSize, context->client->intraComm, ranks); 1814 1814 1815 1815 } … … 1975 1975 TRY 1976 1976 { 1977 // This function is now useless because it will return false only if server and client size are equal to 1 1978 // to be seriously check in future 1979 1977 1980 if (isScalarGrid()) return false; 1978 1981 else if (0 != client) -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
r1784 r1794 205 205 bool hasTransform(); 206 206 size_t getGlobalWrittenSize(void) ; 207 public:208 CArray<int, 1> storeIndex_client;209 CArray<bool, 1> storeMask_client;210 211 /** Map containing indexes that will be sent in sendIndex(). */212 std::map<CContextClient*, map<int, CArray<int, 1> > > storeIndex_toSrv;213 214 /** Map storing the number of senders. Key = size of receiver's intracomm */215 std::map<int, std::map<int,int> > nbSenders;216 217 std::map<CContextClient*, std::map<int,int> > nbReadSenders;218 219 map<int, CArray<int, 1> > storeIndex_fromSrv; // Support, for now, reading with level-1 server220 221 map<int, CArray<size_t, 1> > compressedOutIndexFromClient;222 223 /** Map storing received indexes. Key = sender rank, value = index array. */224 map<int, CArray<size_t, 1> > outGlobalIndexFromClient;225 226 // Manh Ha's comment: " A client receives global index from other clients (via recvIndex)227 // then does mapping these index into local index of STORE_CLIENTINDEX228 // In this way, store_clientIndex can be used as an input of a source filter229 // Maybe we need a flag to determine whether a client wants to write. TODO "230 231 /** Map storing received data. Key = sender rank, value = data array.232 * The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData() */233 map<int, CArray<size_t, 1> > outLocalIndexStoreOnClient;234 235 /** Indexes calculated based on server-like distribution.236 * They are used for writing/reading data and only calculated for server level that does the writing/reading.237 * Along with localIndexToWriteOnClient, these indexes are used to correctly place incoming data. */238 CArray<size_t,1> localIndexToWriteOnServer;239 240 /** Indexes calculated based on client-like distribution.241 * They are used for writing/reading data and only calculated for server level that does the writing/reading.242 * Along with localIndexToWriteOnServer, these indexes are used to correctly place incoming data. */243 CArray<size_t,1> localIndexToWriteOnClient;244 245 CArray<size_t,1> indexFromClients;246 207 247 208 bool hasMask(void) const; … … 303 264 void computeConnectedClientsScalarGrid(); 304 265 266 267 public: 268 /** Array containing the local index of the grid 269 * storeIndex_client[local_workflow_grid_index] -> local_model_grid_index. 270 * Used to store field from model into the worklow, or to return field into models. 271 * The size of the array is the number of local index of the workflow grid */ 272 CArray<int, 1> storeIndex_client_; 273 274 /** Array containing the grid mask masked defined by the mask_nd grid attribute. 275 * The corresponding masked field value provided by the model will be replaced by a NaN value 276 * in the workflow. */ 277 CArray<bool, 1> storeMask_client_; 278 279 /** Map containing the indexes on client side that will be sent to each connected server. 280 * storeIndex_toSrv[&contextClient] -> map concerning the contextClient for which the data will be sent (client side) 281 * storeIndex_toSrv[&contextClient][rank] -> array of indexes that will be sent to each "rank" of the connected servers 282 * storeIndex_toSrv[&contextClient][rank](index_of_buffer_sent_to_server) -> local index of the field of the workflow 283 * grid that will be sent to server */ 284 std::map<CContextClient*, map<int, CArray<int, 1> > > storeIndex_toSrv_; 285 286 287 /** Map containing the indexes on client side that will be received from each connected server. 288 * This map is used to agreggate field data received from server (for reading) into a single array, which will be an entry 289 * point of the worklow on client side. 290 * storeIndex_toSrv[rank] -> array of indexes that will be received from each "rank" of the connected servers 291 * storeIndex_toSrv[rank](index_of_buffer_received_from_server) -> local index of the field in the "workflow grid" 292 * that has been received from server */ 293 std::map<int, CArray<int, 1> > storeIndex_fromSrv_; // Support, for now, reading with level-1 server 294 295 296 /** Maps storing the number of participating clients for data sent a specific server for a given contextClient, identified 297 * by the servers communicator size. In future must be direcly identified by context. 298 * nbSender_[context_server_size] -> map the number of client sender by connected rank of servers 299 * nbSender_[context_server_size] [rank_server] -> the number of client participating to a send message for a server of rank "rank_server" 300 * Usefull to indicate in a message the number of participant needed by the transfer protocol */ 301 std::map<int, std::map<int,int> > nbSenders_; 302 303 304 /** Maps storing the number of participating servers for data sent a specific client for a given contextClient. 305 * Symetric of nbSenders_, but for server side which want to send data to client. 306 * nbReadSender_[context_client_size] -> map the number of server sender by connected rank of clients 307 * nbReadSender_[context_client_size] [rank_client] -> the number of serverq participating to a send message for a client of rank "rank_client" 308 * Usefull to indicate in a message the number of participant needed by the transfer protocol */ 309 std::map<CContextClient*, std::map<int,int> > nbReadSenders_; 310 311 312 // Manh Ha's comment: " A client receives global index from other clients (via recvIndex) 313 // then does mapping these index into local index of STORE_CLIENTINDEX 314 // In this way, store_clientIndex can be used as an input of a source filter 315 // Maybe we need a flag to determine whether a client wants to write. TODO " 316 317 /** Map storing received data on server side. This map is the equivalent of storeIndex_client, but for data not received from model 318 * instead that for client. This map is used to concatenate data received from several clients into a single array on server side 319 * which match the local workflow grid. 320 * outLocalIndexStoreOnClient_[client_rank] -> Array of index from client of rank "client_rank" 321 * outLocalIndexStoreOnClient_[client_rank](index of buffer from client) -> local index of the workflow grid 322 * The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData(). 323 * Symetrically it is also used to send data from a server to sevral client for reading case. */ 324 map<int, CArray<size_t, 1> > outLocalIndexStoreOnClient_; 325 326 327 /** Indexes calculated based on server-like distribution. 328 * They are used for writing/reading data and only calculated for server level that does the writing/reading. 329 * Along with localIndexToWriteOnClient, these indexes are used to correctly place incoming data. */ 330 CArray<size_t,1> localIndexToWriteOnServer; 331 332 /** Indexes calculated based on client-like distribution. 333 * They are used for writing/reading data and only calculated for server level that does the writing/reading. 334 * Along with localIndexToWriteOnServer, these indexes are used to correctly place incoming data. */ 335 CArray<size_t,1> localIndexToWriteOnClient; 336 337 CArray<size_t,1> indexFromClients; 338 339 305 340 private: 306 341 … … 308 343 std::list<CContextClient*> clients; 309 344 std::set<CContextClient*> clientsSet; 345 346 /** Map storing received indexes. Key = sender rank, value = index array. */ 347 map<int, CArray<size_t, 1> > outGlobalIndexFromClient_; 310 348 311 349 bool isChecked;
Note: See TracChangeset
for help on using the changeset viewer.