Skip to content
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

Sync with fe86ed4 #48

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Sync with fe86ed4 #48

merged 4 commits into from
Dec 13, 2024

Conversation

qnzhou
Copy link
Contributor

@qnzhou qnzhou commented Dec 10, 2024

No description provided.

@@ -108,12 +108,12 @@ std::vector<Index> split_edges(
std::vector<std::array<Index, 2>> parent_edge(
num_output_vertices,
{invalid<Index>(), invalid<Index>()});
tbb::parallel_for(Index(0), num_edges, [&](Index eid) {
for (Index eid = 0; eid < num_edges; eid++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why this change is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thread sanitizer is complaining about race condition. But yes, I think it is a false alarm.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's actually not a false alarm. Looking more closely at the code you are iterating over each edges, writing the vertex->edge relationship in the parent_edge array. When multiple edges are incident to the same vertex this parent will be overwritten multiple time, with different edge indices each time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I think you are right. For split_long_edges, every edge split point has a unique parent edge, so there is no race condition. However, for remove_degenerate_facets, an edge split points may belong to multiple collinear edges, which leads to the race condition. Let me fix that.

@qnzhou qnzhou merged commit cc5c79a into main Dec 13, 2024
22 checks passed
@qnzhou qnzhou deleted the qnzhou/v6.29.0 branch December 13, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants