{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/1202","labels_url":"https://api.github.com/repos/open-mpi/ompi/issues/1202/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/ompi/issues/1202/comments","events_url":"https://api.github.com/repos/open-mpi/ompi/issues/1202/events","html_url":"https://github.com/open-mpi/ompi/pull/1202","id":121454237,"number":1202,"title":"Fix MPI_Alltoall to support inter-communicators.","user":{"login":"artpol84","id":7534910,"avatar_url":"https://avatars.githubusercontent.com/u/7534910?v=3","gravatar_id":"","url":"https://api.github.com/users/artpol84","html_url":"https://github.com/artpol84","followers_url":"https://api.github.com/users/artpol84/followers","following_url":"https://api.github.com/users/artpol84/following{/other_user}","gists_url":"https://api.github.com/users/artpol84/gists{/gist_id}","starred_url":"https://api.github.com/users/artpol84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artpol84/subscriptions","organizations_url":"https://api.github.com/users/artpol84/orgs","repos_url":"https://api.github.com/users/artpol84/repos","events_url":"https://api.github.com/users/artpol84/events{/privacy}","received_events_url":"https://api.github.com/users/artpol84/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-mpi/ompi/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/open-mpi/ompi/milestones/4","html_url":"https://github.com/open-mpi/ompi/milestones/v2.0.0","labels_url":"https://api.github.com/repos/open-mpi/ompi/milestones/4/labels","id":810131,"number":4,"title":"v2.0.0","description":"","creator":{"login":"ompiteam","id":2165735,"avatar_url":"https://avatars.githubusercontent.com/u/2165735?v=3","gravatar_id":"","url":"https://api.github.com/users/ompiteam","html_url":"https://github.com/ompiteam","followers_url":"https://api.github.com/users/ompiteam/followers","following_url":"https://api.github.com/users/ompiteam/following{/other_user}","gists_url":"https://api.github.com/users/ompiteam/gists{/gist_id}","starred_url":"https://api.github.com/users/ompiteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ompiteam/subscriptions","organizations_url":"https://api.github.com/users/ompiteam/orgs","repos_url":"https://api.github.com/users/ompiteam/repos","events_url":"https://api.github.com/users/ompiteam/events{/privacy}","received_events_url":"https://api.github.com/users/ompiteam/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":180,"state":"open","created_at":"2014-10-01T15:58:55Z","updated_at":"2015-12-14T22:33:23Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2015-12-10T10:36:57Z","updated_at":"2015-12-15T02:39:51Z","closed_at":"2015-12-14T22:33:23Z","pull_request":{"url":"https://api.github.com/repos/open-mpi/ompi/pulls/1202","html_url":"https://github.com/open-mpi/ompi/pull/1202","diff_url":"https://github.com/open-mpi/ompi/pull/1202.diff","patch_url":"https://github.com/open-mpi/ompi/pull/1202.patch"},"body":"@bosilca @jsquyres @miked-mellanox @jladd-mlnx @hjelmn \r\nHello, I'm seing hangs of the **icalltoall** MPICH/coll tests.\r\n\r\nIn **icalltoall** hang occured because in line 46:\r\nhttp://git.mpich.org/mpich-mellanox.git/blob/master:/test/mpi/coll/icalltoall.c#l46\r\n`Alltoall` is called with **zero** receive buffer. In ompi/master we immidiately exit:\r\nhttps://github.com/open-mpi/ompi/blob/master/ompi/mpi/c/alltoall.c#L99\r\nwhile in v1.10 we would continue:\r\nhttps://github.com/open-mpi/ompi-release/blob/v1.10/ompi/mpi/c/alltoall.c#L101:L103\r\n\r\nAs you can see in https://github.com/open-mpi/ompi/blob/master/ompi/mpi/c/alltoall.c#L99 we will only exit if receive size is 0, we don't have this option for the send buffer.\r\nAs the result left side of the inter-communicator immidiately exits `Alltoall` and continues while the right side waits for the collective to complete.\r\n\r\nOther collectives are not so strict about that, i.e. **ialltoall** doesn't have this check at all:\r\nhttps://github.com/open-mpi/ompi/blob/master/ompi/mpi/c/ialltoall.c#L100\r\nThe same is for **alltoallv**:\r\nhttps://github.com/open-mpi/ompi/blob/master/ompi/mpi/c/alltoallv.c#L123\r\n\r\nthe comment  before deleted piece of code references MPI standard:\r\n```C\r\n-    /* Do we need to do anything? Per MPI standard the (v3.1 page 168 line 48)\r\n-     * the amount of data sent must be equal to the amount of data received.\r\n-     */\r\n-    ompi_datatype_type_size(recvtype, &recvtype_size);\r\n-    if( (0 == recvcount) || (0 == recvtype_size) ) {\r\n-        return MPI_SUCCESS;\r\n-    }\r\n```\r\n\r\nHere is the snippet:\r\n```\r\nThe type signature associated with sendcount, sendtype, at a process must be equal to the \r\ntype signature associated with recvcount, recvtype at any other process. This implies that \r\nthe amount of data sent must be equal to the amount of data received, pairwise between \r\nevery pair of processes.\r\n```\r\n\r\nHowever I think that comment interprets this only for intra-communicators. In case of inter-communicators we don't know what did processes in other group specified as the sendbuffer/sendcount.\r\nAnd there is already parameter check for the intra-communicator case in the code:\r\nhttps://github.com/open-mpi/ompi/blob/master/ompi/mpi/c/alltoall.c#L85:L92\r\n\r\nOther collectives seems to be consistent and pass MPICH/coll tests from this perspective."},"comment":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/comments/164625767","html_url":"https://github.com/open-mpi/ompi/pull/1202#issuecomment-164625767","issue_url":"https://api.github.com/repos/open-mpi/ompi/issues/1202","id":164625767,"user":{"login":"artpol84","id":7534910,"avatar_url":"https://avatars.githubusercontent.com/u/7534910?v=3","gravatar_id":"","url":"https://api.github.com/users/artpol84","html_url":"https://github.com/artpol84","followers_url":"https://api.github.com/users/artpol84/followers","following_url":"https://api.github.com/users/artpol84/following{/other_user}","gists_url":"https://api.github.com/users/artpol84/gists{/gist_id}","starred_url":"https://api.github.com/users/artpol84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artpol84/subscriptions","organizations_url":"https://api.github.com/users/artpol84/orgs","repos_url":"https://api.github.com/users/artpol84/repos","events_url":"https://api.github.com/users/artpol84/events{/privacy}","received_events_url":"https://api.github.com/users/artpol84/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T02:39:51Z","updated_at":"2015-12-15T02:39:51Z","body":"@hjelmn it's not applicable to 1.10:\r\nhttps://github.com/open-mpi/ompi-release/blob/v1.10/ompi/mpi/c/alltoall.c#L101:L103"}}