Changeset 634
- Timestamp:
- 07/15/15 16:36:38 (9 years ago)
- Location:
- XIOS/trunk/src/transformation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/grid_transformation.cpp
r631 r634 471 471 if (0 != sendBuffSize) sendBuff = new unsigned long [sendBuffSize]; 472 472 for (StdSize idx = 0; idx < sendBuffSize; ++idx) sendBuff[idx] = NumTraits<Scalar>::sfmax(); 473 474 std::map<int, MPI_Request> requests; 473 475 474 476 int currentBuffPosition = 0; … … 488 490 } 489 491 currentSendBuff = sendBuff + currentBuffPosition; 490 MPI_ Send(currentSendBuff, countSize, MPI_UNSIGNED_LONG, destRank, 14, client->intraComm);492 MPI_Isend(currentSendBuff, countSize, MPI_UNSIGNED_LONG, destRank, 14, client->intraComm, &requests[destRank]); 491 493 currentBuffPosition += countSize; 492 494 } … … 551 553 } 552 554 555 std::map<int, MPI_Request>::iterator itRequest; 556 for (itRequest = requests.begin(); itRequest != requests.end(); ++itRequest) 557 MPI_Wait(&itRequest->second, MPI_STATUS_IGNORE); 558 553 559 if (0 != sendBuffSize) delete [] sendBuff; 554 560 if (0 != recvBuffSize) delete [] recvBuff; -
XIOS/trunk/src/transformation/transformation_mapping.cpp
r630 r634 140 140 if (0 != buffSize) recvBuffGlobalIndex = new unsigned long [buffSize]; 141 141 142 std::map<int, MPI_Request> requests; 143 142 144 // Inform all "source clients" about index that they need to send 143 145 for (itMapSrc = itbMapSrc; itMapSrc != iteMapSrc; ++itMapSrc) 144 146 { 145 MPI_Request request;146 147 unsigned long* sendPtr = const_cast<unsigned long*>(&(itMapSrc->second)[0]); 147 148 MPI_Isend(sendPtr, … … 151 152 11, 152 153 client->intraComm, 153 &request );154 &requests[itMapSrc->first]); 154 155 } 155 156 … … 177 178 } 178 179 180 std::map<int, MPI_Request>::iterator itRequest; 181 for (itRequest = requests.begin(); itRequest != requests.end(); ++itRequest) 182 MPI_Wait(&itRequest->second, MPI_STATUS_IGNORE); 183 179 184 delete [] sendBuff; 180 185 delete [] recvBuff;
Note: See TracChangeset
for help on using the changeset viewer.