@@ -2956,14 +2956,11 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
29562956 // We remove the duplicates because for the moment child get themself twice:
29572957 // once from the actual definition in the child, a second time from the
29582958 // configuration they get passed by their parents.
2959+ std::regex pipe_pattern{" _t[0-9][0-9]*$" };
29592960 for (auto & dp : importedWorkflow) {
2960- auto found = std::find_if (physicalWorkflow.begin (), physicalWorkflow.end (),
2961- [&name = dp.name ](DataProcessorSpec const & spec) { return spec.name == name; });
2962- // also checking the workflow for processors with the same name but from a different executable,
2963- // adding them to the workflow to trigger the check for duplicate names in the MATERIALISE_WORKFLOW state
2964- auto duplicate_name = std::find_if (dataProcessorInfos.begin (), dataProcessorInfos.end (),
2965- [&name = dp.name , &exec = currentWorkflow.executable ](DataProcessorInfo const & info) { return (info.name == name && info.executable != exec); });
2966- if (found == physicalWorkflow.end () || duplicate_name != dataProcessorInfos.end ()) {
2961+ auto found = std::find_if (dataProcessorInfos.begin (), dataProcessorInfos.end (),
2962+ [&name = dp.name , &pipe_pattern, &exec = currentWorkflow.executable ](DataProcessorInfo const & info) { return (std::regex_replace (info.name , pipe_pattern, " " ) == name && info.executable == exec); });
2963+ if (found == dataProcessorInfos.end ()) {
29672964 physicalWorkflow.push_back (dp);
29682965 rankIndex.insert (std::make_pair (dp.name , workflowHashB));
29692966 }
0 commit comments