8from AthenaCommon
import Logging
9mglog = Logging.logging.getLogger(
'MCJobOptionUtils')
13 FIRST_DIR = (os.environ[
'JOBOPTSEARCHPATH']).
split(
":")[0]
14 jofiles = [f
for f
in os.listdir(FIRST_DIR)
if (f.startswith(
'mc')
and f.endswith(
'.py'))]
16 raise RuntimeError(
'No job options found in '+FIRST_DIR)
17 joparts = os.path.basename(jofiles[0]).
split(
'.')
19 raise RuntimeError(
'Malformed job options file name: '+jofiles[0])
24 if 'ATHENA_CORE_NUMBER' in os.environ
and int(os.environ[
'ATHENA_CORE_NUMBER'])>0:
25 mglog.info(
'Noticed that you have run with an athena MT-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.')
27 if not hasattr(opts,
'nprocs'):
28 mglog.warning(
'Did not see option!')
31 mglog.debug(str(opts))
35 mglog.info(
'For your information, ls of '+directory+
':')
36 mglog.info( sorted( os.listdir( directory ) ) )
std::vector< std::string > split(const std::string &s, const std::string &t=":")
check_reset_proc_number(opts)