Ignore:
Timestamp:
03/10/15 10:49:13 (9 years ago)
Author:
mhnguyen
Message:

Correct some bugs on discovering server index and do some code cleanings

+) Add some checking functions to make sure mpi_isend and mpi_irecv work correctly
+) Add comments to code
+) Remove some redundant code and comments

Test
+) On Curie
+) The new functions are tested in test_new_features.f90. Test_client and test_complete work like before
+) Test cases:

  • 3 dimension grid with: 1 domain, 1 axis
  • 3 dimension grid with: 3 axis
  • Attached and connected

+) All pass and results are correct

TODO:
+) Fix zoom bug with grid composed of only one axis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/client_server_mapping.cpp

    r568 r569  
    33   \author Ha NGUYEN 
    44   \since 04 Feb 2015 
    5    \date 06 Feb 2015 
     5   \date 09 Mars 2015 
    66 
    77   \brief Mapping between index client and server. 
     
    2020} 
    2121 
    22 void CClientServerMapping::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
    23                                                      const CArray<int,1>& localIndexOnClient) 
    24 { 
    25 //  defaultComputeServerIndexMapping(globalIndexOnClient, globalIndexServer); 
    26 } 
    27  
    28  
     22/*! 
     23  Compute mapping global index of server which client sends to. 
     24  \param [in] globalIndexOnClient global index on client 
     25  \param [in] globalIndexServer global index of servers 
     26*/ 
    2927void CClientServerMapping::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
    3028                                                     const std::vector<CArray<size_t,1>* >& globalIndexServer) 
     
    3331} 
    3432 
    35 //void CClientServerMapping::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
    36 //                                                     const CArray<int,1>& localIndexOnClient, 
    37 //                                                     const std::vector<CArray<size_t,1>* >& globalIndexOfServer) 
    38 //{ 
    39 //  defaultComputeServerIndexMapping(globalIndexOnClient, globalIndexOfServer, &localIndexOnClient); 
    40 //} 
    41  
    4233/*! 
    4334   Compute index of data which are sent to server and index global on server side 
    4435   \param [in] globalIndexOnClient global index of data on client 
    4536   \param [in] globalIndexServer global index of server(s) 
     37   \param [in] localIndexOnClient local index of data on client which are sent to server 
    4638*/ 
    4739void CClientServerMapping::defaultComputeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
     
    129121  for(int n=0;n<recvSize;n++) clientRes[recvBuff[n]]++ ; 
    130122 
    131 //  std::map<int,int> nbSenders; 
    132123  for(int n=0;n<nbConnectedServer;n++) 
    133124  { 
Note: See TracChangeset for help on using the changeset viewer.