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

migrate modules used by the HLT menu to multithreading #10909

Closed

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Aug 23, 2015

migrate the following modules to be stream or global modules:

  • EcalRecalibRecHitProducer
  • EgammaHLTNxNClusterProducer
  • HLTRegionalEcalResonanceFilter
  • IPTCorrector
  • IsolatedEcalPixelTrackCandidateProducer
  • IsolatedPixelTrackCandidateProducer
  • L1GlobalTrigger
  • L1TCaloUpgradeToGCTConverter
  • LaserAlignmentEventFilter
  • TriggerResultsFilter
  • TriggerResultsFilterFromDB

  - change all configuration parameters into const members
  - initialise them in the member initializer list
  - remove unnecessary parameters
  - remove unnecessary caching of EventSetup products
  - remove unused methods and member variables
  - remove usage of exceptions in the FED check loop
  - change into a global::EDFilter
@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 23, 2015

@cmsbuild please test

@cmsbuild cmsbuild added this to the Next CMSSW_7_6_X milestone Aug 23, 2015
@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

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

migrate to modules used by the HLT menu multithreading

It involves the following packages:

Alignment/LaserAlignment
Calibration/HcalIsolatedTrackReco
HLTrigger/HLTfilters
HLTrigger/special
L1Trigger/GlobalTrigger
L1Trigger/L1TCalorimeter
RecoEgamma/EgammaHLTProducers
RecoLocalCalo/EcalRecProducers
RecoLocalMuon/RPCRecHit

@perrotta, @cmsbuild, @diguida, @cvuosalo, @fwyzard, @cerminar, @Martin-Grunewald, @slava77, @mmusich, @mulhearn can you please review it and eventually sign? Thanks.
@ghellwig, @Sam-Harper, @jhgoh, @argiro, @Martin-Grunewald, @bellan, @mschrode, @lgray 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.

clock_gettime(CLOCK_REALTIME, &start_time);
*/

void RPCPointProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks way too simple compared to the failed attempt in #9760
DTSegtoRPC etc are using global (static) cache variables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing it out.
Indeed I have checked for static analysis reports only for the modules themselves, not for the other code that they use.
Is there a simple way to find all thread-safety issues related to a plugin ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I know only of running helgrind
@Dr15Jones may know better

Copy link
Contributor

Choose a reason for hiding this comment

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

Best way to do it is to walk yourself through the code in CMSSW, lets you
catch everything but externals with problems and then really complicated
template code like stuff in reco::parser.

helgrind works but it is a bit noisey and thinks all of the std::atomic<>
variables are causing data races, hard to figure out what exactly is
happening.

On Mon, Aug 24, 2015 at 1:57 AM, Slava Krutelyov [email protected]
wrote:

In RecoLocalMuon/RPCRecHit/src/RPCPointProducer.cc
#10909 (comment):

-RPCPointProducer::~RPCPointProducer(){

-}

