-
Notifications
You must be signed in to change notification settings - Fork 310
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 2 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 |
|---|---|---|
|
|
@@ -74,29 +74,36 @@ 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) | ||
| 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"): | ||
| elif LooseVersion(self.version) >= LooseVersion("2013_sp1") and LooseVersion(self.version) < LooseVersion("2016"): | ||
| binprefix = "bin" | ||
| libprefix = "lib/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. no need to redefine it, since it's the same as above?
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. no, while they are all version-specific paths. Otherwise the changed if statement would be true for v2016 as well.
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. see other remark (below) |
||
| elif LooseVersion(self.version) >= LooseVersion("2016"): | ||
| binprefix = "bin" | ||
| libprefix = "lib/intel64/lib" | ||
| libprefix = "lib/intel64_lin" | ||
|
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. since the elif LooseVersion(self.version) >= LooseVersion("2013_sp1"):
binprefix = "bin"
if LooseVersion(self.version) >= LooseVersion("2016"):
libprefix = "lib/intel64_lin"
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. I'll adjust the icc.py |
||
| 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"]], | ||
| ["%s/lib%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]], | ||
|
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 should use [os.path.join(binprefix, x) for x in binfiles] +
[os.path.join(libprefix, 'lib%s' % x) for x in ['iomp5.a', 'iomp5.so']],
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. will change |
||
| 'dirs': [], | ||
| } | ||
|
|
||
|
|
@@ -105,53 +112,81 @@ def sanity_check_step(self): | |
| def make_module_req_guess(self): | ||
| """Customize paths to check and add in environment. | ||
| """ | ||
| # 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 | ||
|
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. move this comment into the 2016-specific block |
||
| debuggerpath = 'debugger_%s' % self.version.split('.')[0] | ||
|
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. only used for |
||
| 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'] | ||
| } | ||
| if LooseVersion(self.version) < LooseVersion("2016"): | ||
| # 64-bit toolkit | ||
| libpaths = ['compiler/lib/intel64', 'lib/intel64', 'debugger/ipt/intel64/lib', 'ipp/lib/intel64', 'tbb/lib/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.
and please keep the order as it was, i.e. list
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. also, make sure lines are shorter than 120 characters, break it up across multiple lines if you must
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. lib exists in the $root, though is a symlink to compilers_and_libraries/linux/lib. Which in its turn is a symlink to ../../compilers_and_libraries_2016.0.109/linux/compiler/lib This is what comes out of LD_LIBRARY_PATH after sourcing iccvars.sh intel64: (with : replaced by newlines for readability) .../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/compiler/lib/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. For new versions, yes, but not for (really) old versions: |
||
| dirmap = { | ||
| 'PATH': ['bin/intel64', 'tbb/bin/intel64', 'ipp/bin/intel64', 'debugger/gdb/intel64/bin'], | ||
|
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. same here, don't drop |
||
| 'LD_LIBRARY_PATH': libpaths, | ||
| 'LIBRARY_PATH': libpaths, | ||
| 'MANPATH': ['man', 'share/man', 'man/en_US', 'debugger/gdb/intel64/share/man'], | ||
| 'CPATH': ['ipp/include', 'tbb/include'], | ||
| 'INTEL_PYTHONHOME': ['debugger/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.
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: | ||
| # 64-bit toolkit | ||
| libpaths = ['daal/../compiler/lib/intel64_lin', 'daal/../tbb/lib/intel64_lin/gcc4.4', 'daal/lib/intel64_lin', '%s/libipt/intel64/lib' % debuggerpath,'tbb/lib/intel64/gcc4.4', 'mkl/lib/intel64', 'ipp/lib/intel64', 'ipp/../compiler/lib/intel64', 'compiler/lib/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. line too long |
||
| dirmap = { | ||
| 'PATH': ['mpi/intel64/bin', 'ipp/bin/intel64', '%s/gdb/intel64/bin' % debuggerpath, 'bin/intel64'], | ||
| 'LD_LIBRARY_PATH': libpaths, | ||
|
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? |
||
| 'LIBRARY_PATH': libpaths, | ||
| 'MANPATH': ['man/common', 'man/en_US', 'debugger/gdb/intel64/share/man'], | ||
| 'CPATH': ['daal/include', 'tbb/include', 'mkl/include', 'ipp/include'], | ||
| 'INTEL_PYTHONHOME': ['%s/python/intel64' % debuggerpath], | ||
| 'DAALROOT': ['daal'], | ||
| 'TBBROOT': ['tbb'], | ||
| 'IPPROOT': ['ipp'], | ||
| 'CLASSPATH': ['daal/lib/daal.jar'], | ||
| } | ||
|
|
||
|
|
||
| # 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("%s/composer_xe_%s" % (self.installdir, self.version)): | ||
|
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. use if os.path.isdir(os.path.join(self.installdir, 'composer_xe_%s' % self.version)): |
||
| prefix = "composer_xe_%s" % self.version | ||
|
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. move this above the |
||
| 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 | ||
| prefix = "composer_xe_%s" % self.version | ||
|
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, why did this change?
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. I don't know. I may have this file from a previous version. It has been in my modified easyblocks for a while .
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. Would'nt know. Can't remember that it was ever in or that I removed it.
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. OK, then make sure the |
||
| for v in vs: | ||
| v2 = "%s/%s" % (prefix, v) | ||
| dirmap[k].append(v2) | ||
| if os.path.isdir("%s/%s" % (self.installdir, v2)): | ||
|
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. use |
||
| dirmap[k].append(v2) | ||
|
|
||
| elif os.path.isdir("%s/compiler" % (self.installdir)): | ||
| prefix = "compiler" | ||
| if os.path.isdir("%s/compilers_and_libraries_%s/linux" % (self.installdir, self.version)): | ||
|
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. use |
||
| prefix = "compilers_and_libraries_%s/linux" % self.version | ||
| 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 = "%s/%s" % (prefix, v) | ||
| if os.path.exists("%s/%s" % (self.installdir, v2)): | ||
|
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. use if os.path.exists(os.path.join(self.installdir, prefix, v)): |
||
| dirmap[k].append(v2) | ||
|
|
||
| return dirmap | ||
|
|
||
| def make_module_extra(self): | ||
|
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 already done in (see #635) |
||
| """Add extra environment variables for icc, for license file and NLS path.""" | ||
| txt = super(EB_icc, self).make_module_extra() | ||
| txt += self.module_generator.prepend_paths(self.license_env_var, self.cfg['license_file'], allow_abs=True) | ||
| txt += self.module_generator.prepend_paths('NLSPATH', '$root/idb/intel64/locale/%l_%t/%N') | ||
| return txt | ||
|
|
||
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?