Skip to content

Commit

Permalink
el cap compiler dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Riyaz Haque committed Jan 21, 2025
1 parent c407bfc commit ae93d54
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions systems/llnl-elcapitan/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,30 @@ def external_pkg_configs(self):
elif self.spec.satisfies("compiler=gcc"):
selections.append(externals / "libsci" / "00-gcc-packages.yaml")

cmp_preference_path = self.next_adhoc_cfg()
with open(cmp_preference_path, "w") as f:
f.write(self.compiler_weighting_cfg())
selections.append(cmp_preference_path)

return selections

def compiler_weighting_cfg(self):
compiler = self.spec.variants["compiler"][0]

if compiler == "cce":
return """\
packages:
all:
require:
- one_of: ["%cce", "%gcc"]
"""
elif compiler == "gcc":
return """\
packages: {}
"""
else:
raise ValueError(f"Unexpected value for compiler: {compiler}")

def compiler_configs(self):
compilers = LlnlElcapitan.resource_location / "compilers"

Expand Down

0 comments on commit ae93d54

Please sign in to comment.