cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.07k stars 4.29k forks source link

Problems compiling macro with new ROOT630 #44539

Open acmbulla opened 6 months ago

acmbulla commented 6 months ago

Dear all,

Since we moved to CMSSW 14 I've been stuck in using my private script to do RelVal comparison. The script is old, essentially it is a simple macro which runs over defined paths in two rootFiles and saves the plots.

There is some Python wrapper to make things easier but you can just follow these steps to replicate the errors I'm facing. I've always used the framework in CMSSW_11_1_4 (for other reasons, I'm familiar with that env), but if you try to use root6.20 to open a root6.30 file you will encounter a segmentation violation error (case1). If you try to use CMSSW_14_0_0, to be consistent with the files you are using, you will be stuck and the macro will not compile (case2).

To convince you that this is a root-related problem, in CMSSW_11_1_4, you are free to also launch the comparison with some random CMSSW_13 files (case3).

Case 1 and 3: cmsrel CMSSW_11_1_4 cd src cmsenv git clone -b bug_report git@github.com:CMSTrackingPOG/TkRelVal.git cd TkRelVal ./debug_test.sh

after that, you should have the rootfiles into collisions/DQM. if not, please download [1,4] and put them into collisions/DQM

cd collisions

(case1)
## launch the validation (some parameters are random but necessary)
## in this case you should get a segmentation error
./makeValidationPlots.sh 369978 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root pre0 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root pre0_root630 369978_ZeroBias_CMSSW_14_0_0_pre0_vs_14_0_0_pre0_root630 D 1. 1.

(case3)
## launch the validation
## Everything should work, you may face some permission-write problems but the macro works
./makeValidationPlots.sh 369978 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_13_3_0_pre1-130X_dataRun3_Prompt_frozen_v4_RelVal_2023D-v1__DQMIO.root pre1 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_13_3_0_pre2-132X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root pre2 369978_ZeroBias_CMSSW_13_3_0_pre1_vs_13_3_0_pre2 D 1. 1.

Case 2 (stuck) cmsrel CMSSW_14_0_0 cd src cmsenv git clone -b bug_report git@github.com:CMSTrackingPOG/TkRelVal.git cd TkRelVal ./debug_test.sh

after that, you should have the rootfiles into collisions/DQM. if not, please download [1,4] and put them into collisions/DQM

cd collisions

 ./makeValidationPlots.sh 369978 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root pre0 DQM/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root pre0_root630 369978_ZeroBias_CMSSW_14_0_0_pre0_vs_14_0_0_pre0_root630 D 1. 1.

**** If you are not able to download the required file, please download: 1) https://cmsweb.cern.ch/dqm/relval/data/browse/ROOT/RelValData/CMSSW_13_3_x/DQM_V0001_R000369978__ZeroBias__CMSSW_13_3_0_pre1-130X_dataRun3_Prompt_frozen_v4_RelVal_2023D-v1__DQMIO.root 2) https://cmsweb.cern.ch/dqm/relval/data/browse/ROOT/RelValData/CMSSW_13_3_x/DQM_V0001_R000369978__ZeroBias__CMSSW_13_3_0_pre2-132X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root 3) https://cmsweb.cern.ch/dqm/relval/data/browse/ROOT/RelValData/CMSSW_14_0_x/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root 4) https://cmsweb.cern.ch/dqm/relval/data/browse/ROOT/RelValData/CMSSW_14_0_x/DQM_V0001_R000369978__ZeroBias__CMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root

cmsbuild commented 6 months ago

cms-bot internal usage

cmsbuild commented 6 months ago

A new Issue was created by @acmbulla.

@rappoccio, @Dr15Jones, @antoniovilela, @smuzaffar, @makortel, @sextonkennedy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 6 months ago

assign dqm

cmsbuild commented 6 months ago

New categories assigned: dqm

@rvenditti,@syuvivida,@tjavaid,@nothingface0,@antoniovagnerini you have been requested to review this Pull request/Issue and eventually sign? Thanks

