Changeset 1025 for XIOS/dev/dev_olga/src/node/domain.hpp
- Timestamp:
- 01/11/17 15:14:22 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/node/domain.hpp
r987 r1025 16 16 #include "transformation.hpp" 17 17 #include "transformation_enum.hpp" 18 18 #include "server_distribution_description.hpp" 19 19 #include "mesh.hpp" 20 20 … … 49 49 enum EEventId 50 50 { 51 EVENT_ID_SERVER_ATTRIBUT, EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT, EVENT_ID_AREA 51 EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT, 52 EVENT_ID_AREA, EVENT_ID_MASK, 53 EVENT_ID_DATA_INDEX, EVENT_ID_SERVER_ATTRIBUT 52 54 } ; 53 55 … … 75 77 /// Vérifications /// 76 78 void checkAttributes(void); 77 78 79 void checkAttributesOnClient(); 79 80 void checkAttributesOnClientAfterTransformation(); 80 81 81 void checkEligibilityForCompressedOutput(void); 82 82 … … 100 100 int getOffsetWrittenIndexes() const; 101 101 102 const std::vector<int>& getStartWriteIndex() const; 103 const std::vector<int>& getCountWriteIndex() const; 104 const std::vector<int>& getLocalWriteSize() const; 105 const std::vector<int>& getGlobalWriteSize() const; 106 102 107 std::map<int, StdSize> getAttributesBufferSize(); 103 108 104 109 bool isEmpty(void) const; 105 110 bool isDistributed(void) const; 106 bool isCompressible(void) const; 107 108 int ni_srv,ibegin_srv,iend_srv ; 109 int zoom_ni_srv,zoom_ibegin_srv,zoom_iend_srv ; 110 111 int nj_srv,jbegin_srv,jend_srv ; 112 int zoom_nj_srv,zoom_jbegin_srv,zoom_jend_srv ; 113 114 CArray<double, 1> lonvalue_srv, latvalue_srv ; 115 CArray<double, 2> bounds_lon_srv, bounds_lat_srv ; 116 CArray<double, 1> lonvalue_client, latvalue_client; 117 CArray<double, 2> bounds_lon_client, bounds_lat_client; 118 CArray<double, 1> area_srv; 119 120 vector<int> connectedServer ; // list of connected server 121 vector<int> nbSenders ; // for each communication with a server, number of communicating client 122 vector<int> nbDataSrv ; // size of data to send to each server 123 vector< vector<int> > i_indSrv ; // for each server, i global index to send 124 vector< vector<int> > j_indSrv ; // for each server, j global index to send 111 bool isCompressible(void) const; 112 113 CArray<double, 1> lonvalue, latvalue; 114 CArray<double, 2> bounds_lonvalue, bounds_latvalue; 115 CArray<double, 1> areavalue; 116 117 vector<int> connectedServer ; // list of connected server 118 vector<int> nbSenders ; // for each communication with a server, number of communicating client 119 vector<int> nbDataSrv ; // size of data to send to each server 120 vector< vector<int> > i_indSrv ; // for each server, i global index to send 121 vector< vector<int> > j_indSrv ; // for each server, j global index to send 125 122 126 123 public: … … 128 125 void addRelFile(const StdString & filename); 129 126 void addRelFileCompressed(const StdString& filename); 130 void completeLonLatClient(void); 131 void sendServerAttribut(void) ; 132 void sendLonLatArea(void); 133 void computeConnectedServer(void) ; 127 void completeLonLatClient(void); 128 void computeConnectedClients(); 134 129 135 130 void AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat, … … 141 136 142 137 static bool dispatchEvent(CEventServer& event); 143 static void recv ServerAttribut(CEventServer& event);138 static void recvDistributionAttributes(CEventServer& event); 144 139 static void recvIndex(CEventServer& event); 140 static void recvMask(CEventServer& event); 141 static void recvZoom(CEventServer& event); 145 142 static void recvLon(CEventServer& event); 146 143 static void recvLat(CEventServer& event); 147 144 static void recvArea(CEventServer& event); 148 void recvServerAttribut(CBufferIn& buffer); 149 void recvIndex(int rank, CBufferIn& buffer); 150 void recvLon(int rank, CBufferIn& buffer); 151 void recvLat(int rank, CBufferIn& buffer); 152 void recvArea(int rank, CBufferIn& buffer); 145 static void recvDataIndex(CEventServer& event); 146 void recvDistributionAttributes(CBufferIn& buffer); 147 void recvZoom(std::vector<int>& rank, std::vector<CBufferIn*>& buffers); 148 void recvIndex(std::map<int, CBufferIn*>& rankBuffers); 149 void recvMask(std::map<int, CBufferIn*>& rankBuffers); 150 void recvLon(std::map<int, CBufferIn*>& rankBuffers); 151 void recvLat(std::map<int, CBufferIn*>& rankBuffers); 152 void recvArea(std::map<int, CBufferIn*>& rankBuffers); 153 void recvDataIndex(std::map<int, CBufferIn*>& rankBuffers); 153 154 154 155 /// Destructeur /// … … 160 161 161 162 static ENodeType GetType(void); 162 const std::map<int, vector<size_t> >& getIndexServer() const;163 const boost::unordered_map<int, vector<size_t> >& getIndexServer() const; 163 164 CArray<bool, 1> localMask; 164 165 bool isCurvilinear ; … … 183 184 void computeLocalMask(void) ; 184 185 185 void checkTransformations(); 186 void setTransformations(const TransMapTypes&); 187 void computeNGlobDomain(); 188 186 void setTransformations(const TransMapTypes&); 187 188 void sendAttributes(); 189 189 void sendIndex(); 190 void sendDistributionAttributes(); 191 void sendMask(); 190 192 void sendArea(); 191 193 void sendLonLat(); 192 193 private: 194 void sendZoom(); 195 void sendDataIndex(); 196 197 private: 198 std::vector<int> start_write_index_; 199 std::vector<int> count_write_index_; 200 std::vector<int> local_write_size_; 201 std::vector<int> global_write_size_; 202 194 203 bool isChecked; 195 204 std::set<StdString> relFiles, relFilesCompressed; 196 205 bool isClientChecked; // Verify whether all attributes of domain on the client side are good 197 206 bool isClientAfterTransformationChecked; 198 std::map<int, CArray<int,1> > indiSrv, indjSrv; 199 std::map<int,int> nbConnectedClients_; // Mapping of number of communicating client to a server 200 std::map<int, vector<size_t> > indSrv_; // Global index of each client sent to server 207 std::map<int, CArray<int,1> > indiSrv, indjSrv, indGlob_; 208 std::map<int,int> nbConnectedClients_, nbConnectedClientsZoom_; // Mapping of number of communicating client to a server 209 210 boost::unordered_map<int, vector<size_t> > indSrv_; // Global index of each client sent to server 211 boost::unordered_map<int, vector<size_t> > indZoomSrv_; // Global index of each client sent to server 201 212 std::map<int, vector<int> > indWrittenSrv_; // Global written index of each client sent to server 202 213 std::vector<int> indexesToWrite; 214 std::vector<int> recvClientRanks_; 203 215 int numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; 204 216 std::vector<int> connectedServerRank_; … … 207 219 bool isCompressible_; 208 220 bool isRedistributed_; 209 TransMapTypes transformationMap_; 210 std::vector<int> nGlobDomain_; 221 TransMapTypes transformationMap_; 211 222 bool isUnstructed_; 223 boost::unordered_map<size_t,size_t> globalLocalIndexMap_; 212 224 213 225 private:
Note: See TracChangeset
for help on using the changeset viewer.