{"action":"created","issue":{"url":"https://api.github.com/repos/mercury-hpc/mercury/issues/142","repository_url":"https://api.github.com/repos/mercury-hpc/mercury","labels_url":"https://api.github.com/repos/mercury-hpc/mercury/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/mercury-hpc/mercury/issues/142/comments","events_url":"https://api.github.com/repos/mercury-hpc/mercury/issues/142/events","html_url":"https://github.com/mercury-hpc/mercury/issues/142","id":182536564,"number":142,"title":"user facing hooks for max rpc sizes","user":{"login":"JohnPJenkins","id":8118010,"avatar_url":"https://avatars.githubusercontent.com/u/8118010?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnPJenkins","html_url":"https://github.com/JohnPJenkins","followers_url":"https://api.github.com/users/JohnPJenkins/followers","following_url":"https://api.github.com/users/JohnPJenkins/following{/other_user}","gists_url":"https://api.github.com/users/JohnPJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnPJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnPJenkins/subscriptions","organizations_url":"https://api.github.com/users/JohnPJenkins/orgs","repos_url":"https://api.github.com/users/JohnPJenkins/repos","events_url":"https://api.github.com/users/JohnPJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/JohnPJenkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-12T14:13:10Z","updated_at":"2016-10-12T17:06:13Z","closed_at":null,"body":"We're currently using a hand-rolled eager transfer mode as a separate RPC type as an alternative to the built-in mercury eager bulk mode. We do this to prevent calls to HG_Bulk_create. While this works, we can only currently guess (or read the source code :)) of the sizes at the NA layer for which this approach saves us work - as background for others, RPCs that exceed a size threshold (NA_Msg_max_unexpected_size) use a bulk handle under the covers to do a staged transfer.\r\n\r\nSince the user no longer sees NA functions, the semantic that matters is knowing what the max size of any particular RPC is in order to make buffering decisions. Hence, I propose the API:\r\n\r\n```C\r\n/**\r\n * Returns the threshold size by which RPC arguments can be transferred in the most\r\n * efficient manner for the underlying network abstraction.\r\n *\r\n * \\param [in] hg_class the class to check\r\n * \\return the size threshold, or 0 if an invalid class was passed in.\r\n */\r\nhg_size_t HG_Get_rpc_threshold_size(hg_class_t *hg_class);\r\n```\r\n\r\nI can put together a PR if we agree on the API. The implementation is trivial - it just calls `NA_Msg_get_max_unexpected_size` and subtracts the mercury header size."},"comment":{"url":"https://api.github.com/repos/mercury-hpc/mercury/issues/comments/253275107","html_url":"https://github.com/mercury-hpc/mercury/issues/142#issuecomment-253275107","issue_url":"https://api.github.com/repos/mercury-hpc/mercury/issues/142","id":253275107,"user":{"login":"JohnPJenkins","id":8118010,"avatar_url":"https://avatars.githubusercontent.com/u/8118010?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnPJenkins","html_url":"https://github.com/JohnPJenkins","followers_url":"https://api.github.com/users/JohnPJenkins/followers","following_url":"https://api.github.com/users/JohnPJenkins/following{/other_user}","gists_url":"https://api.github.com/users/JohnPJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnPJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnPJenkins/subscriptions","organizations_url":"https://api.github.com/users/JohnPJenkins/orgs","repos_url":"https://api.github.com/users/JohnPJenkins/repos","events_url":"https://api.github.com/users/JohnPJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/JohnPJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T17:06:13Z","updated_at":"2016-10-12T17:06:13Z","body":"Sounds good to me! I'll spin up a PR later on."}}
{"actor":{"display_login":"JohnPJenkins"}}