summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py143
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py47
-rw-r--r--var/spack/repos/builtin/packages/jdk/package.py20
-rw-r--r--var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch10
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py12
-rw-r--r--var/spack/repos/builtin/packages/openssl/package.py65
-rw-r--r--var/spack/repos/builtin/packages/tcl/package.py2
8 files changed, 214 insertions, 86 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 224105ea0f..72a5cb22f8 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -15,6 +15,7 @@ class Gcc(Package):
list_depth = 2
version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1')
+ version('5.4.0', '4c626ac2a83ef30dfb9260e6f59c2b30')
version('5.3.0', 'c9616fd448f980259c31de613e575719')
version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467')
version('4.9.3', '6f831b4d251872736e8e9cc09746f327')
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index 493ca16417..fb98b2473c 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -42,15 +42,27 @@ class IntelParallelStudio(IntelInstaller):
variant('daal',
default=True, description="Install the Intel DAAL libraries")
variant('ipp', default=True, description="Install the Intel IPP libraries")
- variant('tools', default=True, description="""Install the Intel Advisor,\
-VTune Amplifier, and Inspector tools""")
+ variant('tools', default=True, description="Install the Intel Advisor, "
+ "VTune Amplifier, and Inspector tools")
provides('mpi', when='@cluster:+mpi')
provides('mkl', when='+mkl')
provides('daal', when='+daal')
provides('ipp', when='+ipp')
+ def check_variants(self, spec):
+ error_message = '\t{variant} can not be turned off if "+all" is set'
+
+ if self.spec.satisfies('+all'):
+ errors = [error_message.format(variant=x)
+ for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools')
+ if ('~' + x) in self.spec]
+ if errors:
+ errors = ['incompatible variants given'] + errors
+ raise InstallError('\n'.join(errors))
+
def install(self, spec, prefix):
+ self.check_variants(spec)
base_components = "ALL" # when in doubt, install everything
mpi_components = ""
@@ -58,9 +70,7 @@ VTune Amplifier, and Inspector tools""")
daal_components = ""
ipp_components = ""
- if spec.satisfies('+all'):
- base_components = "ALL"
- else:
+ if not spec.satisfies('+all'):
all_components = get_all_components()
regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
base_components = \
@@ -77,10 +87,10 @@ VTune Amplifier, and Inspector tools""")
regex = '(gdb|vtune|inspector|advisor)'
tool_components = \
filter_pick(all_components, re.compile(regex).search)
+ components = base_components
- components = base_components
if not spec.satisfies('+all'):
- if spec.satisfies('+mpi') and 'cluster' in str(spec.version):
+ if spec.satisfies('+mpi'):
components += mpi_components
if spec.satisfies('+mkl'):
components += mkl_components
@@ -92,7 +102,10 @@ VTune Amplifier, and Inspector tools""")
spec.satisfies('@professional')):
components += tool_components
- self.intel_components = ';'.join(components)
+ if spec.satisfies('+all'):
+ self.intel_components = 'ALL'
+ else:
+ self.intel_components = ';'.join(components)
IntelInstaller.install(self, spec, prefix)
absbindir = os.path.dirname(os.path.realpath(os.path.join(
@@ -116,8 +129,11 @@ VTune Amplifier, and Inspector tools""")
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
spec.satisfies('@cluster'):
- os.symlink(self.global_license_file, os.path.join(
- self.prefix, "itac_latest", "license.lic"))
+ 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 spec.satisfies('~newdtags'):
wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
"mpigcc", "mpigcc", "mpigxx", "mpigxx",
@@ -142,3 +158,110 @@ VTune Amplifier, and Inspector tools""")
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
os.path.join(self.prefix.man, "man1"))
+
+ def setup_environment(self, spack_env, run_env):
+ # TODO: Determine variables needed for the professional edition.
+
+ 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',
+ join_path(self.prefix, 'tbb', 'lib', 'mic'))
+ run_env.prepend_path('MIC_LD_LIBRARY_PATH',
+ join_path(self.prefix, 'tbb', 'lib', 'mic'))
+
+ 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'))
+
+ 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.
+ run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
+
+ if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
+ run_env.prepend_path('LD_LIBRARY_PATH',
+ join_path(self.prefix, 'mkl', 'lib',
+ 'intel64'))
+ run_env.prepend_path('LIBRARY_PATH',
+ join_path(self.prefix, 'mkl', 'lib',
+ 'intel64'))
+ run_env.prepend_path('CPATH',
+ join_path(self.prefix, 'mkl', 'include'))
+ run_env.prepend_path('MIC_LD_LIBRARY_PATH',
+ join_path(self.prefix, 'mkl', 'lib', 'mic'))
+ 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',
+ join_path(self.prefix, 'ipp', 'lib',
+ 'intel64'))
+ run_env.prepend_path('LIBRARY_PATH',
+ join_path(self.prefix, 'ipp', 'lib',
+ 'intel64'))
+ run_env.prepend_path('CPATH',
+ join_path(self.prefix, 'ipp', 'include'))
+ run_env.prepend_path('MIC_LD_LIBRARY_PATH',
+ join_path(self.prefix, 'ipp', 'lib', 'mic'))
+ run_env.set('IPPROOT', join_path(self.prefix, 'ipp'))
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
index 56d9fabddf..d171411946 100644
--- a/var/spack/repos/builtin/packages/intel/package.py
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -49,13 +49,6 @@ class IntelInstaller(Package):
def install(self, spec, prefix):
- # Remove the installation DB, otherwise it will try to install into
- # location of other Intel builds
- if os.path.exists(os.path.join(os.environ["HOME"], "intel",
- "intel_sdp_products.db")):
- os.remove(os.path.join(os.environ["HOME"], "intel",
- "intel_sdp_products.db"))
-
if not hasattr(self, "intel_prefix"):
self.intel_prefix = self.prefix
@@ -66,12 +59,14 @@ ACCEPT_EULA=accept
PSET_MODE=install
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
PSET_INSTALL_DIR=%s
+NONRPM_DB_DIR=%s
ACTIVATION_LICENSE_FILE=%s
ACTIVATION_TYPE=license_file
PHONEHOME_SEND_USAGE_DATA=no
CONTINUE_WITH_OPTIONAL_ERROR=yes
COMPONENTS=%s
-""" % (self.intel_prefix, self.global_license_file, self.intel_components))
+""" % (self.intel_prefix, self.intel_prefix, self.global_license_file,
+ self.intel_components))
install_script = Executable("./install.sh")
install_script('--silent', silent_config_filename)
@@ -111,8 +106,8 @@ class Intel(IntelInstaller):
self.prefix.lib, "intel64", "libimf.a")))[0]
# symlink or copy?
- os.symlink(self.global_license_file, os.path.join(absbindir,
- "license.lic"))
+ os.symlink(self.global_license_file,
+ os.path.join(absbindir, "license.lic"))
if spec.satisfies('+rpath'):
for compiler_command in ["icc", "icpc", "ifort"]:
@@ -123,3 +118,35 @@ class Intel(IntelInstaller):
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
os.path.join(self.prefix.man, "man1"))
+
+ def setup_environment(self, spack_env, run_env):
+
+ # 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',
+ join_path(self.prefix, 'tbb', 'lib', 'mic'))
+ run_env.prepend_path('MIC_LD_LIBRARY_PATH',
+ join_path(self.prefix, 'tbb', 'lib', 'mic'))
diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py
index 2ec86f05e3..593a6d8340 100644
--- a/var/spack/repos/builtin/packages/jdk/package.py
+++ b/var/spack/repos/builtin/packages/jdk/package.py
@@ -22,34 +22,35 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-#------------------------------------------------------------------------------
+#
# Author: Justin Too <too1@llnl.gov>
-#------------------------------------------------------------------------------
+#
import distutils
-from distutils import dir_util
-from subprocess import call
import spack
from spack import *
import llnl.util.tty as tty
+
class Jdk(Package):
"""The Java Development Kit (JDK) released by Oracle Corporation
in the form of a binary product aimed at Java developers."""
- homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" # noqa: E501
version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf',
url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz")
+ version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4',
+ url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz")
# Oracle requires that you accept their License Agreement in order
# to access the Java packages in download.oracle.com. In order to
# automate this process, we need to utilize these additional curl
# commandline options.
#
- # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux
- curl_options=[
- '-j', # junk cookies
- '-H', # specify required License Agreement cookie
+ # See http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux # noqa: E501
+ curl_options = [
+ '-j', # junk cookies
+ '-H', # specify required License Agreement cookie
'Cookie: oraclelicense=accept-securebackup-cookie']
def do_fetch(self, mirror_only=False):
@@ -65,6 +66,5 @@ class Jdk(Package):
# Now perform the actual fetch
super(Jdk, self).do_fetch(mirror_only)
-
def install(self, spec, prefix):
distutils.dir_util.copy_tree(".", prefix)
diff --git a/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch b/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch
new file mode 100644
index 0000000000..70f0d47925
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.in 2016-07-21 13:03:27.861000000 -0400
++++ b/Makefile.in 2016-07-21 13:03:58.416000000 -0400
+@@ -197,6 +197,7 @@
+ -e 's|@colorize@|$(COLORIZE)|g' \
+ -e 's|@duplicate_paths@|$(DUPLICATE_PATHS)|g' \
+ -e 's|@allow_tcl_mfiles@|$(ALLOW_TCL_MFILES)|g' \
++ -e 's|@path_to_tclsh@|$(PATH_TO_TCLSH)|g' \
+ -e 's|@mpath_avail@|$(MPATH_AVAIL)|g' \
+ -e 's|@short_time@|$(SHORT_TIME)|g' \
+ -e 's|@cacheDirs@|$(SPIDER_CACHE_DIRS)|g' \
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index efa235f646..01911c1a30 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+from glob import glob
class Lmod(Package):
@@ -44,6 +45,7 @@ class Lmod(Package):
depends_on('lua@5.2:')
depends_on('lua-luaposix', type=nolink)
depends_on('lua-luafilesystem', type=nolink)
+ depends_on('tcl', type=nolink)
parallel = False
@@ -53,6 +55,16 @@ class Lmod(Package):
spack_env.append_path('LUA_PATH', stage_lua_path.format(
version=self.version), separator=';')
+ patch('fix_tclsh_paths.patch')
+
+ def patch(self):
+ """The tcl scripts should use the tclsh that was discovered
+ by the configure script. Touch up their #! lines so that the
+ sed in the Makefile's install step has something to work on.
+ Requires the change in the associated patch file.fg"""
+ for tclscript in glob('src/*.tcl'):
+ filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript)
+
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make('install')
diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py
index e7c105d5f5..b9eada9e83 100644
--- a/var/spack/repos/builtin/packages/openssl/package.py
+++ b/var/spack/repos/builtin/packages/openssl/package.py
@@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import urllib
import llnl.util.tty as tty
from spack import *
@@ -50,61 +49,15 @@ class Openssl(Package):
parallel = False
def url_for_version(self, version):
- # This URL is computed pinging the place where the latest version is
- # stored. To avoid slowdown due to repeated pinging, we store the URL
- # in a private class attribute to do the job only once per version
- openssl_urls = getattr(Openssl, '_openssl_url', {})
- openssl_url = openssl_urls.get(version, None)
- # Same idea, but just to avoid issuing the same message multiple times
- warnings_given_to_user = getattr(Openssl, '_warnings_given', {})
- if openssl_url is None:
- if self.spec.satisfies('@system'):
- # The version @system is reserved to system openssl. In that
- # case return a fake url and exit
- openssl_url = '@system (reserved version for system openssl)'
- if not warnings_given_to_user.get(version, False):
- tty.msg('Using openssl@system: '
- 'the version @system is reserved for system openssl')
- warnings_given_to_user[version] = True
- else:
- openssl_url = self.check_for_outdated_release(
- version, warnings_given_to_user) # Store the computed URL
- openssl_urls[version] = openssl_url
- # Store the updated dictionary of URLS
- Openssl._openssl_url = openssl_urls
- # Store the updated dictionary of warnings
- Openssl._warnings_given = warnings_given_to_user
-
- return openssl_url
-
- def check_for_outdated_release(self, version, warnings_given_to_user):
- latest = 'ftp://ftp.openssl.org/source/openssl-{version}.tar.gz'
- older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' # NOQA: ignore=E501
- # Try to use the url where the latest tarballs are stored.
- # If the url does not exist (404), then return the url for
- # older format
- version_number = '.'.join([str(x) for x in version[:-1]])
- try:
- openssl_url = latest.format(version=version)
- urllib.urlopen(openssl_url)
- except IOError:
- openssl_url = older.format(
- version_number=version_number, version_full=version)
- # Checks if we already warned the user for this particular
- # version of OpenSSL. If not we display a warning message
- # and mark this version
- if not warnings_given_to_user.get(version, False):
- tty.warn(
- 'This installation depends on an old version of OpenSSL, '
- 'which may have known security issues. ')
- tty.warn(
- 'Consider updating to the latest version of this package.')
- tty.warn('More details at {homepage}'.format(
- homepage=Openssl.homepage))
- warnings_given_to_user[version] = True
-
- return openssl_url
-
+ if '@system' in self.spec:
+ return '@system (reserved version for system openssl)'
+ else:
+ return super(Openssl, self).url_for_version(self.spec)
+
+ def handle_fetch_error(self, error):
+ tty.warn("Fetching OpenSSL failed. This may indicate that OpenSSL has "
+ "been updated, and the version in your instance of Spack is "
+ "insecure. Consider updating to the latest OpenSSL version.")
def install(self, spec, prefix):
# OpenSSL uses a variable APPS in its Makefile. If it happens to be set
diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py
index ef922314d8..16d896acc6 100644
--- a/var/spack/repos/builtin/packages/tcl/package.py
+++ b/var/spack/repos/builtin/packages/tcl/package.py
@@ -57,3 +57,5 @@ class Tcl(Package):
configure("--prefix={0}".format(prefix))
make()
make("install")
+ with working_dir(prefix.bin):
+ symlink('tclsh{0}'.format(self.version.up_to(2)), 'tclsh')