nixpack
nixpack copied to clipboard
modules: make lmod MODULE_PATH working with compiler_spec
With this patch, loading intel or oneapi module populates MODULEPATH for hierarchical module loading.
Hm, this seems like the right idea, but with our modules I get an error. I'll try to take a closer look soon because this may be triggering some other problem:
Traceback (most recent call last):
File "/usr/lib64/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/mnt/sw/nix/store/59rshn3lra8b7zawxpfj0wss0dwbfhcx-modules.py", line 188, in proc
return write(specs[si])
File "/mnt/sw/nix/store/59rshn3lra8b7zawxpfj0wss0dwbfhcx-modules.py", line 184, in write
s.write(fn)
File "/mnt/sw/nix/store/59rshn3lra8b7zawxpfj0wss0dwbfhcx-modules.py", line 159, in write
self.writer.write()
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/modules/common.py", line 876, in write
context = self.context.to_dict()
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/tengine.py", line 65, in to_dict
d = [(name, getattr(self, name)) for name in self.context_properties]
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/tengine.py", line 65, in <listcomp>
d = [(name, getattr(self, name)) for name in self.context_properties]
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/modules/common.py", line 731, in environment_modifications
spec.package.setup_run_environment(env)
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/build_systems/intel.py", line 1035, in setup_run_environment
f = self.file_to_source
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/build_systems/intel.py", line 653, in file_to_source
if self.version_yearlike.satisfies(ver(':2015')):
File "/mnt/sw/nix/store/wdq5nigi0lxm0840b154xn9zm47sxa4b-spack/lib/spack/spack/build_systems/intel.py", line 329, in version_yearlike
v_year += 2000
TypeError: unsupported operand type(s) for +=: 'VersionStrComponent' and 'int'