2import AthenaCommon.Include
as AthCIncMod
4 AthCIncMod.marker =
' -#-'
8 from AthenaCommon.Interactive
import configureInteractivePrompt
9 configureInteractivePrompt()
10 del configureInteractivePrompt
13from AthenaCommon.Debugging
import hookDebugger, allowPtrace
24import AthenaCommon.SystemOfUnits
as Units
27from AthenaCommon
import CfgMgr
28from AthenaCommon.AppMgr
import ( athAlgSeq, theApp, ToolSvc, theAuditorSvc,
29 ServiceMgr, ServiceMgr
as svcMgr )
30from AthenaCommon.Logging
import log
35 theApp.EventLoop =
"PyAthenaEventLoopMgr"
38theApp.setOutputLevel( globals()[opts.loglevel] )
42if not "POOL_OUTMSG_LEVEL" in os.environ:
43 os.environ[
"POOL_OUTMSG_LEVEL" ] =
str(globals()[opts.loglevel])
46import AthenaCommon.AtlasUnixStandardJob
54from AthenaCommon.Include
import IncludeError
56 include(
"$HOME/.athenarc" )
61from AthenaCommon.ResourceLimits
import SetMaxLimits
64del sys.modules[
'AthenaCommon.ResourceLimits' ]
71 atexit.register( theApp.exit )
76 _msg.info(
'executing CLI (-c) command: "%s"' % opts.command )
79if DbgStage.value ==
"conf":
83 AthCIncMod.marker = AthCIncMod.__marker__
88from AthenaCommon.ConcurrencyFlags
import jobproperties
as jps
89if opts.nprocs
and (opts.nprocs >= 1
or opts.nprocs==-1):
92 _msg.error(
"Cannot run AthenaMP with MPI")
94 jps.ConcurrencyFlags.NumProcs = opts.nprocs
95 _msg.info (
"configuring AthenaMP with [%s] sub-workers",
96 jps.ConcurrencyFlags.NumProcs())
98 if (opts.debug_worker
is True) :
99 jps.ConcurrencyFlags.DebugWorkers =
True
100 _msg.info (
" Workers will pause after fork until SIGUSR1 signal received")
102if (opts.threads
or opts.concurrent_events) :
104 if (opts.threads
is None and opts.concurrent_events
is not None) :
106 jps.ConcurrencyFlags.NumThreads = opts.concurrent_events
107 jps.ConcurrencyFlags.NumConcurrentEvents = opts.concurrent_events
108 elif (opts.threads
is not None and opts.concurrent_events
is None) :
110 jps.ConcurrencyFlags.NumThreads = opts.threads
111 jps.ConcurrencyFlags.NumConcurrentEvents = opts.threads
114 jps.ConcurrencyFlags.NumThreads = opts.threads
115 jps.ConcurrencyFlags.NumConcurrentEvents = opts.concurrent_events
118 if (jps.ConcurrencyFlags.NumProcs() > 0) :
119 _msg.info (
"configuring hybrid AthenaMP/AthenaMT with [%s] concurrent threads and [%s] concurrent events per AthenaMP worker", jps.ConcurrencyFlags.NumThreads, jps.ConcurrencyFlags.NumConcurrentEvents)
120 elif (jps.ConcurrencyFlags.NumProcs() == 0) :
121 _msg.info (
"configuring AthenaHive with [%s] concurrent threads and [%s] concurrent events", jps.ConcurrencyFlags.NumThreads(), jps.ConcurrencyFlags.NumConcurrentEvents())
124 _msg.error (
"ConcurrencyFlags.NumProcs() cannot == -1 !!")
127 import AthenaCommon.AtlasThreadedJob