Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Changes required to compile with TBB 2021.2 #33474
Changes required to compile with TBB 2021.2 #33474
Changes from 8 commits
234da0a
ffd7094
1de5243
1432d97
6c811a3
7cd3a33
f856889
a09f99b
1435f32
32448ad
3132e55
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment stating that this was copied from oneTBB version X because of it was dropped from version Y, maybe with a link to the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was introduced in #33261; I don't know what the change does, but maybe @dan131riley can comment ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was needed to prevent the coroutine from being deleted before this service ended. The early deletion caused a segfault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See
cmssw/FWCore/Services/plugins/InitRootHandlers.cc
Line 75 in 6d2f660
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onetbb_2021 removed the constructor that takes a global/local boolean. While the comments and docs still mention global observers, that actually isn't an option anymore--the only. constructors are a default (that actually does nothing) and one that takes a
task_arena&
to observe a specific arena other than the current one. Seehttps://github.com/oneapi-src/oneTBB/blob/2dba2072869a189b9fdab3ffa431d3ea49059a19/include/oneapi/tbb/task_scheduler_observer.h#L74-L85
https://spec.oneapi.com/versions/latest/elements/oneTBB/source/task_scheduler/task_arena/task_scheduler_observer_cls.html
In fact, we could (and probably should) just remove that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So
public tbb::task_scheduler_observer
should be removed in both locations?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ThreadTracker
andFastTimerService
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The member variable must stay, but the explicit call to the default constructor can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually a parent class, and indeed the parent class needs to stay, it's just the explicit call to the constructor, the
tbb::task_scheduler_observer()
, that can be removed, since the default constructor will be called anyway.