TThreadExecutor not recognized in ROOT namespace

Hello! I’m trying to process a tree using ROOT::TTreeProcessorMT. However, I get an error when the compiler gets to the line #include <ROOT/TTreeProcessorMT>. I’m getting the following error:

/usr/include/root/ROOT/TTreeProcessorMT.hxx:91:10: error: no type named 'TThreadExecutor' in namespace 'ROOT'
   ROOT::TThreadExecutor fPool; ///<! Thread pool for processing.
   ~~~~~~^

I looked in this directory and found TThreadExecutor.hxx and the class TThreadExecutor is defined in the ROOT namespace. I also tried including it directly in my code, but that didn’t help, either. I was initially getting this same error when trying to use ROOT::TTreeProcessorMT, but that was fixed when I added #include <ROOT/TTreeProcessorMT> to my includes.

Does anyone have any pointers (haha)?

I’m running ROOT 6.22.02 on a Linux server with gcc 4.8.5.

Thanks!

Hi,
TTreeProcessorMT requires a ROOT installation with multi-threading support. Does root-config --features contain imt?

Cheers,
Enrico

You’re right! I don’t see imt in the features :frowning: Can you help me resolve it? I did a quick search but didn’t find any useful resources.

Thanks!

For whatever reason, that ROOT installation was compiled without multi-threading support (most common reason: the threading library ROOT requires, Intel TBB, was not available on that platform when ROOT was built).

You need a different ROOT installation. All installation methods listed at https://root.cern/install should provide a ROOT build with multi-threading capabilities, except for the default ROOT you get when logging into LXPLUS (but on LXPLUS you can always use the LCG releases instead).

Cheers,
Enrico

I seem to be using the latest version of ROOT. Even if I have a different ROOT installation, I should still have Intel TBB built on my machine, correct? Are there any flags I need to specify to have the imt feature, or will that automatically be included if TBB is installed?

Thanks!
Jason

If root-config --features does not include imt it doesn’t mean that you are missing TBB in your system but rather than that ROOT was built without imt support – it’s a function of how ROOT was configured and built, not of its version (assuming it’s recent enough to have the feature in the first place) or of the packages you have installed in your system.

Are there any flags I need to specify to have the imt feature, or will that automatically be included if TBB is installed?

If you are compiling ROOT yourself, you should check the output of the cmake configuration file and see what it says about looking for/finding TBB. I think the default behavior is to have imt=ON and if TBB is not found in your system to switch builtin_tbb=ON (i.e. TBB will be downloaded and compiled as part of ROOT’s compilation).

Hope this helps!
Enrico

Awesome, thanks! I’ll try it out. Thanks for all your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.