Changeset 2558 for XIOS3/trunk/src/transport
- Timestamp:
- 09/06/23 14:53:33 (10 months ago)
- Location:
- XIOS3/trunk/src/transport
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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.