2016-10-28 03:58:31 +08:00
|
|
|
##############################################################################
|
|
|
|
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
|
|
|
# Produced at the Lawrence Livermore National Laboratory.
|
|
|
|
#
|
|
|
|
# This file is part of Spack.
|
|
|
|
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
|
|
|
# LLNL-CODE-647188
|
|
|
|
#
|
|
|
|
# For details, see https://github.com/llnl/spack
|
|
|
|
# Please also see the LICENSE file for our notice and the LGPL.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License (as
|
|
|
|
# published by the Free Software Foundation) version 2.1, February 1999.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
|
|
|
# conditions of the GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
##############################################################################
|
2016-05-13 11:04:45 +08:00
|
|
|
from spack import *
|
2016-05-14 07:12:48 +08:00
|
|
|
import os
|
|
|
|
import re
|
2016-05-13 11:04:45 +08:00
|
|
|
|
2016-05-15 23:19:55 +08:00
|
|
|
from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \
|
|
|
|
get_all_components
|
2016-05-13 11:04:45 +08:00
|
|
|
|
2016-05-14 07:12:48 +08:00
|
|
|
|
2016-05-14 06:16:07 +08:00
|
|
|
class IntelParallelStudio(IntelInstaller):
|
2017-03-24 04:58:12 +08:00
|
|
|
"""Intel Parallel Studio."""
|
2016-05-13 11:04:45 +08:00
|
|
|
|
|
|
|
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
|
|
|
|
|
2017-03-16 02:46:48 +08:00
|
|
|
version('professional.2017.2', '70e54b33d940a1609ff1d35d3c56e3b3',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11298/parallel_studio_xe_2017_update2.tgz')
|
|
|
|
version('cluster.2017.2', '70e54b33d940a1609ff1d35d3c56e3b3',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11298/parallel_studio_xe_2017_update2.tgz')
|
2017-03-16 07:51:18 +08:00
|
|
|
version('composer.2017.2', '2891ab1ece43eb61b6ab892f07c47f01',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz')
|
2017-03-01 04:57:10 +08:00
|
|
|
version('professional.2017.1', '7f75a4a7e2c563be778c377f9d35a542',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10973/parallel_studio_xe_2017_update1.tgz')
|
|
|
|
version('cluster.2017.1', '7f75a4a7e2c563be778c377f9d35a542',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10973/parallel_studio_xe_2017_update1.tgz')
|
|
|
|
version('composer.2017.1', '1f31976931ed8ec424ac7c3ef56f5e85',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz')
|
|
|
|
version('professional.2017.0', '34c98e3329d6ac57408b738ae1daaa01',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9651/parallel_studio_xe_2017.tgz')
|
|
|
|
version('cluster.2017.0', '34c98e3329d6ac57408b738ae1daaa01',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9651/parallel_studio_xe_2017.tgz')
|
|
|
|
version('composer.2017.0', 'b67da0065a17a05f110ed1d15c3c6312',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9656/parallel_studio_xe_2017_composer_edition.tgz')
|
|
|
|
version('professional.2016.4', '16a641a06b156bb647c8a56e71f3bb33',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9781/parallel_studio_xe_2016_update4.tgz')
|
|
|
|
version('cluster.2016.4', '16a641a06b156bb647c8a56e71f3bb33',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9781/parallel_studio_xe_2016_update4.tgz')
|
|
|
|
version('composer.2016.4', '2bc9bfc9be9c1968a6e42efb4378f40e',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz')
|
|
|
|
version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9061/parallel_studio_xe_2016_update3.tgz')
|
|
|
|
version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9061/parallel_studio_xe_2016_update3.tgz')
|
|
|
|
version('composer.2016.3', '3208eeabee951fc27579177b593cefe9',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz')
|
|
|
|
version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8676/parallel_studio_xe_2016_update2.tgz')
|
|
|
|
version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8676/parallel_studio_xe_2016_update2.tgz')
|
|
|
|
version('composer.2016.2', '1133fb831312eb519f7da897fec223fa',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz')
|
|
|
|
version('professional.2015.6', 'd460f362c30017b60f85da2e51ad25bf',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8469/parallel_studio_xe_2015_update6.tgz')
|
|
|
|
version('cluster.2015.6', 'd460f362c30017b60f85da2e51ad25bf',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8469/parallel_studio_xe_2015_update6.tgz')
|
|
|
|
version('composer.2015.6', 'da9f8600c18d43d58fba0488844f79c9',
|
|
|
|
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8432/l_compxe_2015.6.233.tgz')
|
2016-05-13 11:04:45 +08:00
|
|
|
|
|
|
|
variant('rpath', default=True, description="Add rpath to .cfg files")
|
2016-05-18 12:18:34 +08:00
|
|
|
variant('newdtags', default=False,
|
|
|
|
description="Allow use of --enable-new-dtags in MPI wrappers")
|
2016-05-14 07:12:48 +08:00
|
|
|
variant('all', default=False,
|
2016-05-15 23:19:55 +08:00
|
|
|
description="Install all files with the requested edition")
|
2016-05-14 07:12:48 +08:00
|
|
|
variant('mpi', default=True,
|
2016-05-15 23:19:55 +08:00
|
|
|
description="Install the Intel MPI library and ITAC tool")
|
2016-05-13 11:04:45 +08:00
|
|
|
variant('mkl', default=True, description="Install the Intel MKL library")
|
2016-05-14 07:12:48 +08:00
|
|
|
variant('daal',
|
2016-05-15 23:19:55 +08:00
|
|
|
default=True, description="Install the Intel DAAL libraries")
|
2016-05-13 11:04:45 +08:00
|
|
|
variant('ipp', default=True, description="Install the Intel IPP libraries")
|
2016-07-11 10:21:43 +08:00
|
|
|
variant('tools', default=True, description="Install the Intel Advisor, "
|
|
|
|
"VTune Amplifier, and Inspector tools")
|
2016-05-13 11:04:45 +08:00
|
|
|
|
2016-09-22 03:27:59 +08:00
|
|
|
variant('shared', default=True, description='Builds shared library')
|
|
|
|
variant('ilp64', default=False, description='64 bit integers')
|
|
|
|
variant('openmp', default=False, description='OpenMP multithreading layer')
|
|
|
|
|
2017-04-22 01:11:29 +08:00
|
|
|
provides('mpi', when='@cluster.0:cluster.9999+mpi')
|
2016-05-13 11:04:45 +08:00
|
|
|
provides('mkl', when='+mkl')
|
|
|
|
provides('daal', when='+daal')
|
|
|
|
provides('ipp', when='+ipp')
|
|
|
|
|
2016-07-26 05:01:49 +08:00
|
|
|
# virtual dependency
|
|
|
|
provides('blas', when='+mkl')
|
|
|
|
provides('lapack', when='+mkl')
|
2017-02-04 10:18:31 +08:00
|
|
|
provides('scalapack', when='+mkl')
|
2016-07-26 05:01:49 +08:00
|
|
|
|
2016-09-22 03:27:59 +08:00
|
|
|
@property
|
|
|
|
def blas_libs(self):
|
2017-04-22 01:11:29 +08:00
|
|
|
spec = self.spec
|
|
|
|
prefix = self.prefix
|
|
|
|
shared = '+shared' in spec
|
|
|
|
|
|
|
|
if '+ilp64' in spec:
|
|
|
|
mkl_integer = ['libmkl_intel_ilp64']
|
|
|
|
else:
|
|
|
|
mkl_integer = ['libmkl_intel_lp64']
|
|
|
|
|
2016-09-27 01:37:23 +08:00
|
|
|
mkl_threading = ['libmkl_sequential']
|
2017-04-22 01:11:29 +08:00
|
|
|
|
|
|
|
if '+openmp' in spec:
|
|
|
|
if '%intel' in spec:
|
|
|
|
mkl_threading = ['libmkl_intel_thread', 'libiomp5']
|
|
|
|
else:
|
|
|
|
mkl_threading = ['libmkl_gnu_thread']
|
|
|
|
|
2016-09-27 01:37:23 +08:00
|
|
|
# TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
|
2017-04-22 01:11:29 +08:00
|
|
|
|
|
|
|
mkl_root = join_path(prefix, 'mkl', 'lib', 'intel64')
|
|
|
|
|
2016-09-22 03:27:59 +08:00
|
|
|
mkl_libs = find_libraries(
|
|
|
|
mkl_integer + ['libmkl_core'] + mkl_threading,
|
2017-04-22 01:11:29 +08:00
|
|
|
root=mkl_root,
|
2016-09-22 03:27:59 +08:00
|
|
|
shared=shared
|
|
|
|
)
|
2017-04-22 01:11:29 +08:00
|
|
|
|
|
|
|
# Intel MKL link line advisor recommends these system libraries
|
|
|
|
system_libs = find_system_libraries(
|
|
|
|
['libpthread', 'libm', 'libdl'],
|
|
|
|
shared=shared
|
|
|
|
)
|
|
|
|
|
2016-09-22 03:27:59 +08:00
|
|
|
return mkl_libs + system_libs
|
|
|
|
|
|
|
|
@property
|
|
|
|
def lapack_libs(self):
|
2017-04-22 01:11:29 +08:00
|
|
|
return self.blas_libs
|
2016-09-22 03:27:59 +08:00
|
|
|
|
2017-02-04 10:18:31 +08:00
|
|
|
@property
|
|
|
|
def scalapack_libs(self):
|
|
|
|
libnames = ['libmkl_scalapack']
|
|
|
|
if self.spec.satisfies('^openmpi'):
|
|
|
|
libnames.append('libmkl_blacs_openmpi')
|
|
|
|
elif self.spec.satisfies('^mpich@1'):
|
|
|
|
libnames.append('libmkl_blacs')
|
|
|
|
elif self.spec.satisfies('^mpich@2:'):
|
|
|
|
libnames.append('libmkl_blacs_intelmpi')
|
|
|
|
elif self.spec.satisfies('^mvapich2'):
|
|
|
|
libnames.append('libmkl_blacs_intelmpi')
|
|
|
|
elif self.spec.satisfies('^mpt'):
|
|
|
|
libnames.append('libmkl_blacs_sgimpt')
|
|
|
|
# TODO: ^intel-parallel-studio can mean intel mpi, a compiler or a lib
|
|
|
|
# elif self.spec.satisfies('^intel-parallel-studio'):
|
|
|
|
# libnames.append('libmkl_blacs_intelmpi')
|
|
|
|
else:
|
|
|
|
raise InstallError("No MPI found for scalapack")
|
|
|
|
|
|
|
|
shared = True if '+shared' in self.spec else False
|
|
|
|
integer = 'ilp64' if '+ilp64' in self.spec else 'lp64'
|
|
|
|
libs = find_libraries(
|
|
|
|
['{0}_{1}'.format(l, integer) for l in libnames],
|
|
|
|
root=join_path(self.prefix, 'mkl', 'lib', 'intel64'),
|
|
|
|
shared=shared
|
|
|
|
)
|
|
|
|
return libs
|
|
|
|
|
2016-05-13 11:04:45 +08:00
|
|
|
def install(self, spec, prefix):
|
2016-05-14 07:12:48 +08:00
|
|
|
base_components = "ALL" # when in doubt, install everything
|
2016-05-13 11:04:45 +08:00
|
|
|
mpi_components = ""
|
|
|
|
mkl_components = ""
|
|
|
|
daal_components = ""
|
|
|
|
ipp_components = ""
|
|
|
|
|
2016-07-11 10:21:43 +08:00
|
|
|
if not spec.satisfies('+all'):
|
2016-05-14 06:16:07 +08:00
|
|
|
all_components = get_all_components()
|
2016-12-03 02:35:36 +08:00
|
|
|
regex = '(comp|openmp|intel-tbb|icc|ifort|psxe)'
|
2016-05-15 23:19:55 +08:00
|
|
|
base_components = \
|
|
|
|
filter_pick(all_components, re.compile(regex).search)
|
2016-07-26 05:02:15 +08:00
|
|
|
regex = '(icsxe|imb|mpi|itac|intel-ta|intel-tc|clck)'
|
2016-05-15 23:19:55 +08:00
|
|
|
mpi_components = \
|
|
|
|
filter_pick(all_components, re.compile(regex).search)
|
|
|
|
mkl_components = \
|
|
|
|
filter_pick(all_components, re.compile('(mkl)').search)
|
|
|
|
daal_components = \
|
|
|
|
filter_pick(all_components, re.compile('(daal)').search)
|
|
|
|
ipp_components = \
|
|
|
|
filter_pick(all_components, re.compile('(ipp)').search)
|
|
|
|
regex = '(gdb|vtune|inspector|advisor)'
|
|
|
|
tool_components = \
|
|
|
|
filter_pick(all_components, re.compile(regex).search)
|
2016-07-11 10:21:43 +08:00
|
|
|
components = base_components
|
2016-05-13 11:04:45 +08:00
|
|
|
|
|
|
|
if not spec.satisfies('+all'):
|
2016-07-14 05:46:43 +08:00
|
|
|
if spec.satisfies('+mpi'):
|
2016-05-13 11:04:45 +08:00
|
|
|
components += mpi_components
|
|
|
|
if spec.satisfies('+mkl'):
|
|
|
|
components += mkl_components
|
|
|
|
if spec.satisfies('+daal'):
|
|
|
|
components += daal_components
|
|
|
|
if spec.satisfies('+ipp'):
|
|
|
|
components += ipp_components
|
2016-05-15 23:19:55 +08:00
|
|
|
if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
|
2016-08-10 16:50:00 +08:00
|
|
|
spec.satisfies('@professional')):
|
2016-05-13 11:04:45 +08:00
|
|
|
components += tool_components
|
|
|
|
|
2016-07-11 10:21:43 +08:00
|
|
|
if spec.satisfies('+all'):
|
|
|
|
self.intel_components = 'ALL'
|
|
|
|
else:
|
|
|
|
self.intel_components = ';'.join(components)
|
2016-05-13 11:04:45 +08:00
|
|
|
IntelInstaller.install(self, spec, prefix)
|
|
|
|
|
2016-08-10 16:50:00 +08:00
|
|
|
absbindir = os.path.dirname(
|
|
|
|
os.path.realpath(os.path.join(self.prefix.bin, "icc")))
|
|
|
|
abslibdir = os.path.dirname(
|
|
|
|
os.path.realpath(os.path.join(
|
|
|
|
self.prefix.lib, "intel64", "libimf.a")))
|
2016-05-14 07:12:48 +08:00
|
|
|
|
|
|
|
os.symlink(self.global_license_file, os.path.join(absbindir,
|
2016-05-15 23:19:55 +08:00
|
|
|
"license.lic"))
|
|
|
|
if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
|
|
|
|
spec.satisfies('@professional')):
|
2016-10-30 05:30:00 +08:00
|
|
|
inspector_dir = "inspector_xe/licenses"
|
|
|
|
advisor_dir = "advisor_xe/licenses"
|
|
|
|
vtune_amplifier_dir = "vtune_amplifier_xe/licenses"
|
|
|
|
|
|
|
|
year = int(str(self.version).split('.')[1])
|
|
|
|
if year >= 2017:
|
|
|
|
inspector_dir = "inspector/licenses"
|
|
|
|
advisor_dir = "advisor/licenses"
|
|
|
|
|
|
|
|
os.mkdir(os.path.join(self.prefix, inspector_dir))
|
2016-05-14 07:12:48 +08:00
|
|
|
os.symlink(self.global_license_file, os.path.join(
|
2016-10-30 05:30:00 +08:00
|
|
|
self.prefix, inspector_dir, "license.lic"))
|
|
|
|
os.mkdir(os.path.join(self.prefix, advisor_dir))
|
2016-05-14 07:12:48 +08:00
|
|
|
os.symlink(self.global_license_file, os.path.join(
|
2016-10-30 05:30:00 +08:00
|
|
|
self.prefix, advisor_dir, "license.lic"))
|
|
|
|
os.mkdir(os.path.join(self.prefix, vtune_amplifier_dir))
|
2016-05-14 07:12:48 +08:00
|
|
|
os.symlink(self.global_license_file, os.path.join(
|
2016-10-30 05:30:00 +08:00
|
|
|
self.prefix, vtune_amplifier_dir, "license.lic"))
|
2016-05-13 11:04:45 +08:00
|
|
|
|
2016-05-15 23:19:55 +08:00
|
|
|
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
|
|
|
|
spec.satisfies('@cluster'):
|
2016-08-10 16:50:00 +08:00
|
|
|
for ifile in os.listdir(os.path.join(self.prefix, "itac")):
|
|
|
|
if os.path.isdir(os.path.join(self.prefix, "itac", ifile)):
|
|
|
|
os.symlink(self.global_license_file,
|
|
|
|
os.path.join(self.prefix, "itac", ifile,
|
|
|
|
"license.lic"))
|
|
|
|
if os.path.isdir(os.path.join(self.prefix, "itac",
|
|
|
|
ifile, "intel64")):
|
|
|
|
os.symlink(self.global_license_file,
|
|
|
|
os.path.join(self.prefix, "itac",
|
|
|
|
ifile, "intel64",
|
|
|
|
"license.lic"))
|
|
|
|
if spec.satisfies('~newdtags'):
|
|
|
|
wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
|
|
|
|
"mpigcc", "mpigcc", "mpigxx", "mpigxx",
|
|
|
|
"mpiicc", "mpiicc", "mpiicpc", "mpiicpc",
|
|
|
|
"mpiifort", "mpiifort"]
|
|
|
|
wrapper_paths = []
|
|
|
|
for root, dirs, files in os.walk(spec.prefix):
|
|
|
|
for name in files:
|
|
|
|
if name in wrappers:
|
|
|
|
wrapper_paths.append(os.path.join(spec.prefix,
|
|
|
|
root, name))
|
|
|
|
for wrapper in wrapper_paths:
|
|
|
|
filter_file(r'-Xlinker --enable-new-dtags', r' ',
|
|
|
|
wrapper)
|
2016-05-13 11:04:45 +08:00
|
|
|
|
|
|
|
if spec.satisfies('+rpath'):
|
|
|
|
for compiler_command in ["icc", "icpc", "ifort"]:
|
2016-05-15 23:19:55 +08:00
|
|
|
cfgfilename = os.path.join(absbindir, "%s.cfg" %
|
|
|
|
compiler_command)
|
2016-05-13 11:04:45 +08:00
|
|
|
with open(cfgfilename, "w") as f:
|
2016-05-14 07:12:48 +08:00
|
|
|
f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
|
2016-05-13 11:04:45 +08:00
|
|
|
|
2016-05-14 07:12:48 +08:00
|
|
|
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
|
2016-05-15 23:19:55 +08:00
|
|
|
os.path.join(self.prefix.man, "man1"))
|
2016-07-11 10:21:43 +08:00
|
|
|
|
|
|
|
def setup_environment(self, spack_env, run_env):
|
2016-07-14 05:46:43 +08:00
|
|
|
# TODO: Determine variables needed for the professional edition.
|
|
|
|
|
2016-07-11 10:21:43 +08:00
|
|
|
major_ver = self.version[1]
|
|
|
|
|
|
|
|
# Remove paths that were guessed but are incorrect for this package.
|
|
|
|
run_env.remove_path('LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib'))
|
|
|
|
run_env.remove_path('LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib'))
|
|
|
|
run_env.remove_path('CPATH',
|
|
|
|
join_path(self.prefix, 'include'))
|
|
|
|
|
|
|
|
# Add the default set of variables
|
|
|
|
run_env.prepend_path('LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib', 'intel64'))
|
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib', 'intel64'))
|
|
|
|
run_env.prepend_path('LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'tbb', 'lib',
|
|
|
|
'intel64', 'gcc4.4'))
|
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'tbb', 'lib',
|
|
|
|
'intel64', 'gcc4.4'))
|
|
|
|
run_env.prepend_path('CPATH',
|
|
|
|
join_path(self.prefix, 'tbb', 'include'))
|
|
|
|
run_env.prepend_path('MIC_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib', 'mic'))
|
|
|
|
run_env.prepend_path('MIC_LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'lib', 'mic'))
|
|
|
|
run_env.prepend_path('MIC_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'tbb', 'lib', 'mic'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('MIC_LD_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'tbb', 'lib', 'mic'))
|
2016-07-11 10:21:43 +08:00
|
|
|
|
|
|
|
if self.spec.satisfies('+all'):
|
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix,
|
|
|
|
'debugger_{0}'.format(major_ver),
|
|
|
|
'libipt', 'intel64', 'lib'))
|
|
|
|
run_env.set('GDBSERVER_MIC',
|
|
|
|
join_path(self.prefix,
|
|
|
|
'debugger_{0}'.format(major_ver), 'gdb',
|
|
|
|
'targets', 'mic', 'bin', 'gdbserver'))
|
|
|
|
run_env.set('GDB_CROSS',
|
|
|
|
join_path(self.prefix,
|
|
|
|
'debugger_{0}'.format(major_ver),
|
|
|
|
'gdb', 'intel64_mic', 'bin', 'gdb-mic'))
|
|
|
|
run_env.set('MPM_LAUNCHER',
|
|
|
|
join_path(self.prefix,
|
|
|
|
'debugger_{0}'.format(major_ver), 'mpm',
|
|
|
|
'mic',
|
|
|
|
'bin', 'start_mpm.sh'))
|
|
|
|
run_env.set('INTEL_PYTHONHOME',
|
|
|
|
join_path(self.prefix,
|
|
|
|
'debugger_{0}'.format(major_ver), 'python',
|
|
|
|
'intel64'))
|
|
|
|
|
2016-07-14 05:46:43 +08:00
|
|
|
if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')):
|
|
|
|
# Only I_MPI_ROOT is set here because setting the various PATH
|
|
|
|
# variables will potentially be in conflict with other MPI
|
|
|
|
# environment modules. The I_MPI_ROOT environment variable can be
|
|
|
|
# used as a base to set necessary PATH variables for using Intel
|
|
|
|
# MPI. It is also possible to set the variables in the modules.yaml
|
|
|
|
# file if Intel MPI is the dominant, or only, MPI on a system.
|
2016-07-12 20:37:36 +08:00
|
|
|
run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
|
2016-07-11 10:21:43 +08:00
|
|
|
|
|
|
|
if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
|
2016-12-03 02:35:36 +08:00
|
|
|
spack_env.set('MKLROOT', join_path(self.prefix, 'mkl'))
|
2016-07-26 05:01:49 +08:00
|
|
|
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'mkl', 'lib',
|
|
|
|
'intel64'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'mkl', 'lib',
|
|
|
|
'intel64'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('CPATH',
|
|
|
|
join_path(self.prefix, 'mkl', 'include'))
|
|
|
|
run_env.prepend_path('MIC_LD_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'mkl', 'lib', 'mic'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.set('MKLROOT', join_path(self.prefix, 'mkl'))
|
|
|
|
|
|
|
|
if self.spec.satisfies('+all') or self.spec.satisfies('+daal'):
|
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'daal', 'lib',
|
|
|
|
'intel64_lin'))
|
|
|
|
run_env.prepend_path('LIBRARY_PATH',
|
|
|
|
join_path(self.prefix, 'daal', 'lib',
|
|
|
|
'intel64_lin'))
|
|
|
|
run_env.prepend_path('CPATH',
|
|
|
|
join_path(self.prefix, 'daal', 'include'))
|
|
|
|
run_env.prepend_path('CLASSPATH',
|
|
|
|
join_path(self.prefix, 'daal', 'lib',
|
|
|
|
'daal.jar'))
|
|
|
|
run_env.set('DAALROOT', join_path(self.prefix, 'daal'))
|
|
|
|
|
|
|
|
if self.spec.satisfies('+all') or self.spec.satisfies('+ipp'):
|
|
|
|
run_env.prepend_path('LD_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'ipp', 'lib',
|
|
|
|
'intel64'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'ipp', 'lib',
|
|
|
|
'intel64'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.prepend_path('CPATH',
|
|
|
|
join_path(self.prefix, 'ipp', 'include'))
|
|
|
|
run_env.prepend_path('MIC_LD_LIBRARY_PATH',
|
2016-07-11 10:59:46 +08:00
|
|
|
join_path(self.prefix, 'ipp', 'lib', 'mic'))
|
2016-07-11 10:21:43 +08:00
|
|
|
run_env.set('IPPROOT', join_path(self.prefix, 'ipp'))
|
2017-03-24 04:58:12 +08:00
|
|
|
|
|
|
|
if self.spec.satisfies('+all') or self.spec.satisfies('+tools'):
|
|
|
|
run_env.prepend_path('PATH',
|
|
|
|
join_path(self.prefix, 'vtune_amplifier_xe',
|
|
|
|
'bin64'))
|
|
|
|
run_env.prepend_path('VTUNE_AMPLIFIER_XE_{0}_DIR'.format(
|
|
|
|
major_ver),
|
|
|
|
join_path(self.prefix, 'vtune_amplifier_xe'))
|