Skip to content
Snippets Groups Projects
Commit 25e4746c authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh Committed by Johannes Elmsheuser
Browse files

Fix athenaHLT running: make initialization happen after fork

Fix athenaHLT running: make initialization happen after fork
parent bd30992f
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# art-description: Trigger athenaHLT test of the PhysicsP1_pp_run3_v1 menu
# art-type: grid
# art-include: main/Athena
# art-include: 24.0/Athena
# art-athena-mt: 4
# art-architecture: '#&nvidia'
# art-output: *.txt
# art-output: *.log
# art-output: log.*
# art-output: *.out
# art-output: *.err
# art-output: *.log.tar.gz
# art-output: *.new
# art-output: *.json
# art-output: *.root
# art-output: *.pmon.gz
# art-output: *perfmon*
# art-output: prmon*
# art-output: *.check*
from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TriggerJobOpts.runHLT'
ex.input = 'data'
ex.threads = 4
ex.concurrent_events = 1
ex.flags = ['Trigger.InDetTracking.doGPU=True', 'CaloRecGPU.GlobalFlags.UseCaloRecGPU=True', 'Trigger.triggerMenuSetup="PhysicsP1_pp_run3_v1_HLTReprocessing_prescale"',
'Trigger.doLVL1=True']
test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)
import sys
sys.exit(test.run())
#!/usr/bin/env python
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# art-description: Trigger athenaHLT test of the PhysicsP1_pp_run3_v1 menu
# art-type: grid
# art-include: main/Athena
# art-include: 24.0/Athena
# art-athena-mt: 4
# art-architecture: '#&nvidia'
# art-output: *.txt
# art-output: *.log
# art-output: log.*
# art-output: *.out
# art-output: *.err
# art-output: *.log.tar.gz
# art-output: *.new
# art-output: *.json
# art-output: *.root
# art-output: *.pmon.gz
# art-output: *perfmon*
# art-output: prmon*
# art-output: *.check*
from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
ex = ExecStep.ExecStep()
ex.type = 'athenaHLT'
ex.job_options = 'TriggerJobOpts.runHLT'
ex.input = 'data'
ex.threads = 4
ex.concurrent_events = 1
ex.flags = ['Trigger.InDetTracking.doGPU=True','Trigger.triggerMenuSetup="PhysicsP1_pp_run3_v1_HLTReprocessing_prescale"',
'Trigger.doLVL1=True']
test = Test.Test()
test.art_type = 'grid'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)
import sys
sys.exit(test.run())
......@@ -17,8 +17,8 @@ atlas_add_library( TrigInDetAccelerationServiceLib
src/*.cxx
PUBLIC_HEADERS TrigInDetAccelerationService
INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
LINK_LIBRARIES AthenaKernel GaudiKernel AthenaBaseComps StoreGateLib InDetIdentifier PixelReadoutGeometryLib SCT_ReadoutGeometry TrigAccelEvent ${TBB_LIBRARIES} rt dl)
LINK_LIBRARIES AthenaKernel GaudiKernel AthenaBaseComps AthenaInterprocess StoreGateLib InDetIdentifier PixelReadoutGeometryLib SCT_ReadoutGeometry TrigAccelEvent ${TBB_LIBRARIES} rt dl)
atlas_add_component( TrigInDetAccelerationService
src/components/*.cxx
LINK_LIBRARIES TrigInDetAccelerationServiceLib AthenaKernel GaudiKernel AthenaBaseComps StoreGateLib TrigAccelEvent ${TBB_LIBRARIES} rt dl)
LINK_LIBRARIES TrigInDetAccelerationServiceLib AthenaKernel GaudiKernel AthenaInterprocess AthenaBaseComps StoreGateLib TrigAccelEvent ${TBB_LIBRARIES} rt dl)
......@@ -15,6 +15,8 @@
#include "TrigAccelEvent/TrigInDetAccelEDM.h"
#include "TrigAccelEvent/TrigITkAccelEDM.h"
#include "CxxUtils/checker_macros.h"
#include "AthenaInterprocess/Incidents.h"
#include "GaudiKernel/ConcurrencyFlags.h"
#include <dlfcn.h>
......@@ -102,13 +104,20 @@ StatusCode TrigInDetAccelerationSvc::initialize() {
/*
* Ask to be informed at the beginning of a new run so that we
* can collect geometry, conditions, etc. and copy them to on-GPU data structures
* For athenaHLT this should be UpdateAfterFork
*/
IIncidentSvc* incsvc;
StatusCode sc = service("IncidentSvc", incsvc);
int priority = 100;
if( sc.isSuccess() ) {
incsvc->addListener( this, "BeginRun", priority);
IIncidentSvc* incsvc;
StatusCode sc = service("IncidentSvc", incsvc);
int priority = 100;
if( sc.isSuccess() ) {
const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
if (is_multiprocess) {
incsvc->addListener( this, AthenaInterprocess::UpdateAfterFork::type(), priority);
}
else {
incsvc->addListener( this, "BeginRun", priority);
}
}
return StatusCode::SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment