ATLAS Offline Software
Loading...
Searching...
No Matches
FPEAndCoreDumpConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentFactory import CompFactory
4
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6
7
8
9#Steered by flag
10
12 cfg=ComponentAccumulator()
13 cds=CompFactory.CoreDumpSvc(FastStackTrace=True)
14
15 #AthGeneration & AthAnalysis don't contain the FPEAuditor
16 if flags.Exec.FPE != -2 and hasattr(CompFactory,"FPEAuditor"):
17 #If we run with FPEAuditor, the CoreDumpSvc should not catch SIGFPE
18 #(but otherwise use the default list of signals)
19 signalsToCatch=[int(i) for i in cds.Signals] # Get the default
20
21 if flags.Exec.FPE<0:
22 cfg.addService(CompFactory.FPEControlSvc(),create=True)
23 else:
24 cfg.addAuditor(CompFactory.FPEAuditor(NStacktracesOnFPE=flags.Exec.FPE))
25 from signal import SIGFPE
26 signalsToCatch.remove(SIGFPE)
27 cds.Signals=signalsToCatch
28 pass
29
30 cfg.addService(cds,create=True)
31
32 return cfg
33