Hi. I had been using conda installed version 6.22/02 of root for quite long without any problems. I also had been using this root to develop ROOT/PyROOT based software where low level code is in C++/ROOT while higher level interface is in PyROOT/Python. However, recently I added uproot, joblib and imp modules to this environment and since then C++ executables of my code are not compiling properly. It started giving undefined reference errors to __fdelt@GLIBC2.15, __memcpy@GLIBC2.17 and many more within same compilation. Then I tried to create new conda environments where I installed only root as given at page [Installing ROOT - ROOT]. However these versions (6.24.6 and 6.26 ) do not run at all and when I try to start ROOT it gives me error
(GARUDA) chinmay@chinmay-desktop:~/Mace-Data-Analysisv0.2/bin$ root
malloc(): corrupted top size
If I try to import ROOT in python it causes segment violation.
What’s happening ?
Okay.
So I found out that PyROOT and uproot are in conflict with each other.
Both of them use llvm (ROOT for root and uproot for numba) at some level
and it messes up conda environment. I reinstalled anaconda and now
I have working ROOT.
However, The workflow I wanted to implement is as follows :
Use uproot to read some TTrees into numpy (simulated data)
Use scikit/Tensorflow libraries to train machine learning models and save the models
During data analysis read data TTrees into numpy array using
uproot, load the ML models from saved files, apply them on data
and save predicted outputs back to TTrees using uproot
Use original data TTrees and predicted TTrees in further analysis by using
TTree Friend features.
Now, I see that AsMatrix methods in ROOT v >= 6.24 allows me to read TTrees
into numpy arrays. Are there methods in PyROOT to write 2D numpy arrays back to
TTrees.
Also AsMatrix method currently supports reading Tree branches as it is. Are there plans
to expand these methods to read only entries passing certain cuts or storing functions of
branches in numpy array.
Uproot doesn’t use numba so I suspect you’ve misidentified the cause of the issue. If you can send me the output of conda info and conda list I can look at fixing the dependency pins in conda-forge to avoid other people having the same problem.
Since I reinstalled conda and now root is working normal (and I haven’t yet installed uproot in that environment ) , I can’t give you the error stacks … later I ran conda update --all, and it came up with multiple conflicts quite many of which pointed to glibc version… So yeah, that could also have been the reason…
I have also figured out way to bypass uproot for now using AsMatrix functions in pyroot