From 5d8c303d479346b29daf0d00f9ffcc367bbfce21 Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 15:34:28 +0100 Subject: [PATCH 1/6] Update IPP easyblock for versions > 2021. --- easybuild/easyblocks/i/ipp.py | 56 ++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 789a44d71c7..5c6696f8cdc 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -42,11 +42,20 @@ from easybuild.tools.systemtools import get_platform_name from easybuild.tools.systemtools import get_shared_lib_ext - class EB_ipp(IntelBase): """ Support for installing Intel Integrated Performance Primitives library """ + def prepare_step(self, *args, **kwargs): + """Since oneAPI there is no license required.""" + if LooseVersion(self.version) >= LooseVersion('2021'): + kwargs['requires_runtime_license'] = False + super(EB_ipp, self).prepare_step(*args, **kwargs) + + def make_installdir(self): + """Do not create installation directory, install script handles that already.""" + if LooseVersion(self.version) >= LooseVersion('2021'): + super(EB_ipp, self).make_installdir(dontcreate=True) def install_step(self): """ @@ -73,18 +82,28 @@ def install_step(self): } # in case of IPP 9.x, we have to specify ARCH_SELECTED in silent.cfg - if LooseVersion(self.version) >= LooseVersion('9.0'): + if LooseVersion(self.version) >= LooseVersion('9.0') \ + and LooseVersion(self.version) < LooseVersion('2021'): silent_cfg_extras = { 'ARCH_SELECTED': self.arch.upper() } + """If installing from OneAPI, install only Intel IPP component""" + if LooseVersion(self.version) >= LooseVersion('2021'): + self.install_components = ['intel.oneapi.lin.ipp.devel'] + super(EB_ipp, self).install_step(silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=silent_cfg_extras) def sanity_check_step(self): """Custom sanity check paths for IPP.""" shlib_ext = get_shared_lib_ext() - dirs = [os.path.join('ipp', x) for x in ['bin', 'include', os.path.join('tools', 'intel64')]] + if LooseVersion(self.version) < LooseVersion('2021'): + dirs = [os.path.join('ipp', x) for x in ['bin', 'include', os.path.join('tools', 'intel64')]] + else: + dirs = [os.path.join('ipp', self.version, x) + for x in ['include', os.path.join('tools', 'intel64')]] + if LooseVersion(self.version) < LooseVersion('8.0'): dirs.extend([ os.path.join('compiler', 'lib', 'intel64'), @@ -99,9 +118,14 @@ def sanity_check_step(self): if LooseVersion(self.version) < LooseVersion('9.0'): ipp_libs.extend(['ac', 'di', 'j', 'm', 'r', 'sc', 'vc']) + if LooseVersion(self.version) < LooseVersion('2021'): + custom_paths_version = '.' + else: + custom_paths_version = self.version + custom_paths = { 'files': [ - os.path.join('ipp', 'lib', 'intel64', 'libipp%s') % y for x in ipp_libs + os.path.join('ipp', custom_paths_version, 'lib', 'intel64', 'libipp%s') % y for x in ipp_libs for y in ['%s.a' % x, '%s.%s' % (x, shlib_ext)] ], 'dirs': dirs, @@ -115,15 +139,19 @@ def make_module_req_guess(self): """ guesses = super(EB_ipp, self).make_module_req_guess() - if LooseVersion(self.version) >= LooseVersion('9.0'): - lib_path = [os.path.join('ipp', 'lib', self.arch), os.path.join('lib', self.arch)] - include_path = os.path.join('ipp', 'include') - - guesses.update({ - 'LD_LIBRARY_PATH': lib_path, - 'LIBRARY_PATH': lib_path, - 'CPATH': [include_path], - 'INCLUDE': [include_path], - }) + if LooseVersion(self.version) >= LooseVersion('2021'): + lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), os.path.join('compiler', '*', 'linux', 'lib'), os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] + include_path = os.path.join('ipp', self.version, 'include') + else: + if LooseVersion(self.version) >= LooseVersion('9.0'): + lib_path = [os.path.join('ipp', 'lib', self.arch), os.path.join('lib', self.arch)] + include_path = os.path.join('ipp', 'include') + + guesses.update({ + 'LD_LIBRARY_PATH': lib_path, + 'LIBRARY_PATH': lib_path, + 'CPATH': [include_path], + 'INCLUDE': [include_path], + }) return guesses From a370e2e2122da23a36b492602a9853c45a962363 Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 15:41:59 +0100 Subject: [PATCH 2/6] Fix style issues identified by Hound bot. --- easybuild/easyblocks/i/ipp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 5c6696f8cdc..b7f83753204 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -140,9 +140,11 @@ def make_module_req_guess(self): guesses = super(EB_ipp, self).make_module_req_guess() if LooseVersion(self.version) >= LooseVersion('2021'): - lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), os.path.join('compiler', '*', 'linux', 'lib'), os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] + lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), \ + os.path.join('compiler', '*', 'linux', 'lib'), \ + os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] include_path = os.path.join('ipp', self.version, 'include') - else: + else: if LooseVersion(self.version) >= LooseVersion('9.0'): lib_path = [os.path.join('ipp', 'lib', self.arch), os.path.join('lib', self.arch)] include_path = os.path.join('ipp', 'include') From 1bf2a169a50a7727e22a5c00520996e515c25706 Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 15:45:30 +0100 Subject: [PATCH 3/6] Fix new style issues. --- easybuild/easyblocks/i/ipp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index b7f83753204..920c6ba7a74 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -140,9 +140,9 @@ def make_module_req_guess(self): guesses = super(EB_ipp, self).make_module_req_guess() if LooseVersion(self.version) >= LooseVersion('2021'): - lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), \ - os.path.join('compiler', '*', 'linux', 'lib'), \ - os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] + lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), + os.path.join('compiler', '*', 'linux', 'lib'), + os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] include_path = os.path.join('ipp', self.version, 'include') else: if LooseVersion(self.version) >= LooseVersion('9.0'): From a812a60a221258c496c8e1277b94c6c9780a16d5 Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 16:18:42 +0100 Subject: [PATCH 4/6] Indentation. --- easybuild/easyblocks/i/ipp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 920c6ba7a74..8dfc04b6cc0 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -141,8 +141,8 @@ def make_module_req_guess(self): if LooseVersion(self.version) >= LooseVersion('2021'): lib_path = [os.path.join('ipp', self.version, 'lib', self.arch), - os.path.join('compiler', '*', 'linux', 'lib'), - os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] + os.path.join('compiler', '*', 'linux', 'lib'), + os.path.join('compiler', '*', 'linux', 'compiler', 'lib', 'intel64_lin')] include_path = os.path.join('ipp', self.version, 'include') else: if LooseVersion(self.version) >= LooseVersion('9.0'): From 64db3a53fcc916f2042ff6f7809abd31df43bc1b Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 16:27:54 +0100 Subject: [PATCH 5/6] E302 blank line missing. --- easybuild/easyblocks/i/ipp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 8dfc04b6cc0..8480bc8e7e6 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -42,6 +42,7 @@ from easybuild.tools.systemtools import get_platform_name from easybuild.tools.systemtools import get_shared_lib_ext + class EB_ipp(IntelBase): """ Support for installing Intel Integrated Performance Primitives library From 85bfffdd2e73f7434da80e7e921d41ed55ddfb40 Mon Sep 17 00:00:00 2001 From: agemuend Date: Mon, 20 Mar 2023 16:47:58 +0100 Subject: [PATCH 6/6] Only update guesses for versions > 9.0. --- easybuild/easyblocks/i/ipp.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 8480bc8e7e6..5344608fd20 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -150,11 +150,12 @@ def make_module_req_guess(self): lib_path = [os.path.join('ipp', 'lib', self.arch), os.path.join('lib', self.arch)] include_path = os.path.join('ipp', 'include') - guesses.update({ - 'LD_LIBRARY_PATH': lib_path, - 'LIBRARY_PATH': lib_path, - 'CPATH': [include_path], - 'INCLUDE': [include_path], - }) + if LooseVersion(self.version) >= LooseVersion('9.0'): + guesses.update({ + 'LD_LIBRARY_PATH': lib_path, + 'LIBRARY_PATH': lib_path, + 'CPATH': [include_path], + 'INCLUDE': [include_path], + }) return guesses