- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I recently installed TBB (last version 2017 Update 3) on Windows 64bits and try to test it with a small C++ program :
#include <iostream> #include <tbb/tbb.h> int main() { std::cout << sizeof(int*) << std::endl; while (1) { std::cout << "begin\n"; tbb::task_scheduler_init init(8); std::cout << init.is_active(); } return 0; }
The first line shows me that I use a 64bits compiler (MinGW-w64 on Windows) but my program crashes if I try to create more than one instance of task_scheduler_init ...
However, the same program compiled with a 32bits compiler (mingw32-gcc on Windows) works well !
What is the trouble ? The documentation of task_scheduler_init (https://software.intel.com/en-us/node/506296) provides an example highlighted the same problem...
PS : I compiled myself the TBB lib from raw sources :
C:\tbb2017_20161128oss>mingw32-make compiler=gcc info
OS: windows
arch=intel64
compiler=gcc
runtime=mingw6.2.0
tbb_build_prefix=windows_intel64_gcc_mingw6.2.0
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
This issue already discussed in https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/641654
You should rebuild TBB with CXXFLAGS="-flifetime-dse=1" to fix this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maksim D. (Intel) wrote:
You should rebuild TBB with CXXFLAGS="-flifetime-dse=1" to fix this issue.
Hello,
Where can I add this command ? Does I need to modify any Makefile (and which Makefile ?) ? (sorry I am a beginner in makefile...)
Another question: What is the purpose of tbbmalloc ? Does I really need it ?
Thanks for your reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where can I add this command ? Does I need to modify any Makefile (and which Makefile ?) ? (sorry I am a beginner in makefile...)
mingw32-make compiler=gcc CXXFLAGS="-flifetime-dse=1"
Another question: What is the purpose of tbbmalloc ? Does I really need it ?
Basically a tbbmalloc is a memory allocator that can work much faster in concurrent environment than a standard allocator.
BTW you can get simple explanation about tbbmalloc and tbbmalloc_proxy from this video https://software.intel.com/videos/1-minute-intro-intel-tbb-malloc-proxy-library .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to compile well but I have some warnings at the end of the build :
task.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
arena.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
scheduler.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
mingw32-make[1]: Leaving directory 'C:/tbb2017_20161128oss/build/windows_intel64_gcc_mingw6.2.0_release'
What does it mean ?
Thanks for the explanation of tbbmalloc and the link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
task.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
arena.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
scheduler.o: duplicate section `.rdata$_ZTIN3tbb4taskE[_ZTIN3tbb4taskE]' has different size
It's a known issue with MinGW; It shouldn't affect library files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot, it is now working !
Have a nice day :)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page