Skip to content

Conversation

@yg42
Copy link

@yg42 yg42 commented May 4, 2021

This PR is for debugging purposes.

Summary of Changes

I am trying to modify the function lloyd_optimize_mesh_2 in order to have a parallel computation of all movements.

When I simulate the threaded behavior (using a serie of different function calls), I have no problem and it seems to work. However, if I use actual threads, I get an error that occurs at Constrained_voronoi_diagram_2.h:360 (this line is polygon.push_back(m_cdt.circumcenter(face));)

This error is malloc(): unaligned tcache chunk detected

yg42 added 3 commits May 4, 2021 17:54
Tentative version of lloyd_optimize on Mesh_2
This causes a random segfault
@maxGimeno maxGimeno added the Not yet approved The feature or pull-request has not yet been approved. label May 5, 2021
@maxGimeno maxGimeno added this to the 5.4-beta milestone May 5, 2021
@yg42
Copy link
Author

yg42 commented May 17, 2021

Hello all,
have anyone managed to reproduce this problem ?

best regards

yann


// create and start thread
TYPE_THREAD th = std::async(&Mesh_global_optimizer_2::threaded_move, this,
t, std::ref(itBegin), std::ref(itEnd),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line should be replaced by t, itBegin, itEnd

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean this will solve the problem ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should solve the problem, yes!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, the crash I was meeting was not the one you mention in the title message.

@janetournois
Copy link
Member

Also, I think moving_vertices should not be modified with remove in compute_move(), but after all moves have been computed, but maybe it works as is

@sloriot sloriot modified the milestones: 5.4-beta, 5.5-beta1 Sep 23, 2021
@sloriot sloriot modified the milestones: 5.5-beta, 5.6-beta Apr 12, 2022
@MaelRL MaelRL modified the milestones: 5.6-beta, 5.7-beta Mar 31, 2023
@janetournois janetournois modified the milestones: 6.0-beta, 6.1-beta May 16, 2024
@MaelRL MaelRL modified the milestones: 6.1-beta, 6.2-beta Mar 17, 2025
@sloriot sloriot changed the base branch from master to main September 16, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not yet approved The feature or pull-request has not yet been approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants