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

make HierarhicalMNS compatible with Cray toolchains #17

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 0 additions & 9 deletions easybuild/framework/easyconfig/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,15 +1463,6 @@ def _parse_dependency(self, dep, hidden=False, build_only=False):
if dependency['full_mod_name'].split('/')[-1].startswith('.'):
dependency['hidden'] = True

name_version = dependency['short_mod_name'].split('/')
if 'name' not in dependency['external_module_metadata']:
dependency['name'] = name_version[0]
if 'version' not in dependency['external_module_metadata']:
if len(name_version) > 1:
dependency['version'] = name_version[1]
else:
dependency['version'] = ''

self.log.debug("Returning parsed external dependency: %s", dependency)
return dependency

Expand Down
16 changes: 15 additions & 1 deletion easybuild/tools/module_naming_scheme/hierarchical_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@
CORE = 'Core'
COMPILER = 'Compiler'
MPI = 'MPI'
TOOLCHAIN = 'Toolchain'

MODULECLASS_COMPILER = 'compiler'
MODULECLASS_MPI = 'mpi'
MODULECLASS_TOOLCHAIN = 'toolchain'

GCCCORE = GCCcore.NAME

Expand Down Expand Up @@ -107,7 +109,11 @@ def det_toolchain_compilers_name_version(self, tc_comps):
# no compiler in toolchain, system toolchain
res = None
elif len(tc_comps) == 1:
res = (tc_comps[0]['name'], self.det_full_version(tc_comps[0]))
tc_comp = tc_comps[0]
if tc_comp is None:
res = None
else:
res = (tc_comp['name'], self.det_full_version(tc_comp))
else:
comp_versions = dict([(comp['name'], self.det_full_version(comp)) for comp in tc_comps])
comp_names = comp_versions.keys()
Expand Down Expand Up @@ -135,6 +141,10 @@ def det_module_subdir(self, ec):
if tc_comps is None:
# no compiler in toolchain, system toolchain => Core module
subdir = CORE
elif tc_comps == [None]:
# no info on toolchain compiler (cfr. Cray toolchains),
# then use toolchain name/version
subdir = os.path.join(TOOLCHAIN, ec.toolchain.name, ec.toolchain.version)
else:
tc_comp_name, tc_comp_ver = self.det_toolchain_compilers_name_version(tc_comps)
tc_mpi = det_toolchain_mpi(ec)
Expand Down Expand Up @@ -223,6 +233,10 @@ def det_modpath_extensions(self, ec):
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 and ec.name.startswith('Cray'):
paths.append(os.path.join(TOOLCHAIN, ec.name, ec.version))

return paths

def expand_toolchain_load(self, ec=None):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
easyblock = 'ConfigureMake'

name = 'HPL'
version = '2.1'

homepage = 'http://www.netlib.org/benchmark/hpl/'
description = "HPL, you know, LINPACK"

toolchain = {'name': 'CrayCCE', 'version': '5.1.29'}

source_urls = ['http://www.netlib.org/benchmark/%(namelower)s']
sources = [SOURCELOWER_TAR_GZ]

moduleclass = 'tools'
5 changes: 5 additions & 0 deletions test/framework/module_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,11 @@ def test_ec(ecfile, short_modname, mod_subdir, modpath_exts, user_modpath_exts,
['MPI/intel-CUDA/%s-5.5.22/impi/5.1.2.150' % iccver],
['MPI/intel-CUDA/%s-5.5.22/impi/5.1.2.150' % iccver],
['Core']),
'CrayCCE-5.1.29.eb': ('CrayCCE/5.1.29', 'Core',
['Toolchain/CrayCCE/5.1.29'],
['Toolchain/CrayCCE/5.1.29'],
['Core']),
'HPL-2.1-CrayCCE-5.1.29.eb': ('HPL/2.1', 'Toolchain/CrayCCE/5.1.29', [], [], ['Core']),
}
for ecfile, mns_vals in test_ecs.items():
test_ec(ecfile, *mns_vals)
Expand Down