- Timestamp:
- 04/22/22 11:46:41 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp
r2324 r2326 449 449 void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize) 450 450 { 451 for(auto& it : mapSize) 452 buffers[it.first]->fixBufferSize(std::max(CXios::minBufferSize*1.0,std::min(it.second*CXios::bufferSizeFactor*1.01,CXios::maxBufferSize*1.0))); 451 setFixedBuffer() ; 452 for(auto& it : mapSize) 453 { 454 size_t size=std::max(CXios::minBufferSize*1.0,std::min(it.second*CXios::bufferSizeFactor*1.01,CXios::maxBufferSize*1.0)) ; 455 mapBufferSize_[it.first]=size ; 456 if (buffers.count(it.first)>0) buffers[it.first]->fixBufferSize(size); 457 } 453 458 } 454 459 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp
r2310 r2326 115 115 CTimer::get("check pending request").suspend(); 116 116 CTimer::get("check event process").resume(); 117 if (enableEventsProcessing) processEvents();117 processEvents(enableEventsProcessing); 118 118 CTimer::get("check event process").suspend(); 119 119 return finished; … … 320 320 buffers[rank]->freeBuffer(count) ; 321 321 delete buffers[rank] ; 322 buffers[rank] = new CServerBuffer(windows_[rank], winAdress, 0, newSize) ;322 buffers[rank] = new CServerBuffer(windows_[rank], winAdress, 0, 2*newSize) ; 323 323 info(100)<<"Context id "<<context->getId()<<" : Receive ChangeBufferSize from client rank "<<rank 324 324 <<" newSize : "<<newSize<<" Address : "<<winAdress[0]<<" & "<<winAdress[1]<<endl ; … … 339 339 } 340 340 341 void CContextServer::processEvents( void)341 void CContextServer::processEvents(bool enableEventsProcessing) 342 342 { 343 343 map<size_t,CEventServer*>::iterator it; … … 363 363 else if (isAttachedModeEnabled() || eventScheduler_->queryEvent(currentTimeLine,hashId) ) 364 364 { 365 if (!enableEventsProcessing && isCollectiveEvent(*event)) return ; 365 366 366 367 if (!eventScheduled_) … … 498 499 bool CContextServer::isCollectiveEvent(CEventServer& event) 499 500 { 500 if (event. classId==CField::GetType()) return CField::isCollectiveEvent(event);501 if (event.type>1000) return false ; 501 502 else return true ; 502 503 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.hpp
r2259 r2326 25 25 void getBufferFromClient(size_t timeLine) ; 26 26 void processRequest(int rank, char* buff,int count) ; 27 void processEvents( void) ;27 void processEvents(bool enableEventsProcessing) ; 28 28 bool hasFinished(void); 29 29 void dispatchEvent(CEventServer& event) ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.hpp
r2304 r2326 55 55 enum EEventId 56 56 { 57 EVENT_ID_COLLECTIVE=100, 57 58 EVENT_ID_AXIS_DISTRIBUTION, 58 EVENT_ID_SEND_DISTRIBUTED_ATTRIBUTE 59 EVENT_ID_SEND_DISTRIBUTED_ATTRIBUTE, 60 EVENT_ID_NO_COLLECTIVE=1000, 59 61 } ; 60 62 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp
r2325 r2326 1130 1130 for(auto field : fileOutField) field->evaluateBufferSize(fieldBufferEvaluation, CXios::isOptPerformance) ; // output to server 1131 1131 for(auto field : couplerOutField) field->evaluateBufferSize(fieldBufferEvaluation, CXios::isOptPerformance) ; // output to coupler 1132 for(auto field : fi eldModelIn) field->evaluateBufferSize(fieldBufferEvaluation, CXios::isOptPerformance) ; // server to client (for io servers)1132 for(auto field : fileInField) field->evaluateBufferSize(fieldBufferEvaluation, CXios::isOptPerformance) ; // server to client (for io servers) 1133 1133 1134 1134 // fix size for each context client -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp
r2274 r2326 53 53 enum EEventId 54 54 { 55 EVENT_ID_COLLECTIVE=100, 55 56 EVENT_ID_CLOSE_DEFINITION,EVENT_ID_UPDATE_CALENDAR, 56 57 EVENT_ID_CREATE_FILE_HEADER,EVENT_ID_CONTEXT_FINALIZE, … … 59 60 EVENT_ID_COUPLER_IN_CLOSE_DEFINITION, 60 61 EVENT_ID_COUPLER_IN_CONTEXT_FINALIZED, 62 EVENT_ID_NO_COLLECTIVE=1000, 61 63 }; 62 64 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/coupler_in.hpp
r1875 r2326 52 52 enum EEventId 53 53 { 54 NO_EVENT 54 EVENT_ID_COLLECTIVE=100, 55 NO_EVENT, 56 EVENT_ID_NO_COLLECTIVE=1000, 55 57 }; 56 58 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/coupler_out.hpp
r2002 r2326 47 47 enum EEventId 48 48 { 49 NO_EVENT 49 EVENT_ID_COLLECTIVE=100, 50 NO_EVENT, 51 EVENT_ID_NO_COLLECTIVE=1000, 50 52 }; 51 53 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.hpp
r2312 r2326 58 58 enum EEventId 59 59 { 60 EVENT_ID_DOMAIN_DISTRIBUTION, EVENT_ID_SEND_DISTRIBUTED_ATTRIBUTE 60 EVENT_ID_COLLECTIVE=100, 61 EVENT_ID_DOMAIN_DISTRIBUTION, EVENT_ID_SEND_DISTRIBUTED_ATTRIBUTE, 62 EVENT_ID_NO_COLLECTIVE=100, 61 63 } ; 62 64 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
r2315 r2326 558 558 { 559 559 CContextClient* client=nullptr ; 560 const size_t headerSize=100 ; 560 561 561 562 for(int i=0;i<2;i++) … … 569 570 map<int,size_t> bufferSize ; 570 571 571 if (evaluateBuffer.count(client)!=0)bufferSize = evaluateBuffer[client] ;572 bufferSize = evaluateBuffer[client] ; 572 573 if (isOptPerformance) 573 574 { 574 575 for(auto& it : dataSize) 575 576 { 576 if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second ;577 else bufferSize[it.first]+=it.second ;577 if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second+headerSize ; 578 else bufferSize[it.first]+=it.second+headerSize ; 578 579 } 579 580 } … … 582 583 for(auto& it : dataSize) 583 584 { 584 if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second;585 else bufferSize[it.first]=std::max(bufferSize[it.first],(size_t)it.second) ;585 if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second+headerSize ; 586 else bufferSize[it.first]=std::max(bufferSize[it.first],(size_t)(it.second+headerSize)) ; 586 587 } 587 588 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp
r2318 r2326 90 90 enum EEventId 91 91 { 92 EVENT_ID_COLLECTIVE=100, 92 93 EVENT_ID_UPDATE_DATA, EVENT_ID_READ_DATA, EVENT_ID_READ_DATA_READY, 93 EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_GRID_COMPLETED 94 EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_GRID_COMPLETED, 95 EVENT_ID_NO_COLLECTIVE=1000, 94 96 }; 95 97 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/file.hpp
r2002 r2326 52 52 enum EEventId 53 53 { 54 EVENT_ID_COLLECTIVE=100, 54 55 EVENT_ID_ADD_FIELD, EVENT_ID_ADD_FIELD_GROUP, EVENT_ID_ADD_VARIABLE, 55 EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_CREATE_ENABLED_FIELDS 56 EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_CREATE_ENABLED_FIELDS, 57 EVENT_ID_NO_COLLECTIVE=1000, 56 58 }; 57 59 -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
r2315 r2326 77 77 enum EEventId 78 78 { 79 EVENT_ID_COLLECTIVE=100, 79 80 EVENT_ID_ADD_DOMAIN, EVENT_ID_ADD_AXIS, EVENT_ID_ADD_SCALAR, 80 81 EVENT_ID_SEND_MASK, 82 EVENT_ID_NO_COLLECTIVE=1000, 81 83 82 84 }; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/scalar.hpp
r2304 r2326 52 52 enum EEventId 53 53 { 54 EVENT_ID_COLLECTIVE=100, 54 55 EVENT_ID_SCALAR_DISTRIBUTION, 55 56 EVENT_ID_SEND_DISTRIBUTED_ATTRIBUTE, 57 EVENT_ID_NO_COLLECTIVE=1000, 56 58 } ; 57 59 static bool dispatchEvent(CEventServer& event); -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/variable.hpp
r1784 r2326 39 39 enum EEventId 40 40 { 41 EVENT_ID_VARIABLE_VALUE 41 EVENT_ID_COLLECTIVE=100, 42 EVENT_ID_VARIABLE_VALUE, 43 EVENT_ID_NO_COLLECTIVE=1000, 42 44 }; 43 45
Note: See TracChangeset
for help on using the changeset viewer.