mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Add pmix::fence() C++ binding
This commit is contained in:
parent
2047dbef59
commit
dfc6b5c4a3
|
@ -173,6 +173,17 @@ auto publish(const std::vector<info>& info) -> void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto fence(const std::vector<proc>& procs = {}, const std::vector<info>& info = {}) -> void
|
||||||
|
{
|
||||||
|
status rc;
|
||||||
|
|
||||||
|
rc = PMIx_Fence(procs.data(), procs.size(), info.data(), info.size());
|
||||||
|
if (rc != PMIX_SUCCESS) {
|
||||||
|
throw runtime_error("pmix::fence() failed: rc=" + rc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} /* namespace pmix */
|
} /* namespace pmix */
|
||||||
|
|
||||||
#endif /* PMIX_HPP */
|
#endif /* PMIX_HPP */
|
||||||
|
|
|
@ -40,13 +40,14 @@ PMIxPlugin::PMIxPlugin(const std::string& name,
|
||||||
|
|
||||||
PublishBoundChannels();
|
PublishBoundChannels();
|
||||||
|
|
||||||
// pmix_proc_t proc;
|
{
|
||||||
// rc = PMIx_Fence(&proc, 1, NULL, 0)
|
pmix::proc all(fProc);
|
||||||
// fence
|
all.rank = pmix::rank::wildcard;
|
||||||
|
|
||||||
|
pmix::fence({all});
|
||||||
|
}
|
||||||
|
|
||||||
// lookup
|
// lookup
|
||||||
|
|
||||||
// fence
|
|
||||||
break;
|
break;
|
||||||
case DeviceState::Exiting:
|
case DeviceState::Exiting:
|
||||||
UnsubscribeFromDeviceStateChange();
|
UnsubscribeFromDeviceStateChange();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user