Skip to content

Conversation

@vgvassilev
Copy link
Member

Rebase PR #1396.

Original PR comment:
"ROOT can't autoparse classes inside namespaces with the rootmap
system (as the loading callbacks don't correctly land where
they are supposed to land with our injected namespaces). As this
turns out to be a feature of some kind, let's preload
TMVA/TreePlayer/Graf to fix all failing tests that are related
to this feature/bug with modules enabled.

This commit can be dropped if we solve on of those problems:

figure out how to fix this bug in the rootmap-based loading
without regressin in performance.

replace the rootmap system with something else like attaching
all C++ modules on startup.

Note that we already do something like this in normal ROOT by
including these packages into the PCH which also makes those
decls available in the normal clang lookup."

@vgvassilev vgvassilev requested review from amadio and pcanal as code owners March 3, 2018 16:32
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1013/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu16/native, ubuntu16/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • ../root/core/metacling/src/TCling.cxx:1946:9: error: redeclaration of ‘bool ModuleWasSuccessfullyLoaded’

@vgvassilev vgvassilev force-pushed the PreloadMoreModules branch from f2131ab to 7b3e73d Compare March 3, 2018 16:51
@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@vgvassilev vgvassilev changed the title Preload more modules [cxxmodules] Preload more modules Mar 3, 2018
@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fBuffer, no [dimension]
  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fIntegral, no [dimension]
  • Error in <TStreamerInfo::Build>: TArrayF, discarding: float* fArray, no [dimension]
  • Error in <TStreamerInfo::Build>: TString::Rep_t, unknown type: TString::Rep_t::(anonymous)
  • Error in <TStreamerInfo::Build>: __shared_ptr<TObjLink>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_ptr<TObjLink,__gnu_cxx::_Lock_policy::_S_atomic>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_count<__gnu_cxx::_Lock_policy::_S_atomic>: _Sp_counted_base<__gnu_cxx::_Lock_policy::_S_atomic>* has no streamer or dictionary, data member _M_pi will not be saved
  • Error in <TStreamerInfo::Build>: __shared_count<__gnu_cxx::_Lock_policy::_S_atomic>: _Sp_counted_base<__gnu_cxx::_Lock_policy::_S_atomic>* has no streamer or dictionary, data member _M_pi will not be saved
  • Error in <TStreamerInfo::Build>: TText, unknown type: void* fWcsTitle
  • Error in <TStreamerInfo::Build>: TLatex: TLatex::FormSize_t* has no streamer or dictionary, data member fTabSize will not be saved

And 23 more

ROOT can't autoparse classes inside namespaces with the rootmap
system (as the loading callbacks don't correctly land where
they are supposed to land with our injected namespaces). As this
turns out to be a feature of some kind, let's preload
TMVA/TreePlayer/Graf to fix all failing tests that are related
to this feature/bug with modules enabled.

This commit can be dropped if we solve on of those problems:

1. figure out how to fix this bug in the rootmap-based loading
without regressin in performance.

2. replace the rootmap system with something else like attaching
all C++ modules on startup.

Note that we already do something like this in normal ROOT by
including these packages into the PCH which also makes those
decls available in the normal clang lookup.
@pcanal
Copy link
Member

pcanal commented Mar 5, 2018

let's preload TMVA/TreePlayer/Graf to fix all failing tests that are related to this feature/bug with modules enabled.
... This commit can be dropped if we solve on of those problems:

Obviously the removal of this preload is a necessary precursor to making the use of module the default. Do we have a mechanism to 'not' forget to remove it?

@vgvassilev
Copy link
Member Author

