![]() |
|
|||
File indexing completed on 2024-04-06 12:12:41
0001 # This test originally demonstrated a problem 0002 # reported online. The problem has since been 0003 # fixed by a modification in the function 0004 # EventProcessor::handleNextEventForStreamAsync. 0005 # I've left unmodified a description of the 0006 # problem below. It is still interesting to keep 0007 # this configuration around and running as it 0008 # still demonstrates the circumstances in a 0009 # way that none of the other tests replicate 0010 # and shows that the problem is fixed if one 0011 # examines the log output. Note that it is not 0012 # coded as a pass/fail test because the timing 0013 # could vary and we don't want a test that 0014 # occasionally fails. It might sometimes still 0015 # exhibit the problem behavior if for example 0016 # a thread hangs. 0017 0018 # Demonstrates a problem first noticed online. Say there 0019 # are 3 lumis. The first and last lumis have events. 0020 # The middle one has no events. We are using 0021 # a source like the one used online that will wait 0022 # to return from getNextItemType until an event 0023 # is available and may sleep for some period 0024 # of time. The problem is that the first lumi 0025 # does not close at the point where it could 0026 # close but is stuck open until lumi 3 is encountered. 0027 # Between encountering lumi 2 and lumi 3, a 0028 # task necessary to complete lumi 1 is stuck 0029 # in the source serial queue behind the task 0030 # waiting for getNextItemType to return. 0031 0032 # Critical to emulating the problem below is 0033 # having event 3 take a long enough time to 0034 # process that it completes after event 4 has 0035 # completed and after the stream it is on has 0036 # completed stream end lumi and its stream is 0037 # waiting for getNextItemType to return what 0038 # to do next. It is blocking the stream serial 0039 # queue which blocks the stream that processed 0040 # event 3 from running the end lumi stream 0041 # transition. 0042 0043 import FWCore.ParameterSet.Config as cms 0044 0045 process = cms.Process("PROD") 0046 0047 process.options = dict( 0048 numberOfThreads = 2, 0049 numberOfStreams = 2, 0050 numberOfConcurrentRuns = 1, 0051 numberOfConcurrentLuminosityBlocks = 2 0052 ) 0053 0054 process.Tracer = cms.Service("Tracer", 0055 printTimestamps = cms.untracked.bool(True) 0056 ) 0057 0058 process.source = cms.Source("SourceWithWaits", 0059 timePerLumi = cms.untracked.double(1), 0060 sleepAfterStartOfRun = cms.untracked.double(0.25), 0061 eventsPerLumi = cms.untracked.vuint32(4,0,5), 0062 lumisPerRun = cms.untracked.uint32(100) 0063 ) 0064 0065 process.sleepingProducer = cms.EDProducer("timestudy::SleepingProducer", 0066 ivalue = cms.int32(1), 0067 consumes = cms.VInputTag(), 0068 eventTimes = cms.vdouble(0.1, 0.1, 0.6, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1) 0069 ) 0070 0071 process.p = cms.Path(process.sleepingProducer)
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |