{"action":"created","issue":{"url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/66","repository_url":"https://api.github.com/repos/wesbland/mpi-forum-historic","labels_url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/66/comments","events_url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/66/events","html_url":"https://github.com/wesbland/mpi-forum-historic/issues/66","id":166689548,"number":66,"title":"Extending MPI_COMM_CREATE to create several disjoint sub-communicators from an intracommunicator","user":{"login":"wesbland","id":1561207,"avatar_url":"https://avatars.githubusercontent.com/u/1561207?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbland","html_url":"https://github.com/wesbland","followers_url":"https://api.github.com/users/wesbland/followers","following_url":"https://api.github.com/users/wesbland/following{/other_user}","gists_url":"https://api.github.com/users/wesbland/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbland/subscriptions","organizations_url":"https://api.github.com/users/wesbland/orgs","repos_url":"https://api.github.com/users/wesbland/repos","events_url":"https://api.github.com/users/wesbland/events{/privacy}","received_events_url":"https://api.github.com/users/wesbland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wesbland","id":1561207,"avatar_url":"https://avatars.githubusercontent.com/u/1561207?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbland","html_url":"https://github.com/wesbland","followers_url":"https://api.github.com/users/wesbland/followers","following_url":"https://api.github.com/users/wesbland/following{/other_user}","gists_url":"https://api.github.com/users/wesbland/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbland/subscriptions","organizations_url":"https://api.github.com/users/wesbland/orgs","repos_url":"https://api.github.com/users/wesbland/repos","events_url":"https://api.github.com/users/wesbland/events{/privacy}","received_events_url":"https://api.github.com/users/wesbland/received_events","type":"User","site_admin":false},"assignees":[{"login":"wesbland","id":1561207,"avatar_url":"https://avatars.githubusercontent.com/u/1561207?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbland","html_url":"https://github.com/wesbland","followers_url":"https://api.github.com/users/wesbland/followers","following_url":"https://api.github.com/users/wesbland/following{/other_user}","gists_url":"https://api.github.com/users/wesbland/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbland/subscriptions","organizations_url":"https://api.github.com/users/wesbland/orgs","repos_url":"https://api.github.com/users/wesbland/repos","events_url":"https://api.github.com/users/wesbland/events{/privacy}","received_events_url":"https://api.github.com/users/wesbland/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/wesbland/mpi-forum-historic/milestones/8","html_url":"https://github.com/wesbland/mpi-forum-historic/milestones/2009/07/27%20Chicago","labels_url":"https://api.github.com/repos/wesbland/mpi-forum-historic/milestones/8/labels","id":1894748,"number":8,"title":"2009/07/27 Chicago","description":"","creator":{"login":"wesbland","id":1561207,"avatar_url":"https://avatars.githubusercontent.com/u/1561207?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbland","html_url":"https://github.com/wesbland","followers_url":"https://api.github.com/users/wesbland/followers","following_url":"https://api.github.com/users/wesbland/following{/other_user}","gists_url":"https://api.github.com/users/wesbland/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbland/subscriptions","organizations_url":"https://api.github.com/users/wesbland/orgs","repos_url":"https://api.github.com/users/wesbland/repos","events_url":"https://api.github.com/users/wesbland/events{/privacy}","received_events_url":"https://api.github.com/users/wesbland/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":10,"state":"closed","created_at":"2016-07-20T18:12:55Z","updated_at":"2016-07-20T21:50:54Z","due_on":"2009-07-29T04:00:00Z","closed_at":"2016-07-20T18:12:55Z"},"comments":73,"created_at":"2016-07-20T21:44:04Z","updated_at":"2016-07-20T21:51:06Z","closed_at":null,"body":"**Originally by _RolfRabenseifner_ on 2008-12-13 07:26:16 -0600**\n\n___\n## Description\n\nIf an application wants to create a set of disjoint subcommunicators \nof a general intracommunicator and each subgroup is well known by all \nmembers of the subgroup then there are two possibilities:\n\n - Calling MPI_COMM_CREATE in a loop over the set of all subgroups.\n [[BR]]\n Disadvantage: This solution is not scalable in the number of subgroups.\n\n - Calculating a unique number for each subgroup and calling\n   MPI_COMM_SPLIT with color := this unique subgroup number.\n [[BR]]\n Disadvantage: The fully available group information is hidden \n to the MPI library. The MPI library must recalculate the subgroups\n based on the color information.\n (The unique group number may be already existing in most \n applications.)\n\n## History\n\nThe existing lack of scalability was detected at a real application \nat University of Stuttgart by Martin Bernreuther and Dominik Rössler.\nRainer Keller detected that the extended bahavior is already implemented in OpenMPI.\n\nDec 15 2008, Straw Vote on whether the MPI Forum wants this\nscaling extension to MPI_COMM_CREATE\n\n|| Yes || No || Abstain ||\n|| 30  ||  0 ||       0 ||\n\n## Proposed Solution, Part A (about intracommunicators)\n\nSubstitute p196:25-30\n\n If comm is an intra-communicator, this function creates a new\n communicator newcomm with communication group defined by group\n and a new context. No cached information propagates from comm\n to newcomm. The function returns MPI_COMM_NULL to processes\n that are not in group.\n The call is erroneous if not all group arguments have the \n same value, or if group is not a subset of the group\n associated with comm. Note that the call is to be executed\n by all processes in comm, even if they do not belong to\n the new group.\n\nby\n\n If comm is an intracommunicator, this function returns a new communicator newcomm with communication group defined by the group argument. No cached information propagates from comm to newcomm. Each process must call with a group argument that is a subgroup of the group associated with comm; this could be MPI_GROUP_EMPTY. The processes may specify different values for the group argument. If a process calls with a non-empty group then all processes in that group must call the function with the same group as argument, that is the same processes in the same order. Otherwise the call is erroneous. This implies that the set of groups specified across the processes must be disjoint. If the calling process is a member of the group given as group argument, then newcomm is a communicator with group as its associated group. In the case that a process calls with a group to which it does not belong, e.g., MPI_GROUP_EMPTY, then MPI_COMM_NULL is returned as newcomm. The function is collective and must be called by all processes in the group of comm. \n\n -Rationale.*\n The interface supports the original mechanism from MPI-1.1, which \n required the same group in all processes of comm. It was extended \n in MPI-2.2 to allow the use of disjoint subgroups in order to \n allow implementations to eliminate unnecessary communication that \n MPI_COMM_SPLIT would incur when the user already knows the \n membership of the disjoint subgroups. \n -(End of rationale.)* \n\nSubstitute p197:1-3\n\n -Advice to implementors.* \n Since all processes calling MPI_COMM_DUP\n or MPI_COMM_CREATE provide the same group argument, it is\n theoretically possible to agree on a group-wide unique \n context with no communication. \n\nby \n\n -Advice to implementors.* When calling MPI_COMM_DUP, all processes call with the same group (the group associated with the communicator). When calling MPI_COMM_CREATE, the processes provide the same group or disjoint subgroups. For both calls, it is theoretically possible to agree on a group-wide unique context with no communication.\n\nSubstitute p199:1-5 \n\n A call to MPI_COMM_CREATE(comm, group, newcomm) is equivalent\n to a call to MPI_COMM_SPLIT(comm, color, key, newcomm), where\n all members of group provide color # 0 and keyrank in group,\n and all processes that are not members of group provide\n color = MPI_UNDEFINED.\n The function MPI_COMM_SPLIT allows more general partitioning of\n a group into one or more subgroups with optional reordering.\n\nby\n\n With an intracommunicator comm, a call to MPI_COMM_CREATE(comm, group, newcomm) is equivalent to a call to MPI_COMM_SPLIT(comm, color, key, newcomm), where processes that are members of their group argument provide color # number of the group (based on a unique numbering of all disjoint groups) and keyrank in group, and all processes that are not members of their group argument provide color = MPI_UNDEFINED. \n \nAfter p199:12 (\"..., or linear algebra\"), the following paragraph is added:\n \n For intracommunicators, MPI_COMM_SPLIT provides similar capability \n as MPI_COMM_CREATE to split a communicating group into disjoint \n subgroups. \n MPI_COMM_SPLIT is useful when some processes do not have complete \n information of the other members in their group, but all processes \n know (the color of) the group to which they belong. \n In this case, the MPI implementation \n discovers the other group members via communication. \n MPI_COMM_CREATE is useful when all processes have complete \n information of the members of their group. \n In this case, MPI can avoid the extra communication \n required to discover group membership. \n\nAfter p199:36, the following advice is added:\n\n -Advice to users.*\n For intercommunicators, MPI_COMM_SPLIT is more general than \n MPI_COMM_CREATE. A single call to MPI_COMM_SPLIT can create a set \n of disjoint intercommunicators, while a call to MPI_COMM_CREATE \n creates only one. \n -(End of advice to users.)* \n\n## Solution, Part B (about intercommunicators)\n\nSubstitute p197, line 16: \n\n ... a part of newcomm. If either group does ... \n\nby \n\n ... a part of newcomm. All processes in the same local group of \n comm must specify the same value for group, i.e., the same members \n in the same order. If either group does ... \n\n## Impact on Implementations\n\nSome implementations may have already implemented this extension.\nAt least they must check  the implementation with the new interface definition.\n\n## Impact on Applications / Users\n\nPart A: None to existing applications, because it is an extension.\n\nPart B: This is a clarification. It was not clearly specified whether on processes that do not belong to newcomm, the same group argument must be given or other \"strange\" groups or MPI_GROUP_EMPTY are also allowed.\n\n## Implementation\n\nThe following implementation (based on MPI_Comm_split)\nis valid, but does not show the possible performance advantages. \nIt is recommended to use an implementation based on the \nexisting MPI_Comm_create instead of using MPI_Comm_split.\n\n```\n#include \"mpi.h\"\n \nint MPI_Comm_create_ticket66( MPI_Comm comm, \n                              MPI_Group group, \n                              MPI_Comm *newcomm)\n{\n  int ierr;\n  int flag, myrank_in_group, zero, key, color; \n  MPI_Group group_of_comm; \n \n  ierr=MPI_Comm_test_inter(comm, &flag); \n  if (flag) { \n    /* intercommunicator --> use existing implementation */\n    return( MPI_Comm_create(comm, group, newcomm) );\n  } else\n  { /* intracommunicator --> use MPI_Comm_split */\n    /* step 1: calculate (color,key)            */\n    if (group == MPI_GROUP_EMPTY)\n    { color=MPI_UNDEFINED; key=0;\n    } else\n    { \n      ierr=MPI_Group_rank(group, &myrank_in_group); \n      if (myrank_in_group == MPI_UNDEFINED) \n      { color=MPI_UNDEFINED; key=0;\n      } else\n      { \n        /* use rank in \"comm\" of the process \n           with rank==0 in \"group\" as identical \n           \"color\" of all processes in \"group\" */\n        ierr=MPI_Comm_group(comm, &group_of_comm);\n        zero=0; \n        MPI_Group_translate_ranks(group, 1, &zero,\n                             group_of_comm, &color);\n        key=myrank_in_group; \n      } \n    } \n    /* step 2: call MPI_Comm_split */\n    return( MPI_Comm_split(comm, color, key, newcomm) ); \n  } \n} \n```\nThe software is provided on the as-is basis.\n\n## Alternative Solutions\n\n## Entry for the Change Log\n\nSection 6.4.2 on page 194.[[BR]]\nMPI_COMM_CREATE is extended to allow several disjoint subgroups \nas input if comm is an intracommunicator.[[BR]]\n**(If Part B is approved:)**[[BR]]\nIf comm is an intercommunicator it was clarified that\nall processes in the same local group of \ncomm must specify the same value for group. "},"comment":{"url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/comments/234094828","html_url":"https://github.com/wesbland/mpi-forum-historic/issues/66#issuecomment-234094828","issue_url":"https://api.github.com/repos/wesbland/mpi-forum-historic/issues/66","id":234094828,"user":{"login":"wesbland","id":1561207,"avatar_url":"https://avatars.githubusercontent.com/u/1561207?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbland","html_url":"https://github.com/wesbland","followers_url":"https://api.github.com/users/wesbland/followers","following_url":"https://api.github.com/users/wesbland/following{/other_user}","gists_url":"https://api.github.com/users/wesbland/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbland/subscriptions","organizations_url":"https://api.github.com/users/wesbland/orgs","repos_url":"https://api.github.com/users/wesbland/repos","events_url":"https://api.github.com/users/wesbland/events{/privacy}","received_events_url":"https://api.github.com/users/wesbland/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T21:51:06Z","updated_at":"2016-07-20T21:51:06Z","body":"**Originally by @jsquyres on 2009-08-25 09:07:11 -0500**\n\n___\nRolf -- aren't you the ticket author?"}}
{"actor":{"display_login":"wesbland"}}