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

Add protection if non-existent geometry is used #47587

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

srimanob
Copy link
Contributor

@srimanob srimanob commented Mar 13, 2025

PR description:

This PR changes how cmsDriver handles non-existent geometry.

  • Before: If non-existent geometry is used, but step does not include SIM, cmsDriver will dump a config file with default RECO geometry ('Configuration/StandardSequences/GeometryRecoDB_cff')
  • With this PR: If a non-existent geometry is used, the cmsDriver will fail with an error message indicating the non-existent geometry. Additionally, if the default RECO geometry is used (e.g., when 'DBExtended' is specified for geometry), a warning message will be displayed.

PR validation:

Try to dump config files in many ways, and check.

If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:

No need of backport.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 13, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @srimanob for master.

It involves the following packages:

  • Configuration/Applications (operations)

@antoniovilela, @cmsbuild, @davidlange6, @fabiocos, @mandrenguyen, @rappoccio can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @fabiocos, @makortel, @missirol this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@srimanob
Copy link
Contributor Author

FYI @mmusich @VourMa

@srimanob
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals RelVals-INPUT AddOn
Size: This PR adds an extra 44KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d9bc57/44951/summary.html
COMMIT: 41131f1
CMSSW: CMSSW_15_1_X_2025-03-12-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47587/44951/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 20 errors in the following unit tests:

---> test TestDQMOnlineClient-visualization had ERRORS
---> test TestDQMOnlineClient-visualization_secondInstance had ERRORS
---> test TestConfigurationApplicationsConfigBuilder had ERRORS
and more ...

RelVals

  • 1306.01306.0_SingleMuPt1_UP15/step1_SingleMuPt1_UP15.log
  • 1000.01000.0_RunMinBias2011A/step2_RunMinBias2011A.log
  • 7.37.3_CosmicsSPLoose2018/step1_CosmicsSPLoose2018.log
Expand to see more relval errors ...

RelVals-INPUT

  • 145.711145.711_RunParkingSingleMuon02024I/step2_RunParkingSingleMuon02024I.log
  • 145.31145.31_RunParkingLLP2024E/step2_RunParkingLLP2024E.log
  • 159.01159.01_HydjetQ_reminiaodPbPb2022_INPUT/step2_HydjetQ_reminiaodPbPb2022_INPUT.log
Expand to see more relval errors ...

AddOn Tests

UNKNOWN
----- Begin Fatal Exception 13-Mar-2025 01:46:04 CET-----------------------
An exception of category 'FileOpenError' occurred while
   [0] Constructing the EventProcessor
   [1] Constructing input source of type PoolSource
   [2] Calling RootInputFileSequence::initTheFile()
   [3] Calling StorageFactory::open()
   [4] Calling File::sysopen()
Exception Message:
Failed to open the file 'RelVal_Raw_Fake_MC.root'
   Additional Info:
      [a] Input file file:RelVal_Raw_Fake_MC.root could not be opened.
      [b] open() failed with system error 'No such file or directory' (error code 2)
----- End Fatal Exception -------------------------------------------------
UNKNOWN
Expand to see more addon errors ...

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #47587 was updated. @antoniovilela, @cmsbuild, @davidlange6, @fabiocos, @mandrenguyen, @rappoccio can you please check and sign again.

@srimanob
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests RelVals RelVals-INPUT
Size: This PR adds an extra 48KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d9bc57/44956/summary.html
COMMIT: 2dd450f
CMSSW: CMSSW_15_1_X_2025-03-12-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47587/44956/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 2 errors in the following unit tests:

---> test test_MC_22_crosscheck had ERRORS
---> test test_MC_23_crosscheck had ERRORS

RelVals

  • 16834.016834.0_TTbar_14TeV+2025/step1_TTbar_14TeV+2025.log
  • 14234.014234.0_TTbar_14TeV+2023FSPU/step1_TTbar_14TeV+2023FSPU.log
  • 312.0312.0_Pyquen_ZeemumuJets_pt10_2760GeV_2022/step1_Pyquen_ZeemumuJets_pt10_2760GeV_2022.log
Expand to see more relval errors ...

RelVals-INPUT

  • 11024.211024.2_TTbar_13UP18HEfailINPUT/step2_TTbar_13UP18HEfailINPUT.log

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #47587 was updated. @antoniovilela, @cmsbuild, @davidlange6, @fabiocos, @mandrenguyen, @rappoccio can you please check and sign again.

@srimanob
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 48KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d9bc57/44966/summary.html
COMMIT: c40ffe6
CMSSW: CMSSW_15_1_X_2025-03-12-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47587/44966/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@@ -817,6 +817,8 @@ def addStandardSequences(self):
try:
if len(self.stepMap):
self.loadAndRemember(self.GeometryCFF)
if (self.GeometryCFF == 'Configuration/StandardSequences/GeometryRecoDB_cff'):
print("Warning: Default GeometryRecoDB_cff is used. It may not work with your process.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cms-sw/alca-l2
Do you think this warning might cause confusion? It will appear when a DB condition is used or when no geometry is specified. The goal is to ensure users are aware of the Global Tag (GT) and Geometry they are using.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you @srimanob
As a minimal line of warning that just certifies that there is something haswhich has to be checked this may work.
But I think that a user who reads the warning message and does not know about this PR may wonder why the default GeometryRecoDB_cff was used, and what's wrong with it: I would add a line that specifies why this happened and what should be done to fix it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Phat, Andrea,
what is exactly the pitfall that you are trying to warn the user about here?
Isn't taking the reco geometry from DB the recommended way (somehow guaranteed by using the right Global Tag) in the vast majority of the cases (and eventually all of them when the phase-2 geometry is put in DB)?
I think the number of false positive here would be very high.

Copy link
Contributor Author

@srimanob srimanob Mar 14, 2025

Choose a reason for hiding this comment

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

If someone try to run Phase-2 without specifying geometry, maybe?

I open to any suggestion. That is why I raise the question here. If we agree that warning may cause more confusion, then I can remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about:
Warning: The default GeometryRecoDB_cff is being used. If you are using a DB geometry, you can ignore this warning. However, if no geometry is specified in your cmsDriver command, you may need to verify your configuration.

Of I can put if just to trigger this warning only when no geometry is specify. Maybe that can be done.

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.

4 participants