mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
First version of the shared memory transport.
Use via `--transport shmem` cmd option. No pub/sub.
This commit is contained in:
@@ -230,6 +230,8 @@ void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMa
|
||||
commonChannel.UpdateAddress(q.second.get<string>("address", commonChannel.GetAddress()));
|
||||
commonChannel.UpdateSndBufSize(q.second.get<int>("sndBufSize", commonChannel.GetSndBufSize()));
|
||||
commonChannel.UpdateRcvBufSize(q.second.get<int>("rcvBufSize", commonChannel.GetRcvBufSize()));
|
||||
commonChannel.UpdateSndKernelSize(q.second.get<int>("sndKernelSize", commonChannel.GetSndKernelSize()));
|
||||
commonChannel.UpdateRcvKernelSize(q.second.get<int>("rcvKernelSize", commonChannel.GetRcvKernelSize()));
|
||||
commonChannel.UpdateRateLogging(q.second.get<int>("rateLogging", commonChannel.GetRateLogging()));
|
||||
|
||||
// temporary FairMQChannel container
|
||||
@@ -241,12 +243,14 @@ void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMa
|
||||
LOG(DEBUG) << "\tnumSockets of " << numSockets << " specified,";
|
||||
LOG(DEBUG) << "\tapplying common settings to each:";
|
||||
|
||||
LOG(DEBUG) << "\ttype = " << commonChannel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << commonChannel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << commonChannel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << commonChannel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << commonChannel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << commonChannel.GetRateLogging();
|
||||
LOG(DEBUG) << "\ttype = " << commonChannel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << commonChannel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << commonChannel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << commonChannel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << commonChannel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\tsndKernelSize = " << commonChannel.GetSndKernelSize();
|
||||
LOG(DEBUG) << "\trcvKernelSize = " << commonChannel.GetRcvKernelSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << commonChannel.GetRateLogging();
|
||||
|
||||
for (int i = 0; i < numSockets; ++i)
|
||||
{
|
||||
@@ -287,6 +291,8 @@ void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMa
|
||||
commonChannel.UpdateAddress(p.second.get<string>("address", commonChannel.GetAddress()));
|
||||
commonChannel.UpdateSndBufSize(p.second.get<int>("sndBufSize", commonChannel.GetSndBufSize()));
|
||||
commonChannel.UpdateRcvBufSize(p.second.get<int>("rcvBufSize", commonChannel.GetRcvBufSize()));
|
||||
commonChannel.UpdateSndKernelSize(p.second.get<int>("sndKernelSize", commonChannel.GetSndKernelSize()));
|
||||
commonChannel.UpdateRcvKernelSize(p.second.get<int>("rcvKernelSize", commonChannel.GetRcvKernelSize()));
|
||||
commonChannel.UpdateRateLogging(p.second.get<int>("rateLogging", commonChannel.GetRateLogging()));
|
||||
}
|
||||
|
||||
@@ -299,12 +305,14 @@ void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMa
|
||||
LOG(DEBUG) << "\tnumSockets of " << numSockets << " specified,";
|
||||
LOG(DEBUG) << "\tapplying common settings to each:";
|
||||
|
||||
LOG(DEBUG) << "\ttype = " << commonChannel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << commonChannel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << commonChannel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << commonChannel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << commonChannel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << commonChannel.GetRateLogging();
|
||||
LOG(DEBUG) << "\ttype = " << commonChannel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << commonChannel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << commonChannel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << commonChannel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << commonChannel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\tsndKernelSize = " << commonChannel.GetSndKernelSize();
|
||||
LOG(DEBUG) << "\trcvKernelSize = " << commonChannel.GetRcvKernelSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << commonChannel.GetRateLogging();
|
||||
|
||||
for (int i = 0; i < numSockets; ++i)
|
||||
{
|
||||
@@ -342,15 +350,19 @@ void SocketParser(const boost::property_tree::ptree& tree, vector<FairMQChannel>
|
||||
channel.UpdateAddress(q.second.get<string>("address", channel.GetAddress()));
|
||||
channel.UpdateSndBufSize(q.second.get<int>("sndBufSize", channel.GetSndBufSize()));
|
||||
channel.UpdateRcvBufSize(q.second.get<int>("rcvBufSize", channel.GetRcvBufSize()));
|
||||
channel.UpdateSndKernelSize(q.second.get<int>("sndKernelSize", channel.GetSndKernelSize()));
|
||||
channel.UpdateRcvKernelSize(q.second.get<int>("rcvKernelSize", channel.GetRcvKernelSize()));
|
||||
channel.UpdateRateLogging(q.second.get<int>("rateLogging", channel.GetRateLogging()));
|
||||
|
||||
LOG(DEBUG) << "" << channelName << "[" << socketCounter << "]:";
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\tsndKernelSize = " << channel.GetSndKernelSize();
|
||||
LOG(DEBUG) << "\trcvKernelSize = " << channel.GetRcvKernelSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
|
||||
channelList.push_back(channel);
|
||||
++socketCounter;
|
||||
@@ -368,15 +380,19 @@ void SocketParser(const boost::property_tree::ptree& tree, vector<FairMQChannel>
|
||||
channel.UpdateAddress(p.second.get<string>("address", channel.GetAddress()));
|
||||
channel.UpdateSndBufSize(p.second.get<int>("sndBufSize", channel.GetSndBufSize()));
|
||||
channel.UpdateRcvBufSize(p.second.get<int>("rcvBufSize", channel.GetRcvBufSize()));
|
||||
channel.UpdateSndKernelSize(p.second.get<int>("sndKernelSize", channel.GetSndKernelSize()));
|
||||
channel.UpdateRcvKernelSize(p.second.get<int>("rcvKernelSize", channel.GetRcvKernelSize()));
|
||||
channel.UpdateRateLogging(p.second.get<int>("rateLogging", channel.GetRateLogging()));
|
||||
|
||||
LOG(DEBUG) << "" << channelName << "[" << socketCounter << "]:";
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\tsndKernelSize = " << channel.GetSndKernelSize();
|
||||
LOG(DEBUG) << "\trcvKernelSize = " << channel.GetRcvKernelSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
|
||||
channelList.push_back(channel);
|
||||
++socketCounter;
|
||||
@@ -395,12 +411,14 @@ void SocketParser(const boost::property_tree::ptree& tree, vector<FairMQChannel>
|
||||
|
||||
FairMQChannel channel(commonChannel);
|
||||
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
LOG(DEBUG) << "\ttype = " << channel.GetType();
|
||||
LOG(DEBUG) << "\tmethod = " << channel.GetMethod();
|
||||
LOG(DEBUG) << "\taddress = " << channel.GetAddress();
|
||||
LOG(DEBUG) << "\tsndBufSize = " << channel.GetSndBufSize();
|
||||
LOG(DEBUG) << "\trcvBufSize = " << channel.GetRcvBufSize();
|
||||
LOG(DEBUG) << "\tsndKernelSize = " << channel.GetSndKernelSize();
|
||||
LOG(DEBUG) << "\trcvKernelSize = " << channel.GetRcvKernelSize();
|
||||
LOG(DEBUG) << "\trateLogging = " << channel.GetRateLogging();
|
||||
|
||||
channelList.push_back(channel);
|
||||
}
|
||||
|
@@ -235,6 +235,8 @@ void FairMQProgOptions::UpdateMQValues()
|
||||
string addressKey = p.first + "." + to_string(index) + ".address";
|
||||
string sndBufSizeKey = p.first + "." + to_string(index) + ".sndBufSize";
|
||||
string rcvBufSizeKey = p.first + "." + to_string(index) + ".rcvBufSize";
|
||||
string sndKernelSizeKey = p.first + "." + to_string(index) + ".sndKernelSize";
|
||||
string rcvKernelSizeKey = p.first + "." + to_string(index) + ".rcvKernelSize";
|
||||
string rateLoggingKey = p.first + "." + to_string(index) + ".rateLogging";
|
||||
|
||||
fMQKeyMap[typeKey] = make_tuple(p.first, index, "type");
|
||||
@@ -242,6 +244,8 @@ void FairMQProgOptions::UpdateMQValues()
|
||||
fMQKeyMap[addressKey] = make_tuple(p.first, index, "address");
|
||||
fMQKeyMap[sndBufSizeKey] = make_tuple(p.first, index, "sndBufSize");
|
||||
fMQKeyMap[rcvBufSizeKey] = make_tuple(p.first, index, "rcvBufSize");
|
||||
fMQKeyMap[sndKernelSizeKey] = make_tuple(p.first, index, "sndKernelSize");
|
||||
fMQKeyMap[rcvKernelSizeKey] = make_tuple(p.first, index, "rcvkernelSize");
|
||||
fMQKeyMap[rateLoggingKey] = make_tuple(p.first, index, "rateLogging");
|
||||
|
||||
UpdateVarMap<string>(typeKey, channel.GetType());
|
||||
@@ -255,6 +259,12 @@ void FairMQProgOptions::UpdateMQValues()
|
||||
//UpdateVarMap<string>(rcvBufSizeKey, to_string(channel.GetRcvBufSize()));// string API
|
||||
UpdateVarMap<int>(rcvBufSizeKey, channel.GetRcvBufSize());
|
||||
|
||||
//UpdateVarMap<string>(sndKernelSizeKey, to_string(channel.GetSndKernelSize()));// string API
|
||||
UpdateVarMap<int>(sndKernelSizeKey, channel.GetSndKernelSize());
|
||||
|
||||
//UpdateVarMap<string>(rcvKernelSizeKey, to_string(channel.GetRcvKernelSize()));// string API
|
||||
UpdateVarMap<int>(rcvKernelSizeKey, channel.GetRcvKernelSize());
|
||||
|
||||
//UpdateVarMap<string>(rateLoggingKey,to_string(channel.GetRateLogging()));// string API
|
||||
UpdateVarMap<int>(rateLoggingKey, channel.GetRateLogging());
|
||||
|
||||
@@ -265,6 +275,8 @@ void FairMQProgOptions::UpdateMQValues()
|
||||
LOG(DEBUG) << "key = " << addressKey <<"\t value = " << GetValue<string>(addressKey);
|
||||
LOG(DEBUG) << "key = " << sndBufSizeKey << "\t value = " << GetValue<int>(sndBufSizeKey);
|
||||
LOG(DEBUG) << "key = " << rcvBufSizeKey <<"\t value = " << GetValue<int>(rcvBufSizeKey);
|
||||
LOG(DEBUG) << "key = " << sndKernelSizeKey << "\t value = " << GetValue<int>(sndKernelSizeKey);
|
||||
LOG(DEBUG) << "key = " << rcvKernelSizeKey <<"\t value = " << GetValue<int>(rcvKernelSizeKey);
|
||||
LOG(DEBUG) << "key = " << rateLoggingKey <<"\t value = " << GetValue<int>(rateLoggingKey);
|
||||
*/
|
||||
index++;
|
||||
@@ -376,7 +388,7 @@ int FairMQProgOptions::UpdateChannelMap(const string& channelName, int index, co
|
||||
{
|
||||
//if we get there it means something is wrong
|
||||
LOG(ERROR) << "update of FairMQChannel map failed for the following key: "
|
||||
<< channelName<<"."<<index<<"."<<member;
|
||||
<< channelName << "." << index << "." << member;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -443,7 +455,7 @@ int FairMQProgOptions::UpdateChannelMap(const string& channelName, int index, co
|
||||
{
|
||||
//if we get there it means something is wrong
|
||||
LOG(ERROR) << "update of FairMQChannel map failed for the following key: "
|
||||
<< channelName<<"."<<index<<"."<<member;
|
||||
<< channelName << "." << index << "." << member;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user