{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/1230","labels_url":"https://api.github.com/repos/open-mpi/ompi/issues/1230/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/ompi/issues/1230/comments","events_url":"https://api.github.com/repos/open-mpi/ompi/issues/1230/events","html_url":"https://github.com/open-mpi/ompi/issues/1230","id":122639456,"number":1230,"title":" a problem in the btl/sm shared_mem_btl_rndv.HOSTNAME ","user":{"login":"sekifjikkatsu","id":16314220,"avatar_url":"https://avatars.githubusercontent.com/u/16314220?v=3","gravatar_id":"","url":"https://api.github.com/users/sekifjikkatsu","html_url":"https://github.com/sekifjikkatsu","followers_url":"https://api.github.com/users/sekifjikkatsu/followers","following_url":"https://api.github.com/users/sekifjikkatsu/following{/other_user}","gists_url":"https://api.github.com/users/sekifjikkatsu/gists{/gist_id}","starred_url":"https://api.github.com/users/sekifjikkatsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sekifjikkatsu/subscriptions","organizations_url":"https://api.github.com/users/sekifjikkatsu/orgs","repos_url":"https://api.github.com/users/sekifjikkatsu/repos","events_url":"https://api.github.com/users/sekifjikkatsu/events{/privacy}","received_events_url":"https://api.github.com/users/sekifjikkatsu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-mpi/ompi/labels/blocker","name":"blocker","color":"e11d21"},{"url":"https://api.github.com/repos/open-mpi/ompi/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"ggouaillardet","id":7233259,"avatar_url":"https://avatars.githubusercontent.com/u/7233259?v=3","gravatar_id":"","url":"https://api.github.com/users/ggouaillardet","html_url":"https://github.com/ggouaillardet","followers_url":"https://api.github.com/users/ggouaillardet/followers","following_url":"https://api.github.com/users/ggouaillardet/following{/other_user}","gists_url":"https://api.github.com/users/ggouaillardet/gists{/gist_id}","starred_url":"https://api.github.com/users/ggouaillardet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggouaillardet/subscriptions","organizations_url":"https://api.github.com/users/ggouaillardet/orgs","repos_url":"https://api.github.com/users/ggouaillardet/repos","events_url":"https://api.github.com/users/ggouaillardet/events{/privacy}","received_events_url":"https://api.github.com/users/ggouaillardet/received_events","type":"User","site_admin":false},"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":25,"closed_issues":186,"state":"open","created_at":"2014-10-01T15:58:55Z","updated_at":"2015-12-19T19:35:25Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-12-17T01:07:44Z","updated_at":"2015-12-19T19:35:52Z","closed_at":null,"body":"I think there is a problem in the btl/sm component.\r\nIt is the synchronization problem that is between the node master process and other child processes.\r\nOther child processes read 0 byte from shared_mem_btl_rndv.HOSTNAME file before the node master\r\n process writes sizeof(opal_shmem_ds_t) bytes to the file.\r\nI think this problem can be solved with the following correction.\r\n\r\n```patch\r\nIndex: ompi/mca/btl/sm/btl_sm.c\r\n===================================================================\r\n--- ompi/mca/btl/sm/btl_sm.c    (リビジョン 4013)\r\n+++ ompi/mca/btl/sm/btl_sm.c    (作業コピー)\r\n@@ -180,6 +180,7 @@\r\n static int\r\n sm_segment_attach(mca_btl_sm_component_t *comp_ptr)\r\n {\r\n+    struct stat buf;\r\n     int rc = OMPI_SUCCESS;\r\n     int fd = -1;\r\n     ssize_t bread = 0;\r\n@@ -195,6 +196,14 @@\r\n         rc = OMPI_ERR_IN_ERRNO;\r\n         goto out;\r\n     }\r\n+    do {\r\n+        if (0 != fstat(fd,&buf)) {\r\n+            opal_output(0, \"sm_segment_attach: \"\r\n+                           \"fstat errno=%d\\n\",errno);\r\n+            rc = OMPI_ERROR;\r\n+            goto out;\r\n+        }\r\n+    } while (sizeof(opal_shmem_ds_t) != buf.st_size);\r\n     if ((ssize_t)sizeof(opal_shmem_ds_t) != (bread =\r\n         read(fd, tmp_shmem_ds, sizeof(opal_shmem_ds_t)))) {\r\n         opal_output(0, \"sm_segment_attach: \"\r\n```\r\n\r\nThis problem occurs in the Open MPI version 1.8.\r\nAnd it may not occur in the Open MPI master."},"comment":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/comments/166018105","html_url":"https://github.com/open-mpi/ompi/issues/1230#issuecomment-166018105","issue_url":"https://api.github.com/repos/open-mpi/ompi/issues/1230","id":166018105,"user":{"login":"rhc54","id":2440928,"avatar_url":"https://avatars.githubusercontent.com/u/2440928?v=3","gravatar_id":"","url":"https://api.github.com/users/rhc54","html_url":"https://github.com/rhc54","followers_url":"https://api.github.com/users/rhc54/followers","following_url":"https://api.github.com/users/rhc54/following{/other_user}","gists_url":"https://api.github.com/users/rhc54/gists{/gist_id}","starred_url":"https://api.github.com/users/rhc54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhc54/subscriptions","organizations_url":"https://api.github.com/users/rhc54/orgs","repos_url":"https://api.github.com/users/rhc54/repos","events_url":"https://api.github.com/users/rhc54/events{/privacy}","received_events_url":"https://api.github.com/users/rhc54/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T19:35:52Z","updated_at":"2015-12-19T19:35:52Z","body":"I'm shifting this to the 2.0.0 release as 1.10 does not have the async modex feature.\r\n"}}