Changeset 829 for XIOS/trunk/src/client_server_mapping_distributed.hpp
- Timestamp:
- 03/23/16 16:11:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/client_server_mapping_distributed.hpp
r759 r829 42 42 virtual ~CClientServerMappingDistributed(); 43 43 44 45 46 44 protected: 47 // Redistribute global index and server index among clients48 void computeDistributedServerIndex(const boost::unordered_map<size_t,int>& globalIndexOfServer,49 const MPI_Comm& clientIntraComm);50 51 // Send server index to clients52 void sendIndexServerToClients(int clientDestRank, std::vector<int>& indexServer,53 const MPI_Comm& clientIntraComm, std::list<MPI_Request>& requestSendIndexServer);54 55 // Send global index to clients56 void sendIndexGlobalToClients(int clientDestRank, std::vector<size_t>& indexGlobal,57 const MPI_Comm& clientIntraComm, std::list<MPI_Request>& requestSendIndexGlobal);58 59 // Verify sending request60 void testSendRequest(std::list<MPI_Request>& sendRequest);61 62 // Process request63 void processReceivedRequest(unsigned long* buffIndexGlobal, int* buffIndexServer, int count);64 65 // Probe and receive message of global index66 void probeIndexGlobalMessageFromClients(unsigned long* recvIndexGlobalBuff, int recvNbIndexCount);67 68 // Probe and receive message of server index69 void probeIndexServerMessageFromClients(int* recvIndexServerBuff, int recvNbIndexCount);70 71 // Compute range of hashing72 void computeHashIndex();73 74 // Compute size of receiving buffer for global index75 int computeBuffCountIndexGlobal(MPI_Request& requestRecv);76 77 // Compute size of receiving buffer for server index78 int computeBuffCountIndexServer(MPI_Request& requestRecv);79 80 // Reset request map81 void resetReceivingRequestAndCount();82 83 protected:84 //! Mapping of global index to the corresponding server85 boost::unordered_map<size_t,int> globalIndexToServerMapping_;86 87 //! Bounds of hash index88 std::vector<size_t> indexClientHash_;89 90 //! Number of client91 int nbClient_;92 93 //! Rank of client94 int clientRank_;95 96 //! Counting of buffer for receiving global index97 int countIndexGlobal_;98 99 //! Counting of buffer for receiving server index100 int countIndexServer_;101 102 //! intracommuntion of clients103 MPI_Comm clientIntraComm_;104 105 //! Request returned by MPI_IRecv function about global index106 std::map<int, MPI_Request> requestRecvIndexGlobal_;107 108 //! Request returned by MPI_IRecv function about index of server109 std::map<int, MPI_Request> requestRecvIndexServer_;110 111 //! Mapping client rank and the beginning position of receiving buffer for message of global index from this client112 std::map<int, unsigned long*> indexGlobalBuffBegin_;113 114 //! Mapping client rank and the begining position of receiving buffer for message of server index from this client115 std::map<int, int*> indexServerBuffBegin_;116 117 //! Flag to specify whether data is distributed or not118 bool isDataDistributed_;119 120 // CClientClientDHTTemplate<int>* ccDHT_;121 45 CClientClientDHTInt* ccDHT_; 122 46 };
Note: See TracChangeset
for help on using the changeset viewer.