Changeset 1646 for XIOS/dev/dev_trunk_omp/src/context_client.cpp
- Timestamp:
- 01/31/19 12:12:52 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/context_client.cpp
r1630 r1646 12 12 #include "cxios.hpp" 13 13 #include "server.hpp" 14 #ifdef _usingEP 14 15 using namespace ep_lib; 16 #endif 15 17 16 18 namespace xios … … 96 98 { 97 99 list<int> ranks = event.getRanks(); 98 100 #pragma omp critical (_output) 101 { 102 info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<endl ; 103 } 99 104 if (CXios::checkEventSync) 100 105 { … … 124 129 { 125 130 event.send(timeLine, sizes, buffList); 131 #pragma omp critical (_output) 132 { 133 info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<" sent"<<endl ; 134 } 126 135 127 136 checkBuffers(ranks); … … 140 149 for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++) 141 150 tmpBufferedEvent.buffers.push_back(new CBufferOut(*it)); 142 info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 151 #pragma omp critical (_output) 152 { 153 info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 154 } 143 155 event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers); 156 #pragma omp critical (_output) 157 { 158 info(100)<<"Event "<<timeLine<<" of context "<<context->getId()<<" sent"<<endl ; 159 } 144 160 } 145 161 } … … 167 183 (*itBuffer)->put((char*)(*it)->start(), (*it)->count()); 168 184 169 info(100)<<"DEBUG : temporaly event sent "<<endl ; 185 #pragma omp critical (_output) 186 { 187 info(100)<<"DEBUG : temporaly event sent "<<endl ; 188 } 170 189 checkBuffers(tmpBufferedEvent.ranks); 171 190 … … 341 360 if (ratio < minBufferSizeEventSizeRatio) minBufferSizeEventSizeRatio = ratio; 342 361 } 362 363 #ifdef _usingEP 343 364 MPI_Allreduce(&minBufferSizeEventSizeRatio, &minBufferSizeEventSizeRatio, 1, MPI_DOUBLE, MPI_MIN, intraComm); 365 #elif _usingMPI 366 MPI_Allreduce(MPI_IN_PLACE, &minBufferSizeEventSizeRatio, 1, MPI_DOUBLE, MPI_MIN, intraComm); 367 #endif 344 368 345 369 if (minBufferSizeEventSizeRatio < 1.0) … … 426 450 { 427 451 #pragma omp critical (_output) 428 info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 452 { 453 info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 454 } 429 455 event.push(*itRank, 1, msg); 430 456 } … … 452 478 { 453 479 #pragma omp critical (_output) 454 report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl 480 { 481 report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl 455 482 << " +) To server with rank " << itMap->first << " : " << itMap->second << " bytes " << endl; 483 } 456 484 totalBuf += itMap->second; 457 485 } 458 486 #pragma omp critical (_output) 459 report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl; 487 { 488 report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl; 489 } 460 490 461 491 //releaseBuffers(); // moved to CContext::finalize()
Note: See TracChangeset
for help on using the changeset viewer.