Add pmix::fence() C++ binding

This commit is contained in:
Dennis Klein 2019-02-07 04:02:45 +01:00 committed by Dennis Klein
parent 2047dbef59
commit dfc6b5c4a3
2 changed files with 17 additions and 5 deletions

View File

@ -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 */
#endif /* PMIX_HPP */

View File

@ -40,13 +40,14 @@ PMIxPlugin::PMIxPlugin(const std::string& name,
PublishBoundChannels();
// pmix_proc_t proc;
// rc = PMIx_Fence(&proc, 1, NULL, 0)
// fence
{
pmix::proc all(fProc);
all.rank = pmix::rank::wildcard;
pmix::fence({all});
}
// lookup
// fence
break;
case DeviceState::Exiting:
UnsubscribeFromDeviceStateChange();