Changeset 489 for XIOS/trunk/src/context_server.cpp
- Timestamp:
- 09/22/14 14:17:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/context_server.cpp
r401 r489 38 38 pendingEvent=true ; 39 39 } 40 40 41 41 bool CContextServer::hasPendingEvent(void) 42 42 { 43 43 return pendingEvent ; 44 44 } 45 45 46 46 bool CContextServer::eventLoop(void) 47 47 { … … 58 58 int count ; 59 59 char * addr ; 60 MPI_Status status; 60 MPI_Status status; 61 61 map<int,CServerBuffer*>::iterator it; 62 62 63 63 for(rank=0;rank<commSize;rank++) 64 64 { … … 66 66 { 67 67 traceOff() ; 68 MPI_Iprobe(rank,20,interComm,&flag,&status); 68 MPI_Iprobe(rank,20,interComm,&flag,&status); 69 69 traceOn() ; 70 70 if (flag==true) 71 71 { 72 72 it=buffers.find(rank) ; 73 if (it==buffers.end()) 73 if (it==buffers.end()) 74 74 it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer))).first ; 75 75 MPI_Get_count(&status,MPI_CHAR,&count) ; … … 84 84 } 85 85 } 86 86 87 87 void CContextServer::checkPendingRequest(void) 88 88 { … … 94 94 int count ; 95 95 MPI_Status status ; 96 96 97 97 for(it=pendingRequest.begin();it!=pendingRequest.end();it++) 98 98 { … … 108 108 } 109 109 } 110 111 for(itRecv=recvRequest.begin();itRecv!=recvRequest.end();itRecv++) 110 111 for(itRecv=recvRequest.begin();itRecv!=recvRequest.end();itRecv++) 112 112 { 113 113 pendingRequest.erase(*itRecv) ; … … 115 115 } 116 116 } 117 117 118 118 void CContextServer::processRequest(int rank, char* buff,int count) 119 119 { 120 120 121 121 CBufferIn buffer(buff,count) ; 122 122 char* startBuffer,endBuffer ; … … 124 124 size_t timeLine ; 125 125 map<size_t,CEventServer*>::iterator it ; 126 126 127 127 while(count>0) 128 128 { … … 136 136 137 137 buffer.advance(size) ; 138 count=buffer.remain() ; 139 } 140 141 } 142 138 count=buffer.remain() ; 139 } 140 141 } 142 143 143 void CContextServer::processEvents(void) 144 144 { 145 145 map<size_t,CEventServer*>::iterator it ; 146 146 CEventServer* event ; 147 147 148 148 it=events.find(currentTimeLine) ; 149 if (it!=events.end()) 149 if (it!=events.end()) 150 150 { 151 151 event=it->second ; … … 162 162 } 163 163 } 164 164 165 165 CContextServer::~CContextServer() 166 166 { 167 167 map<int,CServerBuffer*>::iterator it ; 168 for(it=buffers.begin();it!=buffers.end();++it) delete it->second ; 169 } 168 for(it=buffers.begin();it!=buffers.end();++it) delete it->second ; 169 } 170 170 171 171 … … 178 178 list<CEventServer::SSubEvent>::iterator it ; 179 179 CContext::setCurrent(context->getId()) ; 180 180 181 181 if (event.classId==CContext::GetType() && event.type==CContext::EVENT_ID_CONTEXT_FINALIZE) 182 182 { … … 198 198 else if (event.classId==CFile::GetType()) CFile::dispatchEvent(event) ; 199 199 else if (event.classId==CFileGroup::GetType()) CFileGroup::dispatchEvent(event) ; 200 else if (event.classId==CVariable::GetType()) CVariable::dispatchEvent(event) ; 200 201 else 201 202 {
Note: See TracChangeset
for help on using the changeset viewer.