makortel commented 6 months ago

I've always used the framework in CMSSW_11_1_4 (for other reasons, I'm familiar with that env), but if you try to use root6.20 to open a root6.30 file you will encounter a segmentation violation error (case1).

This is (unfortunately) kind of expected, more details in https://github.com/cms-sw/cmssw/issues/43882. We backported ROOT's fix to open a file produced with ROOT 6.30 down to 12_4_X, but are not planning to go for earlier release cycles (because we are not aware of any production use case requiring that).

Could you post the compilation error of case 2?

slava77 commented 6 months ago

type tracking

acmbulla commented 6 months ago

Hi,

There is no compilation error. The macro starts and simply is stuck at its first print..

./makeValidationPlots.sh 369978 DQM/DQM_V0001_R000369978ZeroBiasCMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1DQMIO.root pre0 DQM/DQM_V0001_R000369978ZeroBiasCMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1DQMIO.root pre0_root630 369978_ZeroBias_CMSSW_14_0_0_pre0_vs_14_0_0_pre0_root630 D 1. 1. Generating some index files before comparing the histos /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions Analyzing DQM/DQM_V0001_R000369978ZeroBiasCMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1DQMIO.root and DQM/DQM_V0001_R000369978ZeroBiasCMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1DQMIO.root in 369978_ZeroBias_CMSSW_14_0_0_pre0_vs_14_0_0_pre0_root630

Processing /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/runValidationComparison.C("DQM/DQM_V0001_R000369978ZeroBiasCMSSW_14_0_0_pre0-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1DQMIO.root","pre0","DQM/DQM_V0001_R000369978ZeroBias__CMSSW_14_0_0_pre0_ROOT630-133X_dataRun3_Prompt_frozen_v1_RelVal_2023D-v1__DQMIO.root","pre0_root630","/eos/project/c/cmsweb/www/tracking/validation/DATA/369978_ZeroBias_CMSSW_14_0_0_pre0_vs_14_0_0_pre0_root630","D",1.,"false")... Info in : creating shared library /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/ReleaseComparison_cpp.so

but I mean, for hours.. and when you gently kill the process (ctrl+c) you get ^CError in : Executing 'cd "/afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions" ; g++ -fPIC -c -O3 -DNDEBUG -DROOFIT_NOBANNER -fdiagnostics-color=always -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -W -Woverloaded-virtual -fsigned-char -pthread -I$ROOTSYS/include -I"/afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/src" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/mctester/1.25.1-32c0128c131a9224cb4da557b9d5fcd1/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/hydjet2/2.4.3-b9dfb7b589b0dbba91d1d27563dd978d/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/dd4hep/v01-27-02-79eed4b201f3da0be8d0851a69892603/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/herwig7/7.2.2-2608d9fb35aef18ab21cb3a356bef91a/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/tauolapp/1.1.8-7be2943809cb7971245caac5e58ef7c5/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/sherpa/2.2.15-57624855e36a02ae7466790adcc090ba/include/SHERPA-MC" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/lwtnn/2.13-a3f70815ff2749dd90ca5e8b53a8a8b0/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/thepeg/2.2.2-31bb60985c407e0139daced5d502f116/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/pythia8/309-d0cc659066c4ce30e87773cccde7738d/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/starlight/r193-f88a9b56a5cba56e1735fa355aea6f5a/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/rivet/3.1.8-0907c79da6fee673e27b41a92d3b0b2c/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/highfive/2.3.1-734bd2d1da6e10e850311bcc06fdbaba/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/classlib/3.1.3-d0fb1478d37e501c65a346e5fa85a200/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/lhapdf/6.4.0-5969784ee06af968580d5197ca83d374/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/geant4/11.1.2-64a948d0da50afc1b46609c8e2c0e393/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/alpaka/1.1.0-0e0b978d445f7af747cf00064c146356/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/tkonlinesw/4.2.0-1_gcc7-417f0dd8bdea7b2e4fe982ab914abf20/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/pcre2/10.36-dc3659c052657671d667638374925ebc/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libungif/4.1.4-2f91a77bad1564f8547f5d13089fd857/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libtiff/4.0.10-bdac8c539bf3892024554f734a79888f/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libpng/1.6.37-7461873793d4834865bcbd73bf2bfcd6/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/frontier_client/2.10.2-e61fe125091fae8cc526214bca0a29f9/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/pcre/8.43-37eb2e8b73bab83d6645ecfd5d73dcaa/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/zstd/1.5.2-0530c990dd9ca27a8d966ab201ed2dfe/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/xrootd/5.6.4-1cd59ba86df003d00e7606507be61349/include/xrootd/private" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/vdt/0.4.3-5a80085534117eaccb28e669c6da4b6f/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/valgrind/3.22.0-e989c977f8949fc48f1bc1206f1f87c8/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/utm/utm_0.11.2-8c560b6fac5dffb240310fca7e1dca85/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/sigcpp/3.2.0-088dbeedbd32a7524fa993c76844b9a8/include/sigc++-3.0" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/sqlite/3.36.0-fde8c1dbb8f282eaade54b13a9a9d4c6/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/rocm-rocrand/5.6.0-07b378170951d27a2eced233ed296e6e/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/pacparser/1.4.2-7a755e2c5b151cdf9eeb889f2c4ee90f/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/oracle/19.11.0.0.0dbru-0ef9ee763c1e7a90d8c4515a5af97f0b/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/py3-numpy/1.24.3-6c4922f4e317e74c4b82416c41722d10/c-api/core/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/meschach/1.2.pCMS1-79435924678a8cc522f783c34e3865d7/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/lz4/1.9.2-e478fcd3e5e191d5bb4ade190474ad76/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libuuid/2.34-27ce4c3579b5b1de2808ea9c4cd8ed29/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libjpeg-turbo/2.0.2-cfe908f70a445c34076845aedc9ca824/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/ktjet/1.06-35642c410ec972a29f6d8b3b15110097/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/jemalloc-prof/5.3.0-2a4c84129100ac7cc75c65cce1063d38/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/jemalloc-debug/5.3.0-37c2156844bd2e38f102f144007e98bb/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/jemalloc/5.3.0-3416db0688377af1e4ae62ddc3410095/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/hls/2019.08-8afb4083e7b06154cf0bca6d787b688f/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/madgraph5amcatnlo/2.7.3-7f7eb2f2a0209c756cbd0ce78e364b07" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/heppdt/3.04.01-4eee1b3b2cbf39195fcdd01b168a64e9/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/hector/1.3.4_patch1-c87256636b8529f392d81dc4a8bf39b1/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/protobuf/3.21.9-999e041f1a53b3ff94ee65a9cc8b7a2c/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libunwind/1.7.2-master-c8f891246bba0e1ca471309188b37284/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/giflib/5.2.0-07dfc72586a7288f078c7a02c8b17956/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/gdbm/1.10-1f0ec10a142f21150eef9d32ba579779/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/freetype/2.10.0-2f842c6203ecd373af1bd11574a751c3/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/fftw3/3.3.8-5270bdf9998065b38f91e9aa053c73ec/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/fftjet/1.5.0-4c95f831c41530ec8fa31a87717d9e5b/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/fastjet/3.4.1-5cbe96b15332d701f2daba5eba5026f0/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/xz/5.2.5-6f3f49b07db84e10c9be594a1176c114/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/dcap/2.47.12-5b22a716d41ee46990f5c71005a19f8d/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/libxml2/2.9.10-843ced916fa9921fbf8ea97048e64257/include/libxml2" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/curl/7.79.0-959a9188e043d67b2825f64cfeb54266/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/cppunit/1.15.x-fb84a4bbf5a436317d208e3ef0864e91/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/coral/CORAL_2_3_21-6efec311d36f82bba7d9d08714a3e8bd/include/LCG" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/pythia6/426-c430ea6f2967f65248af15c71e6c653e/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/hepmc/2.06.10-84d62bf8401502062c47cad693db65fe/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/gsl/2.6-dc093739c7d4283cbe37712ffdbef83e/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/xerces-c/3.1.3-c7b88eaa36d0408120f3c29826a04bf6/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/expat/2.4.8-b093687a482bf386f8f8c236c5b2efa2/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/zlib/1.2.11-51072030b7f93c3ac6c4235f21e413cb/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/clhep/2.4.7.1-5c1cfd46e8f0e61f022ff44f21c90ce1/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/vecgeom/v1.2.7-25fd663ce821ed1accecbf9c823853f3/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/vecgeom/v1.2.7-25fd663ce821ed1accecbf9c823853f3/include/VecGeom" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/bz2lib/1.0.6-d065ccd79984efc6d4660f410e4c81de/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/tbb/v2021.9.0-5109e373398eaf79a8268d6a86a2f6e2/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/cuda/12.2.1-bdf3fff69eaec65abe18a7569592cab6/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/boost/1.80.0-9d4e0dc8cf1f8fc8a67cf53ae917955e/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/xgboost/1.7.5-9c89d217cfd2bd1ca0fdce511a31b168/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/tinyxml2/6.2.0-d17873b4d6a42a43226cf689f82ec1ef/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/rdma-core/39.1-32801f3b791d7fb5e9a61012441d8c33/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/ittnotify/16.06.18-60c208f4e7c36d4489d099cb73074340/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/gosamcontrib/2.0-20150803-9e0755b7295f958b571160de86d4a95b/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/fmt/8.0.1-54e94b39f5cf29341bb9c4765764e1ca/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-d6bc5640efdc17abf386d018e8c9ca0d/include/eigen3" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/rocm/5.6.0-17877708168976351d54c3510af8ed71/include" -I"/usr/local/include" -I"/usr/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/etc/" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/etc//cling" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/etc//cling/plugins/include" -I"/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/include/" -DACLIC__ "/afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/ReleaseComparison_cpp_ACLiC_dict.cxx" ; g++ -O3 -DNDEBUG "/afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/ReleaseComparison_cpp_ACLiC_dict.o" -shared -rdynamic "/lib64/libdl.so" "/lib64/libc.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libgcc_s.so" "/lib64/libm.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libstdc++.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/bin/../lib/libRint.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/bin/../lib/libCore.so" "/lib64/libpthread.so.0" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libpcre.so.1" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libz.so.1" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/liblzma.so.5" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/liblz4.so.1" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libzstd.so.1" "/lib64/libnss_files.so.2" "/lib64/libnss_sss.so.2" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libRIO.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libThread.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libtbb.so.12" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_0/external/slc7_amd64_gcc12/lib/libCling.so" "/lib64/librt.so.1" "/lib64/libtinfo.so.5" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/lib/libMathCore.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/lib/libImt.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/lib/libMultiProc.so" "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/lcg/root/6.30.03-723f04ba093d0553281d42c7b0f6eee1/lib/libNet.so" "/lib64/libssl.so.10" "/lib64/libcrypto.so.10" "/lib64/libgssapi_krb5.so.2" "/lib64/libkrb5.so.3" "/lib64/libcom_err.so.2" "/lib64/libk5crypto.so.3" "/lib64/libkrb5support.so.0" "/lib64/libkeyutils.so.1" "/lib64/libresolv.so.2" "/lib64/libselinux.so.1" -o "/afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/ReleaseComparison_cpp.so"' failed! In file included from input_line_8:1: /afs/cern.ch/user/a/abulla/CMSSW_14_0_0/src/TkRelVal/collisions/runValidationComparison.C:1:10: fatal error: 'ReleaseComparison.cpp+' file not found

