CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/Validation/Performance/python/TimeMemoryGenSummary.py

Go to the documentation of this file.
00001 #G.Benelli
00002 #This fragment is used to add the SimpleMemoryCheck
00003 #and Timing services output to the log for the Performance Suite profiling.
00004 #It is meant to be used with the cmsDriver.py option
00005 #--customise in the following fashion:
00006 #E.g.
00007 #cmsDriver.py MinBias.cfi -n 50 --step=GEN,SIM --customise=Validation/Performance/TimeMemoryInfo.py >& MinBias_GEN,SIM.log&
00008 #Note there is no need to specify the "python" directory in the path.
00009 
00010 import FWCore.ParameterSet.Config as cms
00011 def customise(process):
00012     #Adding SimpleMemoryCheck service:
00013     process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
00014                                           ignoreTotal=cms.untracked.int32(1),
00015                                           oncePerEventMode=cms.untracked.bool(False))
00016     #Adding Timing service:
00017     process.Timing=cms.Service("Timing",
00018                                summaryOnly=cms.untracked.bool(True))
00019     
00020     #Add these 3 lines to put back the summary for timing information at the end of the logfile
00021     #(needed for TimeReport report)
00022     process.options = cms.untracked.PSet(
00023         wantSummary = cms.untracked.bool(True)
00024         )
00025 
00026     #Add the configuration for the Igprof running to dump profile snapshots:
00027     process.IgProfService = cms.Service("IgProfService",
00028         reportFirstEvent            = cms.untracked.int32(1),  #Dump first event for baseline studies
00029         reportEventInterval         = cms.untracked.int32( ((process.maxEvents.input.value()-1)/2) ), # dump in the middle of the run
00030         reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > IgProf.%I.gz")
00031         )
00032 
00033     process.genParticles.abortOnUnknownPDGCode = cms.untracked.bool(False)
00034     
00035     return(process)