11 msg = logging.getLogger(__name__)
32 if argdict[
'imf'].returnMyValue(name=name, substep=substep)
is False:
33 msg.info(
'Skipping inclusion of imf libraries: --imf is set to False')
35 msg.info(
'Enabling inclusion of imf libraries: --imf is set to True')
43 if 'ATLASMKLLIBDIR_PRELOAD' not in os.environ:
44 msg.warning(
'"ATLASMKLLIBDIR_PRELOAD" not found in the current environment'
45 ' - no setup of MKL is possible')
48 if 'ATLASMKLLIBDIR_PRELOAD' in os.environ:
49 if "LD_PRELOAD" not in self.
_envdict:
51 self.
_envdict[
"LD_PRELOAD"].
add(path.join(
"$ATLASMKLLIBDIR_PRELOAD",
"libimf.so"))
52 self.
_envdict[
"LD_PRELOAD"].
add(path.join(
"$ATLASMKLLIBDIR_PRELOAD",
"libintlc.so.5"))
58 if 'tcmalloc' not in argdict
or argdict[
'tcmalloc'].returnMyValue(name=name, substep=substep)
is False:
59 msg.info(
'Skipping inclusion of tcmalloc')
62 if 'TCMALLOCDIR' not in os.environ:
63 msg.warning(
'"TCMALLOCDIR" not found in the current environment'
64 ' - no setup of tcmalloc is possible')
68 if "LD_PRELOAD" not in self.
_envdict:
70 self.
_envdict[
"LD_PRELOAD"].
add(path.join(
"$TCMALLOCDIR",
"libtcmalloc_minimal.so"))
75 if 'env' not in argdict:
78 myEnv = argdict[
'env'].returnMyValue(name=name, substep=substep)
84 k, v = setting.split(
'=', 1)
87 msg.warning(
'Environment setting "{0}" seems to be invalid (must be KEY=VALUE)')
106 _currentEnvironmentValue =
"+++CURRENT+++"
108 def __init__(self, varname, separator=":
", testForExistance=True):
118 def add(self, value, prepend=True):
119 msg.debug(
'Adding new value "{0}" to envvar {1} (currently {2}'.
format(value, self.
_name, self.
_value))
121 msg.warning(
'Attempt to add environment element {0} twice to {1}'.
format(value, self.
_name))
125 if '$' in test_value:
126 test_value = os.path.join(os.environ[os.path.dirname(value)[1:]], os.path.basename(value))
127 if not os.access(test_value, os.R_OK):
128 msg.warning(
"Path to {0} is not readable - will not add it to {1}".
format(value, self.
_name))
131 self.
_value[0:0] = [value]
140 if self.
_name in os.environ: