Skip to content

Commit

Permalink
Revert modules mods (#972)
Browse files Browse the repository at this point in the history
* update meta_modules.py to support mpi provider module path with hash
  • Loading branch information
AlexanderRichert-NOAA authored Mar 8, 2024
1 parent ed48610 commit b148ba5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def setup_meta_modules():
(package_name_dummy, package_version) = get_name_and_version_from_spec(
package_config[package_name]["externals"][i]["spec"]
)
if package_version == mpi_version:
if package_version == mpi_version.split("-")[0]:
package_found = True
external_mpi_package_config = package_config[package_name][
"externals"
Expand Down Expand Up @@ -511,7 +511,7 @@ def setup_meta_modules():
module_dir, compiler_name, compiler_version, "stack-" + mpi_name
)
mpi_module_file = os.path.join(
mpi_module_dir, mpi_version + MODULE_FILE_EXTENSION[module_choice]
mpi_module_dir, mpi_version.split("-")[0] + MODULE_FILE_EXTENSION[module_choice]
)
substitutes = SUBSTITUTES_TEMPLATE.copy()
#
Expand Down Expand Up @@ -600,10 +600,10 @@ def setup_meta_modules():
# and load it with the wrapper, don't set any of the other substitutes
module = "{}/{}".format(mpi_name, mpi_version)
substitutes["MODULELOADS"] += module_load_command(
module_choice, module
module_choice, module.split("-")[0]
).rstrip("\n")
substitutes["MODULEPREREQS"] += module_prereq_command(
module_choice, module
module_choice, module.split("-")[0]
).rstrip("\n")
logging.debug(
" ... ... MODULELOADS: {}".format(substitutes["MODULELOADS"])
Expand Down

0 comments on commit b148ba5

Please sign in to comment.