Changeset 2558
- Timestamp:
- 09/06/23 14:53:33 (17 months ago)
- Location:
- XIOS3/trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/buffer_server.cpp
r2547 r2558 9 9 { 10 10 11 CServerBuffer::CServerBuffer( vector<CWindowDynamic*>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize buffSize)12 : hasWindows(true), windows_(windows), windowsRank_(windowsRank), winAddress_(winAddress)11 CServerBuffer::CServerBuffer(int clientRank, vector<CWindowDynamic*>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize buffSize) 12 : hasWindows(true), clientRank_(clientRank), windows_(windows), windowsRank_(windowsRank), winAddress_(winAddress) 13 13 { 14 14 size = 3 * buffSize; … … 240 240 bool ok=false ; 241 241 242 242 info(100)<<"getBufferFromClient : check data in client buffer : clientRank "<<clientRank_<<" timeline "<<timeLine<<" ??"<< endl ; 243 243 lockBuffer(); 244 244 CTimer::get("getBufferFromClient_locked").resume() ; … … 272 272 for(size_t i=(count<10)?0:count-10; i<count ; i++) checksumLast=checksumLast+buffer[i] ; 273 273 274 info(40)<<"getBufferFromClient timeLine==clientTimeLine: windowsRank "<<windowsRank_<<" timeline "<<timeLine<<" clientTimeline "274 info(40)<<"getBufferFromClient timeLine==clientTimeLine: clientRank "<<clientRank_<<" timeline "<<timeLine<<" clientTimeline " 275 275 <<clientTimeline<<" clientCount "<<count<<" checksum "<<(int)checksum<<" " 276 276 <<(int)buffer[0]<<" "<<(int)buffer[1]<<" "<<(int)buffer[2]<<" "<<(int)buffer[3]<<" "<<(int)buffer[4]<<" "<<(int)buffer[5]<<" " … … 286 286 unlockBuffer() ; 287 287 } 288 CTimer::get("getBufferFromClient").suspend() ; 288 CTimer::get("getBufferFromClient").suspend() ; 289 info(100)<<"getBufferFromClient : check data in client buffer ==> done"<<endl ; 290 289 291 if (ok) return true ; 290 292 -
XIOS3/trunk/src/buffer_server.hpp
r2547 r2558 15 15 { 16 16 public: 17 CServerBuffer( vector<CWindowDynamic*>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize bufSize) ;17 CServerBuffer(int clientRank, vector<CWindowDynamic*>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize bufSize) ; 18 18 ~CServerBuffer() ; 19 19 … … 44 44 int currentWindows ; 45 45 bool hasWindows ; 46 int clientRank_ ; // for debugging 46 47 int windowsRank_ ; 47 48 double bufferFromClientLatency_=1e-1 ; -
XIOS3/trunk/src/transport/legacy_context_server.cpp
r2547 r2558 140 140 MPI_Barrier(winComm_[rank]) ; 141 141 142 it=(buffers.insert(pair<int,CServerBuffer*>(rank, new CServerBuffer(windows_[rank], winBufferAddress, 0, buffSize)))).first;142 it=(buffers.insert(pair<int,CServerBuffer*>(rank, new CServerBuffer(rank, windows_[rank], winBufferAddress, 0, buffSize)))).first; 143 143 lastTimeLine[rank]=0 ; 144 144 itLastTimeLine=lastTimeLine.begin() ; … … 280 280 windows_[rank][0] -> setWinBufferAddress(winBufferAdress[0],0) ; 281 281 windows_[rank][1] -> setWinBufferAddress(winBufferAdress[1],0) ; 282 buffers[rank] = new CServerBuffer( windows_[rank], winBufferAdress, 0, newSize) ;282 buffers[rank] = new CServerBuffer(rank, windows_[rank], winBufferAdress, 0, newSize) ; 283 283 info(100)<<"Context id "<<context->getId()<<" : Receive ChangeBufferSize from client rank "<<rank 284 284 <<" newSize : "<<newSize<<" Address : "<<winBufferAdress[0]<<" & "<<winBufferAdress[1]<<endl ; -
XIOS3/trunk/src/transport/one_sided_client_buffer.hpp
r2547 r2558 194 194 size_t fixedSize_ = 0 ; 195 195 size_t currentBufferSize_= 0 ; 196 double growingFactor_ = 2.;196 double growingFactor_ = 1.2 ; 197 197 MPI_Aint lastFreedBloc_=0 ; 198 198 bool isFinalized_ = false ; -
XIOS3/trunk/src/transport/one_sided_server_buffer.hpp
r2547 r2558 131 131 size_t fixedSize_ = 0 ; 132 132 size_t currentBufferSize_=0 ; 133 double growingFactor_ = 2.;134 double bufferServerFactor_=1 0. ;133 double growingFactor_ = 1.2 ; 134 double bufferServerFactor_=1. ; 135 135 136 136 std::list<CBuffer*> buffers_ ; -
XIOS3/trunk/src/transport/p2p_client_buffer.cpp
r2557 r2558 72 72 bool CP2pClientBuffer::isBufferFree(size_t size) 73 73 { 74 if (sentBlocRequest_.size()> maxSentBlocRequests_) return false ; 74 75 if (buffers_.size()>maxWindows_-1) return false ; 75 76 CBuffer* buffer ; … … 168 169 { 169 170 SBloc& bloc = blocs_.front() ; 171 172 if (info.isActive(logProtocol)) 173 { 174 size_t checksum=0 ; 175 for(size_t j=0;j<bloc.count;j++) checksum+=((unsigned char*)(bloc.addr))[j] ; 176 info(logProtocol)<<"free bloc sent to server rank "<<serverRank_<<" : addr="<<bloc.addr<<" start="<<bloc.start<<" count="<<bloc.count<<" checksum="<<checksum<<endl ; 177 } 178 170 179 bloc.buffer->free(bloc.start, bloc.count) ; 171 180 if (bloc.buffer->getCount()==0) … … 243 252 if (flag==false) 244 253 { 245 ++it ;254 // ++it ; 246 255 break ; 247 256 } -
XIOS3/trunk/src/transport/p2p_client_buffer.hpp
r2556 r2558 41 41 if (count_>0) ERROR("COneSidedClientBuffer::~CBuffer()",<<"Try to delete buffer that is not empty"<<std::endl) ; 42 42 //MPI_Win_detach(window_, buffer_) ; 43 //MPI_Free_mem(buffer_) ;43 MPI_Free_mem(buffer_) ; 44 44 info(logProtocol)<<"Detach memory from windows : addr="<<(MPI_Aint)buffer_<<" count="<<size_<<endl ; 45 45 } … … 205 205 size_t fixedSize_ = 0 ; 206 206 size_t currentBufferSize_= 0 ; 207 double growingFactor_ = 2.;207 double growingFactor_ = 1.2 ; 208 208 MPI_Aint lastFreedBloc_=0 ; 209 209 bool isFinalized_ = false ; 210 int maxSentBlocRequests_ = 10000 ; 210 211 211 212 } ; -
XIOS3/trunk/src/transport/p2p_server_buffer.cpp
r2557 r2558 97 97 if (pendingRmaRequests_.empty()) transferEvents() ; 98 98 99 if (!isLocked_)100 {99 //if (!isLocked_) 100 //{ 101 101 if (lastBlocToFree_!=0) 102 102 { … … 110 110 lastBlocToFree_ = 0 ; 111 111 } 112 }112 //} 113 113 114 114 if (buffers_.size()>1) … … 164 164 << " Bandwith : "<< transferedSize/time<< "byte/s"<<endl ; 165 165 CTimer::get("lastTransfer from "+std::to_string(clientRank_)).reset() ; 166 for(int i=0;i<pendingRmaAddr_.size();i++) 167 { 168 size_t checksum=0 ; 169 unsigned char* buffer = (unsigned char*) pendingRmaAddr_[i] ; 170 for(size_t j=0;j<pendingRmaCount_[i];j++) checksum += buffer[j] ; 171 info(logProtocol)<<"Bloc transfered to adrr="<<(void*) buffer<<" count="<<pendingRmaCount_[i]<<" checksum="<<checksum<<endl ; 172 } 173 166 174 } 167 175 … … 170 178 pendingRmaStatus_.clear() ; 171 179 pendingRmaCount_.clear() ; 180 pendingRmaAddr_.clear() ; 172 181 completedEvents_.insert(onTransferEvents_.begin(),onTransferEvents_.end()) ; 173 182 … … 381 390 pendingRmaRequests_.push_back(request) ; 382 391 pendingRmaCount_.push_back(count) ; 392 pendingRmaAddr_.push_back(buffer->getBuffer()+start) ; 383 393 onTransferEvents_[timeline].push_back({buffer,start,count,addr}) ; 384 394 } -
XIOS3/trunk/src/transport/p2p_server_buffer.hpp
r2556 r2558 133 133 size_t fixedSize_ = 0 ; 134 134 size_t currentBufferSize_=0 ; 135 double growingFactor_ = 2.;136 double bufferServerFactor_=1 0. ;135 double growingFactor_ = 1.2 ; 136 double bufferServerFactor_=1. ; 137 137 138 138 std::list<CBuffer*> buffers_ ; … … 147 147 vector<MPI_Request> pendingRmaRequests_ ; 148 148 vector<MPI_Status> pendingRmaStatus_ ; 149 vector<char*> pendingRmaAddr_ ; 149 150 vector<int> pendingRmaCount_ ; 150 151 … … 164 165 165 166 MPI_Win winControl_ ; 166 bool isLocked_=false ;167 //bool isLocked_=false ; 167 168 const int windowRank_=0 ; 168 169 MPI_Aint lastBlocToFree_=0 ;
Note: See TracChangeset
for help on using the changeset viewer.