Changed modulecmd parameters. return_oe is not one of the parameters in the mainline spack repo. Changed the args to the appropriate ones in the new spack

This commit is contained in:
Mario Melara 2016-04-04 13:44:24 -07:00
parent 7e9baf9e25
commit 9c071ea40d

View file

@ -285,16 +285,15 @@ def find_in_path(cls, *path):
@classmethod @classmethod
def find_in_modules(cls): def find_in_modules(cls):
compilers = [] compilers = []
if cls.PrgEnv: if cls.PrgEnv:
if not cls.PrgEnv_compiler: if not cls.PrgEnv_compiler:
tty.die('Must supply PrgEnv_compiler with PrgEnv') tty.die('Must supply PrgEnv_compiler with PrgEnv')
modulecmd = which('modulecmd') modulecmd = which('modulecmd')
modulecmd.add_default_arg('python') modulecmd.add_default_arg('python')
output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True)
output = modulecmd('avail', cls.PrgEnv_compiler, output=str, error=str)
matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output) matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output)
for name, version in matches: for name, version in matches:
v = version v = version
comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES', comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES',