Ignore:
Timestamp:
05/26/15 16:13:47 (9 years ago)
Author:
rlacroix
Message:

Add basic infrastructure for servers to clients communication.

File:
1 edited

Legend:

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

    r549 r597  
    5252  } 
    5353 
     54  bool CContextServer::hasFinished(void) 
     55  { 
     56    return finished; 
     57  } 
     58 
    5459  bool CContextServer::eventLoop(void) 
    5560  { 
     
    7984        { 
    8085          it=buffers.find(rank); 
    81           if (it==buffers.end()) 
     86          if (it==buffers.end()) // Receive the buffer size and allocate the buffer 
    8287          { 
    8388            StdSize buffSize = 0; 
     
    169174      if (event->isFull()) 
    170175      { 
    171         if (!scheduled && !CXios::isServer) 
     176        if (!scheduled && CServer::eventScheduler) // Skip event scheduling for attached mode and reception on client side 
    172177        { 
    173178          CServer::eventScheduler->registerEvent(currentTimeLine,hashId); 
    174179          scheduled=true; 
    175180        } 
    176         else if (CXios::isServer || CServer::eventScheduler->queryEvent(currentTimeLine,hashId) ) 
     181        else if (!CServer::eventScheduler || CServer::eventScheduler->queryEvent(currentTimeLine,hashId) ) 
    177182        { 
    178183         CTimer::get("Process events").resume(); 
     
    207212    if (event.classId==CContext::GetType() && event.type==CContext::EVENT_ID_CONTEXT_FINALIZE) 
    208213    { 
     214      finished=true; 
    209215      info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl; 
    210216      std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(), 
     
    218224      } 
    219225      context->finalize(); 
    220       finished=true; 
    221226      report(0)<< " Memory report : Context <"<<context->getId()<<"> : server side : total memory used for buffer "<<totalBuf<<" bytes"<<endl; 
    222227    } 
Note: See TracChangeset for help on using the changeset viewer.