-
Notifications
You must be signed in to change notification settings - Fork 222
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
Support multiprocessing without importing gmt in each process #217
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct. |
@norfordb thanks! OK, I think I know what the problem is. The I'll try to think of a way around this. For now, we'll your code as a test case so we know how it works. Again, thank you for reporting this! 🥇 |
Thanks a lot for reporting this problem - I was really scratching my head why plotting in parallel didn't work! For the record, here is how I work around this error for now: One can manually reload from importlib import reload
def gmt_fun(n):
import pygmt
reload(pygmt)
... |
Thanks for your solution. It works on my linux(centos) machine. |
Feedback or description of feature requested
When attempting to call a script using gmt-python by way of the python multiprocessing library (multiprocessing.pool), an error is returned, as shown below.
Are you willing to help implement and maintain this feature? No
Full code that generated the error
The code does work with the following change:
Full error message
System information
conda list
below:The text was updated successfully, but these errors were encountered: