Ignore:
Timestamp:
11/13/14 15:09:28 (9 years ago)
Author:
mhnguyen
Message:

Seperating database of context on "client" side and "server" side

+) Add one more context in contex client in case of attached mode
+) Do some minor changements to make sure everything fine in case of attached mode
+) Replace buffer group with the new options

Test
+) On Curie
+) Connection mode: Attached and seperated
+) File mode: one and multiple
+) All tests passed

File:
1 edited

Legend:

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

    r509 r511  
    8383            StdSize buffSize = 0; 
    8484            MPI_Recv(&buffSize, 1, MPI_LONG, rank, 20, interComm, &status); 
     85            mapBufferSize_.insert(std::make_pair(rank, buffSize)); 
    8586            it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(buffSize)))).first ; 
    8687          } 
     
    207208    { 
    208209      info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl ; 
     210      std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(), 
     211                                             iteMap = mapBufferSize_.end(), itMap; 
     212      StdSize totalBuf = 0; 
     213      for (itMap = itbMap; itMap != iteMap; ++itMap) 
     214      { 
     215        report(10)<< " Memory report : Context <"<<context->getId()<<"> : server side : memory used for buffer of each connection to client" << endl 
     216                  << "  +) With client of rank " << itMap->first << " : " << itMap->second << " bytes " << endl; 
     217        totalBuf += itMap->second; 
     218      } 
    209219      context->finalize() ; 
    210220      finished=true ; 
    211       report(0)<< " Memory report : Context <"<<context->getId()<<"> : server side : total memory used for buffer "<<buffers.size()*CXios::bufferSize<<" bytes"<<endl ; 
     221      report(0)<< " Memory report : Context <"<<context->getId()<<"> : server side : total memory used for buffer "<<totalBuf<<" bytes"<<endl ; 
    212222    } 
    213223    else if (event.classId==CContext::GetType()) CContext::dispatchEvent(event) ; 
Note: See TracChangeset for help on using the changeset viewer.