Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Atlas GccCheckerPlugins package as an external. #4190

Merged

Conversation

gartung
Copy link
Member

@gartung gartung commented Jul 16, 2018

Although the PR is based on the gcc7 branch it can be back ported to any branch with a compiler that supports plugins and c++11.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @gartung (Patrick Gartung) for branch IB/CMSSW_10_2_X/gcc700.

@cmsbuild, @smuzaffar, @gudrutis, @mrodozov can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.

@gartung
Copy link
Member Author

gartung commented Jul 16, 2018

@smuzaffar @Dr15Jones

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@gartung
Copy link
Member Author

gartung commented Jul 16, 2018

@smuzaffar

When I try to run the plugin as compiled is fails with

cc1plus: error: cannot load plugin /home/gartung/cms-build/slc7_amd64_gcc700/external/gcc-checker-plugin/1.0-cms2/lib/libchecker_gccplugins.so
/home/gartung/cms-build/slc7_amd64_gcc700/external/gcc-checker-plugin/1.0-cms2/lib/libchecker_gccplugins.so: undefined symbol: Z19get_inner_referenceP9tree_nodePlS1_PS0_P12machine_modePiS5_S5

If I link the plugin against libcp1plugin.so, it fails with

cc1plus: error: cannot load plugin /home/gartung/cms-build/slc7_amd64_gcc700/external/gcc-checker-plugin/1.0-cms/lib/libchecker_gccplugins.so
/home/gartung/CMSSW_10_2_0/external/slc7_amd64_gcc630/lib/libcp1plugin.so.0: undefined symbol: cp_binding_oracle

If I link the plugin against libcc1plugin.so, it fails with

cc1plus: error: cannot load plugin /home/gartung/cms-build/slc7_amd64_gcc700/external/gcc-checker-plugin/1.0-cms4/lib/libchecker_gccplugins.so
/home/gartung/CMSSW_10_2_0/external/slc7_amd64_gcc630/lib/libcc1plugin.so.0: undefined symbol: c_binding_oracle

@gartung
Copy link
Member Author

gartung commented Jul 16, 2018

Nevermind. I was able to determine that set up a project area for gcc630 and I compiled the plugin with gcc700.

@gartung
Copy link
Member Author

gartung commented Jul 16, 2018

Once the gcc-checker-plugin toolfile is configure in a project area the gcc checker can be run with

g++ -c -o /dev/null --std=c++14 -fplugin=$GCC_CHECKER_PLUGIN -fplugin-arg-libchecker_gccplugins-checkers=all $file

@gartung
Copy link
Member Author

gartung commented Jul 16, 2018

@Dr15Jones I took the twiki text from your email and reformatted it.
https://twiki.cern.ch/twiki/bin/view/Sandbox/PatrickGartungSandbox

@gartung gartung closed this Jul 17, 2018
@gartung
Copy link
Member Author

gartung commented Jul 17, 2018

@davidlange6 Are you opposed to this one too?

@gartung gartung reopened this Jul 17, 2018
@smuzaffar smuzaffar changed the base branch from IB/CMSSW_10_2_X/gcc700 to IB/CMSSW_10_3_X/gcc700 July 18, 2018 08:15
@davidlange6
Copy link
Contributor

not specifically - presumably if we want this for more than a quick test, we should get it put into a proper distribution (add bonus, with a makefile or similar) rather than downloading all the root/fastjet etc etc etc sources that atlas uses..

%post
%{relocateConfig}etc/scram.d/*.xml
echo "GCC_CHECKER_PLUGIN_TOOLFILE_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'; export GCC_CHECKER_PLUGIN_TOOLFILE_ROOT" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
echo "setenv GCC_CHECKER_PLUGIN_TOOLFILE_ROOT '$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gartung , I don't think you need all this logic in this spec file. Just copy the one e.g. curl-toolfile.spec and update variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually you will need the path to the plugin library.

@@ -0,0 +1,23 @@
### RPM external gcc-checker-plugin 1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gartung , use version 2.0.9 here and replace 2.0.9 with %{realversion} in rest of the file.

@davidlange6
Copy link
Contributor

davidlange6 commented Jul 18, 2018 via email

@smuzaffar
Copy link
Contributor

but at least it points to a tag in gitlab ... right?

@davidlange6
Copy link
Contributor

davidlange6 commented Jul 18, 2018 via email

@gartung
Copy link
Member Author

gartung commented Jul 18, 2018

I created this PR for review. It should not be merged yet. I plan to create a repo under cms-externals with just CheckerGccPlugin. I also want to change the Altas references to CMS. Is there a way to mark this PR WIP or For Review. I would mark the codecompass PR the same way.

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@gartung
Copy link
Member Author

gartung commented Jul 18, 2018

I put the CheckerGccPlugins source in its own repository here
https://github.com/gartung/CheckerGccPlugins
I added a Makefile and changed all of the ATLAS references to CMS. This includes the checker_macros.h header that needs to be included to use the pragma macros needed to activate the thread checkers. The header could be placed in CMSSW if that is easier.

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@gartung
Copy link
Member Author

gartung commented Jul 19, 2018

Mostly unmodified source now in cms-external repo
https://github.com/cms-externals/CheckerGccPlugins

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@gartung
Copy link
Member Author

gartung commented Jul 20, 2018

Create gcc-analyzer-c(xx)compiler.xml so gcc checker can be run with
scram b COMPILER=gcc-analyzer

@smuzaffar
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 23, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/29320/console

- set type=compiler for gcc-analyzer-c*compiler
- fix the name of analyzer tools
- make use of scram-tools-post
@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

<environment name="INCLUDE" default="$GCC_CHECKER_PLUGIN_ROOT/include"/>
</client>
</tool>
<runtime name="GCC_CHECKER_PLUGIN" default="$GCC_CHECKER_PLUGIN_ROOT/lib/libchecker_gccplugins.so"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need GCC_CHECKER_PLUGIN env variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is no longer needed.

@smuzaffar
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 23, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/29328/console

@cmsbuild
Copy link
Contributor

Pull request #4190 was updated.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@smuzaffar smuzaffar merged commit e798df6 into cms-sw:IB/CMSSW_10_3_X/gcc700 Jul 23, 2018
@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4190/29328/summary.html

The workflows 1001.0, 1000.0, 140.53, 136.85, 136.8311, 136.7611, 136.731, 4.22 have different files in step1_dasquery.log than the ones found in the baseline. You may want to check and retrigger the tests if necessary. You can check it in the "files" directory in the results of the comparisons

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 31
  • DQMHistoTests: Total histograms compared: 2889291
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2889094
  • DQMHistoTests: Total skipped: 190
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 30 files compared)
  • Checked 128 log files, 14 edm output root files, 31 DQM output files

@gartung gartung deleted the add-gcc-plugin-toolfile branch October 12, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants