{"action":"created","issue":{"url":"https://api.github.com/repos/fatiando/fatiando/issues/182","labels_url":"https://api.github.com/repos/fatiando/fatiando/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/fatiando/fatiando/issues/182/comments","events_url":"https://api.github.com/repos/fatiando/fatiando/issues/182/events","html_url":"https://github.com/fatiando/fatiando/issues/182","id":62420605,"number":182,"title":"Pass a multiprocessing.Pool object to forward modeling functions ","user":{"login":"leouieda","id":290082,"avatar_url":"https://avatars.githubusercontent.com/u/290082?v=3","gravatar_id":"","url":"https://api.github.com/users/leouieda","html_url":"https://github.com/leouieda","followers_url":"https://api.github.com/users/leouieda/followers","following_url":"https://api.github.com/users/leouieda/following{/other_user}","gists_url":"https://api.github.com/users/leouieda/gists{/gist_id}","starred_url":"https://api.github.com/users/leouieda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leouieda/subscriptions","organizations_url":"https://api.github.com/users/leouieda/orgs","repos_url":"https://api.github.com/users/leouieda/repos","events_url":"https://api.github.com/users/leouieda/events{/privacy}","received_events_url":"https://api.github.com/users/leouieda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fatiando/fatiando/labels/feature%20request","name":"feature request","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T15:01:29Z","updated_at":"2015-03-17T15:59:40Z","closed_at":null,"body":"The new version of `fatiando.gravmag.tesseroid` (#175) uses the multiprocessing.Pool to execute the forward modeling in parallel. However, each call to the forward modeling functions creates a new Pool. This can cause significant overhead when functions are called many times.\r\n\r\nAn option would be pass in a Pool object created before so that it can be reused. Currently, the functions take a `njobs` argument that, if > 1, tells how many processes to include in the Pool. This argument could optionally receive an open Pool object to use."},"comment":{"url":"https://api.github.com/repos/fatiando/fatiando/issues/comments/82434006","html_url":"https://github.com/fatiando/fatiando/issues/182#issuecomment-82434006","issue_url":"https://api.github.com/repos/fatiando/fatiando/issues/182","id":82434006,"user":{"login":"leouieda","id":290082,"avatar_url":"https://avatars.githubusercontent.com/u/290082?v=3","gravatar_id":"","url":"https://api.github.com/users/leouieda","html_url":"https://github.com/leouieda","followers_url":"https://api.github.com/users/leouieda/followers","following_url":"https://api.github.com/users/leouieda/following{/other_user}","gists_url":"https://api.github.com/users/leouieda/gists{/gist_id}","starred_url":"https://api.github.com/users/leouieda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leouieda/subscriptions","organizations_url":"https://api.github.com/users/leouieda/orgs","repos_url":"https://api.github.com/users/leouieda/repos","events_url":"https://api.github.com/users/leouieda/events{/privacy}","received_events_url":"https://api.github.com/users/leouieda/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T15:59:40Z","updated_at":"2015-03-17T15:59:40Z","body":"Can't pass the pool as `njobs` because then there is no way of knowing how many processes are in the pool. I need this number to split the computation point arrays between processes."}}