Ignore:
Timestamp:
01/26/16 18:18:58 (8 years ago)
Author:
mhnguyen
Message:

Fixing the bug in ticket 72

+) The distributed axis on client side send info to correct corresponding server
+) Improve serverdistributiondescription class to make it more flexible
+) Create new test_basic_2D only for test cases of 2-d grid

Test
+) On Curie
+) All tests pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/server_distribution_description.hpp

    r657 r815  
    33   \author Ha NGUYEN 
    44   \since 04 Jan 2015 
    5    \date 24 Jul 2015 
     5   \date 11 Jan 2016 
    66 
    77   \brief Description of index distribution on server(s). 
     
    3030 
    3131    /** Default constructor */ 
    32     CServerDistributionDescription(const std::vector<int>& globalDimensionSize); 
     32    CServerDistributionDescription(const std::vector<int>& globalDimensionSize, 
     33                                   int nServer, 
     34                                   ServerDistributionType serType=BAND_DISTRIBUTION); 
     35 
    3336    /** Default destructor */ 
    3437    virtual ~CServerDistributionDescription(); 
    3538 
    36     void computeServerDistribution(int nServer, int positionDimensionDistributed = 1, 
    37                                    bool doComputeGlobalIndex = false, 
    38                                    ServerDistributionType type = BAND_DISTRIBUTION); 
    39  
    40     void computeServerGlobalIndexInRange(int nServer, 
    41                                          const std::pair<size_t, size_t>& indexBeginEnd, 
    42                                          int positionDimensionDistributed = 1, 
    43                                          ServerDistributionType = BAND_DISTRIBUTION); 
     39    void computeServerDistribution(bool doComputeGlobalIndex = false, int positionDimensionDistributed = 1); 
     40    void computeServerGlobalIndexInRange(const std::pair<size_t, size_t>& indexBeginEnd, int positionDimensionDistributed = 1); 
    4441 
    4542    std::vector<std::vector<int> > getServerIndexBegin() const; 
     
    4744    const std::vector<CArray<size_t,1> >& getGlobalIndex() const; 
    4845    const boost::unordered_map<size_t,int>& getGlobalIndexRange() const; 
     46    int getDimensionDistributed(); 
    4947 
    5048  protected: 
     
    6260    //!< In case we need only global index of one server with specific rank 
    6361    boost::unordered_map<size_t,int> globalIndex_; 
     62 
     63    //!< Type of distribution on server side 
     64    ServerDistributionType serverType_; 
     65 
     66    //!< Number of server 
     67    int nServer_; 
     68 
     69    //!< Position of dimension distributed on server side (by default, the second dimension) 
     70    int positionDimensionDistributed_; 
    6471}; 
    6572 
Note: See TracChangeset for help on using the changeset viewer.