From b148ba5295928eb3e80047bb78421def546139a9 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Fri, 8 Mar 2024 05:53:06 -0800 Subject: [PATCH] Revert modules mods (#972) * update meta_modules.py to support mpi provider module path with hash --- spack | 2 +- spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spack b/spack index b1f29d9c8..3839d67d5 160000 --- a/spack +++ b/spack @@ -1 +1 @@ -Subproject commit b1f29d9c8105f36390e6e8f0178ab6e6005b30d6 +Subproject commit 3839d67d54fe6f67a8a60f983b2114b3894dc702 diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py index 6a8061e81..38d66fa31 100755 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py @@ -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" @@ -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() # @@ -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"])