Add experimental static size mode for ofi transport

Whenever --ofi-size-hint > 0, the ofi transport does not use the control
band. Multipart is not supported.
This commit is contained in:
Dennis Klein
2019-04-29 20:28:40 +02:00
parent 2457094b6c
commit 3582091b1c
6 changed files with 118 additions and 7 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() << ")";
LOG(debug) << "OFI transport: asiofi (" << fContext.GetAsiofiVersion() << ")";
if (config) {
fContext.SetSizeHint(config->GetValue<size_t>("ofi-size-hint"));
}
} catch (ContextError& e) {
throw TransportFactoryError{e.what()};
}