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

Update IPP easyblock for versions > 2021 #2909

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 38 additions & 6 deletions easybuild/easyblocks/i/ipp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ 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)
Comment on lines +56 to +59
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong, you need an else-stmt which calls

super(EB_ipp, self).make_installdir()

Or add a variable "dontcreate=None", changing it to True if version > 2021 and then call supr(...).make_installdir(dontcreate=dontcreate)

The latter depends a bit too much of a-prio knowledge of what the default for dontcreate is in the super classes.
So the first way is less prone to get hit by a change in intelbase.py or frameworks easyblock.py

Copy link
Contributor

Choose a reason for hiding this comment

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

With that change installing ipp-2017.1.132.eb works again.


def install_step(self):
"""
Expand All @@ -73,18 +83,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'),
Expand All @@ -99,9 +119,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,
Expand All @@ -115,10 +140,17 @@ 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')
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')

if LooseVersion(self.version) >= LooseVersion('9.0'):
guesses.update({
'LD_LIBRARY_PATH': lib_path,
'LIBRARY_PATH': lib_path,
Expand Down