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

make EcalRingCalibrationTools thread safe (76x) #11093

Merged

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Sep 2, 2015

Implement a minimal set of changes to EcalRingCalibrationTools to make its initialisation and usage thead-safe.
In particular, this should make HLTEcalPhiSymFilter thread-safe again.

Note that EcalRingCalibrationTools is still non-compliant with the CMS coding rules, and should be rewritten either as an ESProducer, or as a non-static data member of an EDProducer.

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 2, 2015

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 2, 2015

+1

@cmsbuild cmsbuild added this to the Next CMSSW_7_6_X milestone Sep 3, 2015
@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

A new Pull Request was created by @fwyzard (Andrea Bocci) for CMSSW_7_6_X.

make EcalRingCalibrationTools thread safe (76x)

It involves the following packages:

Calibration/Tools
HLTrigger/special

@cmsbuild, @mmusich, @diguida, @cerminar can you please review it and eventually sign? Thanks.
@Martin-Grunewald this is something you requested to watch as well.
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.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 3, 2015

@bmarzocc , can you check if there is an alternative, more CMS-compliant approach available ?

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 3, 2015

tracked at #10964

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

-1
Tested at: 3a36c22
I found a compilation error while trying to compile with clang:
I used this command:
scram b vclean && scram build -k -j 8 USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'

>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/GenericHouseholder.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/GenericMinL3Algorithm.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/HouseholderDecomposition.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/InvMatrixCommonDefs.cc 
In file included from /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/EcalRingCalibrationTools.cc:1:
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/interface/EcalRingCalibrationTools.h:51:23: error: 'thread_guard' attribute requires a string
  [[cms::thread_guard(isInitializedFromGeometry_)]]
                      ^
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/InvMatrixUtils.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/MinL3AlgoUniv.cc 
In file included from /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-02-1100/src/Calibration/Tools/src/HouseholderDecomposition.cc:7:


you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-11093/7842/summary.html

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 3, 2015

@Dr15Jones , do I need to use a different syntax to make LLVM/clang happy ?

@bmarzocc
Copy link
Contributor

bmarzocc commented Sep 3, 2015

@fwyzard Is an alternative still needed? An alternative tool in CMSSW for extracting the ringID is this one:

https://github.com/cms-sw/cmssw/blob/CMSSW_7_5_X/Calibration/EcalCalibAlgos/src/EcalGeomPhiSymHelper.cc

however it is not used and maintained anymore, so don't know if it works correctly with the latest CMSSW version.

@fwyzard
Copy link
Contributor Author

fwyzard commented Sep 3, 2015 via email

@davidlange6
Copy link
Contributor

Am I mistaken that computing the ringID from a DetId is more than a few lines of code?

On Sep 3, 2015, at 1:38 PM, Badder Marzocchi notifications@github.com wrote:

@fwyzard Is an alternative still needed? An alternative tool in CMSSW for extracting the ringID is this one:

https://github.com/cms-sw/cmssw/blob/CMSSW_7_5_X/Calibration/EcalCalibAlgos/src/EcalGeomPhiSymHelper.cc

however it is not used and maintained anymore, so don't know if it works correctly with the latest CMSSW version.


Reply to this email directly or view it on GitHub.

@Dr15Jones
Copy link
Contributor

Yeah, the name in the thread_guard statement must be quoted
[[cms::thread_guard("isInitializedFromGeometry_")]]

@Dr15Jones
Copy link
Contributor

My thoughts are what Andrea has done is fine for an emergency patch but this code violates CMSSW coding policies and we need a fix. This design is not a good long term pattern for handling threaded code.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

Pull request #11093 was updated. @cmsbuild, @mmusich, @diguida, @cerminar can you please check and sign again.

@Dr15Jones
Copy link
Contributor

Sorry I missed it the first time.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@mmusich
Copy link
Contributor

mmusich commented Sep 14, 2015

+1
for fwyzard@300e779

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Sep 15, 2015
…threadsafe

make EcalRingCalibrationTools thread safe (76x)
@cmsbuild cmsbuild merged commit d76d4aa into cms-sw:CMSSW_7_6_X Sep 15, 2015
@fwyzard fwyzard deleted the make_EcalRingCalibrationTools_threadsafe branch September 23, 2015 20:05
@fwyzard fwyzard restored the make_EcalRingCalibrationTools_threadsafe branch September 23, 2015 20:05
@fwyzard fwyzard deleted the make_EcalRingCalibrationTools_threadsafe branch September 23, 2015 20:06
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

6 participants