Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions easybuild/tools/module_naming_scheme/hierarchical_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import re

from easybuild.toolchains.gcccore import GCCcore
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.module_naming_scheme.mns import ModuleNamingScheme
from easybuild.tools.module_naming_scheme.toolchain import det_toolchain_compilers, det_toolchain_mpi
Expand Down Expand Up @@ -240,15 +241,18 @@ def det_modpath_extensions(self, ec):
raise EasyBuildError("No compiler available in toolchain %s used to install MPI library %s v%s, "
"which is required by the active module naming scheme.",
ec['toolchain'], ec['name'], ec['version'])
else:
tc_comp_name, tc_comp_ver = tc_comp_info
fullver = self.det_full_version(ec)
paths.append(os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver))
tc_comp_name, tc_comp_ver = tc_comp_info
fullver = self.det_full_version(ec)
paths.append(os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver))

# special case for Cray toolchains
elif modclass == MODULECLASS_TOOLCHAIN and tc_comp_info is None:
# special case for Cray toolchains
if any(ec.name.startswith(x) for x in CRAY_TOOLCHAIN_NAME_PREFIXES):
paths.append(os.path.join(TOOLCHAIN, ec.name, ec.version))
# special case for NVHPC toolchains that lack standalone MPI component
elif ec.name == "NVHPC" and LooseVersion(ec.version) >= LooseVersion('25.0'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can use this instead

    elif ec.name == "NVHPC" and "GCCcore" not in {dep["name"] for dep in ec["dependencies"]}:

That follows https://github.com/easybuilders/easybuild-framework/pull/5103/changes and allows for custom easyconfigs with NVHPC >= 25.0 that are old-style (we have one of those, for historical reasons).

Copy link
Contributor Author

@lexming lexming Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we can indeed replace the version check with a dependency check here.
Fixed in 18f4579

fullver = self.det_full_version(ec)
paths.append(os.path.join(MPI, "nvidia-compilers", fullver, ec.name, fullver))

return paths

Expand Down