include "ReleaseComparison.cpp+"

makortel commented 6 months ago

I was able to simplify the reproducer to

# In ROOT 6.30 environment, e.g. CMSSW_14_0_0
$ git clone -b bug_report https://github.com/CMSTrackingPOG/TkRelVal.git
$ cd TkRelVal/collisions
$ root
root [0] .L ReleaseComparison.cpp+
# takes ages

The file in question is https://github.com/CMSTrackingPOG/TkRelVal/blob/bug_report/collisions/ReleaseComparison.cpp and has ~4k lines. Usual recommendation would be to split the code into more source files.

I found out a way to run the actual compilation command (such that intermediate files are kept)

root [1] gSystem->CompileMacro("ReleaseComparison.cpp", "cvd")

Repeating the long-taking compilation command with -O0 and -O1 are quite fast, with -O2 and the default -O3 taking a long time (I didn't wait).

I'd be tempted to conclude the source file is just too heavy to be compiled in a reasonable time with optimizations enabled. If the problem would be in e.g. inlining of the frequently called functions createTH1FPlot() and createTProfPlot(), maybe moving them to a separate source file, and compiling+loading it separately into ROOT would help to reduce the total compilation time?

I'll tag @pcanal in case he would have any ideas. With the simplified recipe maybe the ROOT forum would be useful as well.

makortel commented 6 months ago

assign pdvm

Given the relation to validation, pdmv is probably closer match than dqm (sorry for the noise)

makortel commented 6 months ago

unassign dqm

pcanal commented 6 months ago

If the problem is indeed in the time gcc takes to compile the source code then splitting it is the only options. If the issue had been in the dictionary generation steps (rootcling being called by ACLiC) then an option would have been to split the file in function forward declaration and class declarations and hide the implementation from Cling (behind #ifndef __CLING__).

makortel commented 6 months ago

assign pdmv

cmsbuild commented 6 months ago

New categories assigned: pdmv

@AdrianoDee,@sunilUIET,@miquork you have been requested to review this Pull request/Issue and eventually sign? Thanks

makortel commented 6 months ago

@pcanal, is there an easy way to change the optimization level ACLiC uses?

dan131riley commented 6 months ago

In the past I've frobbed the compile options via

gSystem->GetMakeSharedLib()/gSystem->SetMakeSharedLib();
gSystem->GetMakeExe()/gSystem->SetMakeExe();
slava77 commented 6 months ago

@acmbulla what do you see with top for the process(es) related to makeValidationPlots.sh ? Is the CPU utilization high? (sometimes file reading may be slow .. or the search paths could explode and the system takes forever to get to related dependencies during compilation/processing)

pcanal commented 6 months ago

is there an easy way to change the optimization level ACLiC uses?

You select the debug mode by passing 'g' when loading the scripts (either as the option to CompileMacro or after the trailing +.

You can also customize the value used (eg. use -O1) with:

gSystem->SetFlagsDebug( ... ); // See GetFlagsDebug
gSystem->SetFlagsOpt( ... ); // See GetFlagsOpt
acmbulla commented 6 months ago

@slava77

well it starts with rootcling which takes no more that 50% of CPU but as soon as cc1plus chicks in, then it takes a stable 95-100% of CPU usage.. Does it help?

slava77 commented 6 months ago

well it starts with rootcling which takes no more that 50% of CPU but as soon as cc1plus chicks in, then it takes a stable 95-100% of CPU usage.. Does it help?

I guess so; it looks like a good evidence in the direction of the file being too complex to compile.

I can suggest a simple check, to comment out the main function after the first few calls to createTH1FPlot and see if it runs much faster. This would suggest if splitting of the script is going to be practical.

OTOH, based on Matti's check of different optimization flags, I'm guessing a switch to -O1 would be fine, assuming a compiled version was running in a reasonable time before (this less optimal version will be probably x2 slower if not less).

acmbulla commented 6 months ago

Yeah leaving just the firsts createTH1FPlot and createTProfPlot it takes ~30 seconds to start and then executes the code in the usual (which is not very efficient) speed. So i guess i can work on splitting the things..