Intel® Threading Building Blocks

Reducing memory footprint

Dear all,

I need to reduce the memory footprint of my program, while retaining some speed. I might also switch data structures. The problem: I need to count all integers of a fixed size in bits, let's say 32 bits, from a file.

Right now I am using a concurrent hashmap, but after some time it spikes to 10GB or RAM and since computation basically stops, I think I am just trashing my memory (laptop with 8GB). Another option is to use a concurrent vector.

Also, I am using a pipeline to read the integers, I don't know if this point might be optimized.


1)  I thought use of std::sort was same as tbb::paralllel_sort though simply changing func leads to a compile error .. Visual Studio ...

Error 38 error C3848: expression having type 'const less_than_key' would lose some const-volatile qualifiers in order to call 'bool less_than_key::operator ()(FaceDistance &,FaceDistance &)'

What causes the undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE error?

I would have liked to post some short sample code, but it'll be a while before I can do so. The error encountered is caused when I build my (extremely large) program on 64 bit CentOS 6.5 and link it with TBB (will post all necessary version numbers if you require it). Then I'm giving the executable that got built, to my colleague who runs it on his 64 bit system (RHEL 6) where he's also installed TBB and when the program starts, this is output:

./myprogram: Symbol `_ZTIN3tbb4taskE' has different size in shared object, consider re-linking

Memory leak with TBB 4.2 with high multi-threading

I'm not sure if this is a false positive or a real problem. I have tried and failed to find anyone else who's faced/fixed this yet.

Using TBB Version 4.2 (I can't upgrade due to legacy issues). I observe a memory leak within my application while using TBB concurrent containers in combination with a high load of TBB parallel threading.

A simple snippet to reproduce this issue  -

strange compile issue on GCC 4.8.3 / libc 2.17

Hi all,

I have a very strange compile error emanating from concurrent_vector.h. At a complete loss how to proceed, was wondering if anyone had any suggestions? 

This was a previously compiling application with a slightly older version of OS (was Redhat 7.0 clone : now failing on 7.1). Getting the following message: 

Reduce with non-thread safe data

Dear all,

I need to use a legacy data structure that is not thread safe, let's call it LDS. Basically, I have a textual file and for each line I send it to LDS, and it updates itself. This data can be reduced (it's even commutative), so I'd like to parallelize it.

thread seemingly executing multiple tasks simultaneously

I have two function node body classes that subclass from the same parent. The parent has a thread-local member variable. Each child class sets that variable to its own value at the top of its operator() function, and then prints out this value some time later. Presumably, if a thread were processing one task at a time, everything would be fine with this structure. However, I occasionally observe that the printout made by class A contains class B's version of the member variable. Could somebody offer an explanation for this behavior?

Calculate size of RAM memory allocated by concurrent_unordered_multimap

Hello everyone,

I have one problem, and I hope that someone have solution.
Suppose that we have concurrent_unordered_multimap<T, T> multimapTest; and random data are inserted in multimapTest.
Is there a way to calculate size of RAM memory (in bytes) which are allocated by multimapTest?


Подписаться на Intel® Threading Building Blocks