TMVA installation with ROOT6

Dear all, I have installed ROOT with flags

./configure macosx64 --prefix=/usr/local/root/ make -j 4 sudo make install
And I do not see any TMVA folder in $ROOTSYS, do you know why this is?
Thanks.

Dear leoredi,

TMVA should be build by default.
It should install libTMVA.so under /usr/local/root/lib .

What do you mean exactly by ‘no TMVA folder in $ROOTSYS’ ?
What is $ROOTSYS in your case?
Can you post the output of the ‘configure’ step?

G Ganis

Thanks for the reply.
So yes I have the libraries:

Then the problem must be with TMVA itself, not with the installation of root, let me explain.
Following what is written here: http://tmva.sourceforge.net/docu/TMVAUsersGuide.pdf on page 4 I:

download TMVA "tar-ball" from https://sourceforge.net/projects/tmva/files/ ~> tar -zxvf TMVA-v4.2.0.tgz ~> cd TMVA-v4.2.0 ~/TMVA-v4.2.0> make

And I get what you see at the end of this message. Could this be because of the way I have installed ROOT? I do not have the configure step output but everything worked like a charm so far,

Compiling src/KDEKernel.cxx ... src/KDEKernel.cxx:94:30: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs2>0 ) return 0.5*TMath::Erf(xs2); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:96:27: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs2==0) return 0.5*TMath::Erf(TMath::Abs(xs1)); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:97:27: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs1>0) return 0.5*(TMath::Erf(xs2)-TMath::Erf(xs1)); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:97:43: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs1>0) return 0.5*(TMath::Erf(xs2)-TMath::Erf(xs1)); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:99:31: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs2>0 ) return 0.5*(TMath::Erf(xs2)+TMath::Erf(TMath::Abs(xs1))); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:99:47: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? if (xs2>0 ) return 0.5*(TMath::Erf(xs2)+TMath::Erf(TMath::Abs(xs1))); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:100:24: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? else return 0.5*(TMath::Erf(TMath::Abs(xs1))-TMath::Erf(TMath::Abs(xs2))); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:100:52: error: no member named 'Erf' in namespace 'TMath'; did you mean 'erf'? else return 0.5*(TMath::Erf(TMath::Abs(xs1))-TMath::Erf(TMath::Abs(xs2))); ^~~~~~~~~~ erf /usr/include/math.h:451:15: note: 'erf' declared here extern double erf(double); ^ src/KDEKernel.cxx:119:25: error: no member named 'Sqrt' in namespace 'TMath' fSigma = ( TMath::Sqrt(2.0) ~~~~~~~^ src/KDEKernel.cxx:120:26: error: no member named 'Power' in namespace 'TMath' *TMath::Power(4./3., 0.2) ~~~~~~~^ src/KDEKernel.cxx:122:26: error: no member named 'Power' in namespace 'TMath' *TMath::Power(fHist->Integral(), -0.2) ); ~~~~~~~^ src/KDEKernel.cxx:198:21: error: no member named 'Sqrt' in namespace 'TMath'; did you mean 'sqrt'? if (fSigma*TMath::Sqrt(1.0/fFirstIterHist->GetBinContent(j)) <= 0 ) { ^~~~~~~~~~~ sqrt /usr/include/math.h:447:15: note: 'sqrt' declared here extern double sqrt(double); ^ src/KDEKernel.cxx:202:57: error: no member named 'Sqrt' in namespace 'TMath'; did you mean 'sqrt'? fSigmaHist->SetBinContent(j,fFineFactor*fSigma/TMath::Sqrt(fFirstIterHist->G... ^~~~~~~~~~~ sqrt /usr/include/math.h:447:15: note: 'sqrt' declared here extern double sqrt(double); ^ 13 errors generated. make: *** [obj/KDEKernel.o] Error 1

Hi,

You should try to avoid , i possible, to install your version of TMVA. I would recommend to use directly the one coming from ROOT. So, ignore these lines in the manual. These are vlid if you are using a very old version of ROOT and you need a newer TMVA version.

Best Regards

Lorenzo

Dear all,

Following Lorenzo’s suggestion I am now using ROOT directly.
I have installed ROOT v6.05.02 using

Now have you got any idea how can I see if it actually works as expected?
If I download TMVA.tar and move into /test/ and try to run

I get a lot of errors even if the application finishes, the logs are:

Error in <TSystem::ExpandFileName>: input: $TMVASYS/lib/libMathCore, output: $TMVASYS/lib/libMathCore Error in <TSystem::ExpandFileName>: input: $TMVASYS/test/rootalias.C, output: $TMVASYS/test/rootalias.C /Users/fredi/Downloads/TMVA-v4.2.0/test/./TMVAlogon.C:24:4: error: 'TMVAGlob' is not a class, namespace, or enumeration TMVAGlob::SetTMVAStyle(); ^ /Users/fredi/Downloads/TMVA-v4.2.0/test/./TMVAlogon.C:24:4: note: 'TMVAGlob' declared here root [0] Processing TMVAClassification.C... IncrementalExecutor::executeFunction: symbol '_ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_' unresolved while linking function '_GLOBAL__sub_I_cling_module_7'! You are probably missing the definition of std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) Maybe you need to load the corresponding shared library? IncrementalExecutor::executeFunction: symbol '_ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc' unresolved while linking function '_GLOBAL__sub_I_cling_module_7'! You are probably missing the definition of std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) Maybe you need to load the corresponding shared library?

Hi,

Why are you still downloading TMVA ?
Everything is within ROOT , if you take TMVAClassification.C from somewhere else, you might have an old version.

To see if it is working, just go to $ROOTSYS/tutorials/tmva and do:

root TMVAClassification.C

Lorenzo

I don’t have any tutorial folder in my $ROOTSYS.
If I do echo $ROOTSYS I get /usr/local/root then I do ll $ROOTSYS I get

drwxr-xr-x 3 root admin 102B 24 Sep 18:13 lib/ drwxr-xr-x 3 root admin 102B 24 Sep 18:13 include/ drwxr-xr-x 31 root admin 1.0K 24 Sep 18:13 bin/ drwxr-xr-x 3 root admin 102B 24 Sep 18:13 etc/ drwxr-xr-x 7 root admin 238B 24 Sep 18:13 share/

Is it because of how I have installed it? Which was:

* Download binary
 * cd into folder after unzip
 * ./configure macosx64 --prefix=/usr/local/root/ -all
 * make -j 4
 * sudo make install
 * vim .profile with `. /usr/local/root/bin/thisroot.sh`

Thanks.

HI,

You have probably installed somewhere else the tutorials (something like a doc directory).
To know it where they are just print in the root prompt the value of

gROOT->GetTutorialsDir()

Lorenzo

Very nice, thanks a lot I can confirm it works fine now.