Got rid of my old method of finding in LOADEDMODULES
This commit is contained in:
		| @@ -283,13 +283,9 @@ def find_in_modules(cls): | |||||||
|             modulecmd = which('modulecmd') |             modulecmd = which('modulecmd') | ||||||
|             modulecmd.add_default_arg('python') |             modulecmd.add_default_arg('python') | ||||||
|             output = modulecmd('avail', return_oe=True) |             output = modulecmd('avail', return_oe=True) | ||||||
|             matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) |             matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) | ||||||
|  | #           It's finding a weird third attribute | ||||||
| #            loaded_modules = os.environ["LOADEDMODULES"].split(":") |             print matches | ||||||
|             #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 |                 v = version | ||||||
|                 comp = cls(spack.spec.CompilerSpec(name + '@' + v), |                 comp = cls(spack.spec.CompilerSpec(name + '@' + v), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mario Melara
					Mario Melara