{"action":"created","issue":{"url":"https://api.github.com/repos/h5py/h5py/issues/1117","repository_url":"https://api.github.com/repos/h5py/h5py","labels_url":"https://api.github.com/repos/h5py/h5py/issues/1117/labels{/name}","comments_url":"https://api.github.com/repos/h5py/h5py/issues/1117/comments","events_url":"https://api.github.com/repos/h5py/h5py/issues/1117/events","html_url":"https://github.com/h5py/h5py/pull/1117","id":370182357,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyOTIwNjcw","number":1117,"title":"FIX: hide mpi imports until as late as possible","user":{"login":"tacaswell","id":199813,"node_id":"MDQ6VXNlcjE5OTgxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/h5py/h5py/milestones/15","html_url":"https://github.com/h5py/h5py/milestone/15","labels_url":"https://api.github.com/repos/h5py/h5py/milestones/15/labels","id":3411882,"node_id":"MDk6TWlsZXN0b25lMzQxMTg4Mg==","number":15,"title":"2.8.1","description":"","creator":{"login":"tacaswell","id":199813,"node_id":"MDQ6VXNlcjE5OTgxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":17,"state":"closed","created_at":"2018-06-08T20:58:47Z","updated_at":"2018-12-08T20:34:45Z","due_on":null,"closed_at":"2018-12-08T20:34:45Z"},"comments":20,"created_at":"2018-10-15T14:10:56Z","updated_at":"2018-12-12T19:19:33Z","closed_at":"2018-10-29T14:20:58Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/h5py/h5py/pulls/1117","html_url":"https://github.com/h5py/h5py/pull/1117","diff_url":"https://github.com/h5py/h5py/pull/1117.diff","patch_url":"https://github.com/h5py/h5py/pull/1117.patch"},"body":"This may help all of the mpi order-related issues.\r\n\r\ncloses #1081 "},"comment":{"url":"https://api.github.com/repos/h5py/h5py/issues/comments/446710332","html_url":"https://github.com/h5py/h5py/pull/1117#issuecomment-446710332","issue_url":"https://api.github.com/repos/h5py/h5py/issues/1117","id":446710332,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjcxMDMzMg==","user":{"login":"leofang","id":5534781,"node_id":"MDQ6VXNlcjU1MzQ3ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/5534781?v=4","gravatar_id":"","url":"https://api.github.com/users/leofang","html_url":"https://github.com/leofang","followers_url":"https://api.github.com/users/leofang/followers","following_url":"https://api.github.com/users/leofang/following{/other_user}","gists_url":"https://api.github.com/users/leofang/gists{/gist_id}","starred_url":"https://api.github.com/users/leofang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofang/subscriptions","organizations_url":"https://api.github.com/users/leofang/orgs","repos_url":"https://api.github.com/users/leofang/repos","events_url":"https://api.github.com/users/leofang/events{/privacy}","received_events_url":"https://api.github.com/users/leofang/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T19:19:33Z","updated_at":"2018-12-12T19:19:33Z","author_association":"NONE","body":"@tacaswell sorry I missed the notification. I just updated my earlier comment slightly. The code snippet above works for both h5py v2.8.0 and the current master branch.\r\n\r\nI want to add that we never saw error messages as reported in #1079, and I'm wondering if the linked issues are related to how MPI, HDF5, etc are built and not to h5py itself. \r\n\r\nThe problem we encountered is that there's a certain initialization order when using MPI together with (CUDA) GPU, and importing a parallel hdf5/h5py initialized MPI prematurely and thus messed up this order, as observed in #1081 and also revealed in the script below (tested with h5py v2.8.0 and master):\r\n```python\r\nimport h5py # MPI is already initialized here...\r\nimport mpi4py\r\nmpi4py.rc.initialize = False # undocumented switch\r\nfrom mpi4py import MPI\r\n\r\n# MPI.Is_initialized() is supposed to be False given the switch is turned off,\r\n# but surprisingly it's True because h5py is imported first!\r\nassert MPI.Is_initialized()\r\n``` \r\nI would therefore suggest to load h5py always after mpi4py. "}}
{"actor":{"display_login":"leofang"}}