|
4 | 4 | import logging |
5 | 5 | import os |
6 | 6 | import re |
7 | | -import shutil |
8 | 7 | import sys |
9 | 8 |
|
10 | 9 | import spack |
11 | 10 | import spack.environment as ev |
12 | | -from spack.version import from_string |
13 | 11 |
|
14 | 12 | # logging.basicConfig(level=logging.INFO) |
15 | 13 | logging.basicConfig(format="%(message)s", level=logging.DEBUG) |
|
47 | 45 | "F77": "", |
48 | 46 | "FC": "", |
49 | 47 | "COMPFLAGS": "", |
50 | | - #"COMPCONFIG": "", |
51 | 48 | "ENVVARS": "", |
52 | 49 | "MPICC": "", |
53 | 50 | "MPICXX": "", |
|
57 | 54 | "PYTHONROOT": "", |
58 | 55 | } |
59 | 56 |
|
60 | | -# Compiler configuration templates (if applicable). |
61 | | -# First key is compiler name (lowercase) as known to spack, |
62 | | -# second key is compiler version in a way that spack understands: |
63 | | -# '2025.1.0', '2025:', ':2026', '2025:2026', ... |
64 | | -COMPILER_CONFIGURATION_TEMPLATES = { |
65 | | - "oneapi": { |
66 | | - "2025:" : { |
67 | | - "ICXCFG" : os.path.join(this_script_dir, "templates/icx.cfg"), |
68 | | - "ICPXCFG" : os.path.join(this_script_dir, "templates/icpx.cfg"), |
69 | | - "IFXCFG" : os.path.join(this_script_dir, "templates/ifx.cfg"), |
70 | | - }, |
71 | | - }, |
72 | | -} |
73 | 57 |
|
74 | 58 | def versiontuple(v): |
75 | 59 | """Version comparison without relying on packaging module""" |
@@ -532,26 +516,6 @@ def custom_sort_key(entry): |
532 | 516 | substitutes["MODULEPATHS"] = substitutes["MODULEPATHS"].rstrip("\n") |
533 | 517 | logging.debug(" ... ... MODULEPATHS : {}".format(substitutes["MODULEPATHS"])) |
534 | 518 |
|
535 | | - ## If there are configuration files for this compiler and version, |
536 | | - ## copy those and apply any environment settings in the modulefile |
537 | | - #if compiler_name in COMPILER_CONFIGURATION_TEMPLATES.keys(): |
538 | | - # for version_string in COMPILER_CONFIGURATION_TEMPLATES[compiler_name].keys(): |
539 | | - # target_versions = from_string(version_string) |
540 | | - # if from_string(compiler_version).satisfies(target_versions): |
541 | | - # config_dict = COMPILER_CONFIGURATION_TEMPLATES[compiler_name][version_string] |
542 | | - # for (env_name, source_file) in config_dict.items(): |
543 | | - # target_file = os.path.join( |
544 | | - # install_dir, |
545 | | - # compiler_name, |
546 | | - # compiler_version, |
547 | | - # os.path.split(source_file)[1] |
548 | | - # ) |
549 | | - # shutil.copy(source_file, target_file) |
550 | | - # substitutes["COMPCONFIG"] += setenv_command( |
551 | | - # module_choice, env_name, target_file |
552 | | - # ) |
553 | | - # substitutes["COMPCONFIG"].rstrip("\n") |
554 | | - |
555 | 519 | # Read compiler template into module_content string |
556 | 520 | with open(COMPILER_TEMPLATES[module_choice]) as f: |
557 | 521 | module_content = f.read() |
|
0 commit comments