Skip to content

Commit 0fcc58a

Browse files
committed
Bug fixes in feature/spack_v1_nautilus_esmf891_netcdf_c for newly introduced compiler/mpi aliases
1 parent b78beff commit 0fcc58a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,15 @@ def custom_sort_key(entry):
520520
# Create mpi modules - currently, only one mpi provider is allowed
521521
for mpi_provider in mpi_providers:
522522

523+
if module_choice == "lmod":
524+
mpi_alias = mpi_provider.name
525+
else:
526+
mpi_alias = ALIASES[mpi_provider.name]
527+
523528
# For tcl, append modulepath for external specs and for specs without
524529
# compiler dependencies; remove the compiler/mpi prefices from the moduless
525530
if module_choice == "tcl":
526531

527-
# Module paths are short names for tcl modules
528-
mpi_alias = ALIASES[mpi_provider.name]
529-
530532
modulepath_save = os.path.join(module_dir, mpi_alias, str(mpi_provider.version), "none", "none")
531533
if not os.path.isdir(modulepath_save):
532534
os.makedirs(modulepath_save)
@@ -548,7 +550,7 @@ def custom_sort_key(entry):
548550

549551
# Module paths are short names for tcl modules
550552
if module_choice == "lmod":
551-
mpi_alias = compiler.name
553+
compiler_alias = compiler.name
552554
else:
553555
compiler_alias = ALIASES[compiler.name]
554556

0 commit comments

Comments
 (0)