Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert modules mods #972

Merged
merged 8 commits into from
Mar 8, 2024
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
Loading