Home | News | Documentation | Download

[LXPLUS] root numpy not supported for ROOT 6.18/00

Hi all,

I am trying to run a code which converts root files to numpy arrays on my /afs space on lxplus,
the code was running perfectly until recently I started getting error regarding that the current “root numpy” version installed for ROOT 6.16/00.
Is there a way to overcome this since I have very limited to no rights when it comes to modifying/updating software on lxplus.

 python2.7 tree_to_np.py /eos/cms/store/group/comm_dqm/ML4DC_2019/ML4DC_AODNtuples_2018 -d=/afs/cern.ch/work/r/runiyal/public/

the output to this is

Error in TCling::RegisterModule: cannot find dictionary module libPyROOT_rdict.pcm
/afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root_numpy/init.py:34: RuntimeWarning: ROOT 6.18/00 is currently active but you installed root_numpy against ROOT 6.16/00. Please consider reinstalling root_numpy for this ROOT version.
RuntimeWarning)
Traceback (most recent call last):
File “tree_to_np.py”, line 3, in
import root_numpy
File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in _importhook
return _orig_ihook( name, *args, **kwds )
File “/afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root_numpy/init.py”, line 51, in
from ._tree import (
File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in _importhook
return _orig_ihook( name, *args, **kwds )
File “/afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root_numpy/_tree.py”, line 6, in
from . import _librootnumpy
File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in _importhook
return _orig_ihook( name, *args, **kwds )
ImportError: libCore.so.6.16: cannot open shared object file: No such file or directory

Thanks in advance!
Rishabh

Maybe @etejedor could help with this issue…

you probably need to recompile root_numpy against the new ROOT version that is active on lxplus.
(or activate a ROOT version from CMS sw stack that is compatible w/ your root_numpy version)

alternatively, you could use root2npy or a combination of uproot+numpy.

1 Like

Hi Rishabh,

To go from ROOT files (TTrees) to numpy arrays you can also use a couple of features implemented by ROOT itself:

Please let us know if we can assist you with using those functions.
Cheers,
Enric

This is the real problem. The bug has already been fixed in Fedora, but still has not been pushed to EPEL. When that happens, then PyROOT will start working again on lxplus. You will also need to recompile against ROOT 6.18, as mentioned above, though. Cheers,

Thank you so much guys!
This was indeed helpful!
How ever I solution which seemed most feasible to me for now was to source ROOT 16, but this is very temporary solution.

Really appreciate your time guys!