Skip to content

Commit

Permalink
GPU Workflow: Fix bug with TPC double-threaded pipeline getting stuck…
Browse files Browse the repository at this point in the history
… at Start/Stop/Start
  • Loading branch information
davidrohr committed Mar 7, 2024
1 parent edc0d65 commit 95d8764
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GPU/Workflow/include/GPUWorkflow/GPUWorkflowSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ class GPURecoWorkflowSpec : public o2::framework::Task
void init(o2::framework::InitContext& ic) final;
void run(o2::framework::ProcessingContext& pc) final;
void endOfStream(o2::framework::EndOfStreamContext& ec) final;
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
void stop() final;
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
o2::framework::Inputs inputs();
o2::framework::Outputs outputs();
o2::framework::Options options();
Expand Down Expand Up @@ -184,6 +184,7 @@ class GPURecoWorkflowSpec : public o2::framework::Task
void RunWorkerThread(int id);
void ExitPipeline();
void handlePipelineEndOfStream(o2::framework::EndOfStreamContext& ec);
void handlePipelineStop();
void initPipeline(o2::framework::InitContext& ic);
void enqueuePipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context, bool inputFinal);
void finalizeInputPipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context);
Expand Down
7 changes: 7 additions & 0 deletions GPU/Workflow/src/GPUWorkflowPipeline.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ void GPURecoWorkflowSpec::handlePipelineEndOfStream(EndOfStreamContext& ec)
}
}

void GPURecoWorkflowSpec::handlePipelineStop()
{
if (mSpecConfig.enableDoublePipeline == 1) {
mPipeline->mayInjectTFId = 0;
}
}

void GPURecoWorkflowSpec::receiveFMQStateCallback(fair::mq::State newState)
{
{
Expand Down
1 change: 1 addition & 0 deletions GPU/Workflow/src/GPUWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void GPURecoWorkflowSpec::init(InitContext& ic)
void GPURecoWorkflowSpec::stop()
{
LOGF(info, "GPU Reconstruction total timing: Cpu: %.3e Real: %.3e s in %d slots", mTimer->CpuTime(), mTimer->RealTime(), mTimer->Counter() - 1);
handlePipelineStop();
}

void GPURecoWorkflowSpec::endOfStream(EndOfStreamContext& ec)
Expand Down

0 comments on commit 95d8764

Please sign in to comment.