-void RPCPointProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup){

  • /*
  • struct timespec start_time, stop_time;
  • time_t fs;
  • time_t fn;
  • time_t ls;
  • time_t ln;
  • clock_gettime(CLOCK_REALTIME, &start_time);

- */

+void RPCPointProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {

I know only of running helgrind
@Dr15Jones https://github.com/Dr15Jones may know better


Reply to this email directly or view it on GitHub
https://github.com/cms-sw/cmssw/pull/10909/files#r37712383.

@cmsbuild
Copy link
Contributor

-1
Tested at: cf42e60
When I ran the RelVals I found an error in the following worklfows:
4.22 step1

DAS Error

1000.0 step1

DAS Error

1001.0 step1

DAS Error

1003.0 step1

DAS Error

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

@fwyzard fwyzard force-pushed the migrate_to_multithreading_75x branch from cf42e60 to eb41cda Compare August 24, 2015 10:21
@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 24, 2015

I've dropped the migration of RPCPointProducer for the time being.

@cmsbuild
Copy link
Contributor

Pull request #10909 was updated. @perrotta, @cmsbuild, @diguida, @cvuosalo, @fwyzard, @cerminar, @Martin-Grunewald, @slava77, @mmusich, @mulhearn can you please check and sign again.

@Dr15Jones
Copy link
Contributor

Look at http://cms-sw.github.io/showIB.html and click on the link 'Modules to thread unsafe statics'. The link 'Modules to thread unsafe EventSetup products' isn't accurate because some safe EventSetup products are falsely marked

edm::EDGetTokenT<EcalRecHitCollection> tok_ee;
edm::EDGetTokenT<EcalRecHitCollection> tok_eb;
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> tok_trigcand;
virtual void beginJob() override;
Copy link
Contributor

Choose a reason for hiding this comment

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

The beingJob and endJob methods are empty, why not just get rid of them?

@Dr15Jones
Copy link
Contributor

From a cursory look, everything seems fine. I also couldn't find any of the modified modules in the most recent 'module to statics' report:

https://cmssdt.cern.ch/SDT/jenkins-artifacts/ib-static-analysis/CMSSW_7_6_X_2015-08-23-2300/slc6_amd64_gcc493/reports/modules2statics.txt

@cmsbuild
Copy link
Contributor

Pull request #10909 was updated. @perrotta, @cmsbuild, @diguida, @cvuosalo, @fwyzard, @cerminar, @Martin-Grunewald, @slava77, @mmusich, @mulhearn can you please check and sign again.

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2015

uhm, a very timely rebase (just seconds after I signed)

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 26, 2015

well, I did the rebase simply to fix the typo you spotted, do we really need to test it all again ?

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2015

@fwyzard was it possible without a rebase?
I have no idea now what you changed (not from the web interface)

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 26, 2015

here is the diff between the version you signed (67f7701 ) and the new version ( 2259c5d ):

$ git diff 67f7701 2259c5d
diff --git a/RecoLocalCalo/EcalRecProducers/plugins/EcalRecalibRecHitProducer.cc b/RecoLocalCalo/EcalRecProducers/plugins/EcalRecalibRecHitProducer.cc
index e9fd90f..6b293d5 100644
--- a/RecoLocalCalo/EcalRecProducers/plugins/EcalRecalibRecHitProducer.cc
+++ b/RecoLocalCalo/EcalRecProducers/plugins/EcalRecalibRecHitProducer.cc
@@ -35,7 +35,7 @@ EcalRecalibRecHitProducer::EcalRecalibRecHitProducer(const edm::ParameterSet& ps
    EBRecHitCollection_(        ps.getParameter<edm::InputTag>("EBRecHitCollection") ),
    EERecHitCollection_(        ps.getParameter<edm::InputTag>("EERecHitCollection") ),
    EBRecHitToken_(             (not EBRecHitCollection_.label().empty()) ? consumes<EBRecHitCollection>(EBRecHitCollection_) : edm::EDGetTokenT<EBRecHitCollection>() ),
-   EERecHitToken_(             (not EERecHitCollection_.label().empty()) ? consumes<EBRecHitCollection>(EERecHitCollection_) : edm::EDGetTokenT<EERecHitCollection>() ),
+   EERecHitToken_(             (not EERecHitCollection_.label().empty()) ? consumes<EERecHitCollection>(EERecHitCollection_) : edm::EDGetTokenT<EERecHitCollection>() ),
    EBRecalibRecHitCollection_( ps.getParameter<std::string>("EBRecalibRecHitCollection") ),
    EERecalibRecHitCollection_( ps.getParameter<std::string>("EERecalibRecHitCollection") ),
    doEnergyScale_(             ps.getParameter<bool>("doEnergyScale") ),

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 26, 2015

By the way, if you prefer I can make a separate PR with only the RECO changes ?

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2015

no particular preference, I can figure out which files are RECO-related.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2015

-1
superseded by a bunch.
Is there going to be a bunch in 75X as well?

Andrea, please close this one (or the others) so that we don't have duplicated features

@fwyzard
Copy link
Contributor Author

fwyzard commented Aug 27, 2015

OK, I've opened #10964 to keep track of all the related pull requests.

@fwyzard fwyzard closed this Aug 27, 2015
@fwyzard fwyzard deleted the migrate_to_multithreading_75x branch August 27, 2015 06:18
@fwyzard fwyzard changed the title migrate to modules used by the HLT menu multithreading migrate modules used by the HLT menu to multithreading Sep 4, 2015
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.

5 participants