- Timestamp:
- 06/18/18 20:32:55 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/client_client_dht_template_impl.hpp
r1460 r1545 116 116 size_t index; 117 117 HashXIOS<size_t> hashGlobalIndex; 118 boost::unordered_map<size_t,int> nbIndices;118 std::unordered_map<size_t,int> nbIndices; 119 119 nbIndices.rehash(std::ceil(ssize/nbIndices.max_load_factor())); 120 120 for (int i = 0; i < ssize; ++i) … … 131 131 } 132 132 133 boost::unordered_map<int, size_t* > client2ClientIndex;133 std::unordered_map<int, size_t* > client2ClientIndex; 134 134 for (int idx = 0; idx < nbClient; ++idx) 135 135 { … … 191 191 if (0 != recvNbIndexClientCount[idx]) 192 192 recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, &request[request_position++]); 193 //recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, request);194 193 currentIndex += recvNbIndexClientCount[idx]; 195 194 } 196 195 197 boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,196 std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 198 197 iteIndex = client2ClientIndex.end(); 199 198 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 200 199 sendIndexToClients(itIndex->first, (itIndex->second), sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, &request[request_position++]); 201 //sendIndexToClients(itIndex->first, (itIndex->second), sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request);202 200 203 201 std::vector<ep_lib::MPI_Status> status(request.size()); … … 280 278 if (0 != recvNbIndexOnReturn[idx]) 281 279 { 282 //recvIndexFromClients(recvRankOnReturn[idx], recvIndexBuffOnReturn+currentIndex, recvNbIndexOnReturn[idx], commLevel, requestOnReturn);283 //recvInfoFromClients(recvRankOnReturn[idx],284 // recvInfoBuffOnReturn+currentIndex*ProcessDHTElement<InfoType>::typeSize(),285 // recvNbIndexOnReturn[idx]*ProcessDHTElement<InfoType>::typeSize(),286 // commLevel, requestOnReturn);287 280 recvIndexFromClients(recvRankOnReturn[idx], recvIndexBuffOnReturn+currentIndex, recvNbIndexOnReturn[idx], commLevel, &requestOnReturn[requestOnReturn_position++]); 288 281 recvInfoFromClients(recvRankOnReturn[idx], … … 294 287 } 295 288 296 boost::unordered_map<int,unsigned char*> client2ClientInfoOnReturn;297 boost::unordered_map<int,size_t*> client2ClientIndexOnReturn;289 std::unordered_map<int,unsigned char*> client2ClientInfoOnReturn; 290 std::unordered_map<int,size_t*> client2ClientIndexOnReturn; 298 291 currentIndex = 0; 299 292 for (int idx = 0; idx < nbRecvClient; ++idx) … … 322 315 } 323 316 324 //sendIndexToClients(rank, client2ClientIndexOnReturn[rank],325 // sendNbIndexOnReturn[idx], commLevel, requestOnReturn);326 //sendInfoToClients(rank, client2ClientInfoOnReturn[rank],327 // sendNbIndexOnReturn[idx]*ProcessDHTElement<InfoType>::typeSize(), commLevel, requestOnReturn);328 317 sendIndexToClients(rank, client2ClientIndexOnReturn[rank], 329 318 sendNbIndexOnReturn[idx], commLevel, &requestOnReturn[requestOnReturn_position++]); … … 349 338 indexToInfoMappingLevel_.swap(indexToInfoMapping); 350 339 if (0 != recvNbIndexCount) delete [] recvIndexBuff; 351 for ( boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin();340 for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 352 341 it != client2ClientIndex.end(); ++it) 353 342 delete [] it->second; … … 360 349 } 361 350 362 for ( boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin();351 for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin(); 363 352 it != client2ClientInfoOnReturn.end(); ++it) 364 353 delete [] it->second; 365 354 366 for ( boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin();355 for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin(); 367 356 it != client2ClientIndexOnReturn.end(); ++it) 368 357 delete [] it->second; … … 430 419 } 431 420 432 boost::unordered_map<int, size_t*> client2ClientIndex;433 boost::unordered_map<int, unsigned char*> client2ClientInfo;421 std::unordered_map<int, size_t*> client2ClientIndex; 422 std::unordered_map<int, unsigned char*> client2ClientInfo; 434 423 for (int idx = 0; idx < nbClient; ++idx) 435 424 { … … 500 489 if (0 != recvNbIndexClientCount[idx]) 501 490 { 502 //recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, request);503 //recvInfoFromClients(recvRankClient[idx],504 // recvInfoBuff+currentIndex*ProcessDHTElement<InfoType>::typeSize(),505 // recvNbIndexClientCount[idx]*ProcessDHTElement<InfoType>::typeSize(),506 // commLevel, request);507 491 recvIndexFromClients(recvRankClient[idx], recvIndexBuff+currentIndex, recvNbIndexClientCount[idx], commLevel, &request[request_position++]); 508 492 recvInfoFromClients(recvRankClient[idx], … … 514 498 } 515 499 516 boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,500 std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 517 501 iteIndex = client2ClientIndex.end(); 518 502 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 519 503 sendIndexToClients(itIndex->first, itIndex->second, sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, &request[request_position++]); 520 //sendIndexToClients(itIndex->first, itIndex->second, sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request); 521 boost::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 504 std::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 522 505 iteInfo = client2ClientInfo.end(); 523 506 for (itInfo = itbInfo; itInfo != iteInfo; ++itInfo) 524 507 sendInfoToClients(itInfo->first, itInfo->second, sendNbInfo[itInfo->first-groupRankBegin], commLevel, &request[request_position++]); 525 //sendInfoToClients(itInfo->first, itInfo->second, sendNbInfo[itInfo->first-groupRankBegin], commLevel, request);526 508 527 509 std::vector<ep_lib::MPI_Status> status(request.size()); … … 551 533 delete [] recvInfoBuff; 552 534 } 553 for ( boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin();535 for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin(); 554 536 it != client2ClientInfo.end(); ++it) 555 537 delete [] it->second; 556 538 557 for ( boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin();539 for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 558 540 it != client2ClientIndex.end(); ++it) 559 541 delete [] it->second;
Note: See TracChangeset
for help on using the changeset viewer.