Open vcbsousa opened 2 years ago
Hi, would you create a minimal example with the problem and send it with the data file ? I'll take a look.
Attachment available until Nov 2, 2022 Hello Bruno,
Thank you for offering your assistance with this issue.
I have attached to this email a folder containing a minimal example of the behavior I have experienced using the compute_RVD example code inside geogram’s git. It contains two boundary meshes in .stl format and 3 point clouds in .obj format. The two boundary meshes correspond to a solid cube and a cube with a hollow sphere inside.
I have noticed that, if I modify the for_each_polyhedron call to tentatively parallelize the computation, i.e. RVD->for_each_polyhedron(callback, true, true, true ), the following happens:
1) if the solid cube.stl is used to restrict the diagram, the computation is successful but the number of threads in the RVD section of the code seems to be limited to 2. In contrast, the parallel computation of the Delaunay graph is performed with 16 threads.
2) if the hollow cubeWithHollowSphere.stl is used, the parallel computation fails. It either says a segmentation fault happened or it displays the following message: compute_RVD(62326,0x700000b73000) malloc: error for object 0x7faa4b70417c: pointer being freed was not allocated compute_RVD(62326,0x700000b73000) malloc: set a breakpoint in malloc_error_break to debug
Thanks again for your help. Sincerely,
Victor Sousa
On Oct 1, 2022, at 1:08 AM, Bruno Levy @. @.>> wrote:
Hi, would you create a minimal example with the problem and send it with the data file ? I'll take a look.
— Reply to this email directly, view it on GitHub https://github.com/BrunoLevy/geogram/issues/26#issuecomment-1264286821, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3LQBOHMIAXQUQKQL2PJ4N3WA7WPXANCNFSM6AAAAAAQZ2F6TE. You are receiving this because you authored the thread.
Hi, Thank you for your examples, I'd need also a minimal program that shows the bug Thank you in advance, -- Bruno
Hello Bruno,
Here is the version of the main.cpp related to the compute_RVD example that shows the bug. Its only modifications from the are the use of the “RVD_cells" callback subroutine and and the activation of the parallel flag in the “for_each_polyhedron" call Let me know if you need anything else. Thank you for your assistance,
Sincerely,
Victor Sousa
On Oct 5, 2022, at 7:23 AM, Bruno Levy @.**@.>> wrote:
Hi, Thank you for your examples, I'd need also a minimal program that shows the bug Thank you in advance, -- Bruno
— Reply to this email directly, view it on GitHubhttps://github.com/BrunoLevy/geogram/issues/26#issuecomment-1268507604, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3LQBOEEDGB4JX53CUS5FJDWBWFO7ANCNFSM6AAAAAAQZ2F6TE. You are receiving this because you authored the thread.Message ID: @.***>
Thanks Victor, I don't see the file, where is it ? -- B
I apologize, I sent it as an email attachment and it seems it was not posted here. main.cpp.zip
Could you please clarify some of my doubts regarding computing the restricted voronoi diagram in multithreaded mode?
In the documentation for the function "for_each_polyhedron()" there is a boolean parameter called "parallel" that, if true, tentatively parallelizes the computation.
1) First, how does it pick the number of threads to run the computation? I noticed that the parallel implementation of the Delaunay triangulation runs with 16 threads on my mac and the RVD computation is restricted to 2 threads if the parallel flag is active.
2) Is there a reason fro the choice of wording "tentatively" in the documentation? Are there restrictions to the parallelization of this operation?
3) I have noticed that the parallelization fails if the mesh that is used to restrict the voronoi diagram has a hole inside. One example of such a mesh would be one used for the computation of the flow around a sphere. Is there a workaround to use the parallel flag in such a case? I could provide the .stl that gives the error if that would be useful.
Thank you for your assistance.