-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Multiprocessing example #28
Comments
One gotcha to watch out for -- I've found that using multiprocessing correctly usually requires OS-specific tweaks. Make sure any multiprocessing examples work on, at minimum, Windows 10 and some reasonable OSX. |
@sclamons what tweaks do you know about for Mac OSX? I've only done this on Windows and Linux which function the same. |
I have to do
or the new processes hang. The guard is there because if you try to set_start_method when the start method is already safe, multiprocessing throws an exception. This is a known bug in Linux, too. Another problem, this one specific to IPython notebooks: IPython can't pass functions defined in a notebook to a function like Pool.map, for reasons I really don't understand. If you want to wrap your lineage simulation in anything more complex than the built-in bioscrape simulation methods, you have to write that function in a separate file and import it. I've used the following code to write a notebook-defined function
|
To do a parameter sweet and to run many stochastic simulations and average the results to get a distribution.
The text was updated successfully, but these errors were encountered: