Attached you can find a test macro test.C (3.8 KB) which prints time spent on fitting using RooFit. It is some reduction of the whole fitting problem that we have in our analysis. I cannot exclude that further reducing the example would still show my problem.
The problem is that testing on several different machines and gcc versions, I have 3-5 times degradation of the run time between ROOT before changes around commit v6-19-01-1204-ge419e5715b (vectorization in RooFit) and after that.
If the test is performed in this way:
root -n -b -l -q test.C++ >& log.txt tail -n 1 log.txt # shows number of milliseconds spent on fitting the model 10 times
I get the following on my laptop with Debian 12, gcc12, i9 13900HX, for listed ROOT versions:
v6-19-01-1199-g24266cd51a 2099 v6-19-01-1204-ge419e5715b 9735 v6-21-02 10920 v6-28-04 16150
The funny thing is that testing on an
lxplus-like CentOS7 virtual machine at CERN, with this script (couldn’t attach):
#!/bin/bash for v in LCG_94a/x86_64-centos7-gcc8-opt LCG_96b/x86_64-centos7-gcc8-opt LCG_97/x86_64-centos7-gcc8-opt LCG_104/x86_64-centos7-gcc12-opt ; do . /cvmfs/sft.cern.ch/lcg/views/$v/setup.sh root-config --version root -n -b -l -q test.C++ >& log.txt tail -n 1 log.txt done
I don’t get deterioration, but rather a small improvement:
6.14/08 9375 6.18/04 9381 6.20/02 8718 6.28/04 8415
Although the run times are neither similar to the fastest nor the slowest performance on my local machine. It should be noted, though, that the absolute run time is hard to compare here, because locally it runs on a rather powerful CPU, while at CERN it is on some (probably shared) VM in the computer centre.
I have a feeling that there might be some difference in how I am building ROOT compared to the central installations and that I didn’t change some important build option for the newer ROOT versions. My
cmake call is:
cmake -Dxml=1 -Dtmva=1 -Dbuiltin_vc=1 -Ddavix=0 -Dbuiltin_afterimage=0 -Dbuiltin_glew=0 -Dbuiltin_ftgl=0 -Dxrootd=0 -Dbuiltin_veccore=1 -Droofit=1 -Dunuran=1 -Dminuit2=1 -Dmathmore=1 -Dfftw3=1 -Dvdt=1 -Dgenvector=1 -Dopengl=1 -Dsoversion=1 -Dexplicitlink=1 -DCMAKE_CXX_FLAGS='-D__ROOFIT_NOBANNER' -DCMAKE_INSTALL_PREFIX=../install $sources
Did anybody run into similar problems? Is it a regression in ROOT for my case or am doing something wrong in the build?