Add a hack to set the expected msg size via cmd option

This commit is contained in:
Alexey Rybalchenko
2019-03-06 10:41:41 +01:00
parent e1b1e5e21b
commit a9dfe39bf7
7 changed files with 16 additions and 4 deletions

View File

@@ -23,12 +23,15 @@ namespace ofi
using namespace std;
TransportFactory::TransportFactory(const string& id, const FairMQProgOptions* /*config*/)
TransportFactory::TransportFactory(const string& id, const FairMQProgOptions* config)
try : FairMQTransportFactory(id)
, fContext(*this, *this, 1)
{
LOG(debug) << "OFI transport: Using AZMQ & "
<< "asiofi (" << fContext.GetAsiofiVersion() << ")";
if (config) {
fContext.SetSizeHint(config->GetValue<size_t>("ofi-size-hint")); // temporary hack to provide expected message size for receive
}
} catch (ContextError& e) {
throw TransportFactoryError{e.what()};
}