Skip to content

Commit

Permalink
Merge pull request #1577 from boegel/icc_ifort_subdir_check
Browse files Browse the repository at this point in the history
enhance sanity check for icc & ifort: also check for compilers_and_libraries_*/linux subdirectory
  • Loading branch information
bartoldeman committed Nov 13, 2018
2 parents 6e28b79 + bca220f commit dd5563e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
24 changes: 18 additions & 6 deletions easybuild/easyblocks/i/icc.py
Expand Up @@ -69,11 +69,18 @@ def __init__(self, *args, **kwargs):

self.debuggerpath = None

if LooseVersion(self.version) >= LooseVersion('2016') and self.cfg['components'] is None:
# we need to use 'ALL' by default, using 'DEFAULTS' results in key things not being installed (e.g. bin/icc)
self.cfg['components'] = [COMP_ALL]
self.log.debug("Nothing specified for components, but required for version 2016, using %s instead",
self.cfg['components'])
self.comp_libs_subdir = None

if LooseVersion(self.version) >= LooseVersion('2016'):

self.comp_libs_subdir = os.path.join('compilers_and_libraries_%s' % self.version, 'linux')

if self.cfg['components'] is None:
# we need to use 'ALL' by default,
# using 'DEFAULTS' results in key things not being installed (e.g. bin/icc)
self.cfg['components'] = [COMP_ALL]
self.log.debug("Nothing specified for components, but required for version 2016, using %s instead",
self.cfg['components'])

def install_step(self):
"""
Expand Down Expand Up @@ -121,6 +128,11 @@ def sanity_check_step(self):
'dirs': [],
}

# make very sure that expected 'compilers_and_libraries_<VERSION>/linux' subdir is there for recent versions,
# since we rely on it being there in make_module_req_guess
if self.comp_libs_subdir:
custom_paths['dirs'].append(self.comp_libs_subdir)

custom_commands = ["which icc"]

super(EB_icc, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
Expand Down Expand Up @@ -189,7 +201,7 @@ def make_module_req_guess(self):
else:
# new directory layout for Intel Parallel Studio XE 2016
# https://software.intel.com/en-us/articles/new-directory-layout-for-intel-parallel-studio-xe-2016
prefix = 'compilers_and_libraries_%s/linux' % self.version
prefix = self.comp_libs_subdir
# Debugger requires INTEL_PYTHONHOME, which only allows for a single value
self.debuggerpath = 'debugger_%s' % self.version.split('.')[0]

Expand Down
7 changes: 6 additions & 1 deletion easybuild/easyblocks/i/ifort.py
Expand Up @@ -37,7 +37,7 @@
from distutils.version import LooseVersion

from easybuild.easyblocks.generic.intelbase import IntelBase
from easybuild.easyblocks.icc import EB_icc #@UnresolvedImport
from easybuild.easyblocks.icc import EB_icc # @UnresolvedImport
from easybuild.tools.systemtools import get_shared_lib_ext


Expand Down Expand Up @@ -73,6 +73,11 @@ def sanity_check_step(self):
'dirs': [],
}

# make very sure that expected 'compilers_and_libraries_<VERSION>/linux' subdir is there for recent versions,
# since we rely on it being there in make_module_req_guess
if self.comp_libs_subdir:
custom_paths['dirs'].append(self.comp_libs_subdir)

custom_commands = ["which ifort"]

IntelBase.sanity_check_step(self, custom_paths=custom_paths, custom_commands=custom_commands)
Expand Down

0 comments on commit dd5563e

Please sign in to comment.