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

Use of ESGetToken in Oscar producer #34338

Merged
merged 16 commits into from Jul 13, 2021
Merged

Conversation

civanch
Copy link
Contributor

@civanch civanch commented Jul 5, 2021

PR description:

Migration to ESGetToken of the OscarMTProducer required some reorganization of Geant4 initialization. If this PR is correct then no change should be at SIM and other steps.

PR validation:

private

if this PR is a backport please specify the original PR and why you need to backport that PR: no

@civanch
Copy link
Contributor Author

civanch commented Jul 5, 2021

assign core

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34338/23706

ERROR: Build errors found during clang-tidy run.

edm::ESGetToken<DDCompactView, IdealGeometryRecord> OscarMTProducer::m_DDD;
                                                                     ^
SimG4Core/Application/plugins/OscarMTProducer.cc:69:72: error: no member named 'm_PDT' in 'OscarMTProducer' [clang-diagnostic-error]
edm::ESGetToken<HepPDT::ParticleDataTable, PDTRecord> OscarMTProducer::m_PDT;
                                                                       ^
SimG4Core/Application/plugins/OscarMTProducer.cc:70:75: error: no member named 'm_MagField' in 'OscarMTProducer' [clang-diagnostic-error]
edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> OscarMTProducer::m_MagField;
                                                                          ^
SimG4Core/Application/plugins/OscarMTProducer.cc:71:26: error: no member named 'm_OscarMutex' in 'OscarMTProducer' [clang-diagnostic-error]
G4Mutex OscarMTProducer::m_OscarMutex = G4MUTEX_INITIALIZER;
                         ^
SimG4Core/Application/plugins/OscarMTProducer.cc:72:23: error: no member named 'm_hasToken' in 'OscarMTProducer' [clang-diagnostic-error]
bool OscarMTProducer::m_hasToken = false;
                      ^
SimG4Core/Application/plugins/OscarMTProducer.cc:87:51: error: use of undeclared identifier 'IdealGeometryRecord' [clang-diagnostic-error]
        m_DD4Hep = esConsumes<cms::DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>();
                                                  ^
SimG4Core/Application/plugins/OscarMTProducer.cc:89:43: error: use of undeclared identifier 'IdealGeometryRecord' [clang-diagnostic-error]
        m_DDD = esConsumes<DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>();
                                          ^
Suppressed 3439 warnings (3438 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34338/23707

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

A new Pull Request was created by @civanch (Vladimir Ivantchenko) for master.

It involves the following packages:

SimG4Core/Application

@smuzaffar, @civanch, @Dr15Jones, @makortel, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks.
@makortel, @cvuosalo, @rovere, @bsunanda, @fabiocos, @slomeo this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@civanch
Copy link
Contributor Author

civanch commented Jul 5, 2021

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 6, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5c6882/16476/summary.html
COMMIT: 03f4773
CMSSW: CMSSW_12_0_X_2021-07-05-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/34338/16476/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 51741 differences found in the comparisons
  • DQMHistoTests: Total files compared: 38
  • DQMHistoTests: Total histograms compared: 2785924
  • DQMHistoTests: Total failures: 287453
  • DQMHistoTests: Total nulls: 252
  • DQMHistoTests: Total successes: 2498197
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 7.705 KiB( 37 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): 0.850 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 250202.181 ): -0.176 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): -0.650 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • DQMHistoSizes: changed ( 7.3 ): 2.744 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 8.0 ): 4.941 KiB SiStrip/MechanicalView
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: found differences in 14 / 37 workflows

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5c6882/16714/summary.html
COMMIT: 3ee5f11
CMSSW: CMSSW_12_0_X_2021-07-12-1400/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/34338/16714/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6132 differences found in the comparisons
  • DQMHistoTests: Total files compared: 38
  • DQMHistoTests: Total histograms compared: 2787742
  • DQMHistoTests: Total failures: 11809
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2775933
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 37 files compared)
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: found differences in 1 / 37 workflows

@civanch
Copy link
Contributor Author

civanch commented Jul 12, 2021

+1

@civanch
Copy link
Contributor Author

civanch commented Jul 12, 2021

Issue #34448 is created. This PR can be merged.

@civanch
Copy link
Contributor Author

civanch commented Jul 12, 2021

@makortel , would you agree to sign it? The issue with Run-1 WFs may be resolved in other PR.

@makortel
Copy link
Contributor

+1

The differences in Run 1 workflows appear to be caused by not-yet-known reason (appears to be related to the execution order magnetic field and geometry ESProducers) that is not caused by this PR, even if this PR acts as an example of bringing the issue up. Merging this PR should not make things worse as they are already.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy, @perrotta (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Jul 13, 2021

+1

@mmusich
Copy link
Contributor

mmusich commented Jul 13, 2021

@makortel
Copy link
Contributor

Indeed, the es.getData() call for the MagneticField should have gone to RunManagerMTWorker::beginRun() (sorry for missing it)

@civanch
Copy link
Contributor Author

civanch commented Jul 13, 2021

@makortel , recent PRs tested without a problem. For example, #34475.
Also es,getData() is called in OscarMTProducer::beginRun(..)

@makortel
Copy link
Contributor

@makortel , recent PRs tested without a problem. For example, #34475.

The problem occurs randomly, depending if (for whatever reason) the OscarMTProducer::produce() is run by different thread than the one that ran OscarMTProducer::beginRun().

Also es,getData() is called in OscarMTProducer::beginRun(..)

The problem is that the es.getData() is called also by OscarMTProducer::produce(). Rather than declare two ESGetTokens (one for beginRun and another for produce), it would be simpler to call tthe es.getData() in the RunManagerMTWorker::beginRun() and store the m_pMagField there (also otherwise the member variable would not be necessary).

@makortel
Copy link
Contributor

Here is a fix #34479

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

7 participants