Changeset 1340


Ignore:
Timestamp:
11/21/17 14:08:25 (7 years ago)
Author:
ymipsl
Message:

Reduce the memory footprint on server level2.

YM

Location:
XIOS/dev/XIOS_DEV_CMIP6/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/distribution_client.cpp

    r1311 r1340  
    3030CDistributionClient::~CDistributionClient() 
    3131{ /* Nothing to do */ } 
     32 
     33void CDistributionClient::partialClear() 
     34{ 
     35  GlobalLocalMap void1 ; 
     36  GlobalLocalMap void2 ; 
     37  std::vector<int> void3 ; 
     38  std::vector<int> void4 ; 
     39 
     40  globalLocalDataSendToServerMap_.swap(void1) ; 
     41  globalDataIndex_.swap(void2) ; 
     42  localDataIndex_.swap(void3); 
     43  localMaskIndex_.swap(void4) ; 
     44} 
    3245 
    3346/*! 
  • XIOS/dev/XIOS_DEV_CMIP6/src/distribution_client.hpp

    r1250 r1340  
    5656                                     const int& dataDim, const int& ni, int& j); 
    5757    static int getAxisIndex(const int& dataIndex, const int& dataBegin, const int& ni); 
     58 
     59    void partialClear(void) ;  //! clear heavy sized attibutes 
    5860 
    5961  protected: 
  • XIOS/dev/XIOS_DEV_CMIP6/src/distribution_server.cpp

    r1202 r1340  
    229229  return nZoomSize_; 
    230230} 
     231 
     232void CDistributionServer::partialClear(void) 
     233{ 
     234  GlobalLocalMap void1 ; 
     235  globalLocalIndexMap_.swap(void1) ; 
     236} 
     237   
    231238} // namespace xios 
  • XIOS/dev/XIOS_DEV_CMIP6/src/distribution_server.hpp

    r1202 r1340  
    5050    virtual void computeLocalIndex(CArray<size_t,1>& globalIndex); 
    5151    virtual void computeGlobalIndex(CArray<int,1>& indexes) const; 
     52    virtual void partialClear(void); //! clear heavy sized attibutes 
    5253 
    5354  protected: 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp

    r1330 r1340  
    237237 
    238238    this->setData(recv_data_tmp); 
     239    // delete incomming flux for server only 
     240    recvFoperationSrv.reset() ; 
     241    recvDataSrv.reset() ; 
    239242  } 
    240243 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp

    r1330 r1340  
    1818#include "grid_transformation.hpp" 
    1919#include "grid_generate.hpp" 
     20#include "server.hpp" 
    2021 
    2122namespace xios { 
     
    826827         computeConnectedClients(); 
    827828       } 
     829     } 
     830     if (CServer::serverLevel==2) 
     831     { 
     832       computeWrittenIndex() ; 
     833       if (serverDistribution_!=0) serverDistribution_->partialClear() ; 
     834       if (clientDistribution_!=0) clientDistribution_->partialClear() ; 
     835       outGlobalIndexFromClient.clear() ; 
    828836     } 
    829837   } 
     
    12501258   } 
    12511259 
     1260 
    12521261  void CGrid::computeClientIndexScalarGrid() 
    12531262  { 
Note: See TracChangeset for help on using the changeset viewer.