-
Notifications
You must be signed in to change notification settings - Fork 32
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
GLPK not thread safe? #2934
Comments
We have not really¹ considered multithreading so far, so I am not surprised that there are problems. Here is what happens. The As a remedy you can use the function test(numtimes, eye)
display = tohrep(VPolygon(regular_polygon(6)))
result = Vector(undef,0)
Threads.@threads for i in 1:numtimes
push!(result,area(LazySets.translate(display,[i,0])∩eye))
end
return result
end Of course that does not fix the problem with ¹Not totally true, but anyway. |
Thanks, I'll try using tohrep and look at the GLPK issue #157. |
I close this because there is probably nothing we can do. #2935 added a method that does not use |
For speed, my suggestion would be that you consider using statically sized arrays, instead of normal Julia arrays (see StaticArrays.jl). |
I want to multithread set computations for speed. This example gives the gist:
This code works fine if I don't multithread the for loop but it is very slow: 14ms on my core i7 11800H 8 core laptop. But the multithreaded code crashes:
Is the GLPK library not thread safe? Is it possible to multithread operations in LazySets?
The text was updated successfully, but these errors were encountered: