Skip to content
Merged
Changes from 2 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
95 changes: 65 additions & 30 deletions easybuild/easyblocks/i/icc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Member

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?

}
super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=cfg_extras_map)
Copy link
Member

Choose a reason for hiding this comment

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

this will crash for non-2016 versions, since cfg_extras_map is not defined

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)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

If we pass COMPONENTS=ALL, we get mkl, ipp, tbb, gdb and a whole other bunch of stuff installed. Do we want this? It actually makes the easyconfigs for the MKL, TBB, etc redundant. We can specify a subset of ALL:

intel-comp-l-all-vars__noarch
intel-comp-l-all-common__noarch
intel-comp-l-ps-common__noarch
intel-comp-l-all-devel__i486
intel-comp-l-ps-ss-devel__i486
intel-comp-l-all__i486
intel-comp-l-ps-ss-wrapper__i486
intel-comp-l-all-devel__x86_64
intel-comp-l-ps-devel__x86_64
intel-comp-l-ps-ss-devel__x86_64
intel-openmp-l-all__i486
intel-openmp-l-ps__i486
intel-openmp-l-all__x86_64
intel-openmp-l-ps-mic__x86_64
intel-openmp-l-ps__x86_64
intel-openmp-l-ps-ss__x86_64
intel-openmp-l-all-devel__i486
intel-openmp-l-all-devel__x86_64
intel-openmp-l-ps-mic-devel__x86_64
intel-openmp-l-ps-devel__x86_64
intel-openmp-l-ps-ss-devel__x86_64
intel-tbb-libs__noarch
intel-comp-all-doc__noarch
intel-comp-ps-ss-doc__noarch
intel-icc-doc__noarch
intel-icc-ps-doc__noarch
intel-icc-ps-ss-doc__noarch
intel-ifort-ps-doc__noarch
intel-icc-l-all__x86_64
intel-icc-l-ps-ss__x86_64
intel-icc-l-all-vars__noarch
intel-icc-l-all-common__noarch
intel-icc-l-ps-common__noarch
intel-icc-l-all__i486
intel-icc-l-ps-ss-wrapper__i486
intel-icc-l-all-devel__i486
intel-icc-l-all-devel__x86_64
intel-icc-l-ps-devel__x86_64
intel-icc-l-ps-ss-devel__x86_64
intel-ifort-l-ps__i486
intel-ifort-l-ps__x86_64
intel-ifort-l-ps-vars__noarch
intel-ifort-l-ps-common__noarch
intel-ifort-l-ps-devel__i486
intel-ifort-l-ps-devel__x86_64
intel-mpirt-l-ps__i486
intel-mkl__i486
intel-mkl-ps__i486
intel-mkl__x86_64
intel-mkl-ps__x86_64
intel-mkl-common__noarch
intel-mkl-ps-common__noarch
intel-mkl-devel__x86_64
intel-mkl-ps-mic-devel__x86_64
intel-mkl-ps-f95-devel__x86_64
intel-mkl-gnu-devel__x86_64
intel-mkl-ps-gnu-devel__x86_64
intel-mkl-ps-pgi-devel__x86_64
intel-mkl-sp2dp-devel__x86_64
intel-mkl-ps-cluster-devel__x86_64
intel-mkl-devel__i486
intel-mkl-ps-f95-devel__i486
intel-mkl-gnu-devel__i486
intel-mkl-ps-gnu-devel__i486
intel-mkl-ps-pgi-devel__i486
intel-mkl-ps-cluster-common__noarch
intel-mkl-ps-f95-common__noarch
intel-mkl-ps-cluster__x86_64
intel-mkl-gnu__x86_64
intel-mkl-ps-gnu__x86_64
intel-mkl-ps-pgi__x86_64
intel-mkl-sp2dp__x86_64
intel-mkl-ps-mic__x86_64
intel-mkl-gnu__i486
intel-mkl-ps-gnu__i486
intel-mkl-ps-pgi__i486
intel-mkl-doc__noarch
intel-mkl-ps-doc__noarch
intel-mkl-ps-tbb__i486
intel-mkl-ps-tbb-devel__i486
intel-mkl-ps-tbb__x86_64
intel-mkl-ps-tbb-devel__x86_64
intel-mkl-ps-tbb-mic__x86_64
intel-mkl-ps-tbb-mic-devel__x86_64
intel-ipp-l-common__noarch
intel-ipp-l-ps-common__noarch
intel-ipp-l-st-devel__i486
intel-ipp-l-st__i486
intel-ipp-l-st__x86_64
intel-ipp-l-mt__i486
intel-ipp-l-mt__x86_64
intel-ipp-l-st-devel__x86_64
intel-ipp-l-ps-st-devel__x86_64
intel-ipp-l-mt-devel__i486
intel-ipp-l-mt-devel__x86_64
intel-ipp-l-doc__noarch
intel-ipp-l-ps-doc__noarch
intel-crypto-ipp-st-devel__i486
intel-crypto-ipp-st-devel__x86_64
intel-crypto-ipp-ps-st-devel__x86_64
intel-crypto-ipp-st__x86_64
intel-crypto-ipp-st__i486
intel-crypto-ipp-mt-devel__i486
intel-crypto-ipp-mt-devel__x86_64
intel-crypto-ipp-mt__x86_64
intel-crypto-ipp-mt__i486
intel-crypto-ipp-ss-st-devel__i486
intel-crypto-ipp-ss-st-devel__x86_64
intel-crypto-ipp-common__noarch
intel-crypto-ipp-doc__noarch
intel-tbb-source__noarch
intel-tbb-devel__noarch
intel-tbb-common__noarch
intel-tbb-ps-common__noarch
intel-tbb-doc__noarch
intel-daal__i486
intel-daal__x86_64
intel-daal-common__noarch
intel-daal-doc__noarch
intel-gdb-gt__x86_64
intel-gdb-gt-src__noarch
intel-gdb-gt-libelfdwarf__x86_64
intel-gdb-gt-devel__x86_64
intel-gdb-gt-common__noarch
intel-gdb-gt-doc__noarch
intel-gdb-ps-cdt__x86_64
intel-gdb-ps-cdt-source__x86_64
intel-gdb-ps-mic__x86_64
intel-gdb-ps-mpm__x86_64
intel-gdb-ps-doc__noarch
intel-gdb-ps-doc-jp__noarch
intel-gdb__i486
intel-gdb__x86_64
intel-gdb-source__noarch
intel-gdb-python-source__noarch
intel-gdb-common__noarch
intel-gdb-doc__noarch
intel-icsxe__noarch
intel-ips__noarch
intel-ipsc__noarch
intel-ipsf__noarch
intel-compxe__noarch
intel-ccompxe__noarch
intel-fcompxe__noarch
intel-ipp-psxe__noarch
intel-mkl-psxe__noarch
intel-tbb-psxe__noarch
intel-daal-psxe__noarch
intel-mpi-psxe__x86_64
intel-mpi-rt-psxe__x86_64
intel-psf-ia__i486
intel-psf-intel__x86_64
intel-gdb-ps-common__noarch
intel-psxe-common__noarch
intel-psxe-doc__noarch
intel-ccomp-doc__noarch
intel-fcomp-doc__noarch
intel-icsxe-doc__noarch
intel-ips-doc__noarch
intel-ipsc-doc__noarch
intel-ipsf-doc__noarch
intel-compxe-doc__noarch
intel-ccompxe-doc__noarch
intel-fcompxe-doc__noarch
intel-icsxe-pset

Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

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

trail and error. But most are clear what they mean.

Copy link
Member

Choose a reason for hiding this comment

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

Seriously? There's no proper documentation for this?

Copy link
Member

Choose a reason for hiding this comment

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


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"
Copy link
Member

Choose a reason for hiding this comment

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

no need to redefine it, since it's the same as above?

Copy link
Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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"
Copy link
Member

Choose a reason for hiding this comment

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

since the binprefix has remained the same, how about this:

elif LooseVersion(self.version) >= LooseVersion("2013_sp1"):
    binprefix = "bin"
    if LooseVersion(self.version) >= LooseVersion("2016"):
        libprefix = "lib/intel64_lin"

Copy link
Author

Choose a reason for hiding this comment

The 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"]],
Copy link
Member

Choose a reason for hiding this comment

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

this should use os.path.join (mostly because of code style):

[os.path.join(binprefix, x) for x in binfiles] +
[os.path.join(libprefix, 'lib%s' % x) for x in ['iomp5.a', 'iomp5.so']],

Copy link
Author

Choose a reason for hiding this comment

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

will change

'dirs': [],
}

Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The 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]
Copy link
Member

Choose a reason for hiding this comment

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

only used for version > 2016, so define it in the block where it's used

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']
Copy link
Member

Choose a reason for hiding this comment

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

lib used to be there, keep it there? may be needed for older compiler versions

and please keep the order as it was, i.e. list lib, lib/intel64 last (so they'll be prepended last to $LD_LIBRARY_PATH, and get preference over the other subdirs)

Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Author

Choose a reason for hiding this comment

The 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
Same for daal, include, ipp, man, mkl and tbb in $root.

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
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/mpi/intel64/lib
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/ipp/../compiler/lib/intel64
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/ipp/lib/intel64
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/tbb/lib/intel64/gcc4.4
.../icc/2016.0.109/debugger_2016/libipt/intel64/lib
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/daal/lib/intel64_lin
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/daal/../tbb/lib/intel64_lin/gcc4.4
.../icc/2016.0.109/compilers_and_libraries_2016.0.109/linux/daal/../compiler/lib/intel64_lin

Copy link
Member

Choose a reason for hiding this comment

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

For new versions, yes, but not for (really) old versions:

-bash-4.1$ ls -ld $EASYBUILD_PREFIX/software/icc/*/lib
drwxr-xr-x 4 vsc40023 vsc40023 4096 Sep  1 02:43 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/11.1.073-32bit/lib
drwxr-xr-x 4 vsc40023 vsc40023 4096 Sep  1 02:43 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/11.1.073/lib
drwxr-xr-x 3 vsc40023 vsc40023 4096 Sep  1 02:43 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/11.1.075/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:44 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2011.3.174/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:51 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2013_sp1.0.080/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:52 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2013_sp1.1.106/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:52 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2013_sp1.2.144/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:53 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2013_sp1.3.174/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:54 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2013_sp1.4.211/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 03:01 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.0.090-GCC-4.9.2/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:54 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.0.090/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 03:02 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.1.133-GCC-4.9.2/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:56 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.1.133/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 03:02 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.2.164-GCC-4.9.2/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 10:27 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.3.187-GNU-4.9.3-2.25/lib -> composerxe/lib
lrwxrwxrwx 1 vsc40023 vsc40023   14 Sep  1 02:56 /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/icc/2015.3.187/lib -> composerxe/lib

dirmap = {
'PATH': ['bin/intel64', 'tbb/bin/intel64', 'ipp/bin/intel64', 'debugger/gdb/intel64/bin'],
Copy link
Member

Choose a reason for hiding this comment

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

same here, don't drop bin

'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']
}
Copy link
Member

Choose a reason for hiding this comment

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

IDB_HOME is no longer set?

Copy link
Author

Choose a reason for hiding this comment

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

nope. Intel dropped IDB in favor of GDB.
Though only these two got set:
GDBSERVER_MIC=/glb/home/s_hpcssw/easybuildinstall/software/rhel/6/icc/2016.0.109/debugger_2016/gdb/targets/mic/bin/gdbserver
GDB_CROSS=/glb/home/s_hpcssw/easybuildinstall/software/rhel/6/icc/2016.0.109/debugger_2016/gdb/intel64_mic/bin/gdb-mic

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']
Copy link
Member

Choose a reason for hiding this comment

The 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,
Copy link
Member

Choose a reason for hiding this comment

The 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)):
Copy link
Member

Choose a reason for hiding this comment

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

use os.path.join while you're at it:

if os.path.isdir(os.path.join(self.installdir, 'composer_xe_%s' % self.version)):

prefix = "composer_xe_%s" % self.version
Copy link
Member

Choose a reason for hiding this comment

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

move this above the if, and use prefix in the if condition (in the os.path.join)

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
Copy link
Member

Choose a reason for hiding this comment

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

hmm, why did this change?

Copy link
Author

Choose a reason for hiding this comment

The 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 .

Copy link
Author

Choose a reason for hiding this comment

The 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.
If I removed it, it likely didn't work in our installs of 2013.sp1 and 2015 releases.

Copy link
Member

Choose a reason for hiding this comment

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

OK, then make sure the if/else version is retained, there's probably a good reason it's there.

for v in vs:
v2 = "%s/%s" % (prefix, v)
dirmap[k].append(v2)
if os.path.isdir("%s/%s" % (self.installdir, v2)):
Copy link
Member

Choose a reason for hiding this comment

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

use os.path.join please

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)):
Copy link
Member

Choose a reason for hiding this comment

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

use os.path.join please

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)):
Copy link
Member

Choose a reason for hiding this comment

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

use os.path.join:

if os.path.exists(os.path.join(self.installdir, prefix, v)):

dirmap[k].append(v2)

return dirmap

def make_module_extra(self):
Copy link
Member

Choose a reason for hiding this comment

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

this is already done in IntelBase now, shouldn't be needed to override it

(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