{"action":"created","issue":{"url":"https://api.github.com/repos/dash-project/dash/issues/167","repository_url":"https://api.github.com/repos/dash-project/dash","labels_url":"https://api.github.com/repos/dash-project/dash/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/dash-project/dash/issues/167/comments","events_url":"https://api.github.com/repos/dash-project/dash/issues/167/events","html_url":"https://github.com/dash-project/dash/issues/167","id":191983333,"number":167,"title":"DART Group Allocation/Initialization","user":{"login":"devreal","id":10974502,"avatar_url":"https://avatars.githubusercontent.com/u/10974502?v=3","gravatar_id":"","url":"https://api.github.com/users/devreal","html_url":"https://github.com/devreal","followers_url":"https://api.github.com/users/devreal/followers","following_url":"https://api.github.com/users/devreal/following{/other_user}","gists_url":"https://api.github.com/users/devreal/gists{/gist_id}","starred_url":"https://api.github.com/users/devreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devreal/subscriptions","organizations_url":"https://api.github.com/users/devreal/orgs","repos_url":"https://api.github.com/users/devreal/repos","events_url":"https://api.github.com/users/devreal/events{/privacy}","received_events_url":"https://api.github.com/users/devreal/received_events","type":"User","site_admin":false},"labels":[{"id":484173621,"url":"https://api.github.com/repos/dash-project/dash/labels/enhancement","name":"enhancement","color":"1d76db","default":true},{"id":482169775,"url":"https://api.github.com/repos/dash-project/dash/labels/specification:dart-if","name":"specification:dart-if","color":"b0f26a","default":false}],"state":"open","locked":false,"assignee":{"login":"devreal","id":10974502,"avatar_url":"https://avatars.githubusercontent.com/u/10974502?v=3","gravatar_id":"","url":"https://api.github.com/users/devreal","html_url":"https://github.com/devreal","followers_url":"https://api.github.com/users/devreal/followers","following_url":"https://api.github.com/users/devreal/following{/other_user}","gists_url":"https://api.github.com/users/devreal/gists{/gist_id}","starred_url":"https://api.github.com/users/devreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devreal/subscriptions","organizations_url":"https://api.github.com/users/devreal/orgs","repos_url":"https://api.github.com/users/devreal/repos","events_url":"https://api.github.com/users/devreal/events{/privacy}","received_events_url":"https://api.github.com/users/devreal/received_events","type":"User","site_admin":false},"assignees":[{"login":"devreal","id":10974502,"avatar_url":"https://avatars.githubusercontent.com/u/10974502?v=3","gravatar_id":"","url":"https://api.github.com/users/devreal","html_url":"https://github.com/devreal","followers_url":"https://api.github.com/users/devreal/followers","following_url":"https://api.github.com/users/devreal/following{/other_user}","gists_url":"https://api.github.com/users/devreal/gists{/gist_id}","starred_url":"https://api.github.com/users/devreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devreal/subscriptions","organizations_url":"https://api.github.com/users/devreal/orgs","repos_url":"https://api.github.com/users/devreal/repos","events_url":"https://api.github.com/users/devreal/events{/privacy}","received_events_url":"https://api.github.com/users/devreal/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dash-project/dash/milestones/1","html_url":"https://github.com/dash-project/dash/milestones/dash-0.3.0","labels_url":"https://api.github.com/repos/dash-project/dash/milestones/1/labels","id":2066410,"number":1,"title":"dash-0.3.0","description":null,"creator":{"login":"fuchsto","id":37075,"avatar_url":"https://avatars.githubusercontent.com/u/37075?v=3","gravatar_id":"","url":"https://api.github.com/users/fuchsto","html_url":"https://github.com/fuchsto","followers_url":"https://api.github.com/users/fuchsto/followers","following_url":"https://api.github.com/users/fuchsto/following{/other_user}","gists_url":"https://api.github.com/users/fuchsto/gists{/gist_id}","starred_url":"https://api.github.com/users/fuchsto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuchsto/subscriptions","organizations_url":"https://api.github.com/users/fuchsto/orgs","repos_url":"https://api.github.com/users/fuchsto/repos","events_url":"https://api.github.com/users/fuchsto/events{/privacy}","received_events_url":"https://api.github.com/users/fuchsto/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":63,"state":"open","created_at":"2016-10-12T22:19:16Z","updated_at":"2016-11-28T12:47:29Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-11-28T11:34:57Z","updated_at":"2016-11-28T13:30:51Z","closed_at":null,"body":"I am not too happy with the allocation/initialization interface of DART groups. ATM, a group has to be allocated as follows:\r\n\r\n```\r\n  dart_group_t *  group;\r\n  size_t size;\r\n  dart_group_sizeof(&size);\r\n  group = static_cast<dart_group_t *>(malloc(size));\r\n  dart_group_init(group),\r\n```\r\n\r\nIt requires 3 (in words: three!) function calls to setup a group. This is rather complicated and highly error-prone. I understand that we cannot expose the implementation of a `dart_group_t` since it depends on the underlying implementation (shmem, mpi, ...). However, I'd like to propose a simpler interface:\r\n\r\n```\r\ndart_ret_t dart_group_init(dart_group_t **group);\r\n```\r\n\r\nwhich would allocate the implementation-specific group data object and initialize it. \r\n\r\nOn another thought, it might even be worth changing the type of a group from\r\n\r\n```\r\ntypedef struct dart_group_struct dart_group_t;\r\n```\r\n\r\nto \r\n\r\n```\r\ntypedef struct dart_group_struct* dart_group_t;\r\n```\r\n\r\nThat way, a `dart_group_t` can be used like a `dart_unit_t` or `dart_team_t` and does not have to think about the fact that the size of `struct dart_group_struct` is unknown. It is only important that a group has to be initialized before it's use. \r\n"},"comment":{"url":"https://api.github.com/repos/dash-project/dash/issues/comments/263271527","html_url":"https://github.com/dash-project/dash/issues/167#issuecomment-263271527","issue_url":"https://api.github.com/repos/dash-project/dash/issues/167","id":263271527,"user":{"login":"devreal","id":10974502,"avatar_url":"https://avatars.githubusercontent.com/u/10974502?v=3","gravatar_id":"","url":"https://api.github.com/users/devreal","html_url":"https://github.com/devreal","followers_url":"https://api.github.com/users/devreal/followers","following_url":"https://api.github.com/users/devreal/following{/other_user}","gists_url":"https://api.github.com/users/devreal/gists{/gist_id}","starred_url":"https://api.github.com/users/devreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devreal/subscriptions","organizations_url":"https://api.github.com/users/devreal/orgs","repos_url":"https://api.github.com/users/devreal/repos","events_url":"https://api.github.com/users/devreal/events{/privacy}","received_events_url":"https://api.github.com/users/devreal/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T13:30:51Z","updated_at":"2016-11-28T13:30:51Z","body":"I should note that my second proposed change (making `dart_group_t` a pointer typedef) would come with changes to all group functions to fit to the use of the other DART datatypes, i.e., strip the pointer from all function definitions:\r\n\r\n```\r\ndart_ret_t dart_group_copy(const dart_group_t *gin,\r\n                           dart_group_t *gout);\r\n```\r\n\r\nwould become\r\n\r\n```\r\ndart_ret_t dart_group_copy(const dart_group_t gin,\r\n                           dart_group_t gout);\r\n```\r\n\r\nIf we only implement the first proposed the interface would remain stable except for two changes to the API (deletion of `dart_group_sizeof` and adaptation of `dart_group_init` or renaming to `dart_group_create`)."}}
{"actor":{"display_login":"devreal"}}