Changeset 1377
- Timestamp:
- 12/13/17 16:06:32 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/context_client.cpp
r1232 r1377 96 96 list<int> ranks = event.getRanks(); 97 97 98 if (CXios::checkEventSync) 99 { 100 int typeId, classId, typeId_in, classId_in, timeLine_out; 101 typeId_in=event.getTypeId() ; 102 classId_in=event.getClassId() ; 103 MPI_Allreduce(&timeLine,&timeLine_out, 1, MPI_UINT64_T, MPI_SUM, intraComm) ; 104 MPI_Allreduce(&typeId_in,&typeId, 1, MPI_INT, MPI_SUM, intraComm) ; 105 MPI_Allreduce(&classId_in,&classId, 1, MPI_INT, MPI_SUM, intraComm) ; 106 if (typeId/clientSize!=event.getTypeId() || classId/clientSize!=event.getClassId() || timeLine_out/clientSize!=timeLine) 107 { 108 ERROR("void CContextClient::sendEvent(CEventClient& event)", 109 << "Event are not coherent between client."); 110 } 111 } 112 98 113 if (!event.isEmpty()) 99 114 { … … 124 139 for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++) 125 140 tmpBufferedEvent.buffers.push_back(new CBufferOut(*it)); 126 141 info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 127 142 event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers); 128 143 } … … 151 166 (*itBuffer)->put((char*)(*it)->start(), (*it)->count()); 152 167 168 info(100)<<"DEBUG : temporaly event sent "<<endl ; 153 169 checkBuffers(tmpBufferedEvent.ranks); 154 170 … … 230 246 for (int i = 0; i < context->serverPrimServer.size(); ++i) 231 247 context->serverPrimServer[i]->listen(); 248 // CServer::contextEventLoop(false) ; // avoid dead-lock at finalize... 232 249 } 233 250 … … 406 423 const std::list<int>& ranks = getRanksServerLeader(); 407 424 for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 425 { 426 info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 408 427 event.push(*itRank, 1, msg); 428 } 409 429 sendEvent(event); 410 430 } -
XIOS/dev/XIOS_DEV_CMIP6/src/cxios.cpp
r1376 r1377 37 37 CRegistry* CXios::globalRegistry = 0; 38 38 double CXios::recvFieldTimeout = 300.0; 39 bool CXios::checkEventSync=false ; 39 40 40 41 //! Parse configuration file and create some objects from it … … 77 78 if (recvFieldTimeout < 0.0) 78 79 ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative."); 80 81 checkEventSync = getin<bool>("check_event_sync", checkEventSync); 79 82 80 83 globalComm=MPI_COMM_WORLD ; -
XIOS/dev/XIOS_DEV_CMIP6/src/cxios.hpp
r1243 r1377 52 52 static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 53 53 static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field 54 static bool checkEventSync; //!< For debuuging, check if event are coherent and synchrone on client side 54 55 55 56 public: -
XIOS/dev/XIOS_DEV_CMIP6/src/event_client.cpp
r814 r1377 5 5 #include "type.hpp" 6 6 #include "mpi.hpp" 7 #include "cxios.hpp" 7 8 8 9 namespace xios … … 49 50 std::list<CMessage*>::iterator itMsg = messages.begin(); 50 51 52 if (CXios::checkEventSync) info(100)<<"Send event "<<timeLine<<" classId : "<<classId<<" typeId : "<<typeId<<endl ; 51 53 for (; itBuff != buffers.end(); ++itBuff, ++itSizes, ++itSenders, ++itMsg) 52 54 { -
XIOS/dev/XIOS_DEV_CMIP6/src/event_client.hpp
r731 r1377 21 21 std::list<int> getRanks(void); 22 22 std::list<int> getSizes(void); 23 23 int getClassId(void) { return classId; } 24 int getTypeId(void) { return typeId; } 25 24 26 private: 25 27 int classId; -
XIOS/dev/XIOS_DEV_CMIP6/src/server.cpp
r1352 r1377 734 734 } 735 735 736 void CServer::contextEventLoop( void)736 void CServer::contextEventLoop(bool enableEventsProcessing /*= true*/) 737 737 { 738 738 bool isFinalized ; … … 748 748 } 749 749 else 750 it->second->checkBuffersAndListen( );750 it->second->checkBuffersAndListen(enableEventsProcessing); 751 751 } 752 752 }
Note: See TracChangeset
for help on using the changeset viewer.