Commit 8bbe2763 authored by Matthieu Dorier's avatar Matthieu Dorier

added busy spin option in client

parent 9a57b7d3
......@@ -113,8 +113,14 @@ class DataStoreImpl {
checkConfig(config);
// get protocol
std::string proto = config["hepnos"]["client"]["protocol"].as<std::string>();
// get busy spin
bool busySpin = config["hepnos"]["client"]["busy-spin"].as<bool>();
// initialize Margo
m_mid = margo_init(proto.c_str(), MARGO_CLIENT_MODE, use_progress_thread, 0);
hg_init_info hg_opt;
memset(&hg_opt, 0, sizeof(hg_opt));
if(busySpin)
hg_opt.na_init_info.progress_mode = NA_NO_BLOCK;
m_mid = margo_init_opt(proto.c_str(), MARGO_CLIENT_MODE, &hg_opt, use_progress_thread, 0);
if(!m_mid) {
cleanup();
throw Exception("Could not initialized Margo");
......
......@@ -62,6 +62,7 @@ void ConnectionInfoGenerator::generateFile(MPI_Comm comm, const std::string& fil
YAML::Node config;
config["hepnos"]["client"]["protocol"] = proto;
config["hepnos"]["client"]["busy-spin"] = serviceConfig.busySpin;
YAML::Node databases = config["hepnos"]["databases"];
YAML::Node datasets = databases["datasets"];
YAML::Node runs = databases["runs"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment