Changeset 583


Ignore:
Timestamp:
04/01/15 17:52:49 (6 years ago)
Author:
mhnguyen
Message:

Fixing the minor bug relating to default buffer size

+) Use size of node object to determine default minimum buffer size

Test
+) On Curie
+) Small grid: 5x5x5 with 5 clients and 2 servers
+) All tests pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r569 r583  
    258258     if (hasClient) 
    259259     { 
    260        client->setBufferSize(getDataSize()); 
     260       size_t bufferSizeMin = 1; 
     261#define DECLARE_NODE(Name_, name_)    \ 
     262   bufferSizeMin = (bufferSizeMin < sizeof(C##Name_##Definition)) ?  sizeof(C##Name_##Definition) : bufferSizeMin; 
     263#define DECLARE_NODE_PAR(Name_, name_) 
     264#include "node_type.conf" 
     265       std::map<int, StdSize> bufferSize = getDataSize(); 
     266       std::map<int, StdSize>::iterator  it = bufferSize.begin(), 
     267                                        ite = bufferSize.end(); 
     268       for (; it != ite; ++it) 
     269       it->second = (it->second < bufferSizeMin) ? bufferSizeMin : it->second; 
     270       client->setBufferSize(bufferSize); 
    261271     } 
    262272   } 
Note: See TracChangeset for help on using the changeset viewer.