36 threadArg = [opt.replace("--threads=", "") for opt in argdict['athenaopts'].value[substep] if'--threads'in opt]
37if len(threadArg) == 0:
38 athenaMTThreads = 0
39elif len(threadArg) == 1:
40if'multithreaded'in argdict and substep == 'all':
41raise ValueError("Detected conflicting methods to configure AthenaMT: --multithreaded and --threads=N (via athenaopts). Only one method must be used")
42 athenaMTThreads = int(threadArg[0])
43if athenaMTThreads < -1:
44raise ValueError("--threads was set to a value less than -1")
45else:
46raise ValueError("--threads was set more than once in 'athenaopts'")
47if athenaMTThreads > 0:
48 msg.info('AthenaMT detected from "threads" setting with {0} threads for substep {1}'.format(athenaMTThreads,substep))
49
50 concurrentEventsArg = [opt.replace("--concurrent-events=", "") for opt in argdict['athenaopts'].value[substep] if'--concurrent-events'in opt]