- Timestamp:
- 08/08/17 20:21:43 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src/node
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp
r1237 r1239 558 558 sendEnabledFieldsInFiles(this->enabledReadModeFiles); 559 559 560 // We have all info of domain, axis and scalar, so send them 560 // Then, check whether we have domain_ref, axis_ref or scalar_ref attached to the enabled fields 561 // If any, so send them to server 561 562 sendRefDomainsAxisScalars(this->enabledWriteModeFiles); 562 563 if (!hasServer) 563 564 sendRefDomainsAxisScalars(this->enabledReadModeFiles); 564 565 565 // After that, send all grid (if any)566 // Check whether enabled fields have grid_ref, if any, send this info to server 566 567 sendRefGrid(this->enabledFiles); 567 568 // This code may be useful in the future when we want to seperate completely read and write … … 569 570 // if (!hasServer) 570 571 // sendRefGrid(this->enabledReadModeFiles); 572 573 // A grid of enabled fields composed of several components which must be checked then their 574 // checked attributes should be sent to server 575 sendGridComponentEnabledFieldsInFiles(this->enabledFiles); // This code can be seperated in two (one for reading, another for writing) 571 576 572 577 // We have a xml tree on the server side and now, it should be also processed 573 578 sendPostProcessing(); 574 579 575 sendGridEnabledFieldsInFiles(this->enabledWriteModeFiles); 576 if (!hasServer) 580 // Finally, we send information of grid itself to server 581 sendGridEnabledFieldsInFiles(this->enabledWriteModeFiles); 582 if (!hasServer) 577 583 sendGridEnabledFieldsInFiles(this->enabledReadModeFiles); 578 584 } … … 669 675 for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 670 676 (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode(); 677 } 678 679 void CContext::sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 680 { 681 int size = activeFiles.size(); 682 for (int i = 0; i < size; ++i) 683 { 684 activeFiles[i]->sendGridComponentOfEnabledFields(); 685 } 671 686 } 672 687 -
XIOS/dev/XIOS_DEV_CMIP6/src/node/context.hpp
r1232 r1239 131 131 void checkGridEnabledFields(); 132 132 void checkGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles); 133 void sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles); 133 void sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles); 134 void sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) ; 134 135 135 136 // std::map<int, StdSize> getAttributesBufferSize(std::map<int, StdSize>& maxEventSize); -
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp
r1236 r1239 376 376 break; 377 377 case RF_NODATA: 378 msg << int(-2) ;378 msg << int(-2) << recvDataSrv; 379 379 break; 380 380 case RF_EOF: … … 797 797 } 798 798 799 void CField::sendGridComponentOfEnabledFields() 800 { 801 solveGridDomainAxisRef(true); 802 // solveCheckMaskIndex(true); 803 } 804 799 805 void CField::sendGridOfEnabledFields() 800 806 { 801 solveGridDomainAxisRef(true);807 // solveGridDomainAxisRef(true); 802 808 solveCheckMaskIndex(true); 803 } 804 805 806 void CField::solveOnlyReferenceEnabledField(bool doSending2Server) 809 } 810 811 void CField::solveOnlyReferenceEnabledField(bool doSending2Server) 807 812 { 808 813 CContext* context = CContext::getCurrent(); -
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.hpp
r1236 r1239 130 130 void checkGridOfEnabledFields(); 131 131 void sendGridOfEnabledFields(); 132 void sendGridComponentOfEnabledFields(); 132 133 133 134 void buildFilterGraph(CGarbageCollector& gc, bool enableOutput); -
XIOS/dev/XIOS_DEV_CMIP6/src/node/file.cpp
r1234 r1239 327 327 // Done by classical server or secondary server 328 328 // TODO: This condition should be changed soon. It only works with maximum number of level as 2 329 if (CServer::serverLevel == 0 || CServer::serverLevel == 2)329 if (CServer::serverLevel == 0 || CServer::serverLevel == 1) 330 330 { 331 331 if (!mode.isEmpty() && mode.getValue() == mode_attr::read) … … 795 795 } 796 796 797 void CFile::sendGridComponentOfEnabledFields() 798 { 799 int size = this->enabledFields.size(); 800 for (int i = 0; i < size; ++i) 801 { 802 this->enabledFields[i]->sendGridComponentOfEnabledFields(); 803 } 804 } 805 797 806 void CFile::sendGridOfEnabledFields() 798 807 { -
XIOS/dev/XIOS_DEV_CMIP6/src/node/file.hpp
r1232 r1239 116 116 void checkGridOfEnabledFields(); 117 117 void sendGridOfEnabledFields(); 118 void sendGridComponentOfEnabledFields(); 118 119 119 120 // Add component into file -
XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp
r1238 r1239 1541 1541 { 1542 1542 CContextServer* server = (!context->hasClient) ? context->server : context->serverPrimServer[p]; 1543 CContextClient* client = (!context->hasClient) ? context->client : context->clientPrimServer[p];1543 CContextClient* client = context->client; //(!context->hasClient) ? context->client : context->clientPrimServer[p]; 1544 1544 1545 1545 int idx = 0, numElement = axis_domain_order.numElements();
Note: See TracChangeset
for help on using the changeset viewer.