# Running TMVA with multi core

**URL:** <https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973>\
**Category:** TMVA\
**Created:** [July 3, 2019, 5:47am UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973 "2019-07-03T05:47:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JungChang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@JungChang](https://root-forum.cern.ch/u/JungChang)\
**Post date:** [July 3, 2019, 5:47am UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973/1 "2019-07-03T05:47:56Z")

</div>

Hi!

I’m trying to run TMVA in multi-core mode. It seems only DNN provides the multi-core option.

Is there anyway to run in multi-core for other methods?  
i.e. PDERS

p.s. I checked the root multicore page : [https://root.cern.ch/how/how-express-parallelism-many-cores](https://root.cern.ch/how/how-express-parallelism-many-cores)  
I used the command  
int nthreads = 7;  
ROOT::EnableImplicitMT(nthreads);  
But it seems when it run with TMVA it still used one core.

Thanks.

Best,  
Justine

---

<div class="post-metadata">

**Author:** ![jcervant](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jcervant/32/18033_2.png) [@jcervant](https://root-forum.cern.ch/u/jcervant)\
**Post date:** [July 3, 2019, 11:41am UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973/2 "2019-07-03T11:41:28Z")

</div>

@swunsch @kialbert could you please have a look?

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [July 3, 2019, 12:18pm UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973/3 "2019-07-03T12:18:05Z")

</div>

Hi,

Indeed only the DNN and and BDT (with gradient boosting) currently support multi-threading.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![11132](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/1/c68b51/32.png) [@11132](https://root-forum.cern.ch/u/11132)\
**Post date:** [January 17, 2021, 8:51am UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973/4 "2021-01-17T08:51:56Z")

</div>

Hi,  
I am trying to use the DNN example in ROOT 6.22 with multi-threading([https://root.cern.ch/doc/v622/TMVAClassification\_8C.html](https://root.cern.ch/doc/v622/TMVAClassification_8C.html)). But it shows only 1 core is used.

-----------Start of deep neural network training on CPU using MT, nthreads = 1

I also try to set “ROOT::EnableImplicitMT(7);”. It does not help.

Best,  
Jie

---

<div class="post-metadata">

**Author:** ![11132](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/1/c68b51/32.png) [@11132](https://root-forum.cern.ch/u/11132)\
**Post date:** [January 18, 2021, 9:08am UTC](https://root-forum.cern.ch/t/running-tmva-with-multi-core/34973/5 "2021-01-18T09:08:11Z")

</div>

Hi,  
I am trying to use the DNN example in ROOT 6.22 with multi-threading([https://root.cern.ch/doc/v622/TMVAClassification\_8C.html](https://root.cern.ch/doc/v622/TMVAClassification_8C.html)). But it shows only 1 core is used.

-----------Start of deep neural network training on CPU using MT, nthreads = 1

I also try to set “ROOT::EnableImplicitMT(7);”. It does not help.

Best,  
Jie
