# RDataFrame multithreading loses events

**URL:** <https://root-forum.cern.ch/t/rdataframe-multithreading-loses-events/49338>\
**Category:** ROOT\
**Tags:** python\
**Created:** [March 24, 2022, 9:08am UTC](https://root-forum.cern.ch/t/rdataframe-multithreading-loses-events/49338 "2022-03-24T09:08:55Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![avilla](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/f1d935/32.png) [@avilla](https://root-forum.cern.ch/u/avilla)\
**Post date:** [March 24, 2022, 11:28am UTC](https://root-forum.cern.ch/t/rdataframe-multithreading-loses-events/49338/5 "2022-03-24T11:28:21Z")

</div>

After a quick investigation, I found out that the problem arises from the computation of the BDT scores.  
Since TMVA is not thread-safe ([see here](https://root-forum.cern.ch/t/multithreading-in-tmva-geneticalgorithm/37039/2)), using it inside an RDataframe with `EnableImplicitMT` activated results in unexpected behaviour.  
Therefore, it should be avoided until TMVA gains support for parallel execution.  
Leaving this for future reference in case someone else experiences the same problem, this topic can be closed.  
Cheers,  
Andrea

---

_[View the full topic](https://root-forum.cern.ch/t/rdataframe-multithreading-loses-events/49338)._
