-
Notifications
You must be signed in to change notification settings - Fork 71
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
Parallelisation support #49
Comments
As far as I understand, nothing should prevent PySAT to be used in parallel using let's say |
Let me just add that I've successfully used pysat with multiprocessing in python @alexeyignatiev. |
That's great to know, @WonJayne! Can you share some concrete recipe with us so that I could probably add it to the documentation? (Because, as I mentioned before, I haven't tried multiprocessing with PySAT myself.) |
@alexeyignatiev Sure. I'll prepare an example, such that you can integrate it. I'll try to follow the style of the existing examples. I think having a small example is actually quite valuable, as the wrong usage of subprocesses can cause out of memory errors (when the solver instance is not deleted). I'll let you know, when the example is ready. Let me use this possibility to thank you for this exceptional package, it enabled me to do a great thesis! |
@WonJayne great to know that the toolkit was of help, thanks! :) And thank you for preparing the example. I believe it will be useful for a wide audience of users! |
@WonJayne, by any chance, did you manage to prepare the example? :) |
@WonJayne, please let me know if your use of PySAT in parallel was done in a similar vein. |
Indeed, I used PySat in parallel in a similar vein. However, in the mean time, I found an alternative way to leverage your awesome work and a parallel solver, CryptoMiniSat. CMS is cool, as it supports both single and multithreaded usage and offers incremental usage. The integration works as follows: I put together a wrapper (crypto_mini_sat.zip) around the Solver of PyCryptoSat, the Python version of CMS, such that one can swap the solvers freely and installed PyCryptoSat with pypi. However, there's one caveat: Currently, the most recent version of CMS that is available for windows is 5.7.0, which is known to suffer from a memory related bug, causing excessive solving times for some cases. But there's light at the end of the tunnel: The most up to date version of CMS should no longer suffer from that, as it has been fixed. Furthermore, in this comment, it is stated that PyCryptoSat will soon be available on PyPi. Hence, I would propose the following to integrate CMS in the near Future: |
Great that you like the Idea of integration via PyPI. Just out of curiosity, what is your concern with limited incremental functionality? The get_conflict method is available since May 2019. Are there more things needed for incremental solving? |
Well, there were quite a few methods in the list here missing in CMS at that point. |
I see. Could have figured out that myself, since my wrapper has lot's of NotImplemented exceptions for the missing methods. |
I was wondering if there is any current support for parallelisation (I want to solve multiple SAT problems at the same time).
Is either Python threads (you could release the GIL?), or multiprocessing supported?
The text was updated successfully, but these errors were encountered: