-
Notifications
You must be signed in to change notification settings - Fork 19
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
Multiprocessing #11
Comments
|
Would it be an idea to not support Python 2.7 (just leave the old code in place when running Python 2.7) and only build this for Python3? |
#77 has a good start for concurrent initialization of objects. It also uncovers that the usage pattern of initializing Realization objects and then asking them do update themselves is not well suited for concurrent runs, as pickling and depickling realization objects back and forth for every operation do not scale. A suggestion could be to allow for more processing in a realization to happen at time of object initialization. It might be possible to pass a dict with names of realization function call as keys, and with (list of) function arguments as dict values, which can be passed to |
Batch processor in #78 |
#106 is ready as an implementation of this issue. Speedup is still disappointingly low, and is effectively holding back merging into master. |
Operations over an ensembles are trivially parallelizable.
We should utilize Python multiprocessing for this.
multiprocessing is what should be used, as multithreading will suffer from GIL.
This is probably trivial for
ensemble.get_smry()
, but not so trivial forensemble.from_smry()
, as we need to populate each realization object with smry data in the parent process' memory space.Maybe
ensemble.from_smry()
should callrealization.get_smry()
with multiprocessing, and then the ensemble object (holding the master process) populates each realizationsself.data['unsmry-<something>']
.We must ensure CTRL-C works, which is trickier with Multiprocessing.
See this: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python
When this is in place, we should also be able to skip issues when libecl is core-dumping due to a difficult UNSMRY-file.
Right now, your Python session will die if libecl crashes on rough data.
The text was updated successfully, but these errors were encountered: