# Error using TMVA on lxplus

**URL:** <https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458>\
**Category:** TMVA\
**Created:** [October 22, 2019, 6:45pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458 "2019-10-22T18:45:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenf](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@chenf](https://root-forum.cern.ch/u/chenf)\
**Post date:** [October 22, 2019, 6:45pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/1 "2019-10-22T18:45:39Z")

</div>

Hi,

I failed to run TMVAClassification.C with default settings on lxplus. Is there anything I need to set up before using TMVA? There are bunches of errors:

Processing ./TMVAClassification.C(“Fisher,Likelihood”)…  
In file included from input\_line\_8:1:  
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:43:10: fatal error: ‘TMVAGui.C’ file not found  
#include “TMVAGui.C”  
^ ~~~~~~~~~~  
Warning in TInterpreter::TCling::RegisterModule: Problems in compiling forward declarations for module libGraf3d: ’  
#line 1 “libGraf3d dictionary forward declarations’ payload”

/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:183:13: error: no member named ‘AddVariable’ in ‘TMVA::Factory’  
factory-\>AddVariable( “myvar1 := var1+var2”, ‘F’ );

```auto
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:184:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "myvar2 := var1-var2", "Expression 2", "", 'F' );
~~~~~~~ ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:185:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "var3", "Variable 3", "units", 'F' );
~~~~~~~ ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:186:13: error: no member named 'AddVariable' in 'TMVA::Factory'
factory->AddVariable( "var4", "Variable 4", "units", 'F' );
~~~~~~~ ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:191:13: error: no member named 'AddSpectator' in 'TMVA::Factory'
factory->AddSpectator( "spec1 := var1*2", "Spectator 1", "units", 'F' );
~~~~~~~ ^
/afs/cern.ch/work/c/chenf/private/test/TMVAClassification.C:192:13: error: no member named 'AddSpectator' in 'TMVA::Factory'
factory->AddSpectator( "spec2 := var1*3", "Spectator 2", "units", 'F' );
```

---

<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:** [October 23, 2019, 5:58pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/2 "2019-10-23T17:58:15Z")

</div>

Hi and welcome to the forums!

I would hazard you are using root6 with a `TMVAClassification.C` from an earlier version. Check the version found in `$ROOTSYS`, or [here](https://github.com/root-project/root/blob/bec9f2d1f778771703f0006a32436e5e23180c00/tutorials/tmva/TMVAClassification.C).

In the newer TMVA versions a data loader was introduce to add a bit more separation of concerns; The Factory had many responsibilities bundled into one.

Please let me know how it goes.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![chenf](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@chenf](https://root-forum.cern.ch/u/chenf)\
**Post date:** [October 23, 2019, 7:05pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/3 "2019-10-23T19:05:27Z")

</div>

Hi Kim,

Thanks for your reply. Yes, it works now.

BTW, can I ask another question. For the windows release of ROOT, does it come with TMVA or not? It seems that it doesn’t come with TMVA.

Best,  
Feng

---

<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:** [October 23, 2019, 8:38pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/4 "2019-10-23T20:38:07Z")

</div>

@bellenot: Would you have the possibility to illuminate us? 🙂

Could you, Feng, elaborate a bit on how you acquired the windows release? Did you download it from somewhere, build it yourself, etc.?

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [October 23, 2019, 8:39pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/5 "2019-10-23T20:39:42Z")

</div>

Hi,

TMVA was not supported on Windows until very recently. It should be available in the next release (6.20/0)

Cheers, Bertrand.

---

<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:** [October 23, 2019, 10:21pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/6 "2019-10-23T22:21:58Z")

</div>

Thanks Bertrand!

That should be ROOT version 6.20/0 (not 5.20/0).

I would edit the post directly had I the ability to do so 🙂

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![chenf](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@chenf](https://root-forum.cern.ch/u/chenf)\
**Post date:** [October 24, 2019, 5:38am UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/7 "2019-10-24T05:38:06Z")

</div>

Hi,

WOW!! Great! Looking forward to the new version!!

Cheers,  
Feng

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [October 24, 2019, 1:08pm UTC](https://root-forum.cern.ch/t/error-using-tmva-on-lxplus/36458/8 "2019-10-24T13:08:55Z")

</div>

You’re right, sorry. Now fixed
