Skip to content
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
7 changes: 3 additions & 4 deletions easybuild/easyblocks/a/advisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ def __init__(self, *args, **kwargs):
else:
self.subdir = os.path.join('advisor', 'latest')

# prepare module load environment
self.prepare_intel_tools_env()

def prepare_step(self, *args, **kwargs):
"""Since 2019u3 there is no license required."""
kwargs['requires_runtime_license'] = False
super(EB_Advisor, self).prepare_step(*args, **kwargs)

def make_module_req_guess(self):
"""Find reasonable paths for Advisor"""
return self.get_guesses_tools()

def sanity_check_step(self):
"""Custom sanity check paths for Advisor"""
binaries = ['advixe-cl', 'advixe-feedback', 'advixe-gui', 'advixe-runss', 'advixe-runtrc', 'advixe-runtc']
Expand Down
21 changes: 12 additions & 9 deletions easybuild/easyblocks/generic/intelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,22 @@ def set_versioned_subdir(self, subdir, path):

def get_guesses_tools(self):
"""Find reasonable paths for a subset of Intel tools, ignoring CPATH, LD_LIBRARY_PATH and LIBRARY_PATH"""
self.log.deprecated("IntelBase.get_guesses_tools() is replaced by IntelBase.prepare_intel_tools_env()", '6.0')

guesses = super(IntelBase, self).make_module_req_guess()
guesses['PATH'] = [os.path.join(self.subdir, 'bin64')]
guesses['MANPATH'] = [os.path.join(self.subdir, 'man')]
def prepare_intel_tools_env(self):
"""Find reasonable paths for a subset of Intel tools, ignoring CPATH, LD_LIBRARY_PATH and LIBRARY_PATH"""
self.module_load_environment.PATH = [os.path.join(self.subdir, 'bin64')]
self.module_load_environment.MANPATH = [os.path.join(self.subdir, 'man')]

# make sure $CPATH, $LD_LIBRARY_PATH and $LIBRARY_PATH are not updated in generated module file,
# because that leads to problem when the libraries included with VTune/Advisor/Inspector are being picked up
for key in ['CPATH', 'LD_LIBRARY_PATH', 'LIBRARY_PATH']:
if key in guesses:
self.log.debug("Purposely not updating $%s in %s module file", key, self.name)
del guesses[key]

return guesses
for disallowed_var in ['CPATH', 'LD_LIBRARY_PATH', 'LIBRARY_PATH']:
try:
delattr(self.module_load_environment, disallowed_var)
except AttributeError:
pass
else:
self.log.debug(f"Purposely not updating ${disallowed_var} in {self.name} module file")

def get_custom_paths_tools(self, binaries):
"""Custom sanity check paths for certain Intel tools."""
Expand Down
7 changes: 3 additions & 4 deletions easybuild/easyblocks/i/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ def __init__(self, *args, **kwargs):
elif loosever >= LooseVersion('2021'):
self.subdir = os.path.join('inspector', 'latest')

# prepare module load environment
self.prepare_intel_tools_env()

def make_installdir(self):
"""Do not create installation directory, install script handles that already."""
super(EB_Inspector, self).make_installdir(dontcreate=True)

def make_module_req_guess(self):
"""Find reasonable paths for Inspector"""
return self.get_guesses_tools()

def sanity_check_step(self):
"""Custom sanity check paths for Intel Inspector."""
binaries = ['inspxe-cl', 'inspxe-feedback', 'inspxe-gui', 'inspxe-runmc', 'inspxe-runtc']
Expand Down
7 changes: 3 additions & 4 deletions easybuild/easyblocks/v/vtune.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def __init__(self, *args, **kwargs):
elif loosever >= LooseVersion('2020'):
self.subdir = 'vtune_profiler'

# prepare module load environment
self.prepare_intel_tools_env()

def prepare_step(self, *args, **kwargs):
"""Since 2019u3 there is no license required."""
kwargs['requires_runtime_license'] = False
Expand All @@ -69,10 +72,6 @@ def make_installdir(self):
"""Do not create installation directory, install script handles that already."""
super(EB_VTune, self).make_installdir(dontcreate=True)

def make_module_req_guess(self):
"""Find reasonable paths for VTune"""
return self.get_guesses_tools()

def sanity_check_step(self):
"""Custom sanity check paths for VTune."""
binaries = ['amplxe-feedback', 'amplxe-runss', 'vtune', 'vtune-gui']
Expand Down