@pcanal, can you elaborate a little because I cannot understand both sentences ;)

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error in <TStreamerInfo::Build>: TBaseClass: BaseClassInfo_t* has no streamer or dictionary, data member fInfo will not be saved
  • Error in <TBufferFile::CheckByteCount>: object of class TDictionary read too many bytes: 39 instead of 31
  • Error in <TExMap::Remove>: key 1186048 not found at 478
  • Error in <TExMap::Remove>: key 3 not found at 3
  • Error in <TExMap::Remove>: key 3045 not found at 27
  • Error in <TBufferFile::ReadClassBuffer>: class: TClassRef, attempting to access a wrong version: 4633, object skipped at offset 265
  • Error in <TExMap::Remove>: key 591700 not found at 173
  • Error in <TBufferFile::CheckByteCount>: object of class TBaseClass read too few bytes: 67 instead of 73
  • Error in <TExMap::Remove>: key 1074331651 not found at 107
  • Error in <TExMap::Remove>: key 156520290 not found at 272

And 352 more

Warnings:

  • ninja: warning: multiple rules generate tutorials/hsimple.root. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]

@pcanal
Copy link
Member

pcanal commented Mar 12, 2018

Obviously the removal of this preload is a necessary precursor to making the use of module the
default. Do we have a mechanism to 'not' forget to remove it?

@pcanal, can you elaborate a little because I cannot understand both sentences ;)

@vgvassilev I was apparently mistakenly talking about 'preloading the library' rather than what you seem to have meant ('preloading the module'). Since it is 'only' the module and that we already do this pre-loading of the AST node via the PCH, removing this 'pre-attaching of the AST nodes via preloading the module' is indeed not a pre-requisite to making the use of module the default mechanism. [It is rather a question of optimization and/or implementation of the replacement for the rootmap forward declaration].

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@yamaguchi1024
Copy link
Contributor

I think we can close this as it's out of date and we have a new patch for loading all the modules. Loading more modules have the negative effect on performance, so we're not going to this direction for now.

@vgvassilev
Copy link
Member Author

Which is the new patch you have in mind?

@yamaguchi1024
Copy link
Contributor

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • ERROR: Timeout after 10 minutes
  • ERROR: Error cloning remote repo 'origin'
  • ERROR: Error cloning remote repo 'origin'
  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fBuffer, no [dimension]
  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fIntegral, no [dimension]
  • Error in <TStreamerInfo::Build>: TArrayF, discarding: float* fArray, no [dimension]
  • Error in <TStreamerInfo::Build>: TString::Rep_t, unknown type: TString::Rep_t::(anonymous)
  • Error in <TStreamerInfo::Build>: __shared_ptr<TObjLink>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_ptr<TObjLink,__gnu_cxx::_Lock_policy::_S_atomic>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_count<__gnu_cxx::_Lock_policy::_S_atomic>: _Sp_counted_base<__gnu_cxx::_Lock_policy::_S_atomic>* has no streamer or dictionary, data member _M_pi will not be saved

And 26 more

Warnings:

  • ../root/core/metacling/src/TCling.cxx:1118:13: warning: ‘void loadModulePath(clang::HeaderSearch&, const char*)’ defined but not used [-Wunused-function]

@vgvassilev vgvassilev force-pushed the PreloadMoreModules branch from 3ed20f2 to f5eed82 Compare April 2, 2018 21:06
@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • ERROR: Timeout after 10 minutes
  • ERROR: Error fetching remote repo 'origin'
  • ERROR: Error fetching remote repo 'origin'
  • Error: /mnt/build/jenkins/workspace/root-pullrequests-build/build/bin/rootcling: compilation failure (/mnt/build/jenkins/workspace/root-pullrequests-build/build/lib/libMathCore87e80712ed_dictUmbrella.h)

Warnings:

  • ../root/core/metacling/src/TCling.cxx:1118:13: warning: ‘void loadModulePath(clang::HeaderSearch&, const char*)’ defined but not used [-Wunused-function]

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -DROOT_PARALLEL_LINK_JOBS=2 -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -DROOT_PARALLEL_LINK_JOBS=2 -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error: /mnt/build/jenkins/workspace/root-pullrequests-build/build/bin/rootcling: compilation failure (/mnt/build/jenkins/workspace/root-pullrequests-build/build/lib/libMathCore1faeac90e9_dictUmbrella.h)

