Skip to content

Conversation

@byjtew
Copy link
Collaborator

@byjtew byjtew commented Jan 29, 2024

Closes #278

@byjtew byjtew requested a review from anyzelman January 29, 2024 15:48
@byjtew byjtew changed the base branch from master to develop January 29, 2024 15:49
@anyzelman anyzelman added this to the v0.8 milestone Feb 5, 2024
@byjtew byjtew requested a review from anyzelman February 26, 2024 14:09
@anyzelman
Copy link
Member

Ready to merge

@GiovaGa GiovaGa force-pushed the 664-missing-assertions-for-threaded-execution branch from 48a6c1a to 775ca77 Compare October 22, 2025 07:36
@GiovaGa
Copy link
Collaborator

GiovaGa commented Oct 22, 2025

@anyzelman this seems solved, I don't know if we want a clearer error message to be outputted instead of a possibly cryptic assertion error.
I will run unit tests on the internal CI just to be sure, but should be good to go

@anyzelman anyzelman force-pushed the 664-missing-assertions-for-threaded-execution branch from 775ca77 to 11b57b6 Compare January 13, 2026 15:42
@anyzelman
Copy link
Member

I rebased again, reviewed it, and running smoke + unit tests with LPF now (in addition to CI).

Changes during review: I made the check a function of the Coordinates class, as otherwise it is not easy to call for a check without a lot of code repetition. I also modified the internal::getCoordinates for const-coordinates to perform the check. I did not think the modification to config::OMP was needed and reverted that, instead relying on its already-established threads function call.

There is one annoyance that in the use of the coordinates class, a callee tends to call a third class for creating the buffer, and then passes that into Coordinates. This means that the number of threads is actually controlled by this third class. The current design in this MR is hence not totally robust if somehow the number of threads spawned during a parallel section changes between the time the third party class code executes and allocates the buffer for some T1 #threads , and the time the #threads is actually recorded when the coordinates instance is set while some other T2 #threads is active.

… sequential and parallel contexts. Refined it a bit and trying again
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.

Missing assertions for threaded execution

4 participants