-
Notifications
You must be signed in to change notification settings - Fork 128
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
Make various geogram functions thread-safe #68
Comments
ForLBFGS/ HLBFGS, Dmitry Sokolov wrote a new version, that probably does not have all these globals. I'll take a look ! |
Hi Bruno, Please let me know if you need data set to reproduce the issue. Thanks, |
Hi @Abenabbou,
|
Hi @BrunoLevy, - Which class do you use for 2D Delaunay triangulation ? We use the factory in Delaunay::create(2) after settings the args in cmdline. Below how we do it:
What are the symptoms ? If it is a crash, did you take a look at the stack trace ? Where was it ? yes we have a crash. Below the trace of the crash (from a Gtest):
The class Delaunay2d uses the citation system that has globals, it may be the culptrit (I will deactivate it or make it optional in a future release). In the meanwhile, you can try commenting-out the cite() function in src/lib/geogram/bibliography.cpp. Yes we have already done this and it woks, as you said a temporary solution! CD2T This is a very good news :), we will give it a try and let you know. We have already a CD2T in house, for that we use your D2T and insert the constraints by an algorithm we have in our side. In our algorithm, we have the option to restore the Delaunay after constraints insertion and we don't have additional point (Steiner). Is your CD2T has these features too? Regards, |
Hi Azeddine, Yes, the |
Thank you Bruno. We will try it. |
Is this version available somewhere btw? |
Yes, here |
Would you be able to use it in Geogram under a different license then? |
It would be problematic for some users of geogram in the industry, |
If Dmitry doesn't want to release his implementation under a permissive license, it'd be good to make it possible to plug other L-BFGS implementations into Geogram, e.g. via the use of a templated or polymorphic interface. E.g. I've used CppNumericalSolvers in the past and I like how it's designed. There's also optim which has a permissive license and a few interesting features. In any case it'd be good to make the L-BFGS backend solver configurable so we can hook up a thread-safe implementation for industrial applications. |
By "thread-safe" here I mean "being able to call geogram functions concurrently". E.g. being able to run Delaunay triangulation on two meshes in parallel (which can happen when integrating Geogram functions in a node-base application like Blender). This is why having a central scheduler (like OneTBB) helps a lot. Currently a lot of geogram routines use global static variables. Using
thread_local
instead would help. Some examples:Ideally this should be tested with
ThreadSanitizer
by calling Delaunay triangulation on a few meshes in parallel...The text was updated successfully, but these errors were encountered: