Segmentation Violation when using PyAdaBoost in TMVA

Hello,

I am trying to use the PYMVA method PyAdaBoost in TMVA. Firstly I checked TMVA was working by running TMVAClassification.C which compiled ok however the following messages appeared at the beginning:

Error in <TSystem::ExpandFileName: input: $TMVASYS/lib/libRIO, output: $TMVASYS/lib/libRIO
Error in <TSystem::ExpandFileName: input: $TMVASYS/lib/libCling, output: $TMVASYS/lib/libCling
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
Error in <TSystem::ExpandFileName: input: $TMVASYS/test/TMVAlogon.C, output: $TMVASYS/test/TMVAlogon.C

I then tried to add the PyAdaBoost method to the TMVAClassification.C and I got a segmentation violation at the following line:

factory->BookMethod(dataloader, TMVA::Types::kPyAdaBoost, “PyAdaBoost”, “!V:BaseEstimator=None:NEstimators=100:LearningRate=1:Algorithm=SAMME.R:RandomState=None” );

I included PyMethodBase.h and MethodPyAdaBoost.h and included the line TMVA::PyMethodBase::PyInitialize(); in my code. I am using ROOT 6.10.06.

Do you have any ideas?

Many thanks,

Martha

Is $TMVASYS set correctly? What is the output of

echo $TMVASYS

in the shell?

Hi Martha,

Can you detail your ROOT/TMVA installation, did you compile it yourself, did you download the binary or are you using an LCG release?

Could you also post the error message that is output?

Since ROOT6, TMVA is integrated into ROOT, making the environment variable $TMVASYS redundant. Getting a reference to this variable thus makes me suspect that, potentially, your ROOT installation is misconfigured.

Cheers,
Kim

Hi,

I am using an LCG release by running the command in my terminal:

source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_91 x86_64-slc6-gcc62-opt

The total output is as follows:

Error in <TSystem::ExpandFileName: input: $TMVASYS/lib/libRIO, output: $TMVASYS/lib/libRIO
Error in <TSystem::ExpandFileName: input: $TMVASYS/lib/libCling, output: $TMVASYS/lib/libCling
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
Error in <TSystem::ExpandFileName: input: $TMVASYS/test/TMVAlogon.C, output: $TMVASYS/test/TMVAlogon.C
root [0]
Processing TMVAClassification.C…

==> Start TMVAClassification
Info in TFile::OpenFromCache: using local cache copy of http://root.cern.ch/files/tmva_class_example.root [./files/tmva_class_example.root]
— TMVAClassification : Using input file: ./files/tmva_class_example.root
DataSetInfo : [dataset] : Added class “Signal”
: Add Tree TreeS of type Signal with 6000 events
DataSetInfo : [dataset] : Added class “Background”
: Add Tree TreeB of type Background with 6000 events
Factory : Booking method: PyAdaBoost
:

*** Break *** segmentation violation

Thanks,

Martha

Hmm, I can not reproduce the initial error message on lxplus when running. Is this similar to what you do?

source /cvmfs/sft.cern.ch/lcg/views/setupViews.sh LCG_91 x86_64-slc6-gcc62-opt
root -b $ROOTSYS/tutorials/tmva/TMVAClassification.C

I can also run pyAdaBoost on this setup with no issues.

wget https://raw.githubusercontent.com/root-project/root/master/tmva/pymva/test/testPyAdaBoostClassification.C
root -b testPyAdaBoostClassification.C

I also tried booking the classifier with your configuration ("!V:BaseEstimator=None:NEstimators=100:LearningRate=1:Algorithm=SAMME.R:RandomState=None") and am still successful. This indicates that maybe your ROOT setup is not configured properly after all.

Can you verify that you can run these steps on lxplus?

Cheers,
Kim

Hi,

I can run the TMVAClassification.C ok but I get a segmentation violation when trying to run testPyAdaBoostClassification.C.

Thanks,

Martha

Ok, I have no idea what the source of this error could be. Maybe you could ask a colleague to try running the same steps.

In any case, the issue seems to be a configuration one and not with ROOT/TMVA itself.

Cheers,
Kim