Skip to content
Merged
38 changes: 20 additions & 18 deletions easybuild/tools/module_naming_scheme/hierarchical_mns.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,28 @@ def det_toolchain_compilers_name_version(self, tc_comps):
if tc_comps is None:
# no compiler in toolchain, system toolchain
res = None
elif len(tc_comps) == 1:
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()
key = ','.join(sorted(comp_names))
if key in COMP_NAME_VERSION_TEMPLATES:
tc_comp_name, tc_comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[key]
tc_comp_ver = tc_comp_ver_tmpl % comp_versions
# make sure that icc/ifort versions match (unless not existing as separate modules)
if tc_comp_name == 'intel' and comp_versions.get('icc') != comp_versions.get('ifort'):
raise EasyBuildError("Bumped into different versions for Intel compilers: %s", comp_versions)
if len(tc_comps) > 0 and tc_comps[0]:
comp_versions = dict([(comp['name'], self.det_full_version(comp)) for comp in tc_comps])
comp_names = comp_versions.keys()
key = ','.join(sorted(comp_names))
if key in COMP_NAME_VERSION_TEMPLATES:
tc_comp_name, tc_comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[key]
tc_comp_ver = tc_comp_ver_tmpl % comp_versions
# make sure that icc/ifort versions match (unless not existing as separate modules)
if tc_comp_name == 'intel' and comp_versions.get('icc') != comp_versions.get('ifort'):
raise EasyBuildError("Bumped into different versions for Intel compilers: %s", comp_versions)
res = (tc_comp_name, tc_comp_ver)
else:
if len(tc_comps) == 1:
tc_comp = tc_comps[0]
res = (tc_comp['name'], self.det_full_version(tc_comp))
else:
raise EasyBuildError("Unknown set of toolchain compilers, module naming scheme needs work: %s",
comp_names)
else:
raise EasyBuildError("Unknown set of toolchain compilers, module naming scheme needs work: %s",
comp_names)
res = (tc_comp_name, tc_comp_ver)
res = None

return res

def det_module_subdir(self, ec):
Expand Down
18 changes: 18 additions & 0 deletions test/framework/easyconfigs/test_ecs/i/iimpi/iimpi-2021a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is an easyconfig file for EasyBuild, see http://easybuilders.github.io/easybuild
easyblock = 'Toolchain'

name = 'iimpi'
version = '2021a'

homepage = 'https://software.intel.com/parallel-studio-xe'
description = """Intel C/C++ and Fortran compilers, alongside Intel MPI."""

toolchain = SYSTEM

local_comp_ver = '2021.2.0'
dependencies = [
('intel-compilers', local_comp_ver),
('impi', local_comp_ver, '', ('intel-compilers', local_comp_ver)),
]

moduleclass = 'toolchain'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# dummy easyconfig, only for use with easybuild-framwork test suite!
easyblock = 'Toolchain'

name = 'imkl'
version = '2021.2.0'

homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html'
description = "Intel oneAPI Math Kernel Library"

toolchain = {'name': 'iimpi', 'version': '2021a'}

# see https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html
source_urls = ['https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17757/']
sources = ['l_onemkl_p_%(version)s.296_offline.sh']
checksums = ['816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae']

moduleclass = 'numlib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# dummy easyconfig, only for use with easybuild-framwork test suite!
easyblock = 'Toolchain'

name = 'impi'
version = '2021.2.0'

homepage = 'https://software.intel.com/content/www/us/en/develop/tools/mpi-library.html'
description = "Intel MPI Library, compatible with MPICH ABI"

toolchain = {'name': 'intel-compilers', 'version': '2021.2.0'}

# see https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html
source_urls = ['https://registrationcenter-download.intel.com/akdlm/irc_nas/17729/']
sources = ['l_mpi_oneapi_p_%(version)s.215_offline.sh']
checksums = ['d0d4cdd11edaff2e7285e38f537defccff38e37a3067c02f4af43a3629ad4aa3']

# dummy easyconfig, only for use with easybuild-framwork test suite!
dependencies = [
# ('UCX', '1.10.0'),
]

moduleclass = 'mpi'
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# dummy easyconfig, only for use with easybuild-framwork test suite!
easyblock = 'Toolchain'

name = 'intel-compilers'
version = '2021.2.0'

homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html'
description = "Intel C, C++ & Fortran compilers (classic and oneAPI)"

toolchain = SYSTEM

# see https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html
sources = [
{
'source_urls': ['https://registrationcenter-download.intel.com/akdlm/irc_nas/17749/'],
'filename': 'l_dpcpp-cpp-compiler_p_%(version)s.118_offline.sh',
},
{
'source_urls': ['https://registrationcenter-download.intel.com/akdlm/irc_nas/17756/'],
'filename': 'l_fortran-compiler_p_%(version)s.136_offline.sh',
},
]
checksums = [
# l_dpcpp-cpp-compiler_p_2021.2.0.118_offline.sh
'5d01cbff1a574c3775510cd97ffddd27fdf56d06a6b0c89a826fb23da4336d59',
'a62e04a80f6d2f05e67cd5acb03fa58857ee22c6bd581ec0651c0ccd5bdec5a1', # l_fortran-compiler_p_2021.2.0.136_offline.sh
]

# dummy easyconfig, only for use with easybuild-framwork test suite!
local_gccver = '10.3.0'
dependencies = [
# ('GCCcore', local_gccver),
# ('binutils', '2.36.1', '', ('GCCcore', local_gccver)),
]

moduleclass = 'compiler'
2 changes: 1 addition & 1 deletion test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,7 @@ def test_index_functions(self):
# test with specified path with and without trailing '/'s
for path in [test_ecs, test_ecs + '/', test_ecs + '//']:
index = ft.create_index(path)
self.assertEqual(len(index), 85)
self.assertEqual(len(index), 89)

expected = [
os.path.join('b', 'bzip2', 'bzip2-1.0.6-GCC-4.9.2.eb'),
Expand Down
8 changes: 8 additions & 0 deletions test/framework/module_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,14 @@ def test_ec(ecfile, short_modname, mod_subdir, modpath_exts, user_modpath_exts,
['Compiler/intel/2019.4.243'], ['Core']),
'imkl-2019.4.243-iimpi-2019.08.eb': ('imkl/2019.4.243',
'MPI/intel/2019.4.243/impi/2019.4.243', [], [], ['Core']),
'intel-compilers-2021.2.0.eb': ('intel-compilers/2021.2.0', 'Core',
['Compiler/intel/2021.2.0'], ['Compiler/intel/2021.2.0'], ['Core']),
'impi-2021.2.0-intel-compilers-2021.2.0.eb': ('impi/2021.2.0', 'Compiler/intel/2021.2.0',
['MPI/intel/2021.2.0/impi/2021.2.0'],
['MPI/intel/2021.2.0/impi/2021.2.0'],
['Core']),
'imkl-2021.2.0-iimpi-2021a.eb': ('imkl/2021.2.0', 'MPI/intel/2021.2.0/impi/2021.2.0',
[], [], ['Core']),
'CUDA-9.1.85-GCC-6.4.0-2.28.eb': ('CUDA/9.1.85', 'Compiler/GCC/6.4.0-2.28',
['Compiler/GCC-CUDA/6.4.0-2.28-9.1.85'],
['Compiler/GCC-CUDA/6.4.0-2.28-9.1.85'], ['Core']),
Expand Down
2 changes: 2 additions & 0 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ def test_search_archived(self):
txt = self.get_stdout().rstrip()
self.mock_stdout(False)
expected = '\n'.join([
' * intel-compilers-2021.2.0.eb',
' * intel-2018a.eb',
'',
"Note: 1 matching archived easyconfig(s) found, use --consider-archived-easyconfigs to see them",
Expand All @@ -1043,6 +1044,7 @@ def test_search_archived(self):
txt = self.get_stdout().rstrip()
self.mock_stdout(False)
expected = '\n'.join([
' * intel-compilers-2021.2.0.eb',
' * intel-2018a.eb',
'',
"Matching archived easyconfigs:",
Expand Down