Changeset 1294 for XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.hpp
- Timestamp:
- 10/06/17 13:41:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.hpp
r1263 r1294 161 161 void sendIndex(void); 162 162 void sendIndexScalarGrid(); 163 164 void setContextClient(CContextClient* contextClient); 163 165 164 166 void computeDomConServer(); … … 215 217 map<int, CArray<int, 1> > storeIndex_fromSrv; // Support, for now, reading with level-1 server 216 218 217 218 map<int, CArray<size_t, 1> > outIndexFromClient, compressedOutIndexFromClient, outGlobalIndexFromClient; 219 220 // A client receives global index from other clients (via recvIndex) 221 // then does mapping these index into local index of STORE_CLIENTINDEX 222 // In this way, store_clientIndex can be used as an input of a source filter 223 // Maybe we need a flag to determine whether a client wants to write. TODO 219 map<int, CArray<size_t, 1> > outIndexFromClient; // Deprecated 220 221 map<int, CArray<size_t, 1> > compressedOutIndexFromClient; 222 223 /** Map storing received indexes. Key = sender rank, value = index array. */ 224 map<int, CArray<size_t, 1> > outGlobalIndexFromClient; 225 226 // Manh Ha's comment: " A client receives global index from other clients (via recvIndex) 227 // then does mapping these index into local index of STORE_CLIENTINDEX 228 // In this way, store_clientIndex can be used as an input of a source filter 229 // Maybe we need a flag to determine whether a client wants to write. TODO " 230 231 /** Map storing received data. Key = sender rank, value = data array. 232 * The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData() */ 224 233 map<int, CArray<size_t, 1> > outLocalIndexStoreOnClient; 225 234 226 /** Indexes calculated based on server distribution (serverDistribution_). They are used for writing data into a file. */ 235 /** Indexes calculated based on server-like distribution. 236 * They are used for writing/reading data and only calculated for server level that does the writing/reading. 237 * Along with localIndexToWriteOnClient, these indexes are used to correctly place incoming data. */ 227 238 CArray<size_t,1> localIndexToWriteOnServer; 228 239 229 /** Indexes calculated based on client distribution (clientDistribution_). They are not used at all. 230 They should be the same as localIndexToWriteOnServer and potentially can be used as an additional check.*/ 240 /** Indexes calculated based on client-like distribution. 241 * They are used for writing/reading data and only calculated for server level that does the writing/reading. 242 * Along with localIndexToWriteOnServer, these indexes are used to correctly place incoming data. */ 231 243 CArray<size_t,1> localIndexToWriteOnClient; 232 244 233 245 CArray<size_t,1> indexFromClients; 246 234 247 void checkMask(void); 235 248 void createMask(void); … … 289 302 290 303 private: 291 bool isChecked; 292 bool isDomainAxisChecked; 293 bool isIndexSent; 304 305 /** Clients that have to send a grid. There can be multiple clients in case of secondary server, otherwise only one client. */ 306 std::set<CContextClient*> clients; 307 308 bool isChecked; 309 bool isDomainAxisChecked; 310 bool isIndexSent; 294 311 295 312 CDomainGroup* vDomainGroup_; … … 299 316 bool isAxisListSet, isDomListSet, isScalarListSet; 300 317 301 /** Distribution calculated in computeClientIndex()based on the knowledge of the entire grid */318 /** Client-like distribution calculated based on the knowledge of the entire grid */ 302 319 CDistributionClient* clientDistribution_; 303 320 304 /** Distribution calculated upon receiving indexes */321 /** Server-like distribution calculated upon receiving indexes */ 305 322 CDistributionServer* serverDistribution_; 306 323 … … 345 362 void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const 346 363 { 364 //#ifdef __XIOS_DEBUG 347 365 if (this->getDataSize() != field.numElements()) 348 366 ERROR("void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const", … … 351 369 << "The data array does not have the right size! " 352 370 << "Grid = " << this->GetName()) 371 //#endif 353 372 this->storeField_arr(field.dataFirst(), stored); 354 373 } … … 357 376 void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const 358 377 { 378 //#ifdef __XIOS_DEBUG 359 379 if (this->getDataSize() != field.numElements()) 360 380 ERROR("void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const", … … 363 383 << "The ouput array does not have the right size! " 364 384 << "Grid = " << this->GetName()) 385 //#endif 365 386 this->restoreField_arr(stored, field.dataFirst()); 366 387 }
Note: See TracChangeset
for help on using the changeset viewer.