-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Update tbb to 2020 3 #2447
Update tbb to 2020 3 #2447
Conversation
…020_U3 can use the new interface
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.
Good, just minor issue with readme.
The handling of TBB_INTERFACE_NEW seems logical to me. |
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.
Great!
Error popped up in Stan tests: https://jenkins.mc-stan.org/blue/organizations/jenkins/Stan/detail/downstream_tests/2773/pipeline |
Ooof, that's not a fun error. Lemme see where we are pulling that in. It's only an warning promoted to an error but I'd rather make a patch for it |
Alright all I had to do here is add |
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.
Good to go assuming tests pass. Thanks!
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
It looks like we need to make the task schedular initialization into |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Needs stan-dev/cmdstan#1001 then just restart upstream tests and should be good to go. |
Restared upstream tests: https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/PR-2447/5/pipeline |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
@rok-cesnovar odd, it looks like the tests passed but the jenkins here still has an X https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/PR-2447/5/pipeline |
@@ -5,6 +5,14 @@ | |||
|
|||
#include <boost/lexical_cast.hpp> | |||
|
|||
#include <tbb/tbb_stddef.h> |
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 breaks external oneTBB since tbb/tbb_stddef.h
is not found:
stan/math/prim/core/init_threadpool_tbb.hpp(8):
catastrophic error: cannot open source file "tbb/tbb_stddef.h"
#include <tbb/tbb_stddef.h>
TBB_VERSION_MAJOR
is now defined in tbb/version.h
.
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.
Thanks! So seems we need to add another ONE_TBB compile time define.
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'll submit a hot fix shortly; testing it now.
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.
@rok-cesnovar #2452 does the trick.
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'll put in a fix pr. I think we can just move #ifndef TBB_INTERFACE_NEW
up since if they have that defined then we know already we are using the new interface
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.
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.
Exactly :)
Fix external oneTBB after #2447
Summary
This updates the tbb to 2020 3. The only code side change here is that in order to be backwards compatible, but still use the new
task_arena
interface we look at the tbb version major and if it is >= 2020 we define TBB_INTERFACE_NEW and use that, but otherwise we use the old interfaceAnd for backwards compatibility I removed the
priority::normal
from the new interfaces task arena since that's the default butpriority::normal
is not defined for the old version of tbbTests
Side Effects
Just the macro flag to be aware of
Release notes
Update tbb to 2020 3
Checklist
Math issue #(issue number)
Copyright holder: Steve Bronder
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested