From 1a0cbcf672c1dfc34e99116c2b7c2f2560d036b2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 2 May 2020 16:43:54 +0200 Subject: [PATCH 1/4] undo hacky changes in _parse_dependency to inject guessed values for name/version in case no metadata is available for external modules --- easybuild/framework/easyconfig/easyconfig.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/easybuild/framework/easyconfig/easyconfig.py b/easybuild/framework/easyconfig/easyconfig.py index cc081ec22c..d79eed817b 100644 --- a/easybuild/framework/easyconfig/easyconfig.py +++ b/easybuild/framework/easyconfig/easyconfig.py @@ -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 From ced2fb04be6a1b3cd1debae9890366ba404dad0f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 2 May 2020 16:44:34 +0200 Subject: [PATCH 2/4] make HierarhicalMNS compatible with Cray toolchains (proper fix for #3265) --- .../module_naming_scheme/hierarchical_mns.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/easybuild/tools/module_naming_scheme/hierarchical_mns.py b/easybuild/tools/module_naming_scheme/hierarchical_mns.py index f6d7cf1423..649b700003 100644 --- a/easybuild/tools/module_naming_scheme/hierarchical_mns.py +++ b/easybuild/tools/module_naming_scheme/hierarchical_mns.py @@ -41,9 +41,11 @@ CORE = 'Core' COMPILER = 'Compiler' MPI = 'MPI' +TOOLCHAIN = 'Toolchain' MODULECLASS_COMPILER = 'compiler' MODULECLASS_MPI = 'mpi' +MODULECLASS_TOOLCHAIN = 'toolchain' GCCCORE = GCCcore.NAME @@ -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() @@ -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) @@ -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: + paths.append(os.path.join(TOOLCHAIN, ec.toolchain.name, ec.toolchain.version)) + return paths def expand_toolchain_load(self, ec=None): From 837f1f345641ed26abb701c6f30481d87d7bef80 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 2 May 2020 18:11:43 +0200 Subject: [PATCH 3/4] fix special case for Cray toolchains in HierarchicalMNS.det_modpath_extensions + enhance test_hierarchical_mns --- easybuild/tools/module_naming_scheme/hierarchical_mns.py | 4 ++-- test/framework/module_generator.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/module_naming_scheme/hierarchical_mns.py b/easybuild/tools/module_naming_scheme/hierarchical_mns.py index 649b700003..1647f4c96e 100644 --- a/easybuild/tools/module_naming_scheme/hierarchical_mns.py +++ b/easybuild/tools/module_naming_scheme/hierarchical_mns.py @@ -234,8 +234,8 @@ def det_modpath_extensions(self, 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: - paths.append(os.path.join(TOOLCHAIN, ec.toolchain.name, ec.toolchain.version)) + 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 diff --git a/test/framework/module_generator.py b/test/framework/module_generator.py index 81ce794218..439091a3a3 100644 --- a/test/framework/module_generator.py +++ b/test/framework/module_generator.py @@ -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) From 68db5c10d571c7d17fca0568b9a75308320ae171 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 2 May 2020 21:15:13 +0200 Subject: [PATCH 4/4] add missing HPL test easyconfig using CrayCCE as toolchain --- .../test_ecs/h/HPL/HPL-2.1-CrayCCE-5.1.29.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/framework/easyconfigs/test_ecs/h/HPL/HPL-2.1-CrayCCE-5.1.29.eb diff --git a/test/framework/easyconfigs/test_ecs/h/HPL/HPL-2.1-CrayCCE-5.1.29.eb b/test/framework/easyconfigs/test_ecs/h/HPL/HPL-2.1-CrayCCE-5.1.29.eb new file mode 100644 index 0000000000..607821faf2 --- /dev/null +++ b/test/framework/easyconfigs/test_ecs/h/HPL/HPL-2.1-CrayCCE-5.1.29.eb @@ -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'