Skip to content

on behaviour of OutputModules in unscheduled execution, and its interplay with HLT #36138

@missirol

Description

@missirol

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 of SwitchProducers in triggers with GPU offloading. We are currently testing if it's possible to move to Tasks in other parts of the HLT menu, beyond what would be strictly necessary. Note that "migrating HLT to Tasks" for us currently means that EDProducers of a given Path are moved to a Task, but EDFilters are 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 OutputModule writing events for the OR of 2 triggers. The OutputModule expects 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, while thePathWithProducts fails before the filter theVerticesAfterStep1 is executed; the OutputModule tries to run theVerticesAfterStep2 (unscheduled), and this leads to a crash b/c the products of theVerticesAfterStep1 are missing.

The issue boils down to the fact that, as explained in the documentation, OutputModules can 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 OutputModule writing 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, since theVerySlowModule is unscheduled and expected by the OutputModule, it is executed despite thePathWithSlowModules being "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 OutputModules to require the unscheduled execution of modules (in other words, simply having outputCommands as a list of directives for saving products only if they were produced)? If yes, how difficult would that be to implement?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions