-
Notifications
You must be signed in to change notification settings - Fork 305
Added Intel compiler v2016 support #691
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
Changes from all commits
15b48de
782d164
12c6707
01254a5
441d1b6
5e95c15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ | |
| from distutils.version import LooseVersion | ||
|
|
||
| from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 | ||
| from easybuild.tools.modules import get_software_root, get_software_version | ||
| from easybuild.tools.run import run_cmd | ||
|
|
||
|
|
||
|
|
@@ -74,29 +75,35 @@ def install_step(self): | |
| 'license_file_name': LICENSE_FILE_NAME_2012, | ||
| } | ||
|
|
||
| super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map) | ||
| cfg_extras_map = {} | ||
| if LooseVersion(self.version) >= LooseVersion('2016'): | ||
| cfg_extras_map = { | ||
| 'COMPONENTS': 'ALL', | ||
| } | ||
| super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=cfg_extras_map) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this will crash for non-2016 versions, since please change it to something like: silent_cfg_extras = {}
if LooseVersion(self.version) >= LooseVersion('2016'):
silent_cfg_extras.update{'COMPONENTS': 'ALL'}
super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=silent_cfg_extras)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, makes sense.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we pass
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. omfg... how the hell da we figure out what we need from this mess? O_o
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. trail and error. But most are clear what they mean.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seriously? There's no proper documentation for this?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None that I have found? |
||
|
|
||
| def sanity_check_step(self): | ||
| """Custom sanity check paths for icc.""" | ||
|
|
||
| binprefix = "bin/intel64" | ||
| libprefix = "lib/intel64/lib" | ||
| libprefix = "lib/intel64" | ||
| if LooseVersion(self.version) >= LooseVersion("2011"): | ||
| if LooseVersion(self.version) <= LooseVersion("2011.3.174"): | ||
| binprefix = "bin" | ||
| elif LooseVersion(self.version) >= LooseVersion("2013_sp1"): | ||
| binprefix = "bin" | ||
| libprefix = "lib/intel64/lib" | ||
| if LooseVersion(self.version) >= LooseVersion("2016"): | ||
| libprefix = "lib/intel64_lin" | ||
| else: | ||
| libprefix = "compiler/lib/intel64/lib" | ||
| libprefix = "compiler/lib/intel64" | ||
|
|
||
| binfiles = ["icc", "icpc"] | ||
| if LooseVersion(self.version) < LooseVersion("2014"): | ||
| binfiles += ["idb"] | ||
|
|
||
| custom_paths = { | ||
| 'files': ["%s/%s" % (binprefix, x) for x in binfiles] + | ||
| ["%s%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]], | ||
| 'files': [os.path.join(binprefix, x) for x in binfiles] + | ||
| [os.path.join(libprefix, 'lib%s' % x) for x in ['iomp5.a', 'iomp5.so']], | ||
| 'dirs': [], | ||
| } | ||
|
|
||
|
|
@@ -105,53 +112,114 @@ def sanity_check_step(self): | |
| def make_module_req_guess(self): | ||
| """Customize paths to check and add in environment. | ||
| """ | ||
| debuggerpath = None | ||
| prefix = None | ||
| if self.cfg['m32']: | ||
| # 32-bit toolchain | ||
| libpaths = ['lib', 'lib/ia32'], | ||
| dirmap = { | ||
| 'PATH': ['bin', 'bin/ia32', 'tbb/bin/ia32'], | ||
| 'LD_LIBRARY_PATH': ['lib', 'lib/ia32'], | ||
| 'LIBRARY_PATH': ['lib', 'lib/ia32'], | ||
| 'LD_LIBRARY_PATH': libpaths, | ||
| 'LIBRARY_PATH': libpaths, | ||
| 'MANPATH': ['man', 'share/man', 'man/en_US'], | ||
| 'IDB_HOME': ['bin/intel64'] | ||
| } | ||
| else: | ||
| # 64-bit toolit | ||
| dirmap = { | ||
| 'PATH': ['bin', 'bin/intel64', 'tbb/bin/emt64'], | ||
| 'LD_LIBRARY_PATH': ['lib', 'lib/intel64'], | ||
| 'LIBRARY_PATH': ['lib', 'lib/intel64'], | ||
| 'MANPATH': ['man', 'share/man', 'man/en_US'], | ||
| 'IDB_HOME': ['bin/intel64'] | ||
| } | ||
| # 64-bit toolkit | ||
|
|
||
| # using get_software_version('GCC') won't work, while the compiler toolchain is dummy:dummy, which does not | ||
| # load dependencies. | ||
| gccversion = get_software_version('GCC') | ||
| # manual approach to at least have the system version of gcc | ||
| if not gccversion: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a bit fat warn here. We don't really support this anymore. icc should always be installed alongside an EB GCC.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Ward, not sure what you mean. though during the install phase it is not available. Likely because the toolchains is dummy, dummy and it doesn't load the GCC version listed.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, gccversion = get_software_version('GCC')
if not gccversion:
raise EasyBuildError("GCC module is not loaded?")
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wpoely86: no, please don't, you'll break the installation of We should encourage using an EB-built GCC when installing/using I wouldn't go further than adding a |
||
| cmd = 'gcc --version' | ||
| (out, _) = run_cmd(cmd, log_all=True, simple=False) | ||
| ver_re = re.compile("^gcc \(GCC\) (?P<version>[0-9.]+) [0-9]+", re.M) | ||
| gccversion = ver_re.search(out).group('version') | ||
|
|
||
| # TBB directory structure | ||
| # https://www.threadingbuildingblocks.org/docs/help/tbb_userguide/Linux_OS.htm | ||
| tbbgccversion = 'gcc4.4' # gcc version 4.4 or higher that may or may not support exception_ptr | ||
| if gccversion and LooseVersion(gccversion) >= LooseVersion("4.1") and LooseVersion(gccversion) < LooseVersion("4.4"): | ||
| tbbgccversion = 'gcc4.1' # gcc version number between 4.1 and 4.4 that do not support exception_ptr | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, this may be relevant for older versions? |
||
| if LooseVersion(self.version) < LooseVersion("2016"): | ||
| prefix = "composer_xe_%s" % self.version | ||
|
|
||
| # Debugger is dependent on INTEL_PYTHONHOME since version 2015 and newer | ||
| if LooseVersion(self.version) >= LooseVersion("2015"): | ||
| # Debugger requires INTEL_PYTHONHOME, which only allows for a single value | ||
| debuggerpath = os.path.join('composer_xe_%s' % self.version.split('.')[0], 'debugger') | ||
|
|
||
| libpaths = [os.path.join('tbb/lib/intel64', tbbgccversion), | ||
| 'ipp/lib/intel64', | ||
| 'debugger/ipt/intel64/lib', | ||
| 'lib/intel64', | ||
| 'compiler/lib/intel64', | ||
| ] | ||
| dirmap = { | ||
| 'PATH': ['debugger/gdb/intel64/bin', 'ipp/bin/intel64', 'tbb/bin/intel64', 'bin/intel64'], | ||
| 'LD_LIBRARY_PATH': libpaths, | ||
| 'LIBRARY_PATH': libpaths, | ||
| 'MANPATH': ['debugger/gdb/intel64/share/man', 'man/en_US', 'share/man', 'man'], | ||
| 'CPATH': ['ipp/include', 'tbb/include'], | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope. Intel dropped IDB in favor of GDB. |
||
| 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 | ||
| # Debugger requires INTEL_PYTHONHOME, which only allows for a single value | ||
| debuggerpath = 'debugger_%s' % self.version.split('.')[0] | ||
|
|
||
| libpaths = ['daal/../compiler/lib/intel64_lin', | ||
| os.path.join('daal/../tbb/lib/intel64_lin', tbbgccversion), | ||
| 'daal/lib/intel64_lin', | ||
| os.path.join(debuggerpath, 'libipt/intel64/lib'), | ||
| os.path.join('tbb/lib/intel64', tbbgccversion), | ||
| 'mkl/lib/intel64', | ||
| 'ipp/lib/intel64', | ||
| 'ipp/../compiler/lib/intel64', | ||
| 'mpi/intel64', | ||
| 'compiler/lib/intel64', | ||
| 'lib/intel64_lin', | ||
| ] | ||
| dirmap = { | ||
| 'PATH': ['mpi/intel64/bin', | ||
| 'ipp/bin/intel64', | ||
| os.path.join(debuggerpath, 'gdb/intel64/bin'), | ||
| 'bin/intel64', | ||
| 'bin', | ||
| ], | ||
| 'LD_LIBRARY_PATH': libpaths, | ||
| 'LIBRARY_PATH': libpaths, | ||
| 'MANPATH': ['man/common', 'man/en_US', 'debugger/gdb/intel64/share/man'], | ||
| 'CPATH': ['ipp/include', 'mkl/include', 'tbb/include', 'daal/include'], | ||
| 'DAALROOT': ['daal'], | ||
| 'TBBROOT': ['tbb'], | ||
| 'IPPROOT': ['ipp'], | ||
| 'CLASSPATH': ['daal/lib/daal.jar'] | ||
| } | ||
|
|
||
| # set debugger path | ||
| if debuggerpath: | ||
| if os.path.isdir(os.path.join(self.installdir, debuggerpath, 'python/intel64')): | ||
| self.cfg['modextravars'] = { 'INTEL_PYTHONHOME': os.path.join('$root', debuggerpath, 'python/intel64') } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is added twice?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First one is not necessary. Was work-in-progess that was left behind. Thanx for the keen eye. |
||
|
|
||
| # in recent Intel compiler distributions, the actual binaries are | ||
| # in deeper directories, and symlinked in top-level directories | ||
| # however, not all binaries are symlinked (e.g. mcpcom is not) | ||
| if os.path.isdir("%s/composerxe-%s" % (self.installdir, self.version)): | ||
| prefix = "composerxe-%s" % self.version | ||
| # more recent versions of the Intel Compiler (2013.sp1 and newer) | ||
| if os.path.isdir(os.path.join(self.installdir, prefix)): | ||
| oldmap = dirmap | ||
| dirmap = {} | ||
| for k, vs in oldmap.items(): | ||
| dirmap[k] = [] | ||
| if k == "LD_LIBRARY_PATH": | ||
| prefix = "composerxe-%s/compiler" % self.version | ||
| else: | ||
| prefix = "composerxe-%s" % self.version | ||
| for v in vs: | ||
| v2 = "%s/%s" % (prefix, v) | ||
| dirmap[k].append(v2) | ||
|
|
||
| elif os.path.isdir("%s/compiler" % (self.installdir)): | ||
| prefix = "compiler" | ||
| oldmap = dirmap | ||
| dirmap = {} | ||
| for k, vs in oldmap.items(): | ||
| dirmap[k] = [] | ||
| prefix = '' | ||
| if k == "LD_LIBRARY_PATH": | ||
| prefix = "compiler/" | ||
| for v in vs: | ||
| v2 = "%s%s" % (prefix, v) | ||
| dirmap[k].append(v2) | ||
| v2 = os.path.join(prefix, v) | ||
| if os.path.exists(os.path.join(self.installdir, v2)): | ||
| dirmap[k].append(v2) | ||
| elif os.path.isdir(os.path.join(self.installdir, v)): | ||
| dirmap[k].append(v) | ||
|
|
||
| return dirmap | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a very good idea... This is icc, not "Intel world".
Is there documentation on what are valid values for
COMPONENTS?