Warnings:

  • ../root/core/metacling/src/TCling.cxx:1118:13: warning: ‘void loadModulePath(clang::HeaderSearch&, const char*)’ defined but not used [-Wunused-function]

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -DROOT_PARALLEL_LINK_JOBS=2 -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -DROOT_PARALLEL_LINK_JOBS=2 -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error: /mnt/build/jenkins/workspace/root-pullrequests-build/build/bin/rootcling: compilation failure (/mnt/build/jenkins/workspace/root-pullrequests-build/build/lib/libMathCorec2ea5ff842_dictUmbrella.h)

Warnings:

  • ../root/core/metacling/src/TCling.cxx:1118:13: warning: ‘void loadModulePath(clang::HeaderSearch&, const char*)’ defined but not used [-Wunused-function]

@vgvassilev
Copy link
Member Author

@phsft-bot build just on slc6/gcc62 with flags -DLLVM_BUILD_TYPE=Debug -Droofit=Off -Druntime_cxxmodules=On -Dctest_test_exclude_none=On

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -DLLVM_BUILD_TYPE=Debug -Droofit=Off -Druntime_cxxmodules=On -Dctest_test_exclude_none=On
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • ninja: error: '/mnt/build/jenkins/workspace/root-pullrequests-build/root/RooStats', needed by 'CMakeFiles/onepcm', missing and no known rule to make it

@vgvassilev vgvassilev force-pushed the PreloadMoreModules branch from 7d6f3d6 to 3b8336f Compare April 4, 2018 15:51
@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -DLLVM_BUILD_TYPE=Debug -Droofit=Off -Druntime_cxxmodules=On -Dctest_test_exclude_none=On
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • ninja: error: '/mnt/build/jenkins/workspace/root-pullrequests-build/root/RooFit', needed by 'CMakeFiles/onepcm', missing and no known rule to make it

Currently RooFit has a bug and we cannot use it with modules builds.
@vgvassilev vgvassilev force-pushed the PreloadMoreModules branch from 3b8336f to 390cc01 Compare April 4, 2018 15:58
@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -DLLVM_BUILD_TYPE=Debug -Droofit=Off -Druntime_cxxmodules=On -Dctest_test_exclude_none=On
How to customize builds

@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fBuffer, no [dimension]
  • Error in <TStreamerInfo::Build>: TH1, discarding: double* fIntegral, no [dimension]
  • Error in <TStreamerInfo::Build>: TArrayF, discarding: float* fArray, no [dimension]
  • Error in <TStreamerInfo::Build>: TString::Rep_t, unknown type: TString::Rep_t::(anonymous)
  • Error in <TStreamerInfo::Build>: __shared_ptr<TObjLink>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_ptr<TObjLink,__gnu_cxx::_Lock_policy::_S_atomic>: TObjLink* has no streamer or dictionary, data member _M_ptr will not be saved
  • Error in <TStreamerInfo::Build>: __weak_count<__gnu_cxx::_Lock_policy::_S_atomic>: _Sp_counted_base<__gnu_cxx::_Lock_policy::_S_atomic>* has no streamer or dictionary, data member _M_pi will not be saved
  • Error in <TStreamerInfo::Build>: __shared_count<__gnu_cxx::_Lock_policy::_S_atomic>: _Sp_counted_base<__gnu_cxx::_Lock_policy::_S_atomic>* has no streamer or dictionary, data member _M_pi will not be saved
  • Error in <TStreamerInfo::Build>: TText, unknown type: void* fWcsTitle
  • Error in <TStreamerInfo::Build>: TLatex: TLatex::FormSize_t* has no streamer or dictionary, data member fTabSize will not be saved

And 23 more

Warnings:

  • ../root/core/metacling/src/TCling.cxx:1118:13: warning: ‘void loadModulePath(clang::HeaderSearch&, const char*)’ defined but not used [-Wunused-function]

@vgvassilev
Copy link
Member Author

@Teemperor, I'd like to close this PR but the change to the clang::SourceManager seems still relevant. Could you open a phab review for it?

@vgvassilev
Copy link
Member Author

This is implemented in a different way in the master.

@vgvassilev vgvassilev closed this Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants