Changeset 2432


Ignore:
Timestamp:
11/25/22 14:48:06 (2 months ago)
Author:
jderouillat
Message:

Fix the evaluated buffer sizes for fields, and shrink the memory overbooking of buffers on servers (legacy)

Location:
XIOS3/branches/xios-3.0-beta/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/branches/xios-3.0-beta/src/node/field.cpp

    r2397 r2432  
    575575          for(auto& it : dataSize)  
    576576          { 
    577             if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second+headerSize ; 
    578             else bufferSize[it.first]+=it.second+headerSize ; 
     577            if (bufferSize.count(it.first)==0) bufferSize[it.first]=sizeof(double)*it.second+headerSize ; 
     578            else bufferSize[it.first]+=sizeof(double)*it.second+headerSize ; 
    579579          } 
    580580        } 
     
    583583          for(auto& it : dataSize)  
    584584          { 
    585               if (bufferSize.count(it.first)==0) bufferSize[it.first]=it.second+headerSize ; 
    586               else bufferSize[it.first]=std::max(bufferSize[it.first],(size_t)(it.second+headerSize)) ; 
     585              if (bufferSize.count(it.first)==0) bufferSize[it.first]=sizeof(double)*it.second+headerSize ; 
     586              else bufferSize[it.first]=std::max(bufferSize[it.first],(size_t)(sizeof(double)*it.second+headerSize)) ; 
    587587          } 
    588588        } 
  • XIOS3/branches/xios-3.0-beta/src/transport/legacy_context_server.cpp

    r2343 r2432  
    283283        buffers[rank]->freeBuffer(count) ; 
    284284        delete buffers[rank] ; 
    285         buffers[rank] = new CServerBuffer(windows_[rank], winAdress, 0, 2*newSize) ; 
     285        buffers[rank] = new CServerBuffer(windows_[rank], winAdress, 0, newSize) ; 
    286286        info(100)<<"Context id "<<context->getId()<<" : Receive ChangeBufferSize from client rank "<<rank 
    287287                 <<"  newSize : "<<newSize<<" Address : "<<winAdress[0]<<" & "<<winAdress[1]<<endl ; 
Note: See TracChangeset for help on using the changeset viewer.