-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
As suggested by @silviodonato, I'm opening an issue related to a recent discussion between Core-Sw and HLT concerning the behaviour of OutputModules in unscheduled execution, to keep better track of this problem and its possible solutions (the original exchange was had in the Core-Sw Mattermost channel on Nov, 8-9).
The use case is HLT's goal to fully support workflows with Tasks and SwitchProducers where needed in the HLT menu for Run-3 (e.g. triggers with GPU offloading).
I'm copying below part of the original question [*].
FYI: @fwyzard @Sam-Harper @Martin-Grunewald @makortel @Dr15Jones
[*]
Context : in Run-2 HLT did not make use of
Tasks; in Run-3 it will, mainly b/c of the use ofSwitchProducersin triggers with GPU offloading. We are currently testing if it's possible to move toTasksin other parts of the HLT menu, beyond what would be strictly necessary. Note that "migrating HLT to Tasks" for us currently means thatEDProducersof a givenPathare moved to aTask, butEDFiltersare not (they remain directly on the Path, or on a Sequence used in the Path), because the filter decision is needed (as known, in a HLT path one wants to reject the event as soon as possible, without running producers unnecessarily).After migrating all paths of an HLT config to Tasks as a test, we encountered problems related to
OutputModules.I tried to exemplify the issue in this dummy config. There is 1
OutputModulewriting events for the OR of 2 triggers. TheOutputModuleexpects to write the products of 1 producer which runs unscheduled. This producer (theVerticesAfterStep2) is associated to 1 Path (thePathWithProducts) and, in turn, it needs the products of an EDFilter in the same Path, but said EDFilter (theVerticesAfterStep1) runs scheduled. The other trigger (thePathAlwaysTrue) always fires, whilethePathWithProductsfails before the filtertheVerticesAfterStep1is executed; theOutputModuletries to runtheVerticesAfterStep2(unscheduled), and this leads to a crash b/c the products oftheVerticesAfterStep1are missing.The issue boils down to the fact that, as explained in the documentation,
OutputModulescan trigger the unscheduled execution of a module if its products are expected to be saved in the output file.Another way this could complicate things for HLT is shown in a 2nd example. Here again, we have an
OutputModulewriting events for the OR of 2 triggers. A common situation for HLT is that one path gets disabled (or, 'prescaled to zero') to avoid running certain modules (here,theVerySlowModule). But, sincetheVerySlowModuleis unscheduled and expected by theOutputModule, it is executed despitethePathWithSlowModulesbeing "disabled". Clearly, the Fwk is working as intended, just not in the most convenient/intuitive way for HLT.Question is: would it make sense to have the option to disable the ability of
OutputModulesto require the unscheduled execution of modules (in other words, simply havingoutputCommandsas a list of directives for saving products only if they were produced)? If yes, how difficult would that be to implement?