{"action":"created","comment":{"url":"https://api.github.com/repos/eth-cscs/arbor/pulls/comments/180461751","pull_request_review_id":110883327,"id":180461751,"diff_hunk":"@@ -0,0 +1,186 @@\n+Domain Decomposition\n+====================\n+\n+Definitions\n+-----------\n+\n+Domain decomposition\n+    A description of the distribution of the model over the available\n+    computational resources. The description partitions the\n+    cells in the model as follows:\n+\n+        * group the cells into *cell groups* of the same kind of cell;\n+        * assign each cell group to either a CPU core or GPU on a specific MPI rank.\n+\n+    The number of cells in each cell group depends on different factors,\n+    including the type of the cell, and whether the cell group will run on a CPU\n+    core or the GPU.\n+\n+    See :cpp:class:`arb::domain_decimposition`.\n+\n+Load balancer\n+    A distributed algorithm that determines the domain decomposition using the\n+    model recipe and and description of the available computational resources as\n+    inputs.\n+\n+    See :cpp:func:`arb::partition_load_balance`.\n+\n+Hardware\n+--------\n+\n+.. cpp:namespace:: arb::hw\n+\n+.. cpp:class:: node_info\n+\n+    Information about the computational resources available to a simulation, typically a\n+    subset of the resources available on a physical hardware node.\n+    When used for distributed simulations, where a model will be distributed over more than\n+    one node, a :cpp:class:`hw::node_info` represents the resources available to the local\n+    MPI rank.\n+\n+    .. container:: example-code\n+\n+        .. code-block:: cpp\n+\n+            // Make node that uses one thread for each available hardware thread,\n+            // and one GPU if any GPUs are available.\n+            hw::node_info node;\n+            node.num_cpu_cores = threading::num_threads();\n+            node.num_gpus = hw::num_gpus()>0? 1: 0;\n+\n+    .. cpp:function:: node_info() = default\n+\n+        Default constructor (sets 1 CPU core and 0 GPUs).\n+\n+    .. cpp:function:: node_info(unsigned cores, unsigned gpus)\n+\n+        Constructor that sets the number of :cpp:var:`cores` and :cpp:var:`gpus` available.\n+\n+    .. cpp:member:: unsigned num_cpu_cores = 1\n+\n+        The number of CPU cores available.\n+\n+        By default it is assumed that there is one core available.\n+\n+    .. cpp:member:: unsigned num_gpus = 0\n+\n+        The number of GPUs available.\n+\n+        By default it is assumed that there are no GPUs.\n+\n+Load Balancers\n+--------------\n+\n+Load balancing generates a :cpp:class:`domain_decomposition` given a :cpp:class:`recipe`\n+and a description of the hardware on which the model will run. Currently Arbor provides\n+one load balancer, :cpp:func:`partition_load_balance`, and more will be added over time.\n+\n+If the model is distributed with MPI, the partitioning algorithm for cells is\n+distributed with MPI communication. The returned :cpp:class:`domain_decomposition`\n+describes the cell groups on the local MPI rank.\n+\n+.. Note::\n+    Power users know their model and the hardware resources that\n+    they are running on very well, and know best how to partition their model\n+    workload to get optimal performance.\n+    The :cpp:class:`domain_decomposition` type is kept very simple, and is\n+    independent of any load balancing algorithm, so power users can supply their\n+    own domain decomposition without using one of the built-in load balancers.\n+\n+.. cpp:namespace:: arb\n+\n+.. cpp:function:: domain_decomposition partition_load_balance(const recipe& rec, hw::node_info nd)\n+\n+    Construct a :cpp:class:`domain_decomposition` that distributes the cells\n+    in the model described by :cpp:var:`rec` over the hardware resources described\n+    by `hw::node_info`.\n+","path":"doc/cpp_domdec.rst","position":97,"original_position":97,"commit_id":"f7c886a67a6e611f76adc380b8f8c6f2e55c9c07","original_commit_id":"f7c886a67a6e611f76adc380b8f8c6f2e55c9c07","user":{"login":"halfflat","id":556816,"avatar_url":"https://avatars1.githubusercontent.com/u/556816?v=4","gravatar_id":"","url":"https://api.github.com/users/halfflat","html_url":"https://github.com/halfflat","followers_url":"https://api.github.com/users/halfflat/followers","following_url":"https://api.github.com/users/halfflat/following{/other_user}","gists_url":"https://api.github.com/users/halfflat/gists{/gist_id}","starred_url":"https://api.github.com/users/halfflat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfflat/subscriptions","organizations_url":"https://api.github.com/users/halfflat/orgs","repos_url":"https://api.github.com/users/halfflat/repos","events_url":"https://api.github.com/users/halfflat/events{/privacy}","received_events_url":"https://api.github.com/users/halfflat/received_events","type":"User","site_admin":false},"body":"A description of the algorithm it employs to do so would be useful: it is the information a prospective user would use to determine if they are likely to be satisfied with using this balancer, or if they should write their own balancer or decomposition object.","created_at":"2018-04-10T15:19:23Z","updated_at":"2018-04-10T15:58:01Z","html_url":"https://github.com/eth-cscs/arbor/pull/471#discussion_r180461751","pull_request_url":"https://api.github.com/repos/eth-cscs/arbor/pulls/471","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/comments/180461751"},"html":{"href":"https://github.com/eth-cscs/arbor/pull/471#discussion_r180461751"},"pull_request":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/471"}}},"pull_request":{"url":"https://api.github.com/repos/eth-cscs/arbor/pulls/471","id":180337599,"html_url":"https://github.com/eth-cscs/arbor/pull/471","diff_url":"https://github.com/eth-cscs/arbor/pull/471.diff","patch_url":"https://github.com/eth-cscs/arbor/pull/471.patch","issue_url":"https://api.github.com/repos/eth-cscs/arbor/issues/471","number":471,"state":"open","locked":false,"title":"Domain decomposition and simulation C++ API docs","user":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"body":"Add two new documentation pages for the C++ API\r\n  1. Domain decomposition page that covers `domain_decomposition`, `node_info` and `partition_load_balance`.\r\n  2. Simulation page that describes `arb::simulation` API interface.\r\n\r\nAlso\r\n  * fixed some small typos elsewhere in the docs.\r\n  * use `std::move` when adding spike callbacks to `arb::simulation` (useful if callbacks are stateful).","created_at":"2018-04-09T15:01:24Z","updated_at":"2018-04-10T15:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b923ad3270c1c78ab7ed381c1028628da7e67d21","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eth-cscs/arbor/pulls/471/commits","review_comments_url":"https://api.github.com/repos/eth-cscs/arbor/pulls/471/comments","review_comment_url":"https://api.github.com/repos/eth-cscs/arbor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eth-cscs/arbor/issues/471/comments","statuses_url":"https://api.github.com/repos/eth-cscs/arbor/statuses/f7c886a67a6e611f76adc380b8f8c6f2e55c9c07","head":{"label":"bcumming:doc/cpp-sim","ref":"doc/cpp-sim","sha":"f7c886a67a6e611f76adc380b8f8c6f2e55c9c07","user":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"repo":{"id":73794288,"name":"arbor","full_name":"bcumming/arbor","owner":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcumming/arbor","description":null,"fork":true,"url":"https://api.github.com/repos/bcumming/arbor","forks_url":"https://api.github.com/repos/bcumming/arbor/forks","keys_url":"https://api.github.com/repos/bcumming/arbor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcumming/arbor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcumming/arbor/teams","hooks_url":"https://api.github.com/repos/bcumming/arbor/hooks","issue_events_url":"https://api.github.com/repos/bcumming/arbor/issues/events{/number}","events_url":"https://api.github.com/repos/bcumming/arbor/events","assignees_url":"https://api.github.com/repos/bcumming/arbor/assignees{/user}","branches_url":"https://api.github.com/repos/bcumming/arbor/branches{/branch}","tags_url":"https://api.github.com/repos/bcumming/arbor/tags","blobs_url":"https://api.github.com/repos/bcumming/arbor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcumming/arbor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcumming/arbor/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcumming/arbor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcumming/arbor/statuses/{sha}","languages_url":"https://api.github.com/repos/bcumming/arbor/languages","stargazers_url":"https://api.github.com/repos/bcumming/arbor/stargazers","contributors_url":"https://api.github.com/repos/bcumming/arbor/contributors","subscribers_url":"https://api.github.com/repos/bcumming/arbor/subscribers","subscription_url":"https://api.github.com/repos/bcumming/arbor/subscription","commits_url":"https://api.github.com/repos/bcumming/arbor/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcumming/arbor/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcumming/arbor/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcumming/arbor/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcumming/arbor/contents/{+path}","compare_url":"https://api.github.com/repos/bcumming/arbor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcumming/arbor/merges","archive_url":"https://api.github.com/repos/bcumming/arbor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcumming/arbor/downloads","issues_url":"https://api.github.com/repos/bcumming/arbor/issues{/number}","pulls_url":"https://api.github.com/repos/bcumming/arbor/pulls{/number}","milestones_url":"https://api.github.com/repos/bcumming/arbor/milestones{/number}","notifications_url":"https://api.github.com/repos/bcumming/arbor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcumming/arbor/labels{/name}","releases_url":"https://api.github.com/repos/bcumming/arbor/releases{/id}","deployments_url":"https://api.github.com/repos/bcumming/arbor/deployments","created_at":"2016-11-15T08:47:50Z","updated_at":"2017-09-27T13:33:54Z","pushed_at":"2018-04-10T07:59:22Z","git_url":"git://github.com/bcumming/arbor.git","ssh_url":"git@github.com:bcumming/arbor.git","clone_url":"https://github.com/bcumming/arbor.git","svn_url":"https://github.com/bcumming/arbor","homepage":"","size":4932,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eth-cscs:master","ref":"master","sha":"e9c4523290315e96620adf01fa3948520cebea56","user":{"login":"eth-cscs","id":5744410,"avatar_url":"https://avatars0.githubusercontent.com/u/5744410?v=4","gravatar_id":"","url":"https://api.github.com/users/eth-cscs","html_url":"https://github.com/eth-cscs","followers_url":"https://api.github.com/users/eth-cscs/followers","following_url":"https://api.github.com/users/eth-cscs/following{/other_user}","gists_url":"https://api.github.com/users/eth-cscs/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-cscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-cscs/subscriptions","organizations_url":"https://api.github.com/users/eth-cscs/orgs","repos_url":"https://api.github.com/users/eth-cscs/repos","events_url":"https://api.github.com/users/eth-cscs/events{/privacy}","received_events_url":"https://api.github.com/users/eth-cscs/received_events","type":"Organization","site_admin":false},"repo":{"id":69863074,"name":"arbor","full_name":"eth-cscs/arbor","owner":{"login":"eth-cscs","id":5744410,"avatar_url":"https://avatars0.githubusercontent.com/u/5744410?v=4","gravatar_id":"","url":"https://api.github.com/users/eth-cscs","html_url":"https://github.com/eth-cscs","followers_url":"https://api.github.com/users/eth-cscs/followers","following_url":"https://api.github.com/users/eth-cscs/following{/other_user}","gists_url":"https://api.github.com/users/eth-cscs/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-cscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-cscs/subscriptions","organizations_url":"https://api.github.com/users/eth-cscs/orgs","repos_url":"https://api.github.com/users/eth-cscs/repos","events_url":"https://api.github.com/users/eth-cscs/events{/privacy}","received_events_url":"https://api.github.com/users/eth-cscs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eth-cscs/arbor","description":"The Arbor multi-compartment neural network simulation library.","fork":false,"url":"https://api.github.com/repos/eth-cscs/arbor","forks_url":"https://api.github.com/repos/eth-cscs/arbor/forks","keys_url":"https://api.github.com/repos/eth-cscs/arbor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eth-cscs/arbor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eth-cscs/arbor/teams","hooks_url":"https://api.github.com/repos/eth-cscs/arbor/hooks","issue_events_url":"https://api.github.com/repos/eth-cscs/arbor/issues/events{/number}","events_url":"https://api.github.com/repos/eth-cscs/arbor/events","assignees_url":"https://api.github.com/repos/eth-cscs/arbor/assignees{/user}","branches_url":"https://api.github.com/repos/eth-cscs/arbor/branches{/branch}","tags_url":"https://api.github.com/repos/eth-cscs/arbor/tags","blobs_url":"https://api.github.com/repos/eth-cscs/arbor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eth-cscs/arbor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eth-cscs/arbor/git/refs{/sha}","trees_url":"https://api.github.com/repos/eth-cscs/arbor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eth-cscs/arbor/statuses/{sha}","languages_url":"https://api.github.com/repos/eth-cscs/arbor/languages","stargazers_url":"https://api.github.com/repos/eth-cscs/arbor/stargazers","contributors_url":"https://api.github.com/repos/eth-cscs/arbor/contributors","subscribers_url":"https://api.github.com/repos/eth-cscs/arbor/subscribers","subscription_url":"https://api.github.com/repos/eth-cscs/arbor/subscription","commits_url":"https://api.github.com/repos/eth-cscs/arbor/commits{/sha}","git_commits_url":"https://api.github.com/repos/eth-cscs/arbor/git/commits{/sha}","comments_url":"https://api.github.com/repos/eth-cscs/arbor/comments{/number}","issue_comment_url":"https://api.github.com/repos/eth-cscs/arbor/issues/comments{/number}","contents_url":"https://api.github.com/repos/eth-cscs/arbor/contents/{+path}","compare_url":"https://api.github.com/repos/eth-cscs/arbor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eth-cscs/arbor/merges","archive_url":"https://api.github.com/repos/eth-cscs/arbor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eth-cscs/arbor/downloads","issues_url":"https://api.github.com/repos/eth-cscs/arbor/issues{/number}","pulls_url":"https://api.github.com/repos/eth-cscs/arbor/pulls{/number}","milestones_url":"https://api.github.com/repos/eth-cscs/arbor/milestones{/number}","notifications_url":"https://api.github.com/repos/eth-cscs/arbor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eth-cscs/arbor/labels{/name}","releases_url":"https://api.github.com/repos/eth-cscs/arbor/releases{/id}","deployments_url":"https://api.github.com/repos/eth-cscs/arbor/deployments","created_at":"2016-10-03T11:03:22Z","updated_at":"2018-04-06T08:21:13Z","pushed_at":"2018-04-10T13:59:29Z","git_url":"git://github.com/eth-cscs/arbor.git","ssh_url":"git@github.com:eth-cscs/arbor.git","clone_url":"https://github.com/eth-cscs/arbor.git","svn_url":"https://github.com/eth-cscs/arbor","homepage":"https://eth-cscs.github.io/nestmc/","size":3332,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":14,"open_issues":73,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/471"},"html":{"href":"https://github.com/eth-cscs/arbor/pull/471"},"issue":{"href":"https://api.github.com/repos/eth-cscs/arbor/issues/471"},"comments":{"href":"https://api.github.com/repos/eth-cscs/arbor/issues/471/comments"},"review_comments":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/471/comments"},"review_comment":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eth-cscs/arbor/pulls/471/commits"},"statuses":{"href":"https://api.github.com/repos/eth-cscs/arbor/statuses/f7c886a67a6e611f76adc380b8f8c6f2e55c9c07"}},"author_association":"OWNER"}}
{"actor":{"display_login":"halfflat"}}