Skip to content

Commit

Permalink
Merge aa7cd03 into 5c7b24e
Browse files Browse the repository at this point in the history
  • Loading branch information
NiharSaha authored Oct 29, 2022
2 parents 5c7b24e + aa7cd03 commit 3262277
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
35 changes: 17 additions & 18 deletions Validation/Performance/python/TimeMemoryG4Info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,35 @@ def customise(process):
#Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
#print process.MessageLogger.__dict__
#Configuring the G4msg.log output
process.MessageLogger.files = dict(G4msg = cms.untracked.PSet(
noTimeStamps = cms.untracked.bool(True)
process.MessageLogger.files = dict(G4msg = dict(
noTimeStamps = True
#First eliminate unneeded output
,threshold = cms.untracked.string('INFO')
,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
,FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
,FwkSummary = cms.untracked.PSet(limit = cms.untracked.int32(0))
,Root_NoDictionary = cms.untracked.PSet(limit = cms.untracked.int32(0))
,FwkJob = cms.untracked.PSet(limit = cms.untracked.int32(0))
,TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
,TimeModule = cms.untracked.PSet(limit = cms.untracked.int32(0))
,TimeEvent = cms.untracked.PSet(limit = cms.untracked.int32(0))
,MemoryCheck = cms.untracked.PSet(limit = cms.untracked.int32(0))
,threshold = 'INFO'
,INFO = dict(limit = 0)
,FwkReport = dict(limit = 0)
,FwkSummary = dict(limit = 0)
,Root_NoDictionary = dict(limit = 0)
,FwkJob = dict(limit = 0)
,TimeReport = dict(limit = 0)
,TimeModule = dict(limit = 0)
,TimeEvent = dict(limit = 0)
,MemoryCheck = dict(limit = 0)
#TimeModule, TimeEvent, TimeReport are written to LogAsbolute instead of LogInfo with a category
#so they cannot be eliminated from any destination (!) unless one uses the summaryOnly option
#in the Timing Service... at the price of silencing the output needed for the TimingReport profiling
#
#Then add the wanted ones:
,PhysicsList = cms.untracked.PSet(limit = cms.untracked.int32(-1))
,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
,PhysicsList = dict(limit = -1)
,G4cout = dict(limit = -1)
,G4cerr = dict(limit = -1)
)
)
#Add these 3 lines to put back the summary for timing information at the end of the logfile
#(needed for TimeReport report)
if hasattr(process,'options'):
process.options.wantSummary = cms.untracked.bool(True)
else:
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(True)
)
process.options.wantSummary = True


return(process)
5 changes: 2 additions & 3 deletions Validation/Performance/python/TimeMemoryInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ def customise(process):
if hasattr(process,'options'):
process.options.wantSummary = cms.untracked.bool(True)
else:
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(True)
)
process.options.wantSummary = True


return(process)
7 changes: 3 additions & 4 deletions Validation/Performance/python/TimeMemoryJobReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ def customiseWithTimeMemoryJobReport(process):
if hasattr(process,"options"):
process.options.wantSummary = cms.untracked.bool(False)
else:
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(False)
)
process.options.wantSummary = False


#Silence the final Timing service report
process.MessageLogger.cerr.TimeReport = cms.untracked.PSet(limit = cms.untracked.int32(0))
process.MessageLogger.cerr.TimeReport = dict(limit = 0)

return(process)

5 changes: 2 additions & 3 deletions Validation/Performance/python/TimeMemorySummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ def customise(process):
if hasattr(process,"options"):
process.options.wantSummary = cms.untracked.bool(True)
else:
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(True)
)
process.options.wantSummary = True


return(process)

Expand Down

0 comments on commit 3262277

Please sign in to comment.