Started changing the find in modules method written by Todd

This commit is contained in:
Mario Melara 2015-10-07 15:57:29 -07:00
parent 06fe879745
commit b6d2a12ceb

View file

@ -272,9 +272,11 @@ def find_in_modules(cls):
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')
output = _shell('module avail %s' % cls.PrgEnv_compiler) loaded_modules = os.environ["LOADEDMODULES"].split(":")
matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) #output = _shell('module avail %s' % cls.PrgEnv_compiler)
for module in loaded_modules:
match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module)
for name, version in matches: for name, version in matches:
v = version + '-craype' v = version + '-craype'