CoEPP RC
 

ROOT Issues

Using MathMore lib

Problem

  • Using a function from the MathMore fails with the following error:
root [0] ROOT::Math::hyperg(3.,2.,4.,-.23)
IncrementalExecutor::executeFunction: symbol '_ZN4ROOT4Math6hypergEdddd' unresolved while linking [cling interface function]!
You are probably missing the definition of ROOT::Math::hyperg(double, double, double, double)
Maybe you need to load the corresponding shared library?

Solution

  • Be sure that you have executed 'setupATLAS' and 'lsetup ROOT'
  • Load the MathMore library prior to executing your script / macro
[root@sydui4 ~]# root -l
*** DISPLAY not set, setting it to hubble.physics.usyd.edu.au:0.0
root [0]  gSystem->Load("$ROOTSYS/lib/libMathMore.so")
(int) 0
root [1] ROOT::Math::hyperg(3.,2.,4.,-.23)
(double) 7.307137e-01

Creating Dictionaries

Problem

  • You have a root file and you want to create a dictionary that you can load as a shared library. You followed the documentation in interacting-shared-libraries-rootcint but you failed to create that dictionary either manually or through ACLIC.

Solution

1) Enable the ATLAS environment

-bash-4.1$ setupATLAS

--- * ---

2) Enable your prefer root version. Some versions have problems in production header files (they introduce hard coded paths). 5.34.19-x86_64-slc6-gcc48-opt is know to work

-bash-4.1$ localSetupROOT 5.34.19-x86_64-slc6-gcc48-opt

--- * ---

3) Start root and create the PAR file from a known root file

$ root
(...)
root [0] TFile *f = TFile::Open("TauTauEventGeneration-evtgen.root")
Warning in <TClass::TClass>: no dictionary for class Belle2::EventMetaData is available
Warning in <TClass::TClass>: no dictionary for class Belle2::MCParticle is available
Warning in <TClass::TClass>: no dictionary for class Belle2::RelationsInterface<TObject> is available
Warning in <TClass::TClass>: no dictionary for class Belle2::Const::DetectorSet is available
Warning in <TClass::TClass>: no dictionary for class Belle2::FileMetaData is available
Warning in <TClass::TClass>: no dictionary for class Belle2::ProcessStatistics is available
Warning in <TClass::TClass>: no dictionary for class Belle2::Mergeable is available
Warning in <TClass::TClass>: no dictionary for class Belle2::ModuleStatistics is available
Warning in <TClass::TClass>: no dictionary for class Belle2::CalcMeanCov<2,float> is available

root [1] f->MakeProject("packages/TauTauEventGeneration-evtgen", "*", "par")
MakeProject has generated 9 classes in packages/TauTauEventGeneration-evtgen
Files Makefile, Makefile.arch, PROOF-INF/BUILD.sh and PROOF-INF/SETUP.C have been generated under 'packages/TauTauEventGeneration-evtgen'
TauTauEventGeneration-evtgen/
TauTauEventGeneration-evtgen/PROOF-INF/
TauTauEventGeneration-evtgen/PROOF-INF/BUILD.sh
TauTauEventGeneration-evtgen/PROOF-INF/SETUP.C
TauTauEventGeneration-evtgen/TauTauEventGeneration-evtgenProjectSource.cxx
TauTauEventGeneration-evtgen/Belle2__EventMetaData.h
TauTauEventGeneration-evtgen/TauTauEventGeneration-evtgenProjectHeaders.h
TauTauEventGeneration-evtgen/Belle2__MCParticle.h
TauTauEventGeneration-evtgen/Belle2__RelationsInterface_TObject_.h
TauTauEventGeneration-evtgen/Belle2__Const__DetectorSet.h
TauTauEventGeneration-evtgen/Belle2__FileMetaData.h
TauTauEventGeneration-evtgen/Belle2__ProcessStatistics.h
TauTauEventGeneration-evtgen/Belle2__Mergeable.h
TauTauEventGeneration-evtgen/Belle2__ModuleStatistics.h
TauTauEventGeneration-evtgen/Belle2__CalcMeanCov_2_float_.h
TauTauEventGeneration-evtgen/TauTauEventGeneration-evtgenProjectInstances.h
TauTauEventGeneration-evtgen/TauTauEventGeneration-evtgenLinkDef.h
TauTauEventGeneration-evtgen/Makefile
TauTauEventGeneration-evtgen/Makefile.arch
Info in <TFile::MakeProject>: PAR file packages/TauTauEventGeneration-evtgen.par generated

--- * ---

4)  Exit root and check the project that has been created

-bash-4.1$ ls packages/
TauTauEventGeneration-evtgen  TauTauEventGeneration-evtgen.par

-bash-4.1$ ls -l packages
total 12
drwxr-xr-x 3 goncalo people 4096 May  6 06:54 TauTauEventGeneration-evtgen
-rw-r--r-- 1 goncalo people 7486 May  6 06:54 TauTauEventGeneration-evtgen.par

-bash-4.1$ ls -l packages/TauTauEventGeneration-evtgen
total 76
-rw-r--r-- 1 goncalo people  1016 May  6 06:54 Belle2__CalcMeanCov_2_float_.h
-rw-r--r-- 1 goncalo people   847 May  6 06:54 Belle2__Const__DetectorSet.h
-rw-r--r-- 1 goncalo people  1124 May  6 06:54 Belle2__EventMetaData.h
-rw-r--r-- 1 goncalo people  1764 May  6 06:54 Belle2__FileMetaData.h
-rw-r--r-- 1 goncalo people  2665 May  6 06:54 Belle2__MCParticle.h
-rw-r--r-- 1 goncalo people   818 May  6 06:54 Belle2__Mergeable.h
-rw-r--r-- 1 goncalo people   880 May  6 06:54 Belle2__ModuleStatistics.h
-rw-r--r-- 1 goncalo people  1016 May  6 06:54 Belle2__ProcessStatistics.h
-rw-r--r-- 1 goncalo people  1072 May  6 06:54 Belle2__RelationsInterface_TObject_.h
-rw-r--r-- 1 goncalo people  2471 May  6 06:54 Makefile
-rw-r--r-- 1 goncalo people 12571 May  6 06:54 Makefile.arch
drwxr-xr-x 2 goncalo people    35 May  6 06:54 PROOF-INF
-rw-r--r-- 1 goncalo people   609 May  6 06:54 TauTauEventGeneration-evtgenLinkDef.h
-rw-r--r-- 1 goncalo people   398 May  6 06:54 TauTauEventGeneration-evtgenProjectHeaders.h
-rw-r--r-- 1 goncalo people     0 May  6 06:54 TauTauEventGeneration-evtgenProjectInstances.h
-rw-r--r-- 1 goncalo people  9239 May  6 06:54 TauTauEventGeneration-evtgenProjectSource.cxx

---* ---

5) Generate you dictionary running 'make'

-bash-4.1$ packages/TauTauEventGeneration-evtgen

-bash-4.1$ make
Generating dictionary TauTauEventGeneration-evtgenProjectDict.cxx...
g++ -O2 -Wall -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -m64 -I/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.8/include -c TauTauEventGeneration-evtgenProjectSource.cxx
g++ -shared -O2 -m64 TauTauEventGeneration-evtgenProjectSource.o -o  libTauTauEventGeneration-evtgen.so -L/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/5.34.19-x86_64-slc6-gcc4.8/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic
libTauTauEventGeneration-evtgen.so done

--- * ---

6) Now you are able to use that dictionary as a shared library, and even, load it ROOT

-bash-4.1$ cd ../..

-bash-4.1$ root
(...)
root [0] gSystem->Load("packages/TauTauEventGeneration-evtgen/libTauTauEventGeneration-evtgen.so")
(int)0

segmentation violation

Problem

[user@agu1] $ . setupATLAS
[user@agu1] $ asetup 17.3.0
[user@agu1] $ root
Fatal in <TROOT::InitSystem>: HOME directory not set

*** Break *** segmentation violation
[user@agu1] $
  • Problem is caused by old version of root not respecting proper Name Service databases
    • We use a central LDAP network passwd database not /etc/passwd. This old version of root crashes when the user isn't in the actual /etc/passwd file.

Solution

  • use a different version of root: ie 17.5.0
    [user@agu1] $ . setupATLAS
    [user@agu1] $ asetup 17.5.0
    [user@agu1] $ root
  • Another less preferred option is to ask Sean or Lucien to add your username to the the actual /etc/passwd file.

root version error

Problem

  • When running root code after changing configs or versions sometimes you will see these errors:
    Error in : version mismatch, /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/GAUDI/v22r1p8/InstallArea/x86_64-slc5-gcc43-opt/lib/libGaudiPythonDict.so = 53200, ROOT = 53404
    Error in : failure loading library libGaudiPythonDict for class basic_ostream >
    GLOBUS_ERROR_VERBOSE=true
    _CONDOR_WRAPPER_ERROR_FILE=/var/lib/condor/execute/dir_24290/.job_wrapper_failure
    Error in : version mismatch, /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc5-gcc43-opt/17.5.0/AtlasCore/17.5.0/InstallArea/x86_64-slc5-gcc43-opt/lib/libAthenaPythonDict.so = 53200, ROOT = 53404
    Error in : failure loading library AthenaPythonDict.so for class type_info
  • The error is caused by the *.so file having been compiled against a different version of root (see 53200 in code output above).

Solution

  • Delete all the old *.so files in your working directory. They are derived files and will be recreated from source code when you try to run it again.

Bad EPS files using Tau Channel Common framework

Problem

  • Although no errors are produced running them, the graphing routines produce large .eps files of grabage.

Solution

  • use a specific version of root: ie 17.0.6.4
    [user@agu1] $ . setupATLAS
    [user@agu1] $ asetup 17.0.6.4
tier3/faq/root.txt · Last modified: 2016/04/29 13:52 by goncalo
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki