Workflow depends on itself error

Dear all,

I’m writing a workflow, it passes the compilation and link phase.
But, when I try to run it, the system replays with this error :

[O2Suite/latest-o2] ~/SoftwareRepos/alice/sw/BUILD/O2-latest/O2 $> o2-hmpid-digits-to-clusters-workflow --help
[ERROR] error while setting up workflow in o2-hmpid-digits-to-clusters-workflow: HMP-Clusterization depends on itself
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: HMP-Clusterization depends on itself
Abort trap: 6
[O2Suite/latest-o2] ~/SoftwareRepos/alice/sw/BUILD/O2-latest/O2 $>

What do it means ?

The workflow is very simple :

using namespace o2;
using namespace o2::framework;

WorkflowSpec defineDataProcessing(const ConfigContext& configcontext)

  • WorkflowSpec specs;*
  • o2::conf::ConfigurableParam::updateFromString(configcontext.options().getstd::string(“configKeyValues”));*
  • DataProcessorSpec consumer = o2::hmpid::getDigitsToClustersSpec();*
  • specs.push_back(consumer);*
  • return specs;*

And the Spec declaration

o2::framework::DataProcessorSpec getDigitsToClustersSpec(std::string inputSpec)

  • std::vectoro2::framework::InputSpec inputs;*

  • inputs.emplace_back(“digits”, o2::header::gDataOriginHMP, “DIGITS”, 0, Lifetime::Timeframe);*

  • inputs.emplace_back(“intrecord”, o2::header::gDataOriginHMP, “INTRECORDS”, 0, Lifetime::Timeframe);*

  • std::vectoro2::framework::OutputSpec outputs;*

  • outputs.emplace_back(“HMP”, “CLUSTERS”, 0, o2::framework::Lifetime::Timeframe);*

  • outputs.emplace_back(“HMP”, “INTRECORDS”, 0, o2::framework::Lifetime::Timeframe);*

  • return DataProcessorSpec{*

  • “HMP-Clusterization”,*

  • inputs,*

  • outputs,*

  • AlgorithmSpec{adaptFromTask()},*

  • Options{{“sigma-cut”, VariantType::String, “”, {“sigmas as comma separated list”}}}};*

Where is the bug ? What I’m wrong ?

Thanks a lot

Antonio Franco

Hi @fap

This means that your workflow inputs and outputs are matching to each other. Indeed, {HMP/INTRECORDS/0} will match both to the input and to the output, so you have a short circuit…

The flow is :

I read from input the vector of events, and the vector of digits (each event points to the related chunk of digit elements)
after the clusterization, the program produce a vector of interactionrecords and a vector of clusters (each event has the pointer to the chunk of related cluster)

how I can bypass this issue ?
Do I define a different name for the INTERECORDS also if it contains the same info ?


I supposed that the name of a stream depends to its syntax and not to its semantics, nevertheless …

The matching is done based on the DataOrigin/DataDescription/SubSpec + timeSlice, and in your case the input with subspec 0 matches to the output with wildcarded subspec, leading to a short circuit…

For the record, I added here the task to create an example about how to overcome the issue: