payload: {"action":"created","issue":{"url":"https://api.github.com/repos/thouska/spotpy/issues/222","repository_url":"https://api.github.com/repos/thouska/spotpy","labels_url":"https://api.github.com/repos/thouska/spotpy/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/thouska/spotpy/issues/222/comments","events_url":"https://api.github.com/repos/thouska/spotpy/issues/222/events","html_url":"https://github.com/thouska/spotpy/issues/222","id":456847181,"node_id":"MDU6SXNzdWU0NTY4NDcxODE=","number":222,"title":"correct way to spawn a subprocess when running SCE-UA using multiprocess mpi","user":{"login":"iacopoff","id":38247963,"node_id":"MDQ6VXNlcjM4MjQ3OTYz","avatar_url":"https://avatars3.githubusercontent.com/u/38247963?v=4","gravatar_id":"","url":"https://api.github.com/users/iacopoff","html_url":"https://github.com/iacopoff","followers_url":"https://api.github.com/users/iacopoff/followers","following_url":"https://api.github.com/users/iacopoff/following{/other_user}","gists_url":"https://api.github.com/users/iacopoff/gists{/gist_id}","starred_url":"https://api.github.com/users/iacopoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iacopoff/subscriptions","organizations_url":"https://api.github.com/users/iacopoff/orgs","repos_url":"https://api.github.com/users/iacopoff/repos","events_url":"https://api.github.com/users/iacopoff/events{/privacy}","received_events_url":"https://api.github.com/users/iacopoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2019-06-17T09:59:36Z","updated_at":"2019-09-23T10:52:34Z","closed_at":null,"author_association":"NONE","body":"Hi, I am calibrating an hydrological model (VIC model) using SCE-UA.\r\n\r\nBelow a short description of the way the model is run from the calibration.py script:\r\nWithin the spotpy_setup class, under the simulation method, I call a model class which then uses the subprocess.run() function to run the VIC executable.\r\n\r\nThis works fine when I am running the script on a single core. \r\n\r\nHowever, when i try to run the sceua algorithm in parallel (argument parallel=\"mpi\"), writing on the terminal mpiexec -np python calibration.py, I get the following error:\r\n\r\n_--------------------------------------------------------------------------\r\nAn MPI process has executed an operation involving a call to the\r\n\"fork()\" system call to create a child process.  Open MPI is currently\r\noperating in a condition that could result in memory corruption or\r\nother system errors; your MPI job may hang, crash, or produce silent\r\ndata corruption.  The use of fork() (or system() or other calls that\r\ncreate child processes) is strongly discouraged.\r\n\r\nThe process that invoked fork was:\r\n\r\n  Local host:          mgmt01 (PID 23174)\r\n  MPI_COMM_WORLD rank: 1\r\n\r\nIf you are *absolutely sure* that your application will successfully\r\nand correctly survive a call to fork(), you may disable this warning\r\nby setting the mpi_warn_on_fork MCA parameter to 0.\r\n--------------------------------------------------------------------------_\r\n\r\n\r\nI reckon this is because I am using subprocess.run().\r\n\r\nDoes anyone have encountered the same issue and would like to share a solution? maybe using mpi4py itself (i am not familiar with multiprocessing, but about to dive into it)?\r\n\r\nthanks!\r\n\r\niacopo"},"comment":{"url":"https://api.github.com/repos/thouska/spotpy/issues/comments/534049463","html_url":"https://github.com/thouska/spotpy/issues/222#issuecomment-534049463","issue_url":"https://api.github.com/repos/thouska/spotpy/issues/222","id":534049463,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDA0OTQ2Mw==","user":{"login":"bees4ever","id":21102167,"node_id":"MDQ6VXNlcjIxMTAyMTY3","avatar_url":"https://avatars1.githubusercontent.com/u/21102167?v=4","gravatar_id":"","url":"https://api.github.com/users/bees4ever","html_url":"https://github.com/bees4ever","followers_url":"https://api.github.com/users/bees4ever/followers","following_url":"https://api.github.com/users/bees4ever/following{/other_user}","gists_url":"https://api.github.com/users/bees4ever/gists{/gist_id}","starred_url":"https://api.github.com/users/bees4ever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bees4ever/subscriptions","organizations_url":"https://api.github.com/users/bees4ever/orgs","repos_url":"https://api.github.com/users/bees4ever/repos","events_url":"https://api.github.com/users/bees4ever/events{/privacy}","received_events_url":"https://api.github.com/users/bees4ever/received_events","type":"User","site_admin":false},"created_at":"2019-09-23T10:52:34Z","updated_at":"2019-09-23T10:52:34Z","author_association":"CONTRIBUTOR","body":"Hi @iacopoff,\r\n\r\nyes for me it worked with the `__file__` constant.\r\nI worked around now, to not use it anymore. if you have some time you may can apply the patch https://patch-diff.githubusercontent.com/raw/thouska/spotpy/pull/235.patch and test if you now can successfully build the `hymod` exe...\r\n\r\nThanky\r\n\r\n"}}
other: {"actor":{"display_login":"bees4ever"}}