Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
968 Views

Intel TBB Version 2020 Warnings

At my workplace, we are upgrading the Intel TBB library to Version 2020. After integrating the library we have started seeing deprecation warnings on all the platforms. On windows (MS Visual Studio 2017), these warnings are treated as error and on macOS (XCode 10.14) , Linux (GCC 6.3) these are warnings are displayed as harmless pragma message. For ex. on Windows the warning will be as below

1: foo.cpp
2: c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.11.25503\include\exception(375): warning C4996: 'tbb::captured_exception::~captured_exception': was declared deprecated

3: C:\path\tbb\include\tbb\tbb_exception.h(206): note: see declaration of 'tbb::captured_exception::~captured_exception'
4: C:\path\tbb\include\tbb\tbb_exception.h(345): note: see reference to function template instantiation 'std::exception_ptr std::make_exception_ptr<tbb::captured_exception>(_Ex) noexcept' being compiled
5:         with
6:         [
7:             _Ex=tbb::captured_exception
8:         ]

On linux and macOS

../path/tbb/include/tbb/task_scheduler_init.h:21:154: note: #pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.
 #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")

While Linux and macOS are OK for the time being, (as we will migrate to newer or standard library features as suggested in the warnings and Intel TBB Webpages here and here) whats concerning us is the warnings on the Windows platform as mentioned above. There are more than 1200 instances of this particular warning and all of them are emanating Intel TBB header file tbb_exception.h.

The warning is highlighting

1) MSVC's header file exception since tbb_exception.h's deprecated classes are using exception header's classes

2) Any header file that includes tbb_exception.h e.g. concurrent_map.h

We are aware that we can suppress these warnings via TBB_SUPPRESS_DEPRECATED_MESSAGES macro.

Having said all this, is the TBB development team aware of this issue of warnings and this particular warning emanating from tbb_exception.h ?

If yes, do they plan to get rid of these warnings in the future version of TBB library ?

0 Kudos
5 Replies
Highlighted
Employee
968 Views

Hello,

    We are transitioning  to oneTBB: https://software.intel.com/en-us/oneapi/onetbb with what we call revamped TBB API. Please see the document that you can access from the link mentioned here:

https://software.intel.com/en-us/articles/tbb-revamp

 

or directly https://software.intel.com/sites/default/files/managed/b2/d2/TBBRevamp.pdf 

In oneTBB these features that you see now as deprecated -- will be removed. So longer turn we hope that you can consider switching to new API. Please let us know if you see any problems with this proposal. Meanwhile, we will continue to support old API with TBB 2020 product (and earlier versions).     

Are you concerned that there are too many messages about deprecation are printed? Were you aware of the information above?

  

0 Kudos
Highlighted
Employee
968 Views

Hello, 

Both cases look strange, could you provide more details regarding build environment (compiler version, OS version, build options)?

0 Kudos
Highlighted
Beginner
968 Views

Hi folks,

Thanks for your response.

1) I have updated the post with "Small standalone reproducible example". It contains info regarding build environment (compiler version, OS version, build options).

The thing that we have observed is that it if we include any TBB header after standard exception header i.e.

#include <exception>
#include "tbb/concurrent_queue.h"

it blurts out this warning from the header file tbb_exception.h. If the order is reversed, warning disappears.

Let us know if there are any workaround(s) or separate flag to get rid of this warning. Or is there just one flag for now i.e. TBB_SUPPRESS_DEPRECATED_MESSAGES ?

2) Yes we are aware of TBBRevamp.pdf document and we are going to recommend our developers to change their code to honor that :)

0 Kudos
Highlighted
Employee
968 Views

Hi Recker,

These extra warnings were caused by environmental issues in some VS versions.

Thank you for reporting!

This problem will be solved in future releases.

0 Kudos
Highlighted
Beginner
968 Views

Thanks for your response. One more thing, for the same platform and compiler combination(s) a small code like below will blurt out the #pragma message

#include "tbb/atomic.h"
int main() {
    return 0;
}

Linux :

tbb/include/tbb/atomic.h:21:141: note: #pragma message: TBB Warning: tbb/atomic.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.
 #pragma message("TBB Warning: tbb/atomic.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")

Windows

TBB Warning: tbb/atomic.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.

This is ok since the whole header is getting deprecated. 

0 Kudos