{"action":"created","issue":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/453","labels_url":"https://api.github.com/repos/flux-framework/flux-core/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/flux-framework/flux-core/issues/453/comments","events_url":"https://api.github.com/repos/flux-framework/flux-core/issues/453/events","html_url":"https://github.com/flux-framework/flux-core/pull/453","id":112473759,"number":453,"title":"implement library for PMI simple v1 wire protocol server side","user":{"login":"garlick","id":169947,"avatar_url":"https://avatars.githubusercontent.com/u/169947?v=3","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flux-framework/flux-core/labels/review","name":"review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-20T22:31:32Z","updated_at":"2015-10-21T22:12:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/flux-framework/flux-core/pulls/453","html_url":"https://github.com/flux-framework/flux-core/pull/453","diff_url":"https://github.com/flux-framework/flux-core/pull/453.diff","patch_url":"https://github.com/flux-framework/flux-core/pull/453.patch"},"body":"This PR implements a small \"protocol engine\" for the PMI simple v1 wire protocol, for the server side and then uses it and the recently added `subprocess_socketpair()` call to implement PMI as a bootstrap option for brokers in `flux-start`.\r\n\r\nWe could go a step further and eliminate the `--rank, --size, and --boot-method=LOCAL` code in the broker and make this the default way that `flux-start` operates, but I stopped short of that.\r\n\r\nIt's worth noting that this subset of PMI1 lacks `PMI_Get_id()` (used to communicate a non-numeric job id) and `PMI_Get_clique_ranks()` (used to determine which ranks can communicate over ipc versus tcp).  \r\n\r\nAlso, in this iteration I didn't bother implementing the protocol operations for `PMI_Publish_name()` , `PMI_Unpublish_name()`, `PMI_Lookup_name()`, or `PMI_Spawn_multiple()`.  (These are also stubbed out in libpmi-client)\r\n\r\nA demo of `flux-start --boot-method=PMI` was added to the sharness hydra test.\r\n\r\nAnother test was added that exercises each protocol operation, pitting libpmi-client against libpmi-server over a single socketpair."},"comment":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/comments/150039565","html_url":"https://github.com/flux-framework/flux-core/pull/453#issuecomment-150039565","issue_url":"https://api.github.com/repos/flux-framework/flux-core/issues/453","id":150039565,"user":{"login":"grondo","id":741970,"avatar_url":"https://avatars.githubusercontent.com/u/741970?v=3","gravatar_id":"","url":"https://api.github.com/users/grondo","html_url":"https://github.com/grondo","followers_url":"https://api.github.com/users/grondo/followers","following_url":"https://api.github.com/users/grondo/following{/other_user}","gists_url":"https://api.github.com/users/grondo/gists{/gist_id}","starred_url":"https://api.github.com/users/grondo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grondo/subscriptions","organizations_url":"https://api.github.com/users/grondo/orgs","repos_url":"https://api.github.com/users/grondo/repos","events_url":"https://api.github.com/users/grondo/events{/privacy}","received_events_url":"https://api.github.com/users/grondo/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T22:12:29Z","updated_at":"2015-10-21T22:12:29Z","body":"@garlick -- I was thinking of the cbuf being moved into the `pmi_simple_server` implemtation -- either by feeding data directly into the server or by having the socket fd be part of the server too (then, you just register an fdwatcher internally in `pmi_simple_server` and it manages its own state). I see now, however, that is a pretty  big change, and I didn't even look closely enough to see if it was possible to implement for all cases! Sorry!\r\n\r\nI think what is here is great for now, and maybe when we try using this with MPI as part of wrexecd or the replacement, we could look at moving the buffered IO into pmi server implementation, then just wire it directly into wrexecd/shell reactor? (At least that way there won't be duplication of code among users)"}}