{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/pmix/issues/10","labels_url":"https://api.github.com/repos/open-mpi/pmix/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/pmix/issues/10/comments","events_url":"https://api.github.com/repos/open-mpi/pmix/issues/10/events","html_url":"https://github.com/open-mpi/pmix/pull/10","id":59468407,"number":10,"title":"Provide more flexible client setup at fork. ","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":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-02T11:19:17Z","updated_at":"2015-03-02T18:07:33Z","closed_at":"2015-03-02T15:11:51Z","pull_request":{"url":"https://api.github.com/repos/open-mpi/pmix/pulls/10","html_url":"https://github.com/open-mpi/pmix/pull/10","diff_url":"https://github.com/open-mpi/pmix/pull/10.diff","patch_url":"https://github.com/open-mpi/pmix/pull/10.patch"},"body":"Add PMIx_server_setup_fork_fn function that can use external callback to set\r\nenvironment variable.\r\nFor example in SLURM setup of new client is done in stepd environment\r\nand one has a pointer to the future client environment."},"comment":{"url":"https://api.github.com/repos/open-mpi/pmix/issues/comments/76765006","html_url":"https://github.com/open-mpi/pmix/pull/10#issuecomment-76765006","issue_url":"https://api.github.com/repos/open-mpi/pmix/issues/10","id":76765006,"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-03-02T18:07:33Z","updated_at":"2015-03-02T18:07:33Z","body":"I’m totally confused. Why does the host server need to parse the variables?? They are meaningless to anyone outside of the PMIx library itself.\n\n\n> On Mar 2, 2015, at 10:02 AM, Artem Polyakov <notifications@github.com> wrote:\n> \n> 2015-03-03 0:00 GMT+06:00 Artem Polyakov <artpol84@gmail.com>:\n> \n> >\n> >\n> > 2015-03-02 23:50 GMT+06:00 rhc54 <notifications@github.com>:\n> >\n> >> Wow, I'm even more confused. We don't replace any environment in that\n> >> function, nor do we modify the current environment in any way. We just add\n> >> some things to the char** array that you give us. Could be any array, not\n> >> necessarily an environment.\n> >>\n> > Ahh, sorry. That is my fault. I messed thing up (was sleepy).\n> > You are right in PMIx_server_setup_fork you changes env and that is\n> > clearly a right way to go.\n> > The problem was that SLURM uses modified mmemory allocation functions\n> > (xmalloc instead of malloc). The memory ponted by env in p_mpi_hook_slurmstepd_task\n> > is allocated with xmalloc and that leads to segfault when pmix_setenv tries\n> > to expand it with realloc.\n> >\n> >> Let's just table this as clearly we aren't communicating. Do whatever you\n> >> need on the Slurm side.\n> >>\n> > I'll need the way to retreive the name of variables and their values as an\n> > array or with something else.\n> >\n> Of course I can pass temporal env into PMIx_server_setup_fork and parse\n> NAME=VALUE strings. But I would be happy to avoid that.\n> \n> > —\n> >> Reply to this email directly or view it on GitHub\n> >> <https://github.com/open-mpi/pmix/pull/10#issuecomment-76761627>.\n> >>\n> >\n> >\n> >\n> > --\n> > С Уважением, Поляков Артем Юрьевич\n> > Best regards, Artem Y. Polyakov\n> >\n> \n> \n> \n> -- \n> С Уважением, Поляков Артем Юрьевич\n> Best regards, Artem Y. Polyakov\n> —\n> Reply to this email directly or view it on GitHub <https://github.com/open-mpi/pmix/pull/10#issuecomment-76764017>.\n> \n\n"}}