diff --git a/.travis.yml b/.travis.yml index 2e7b1c64fcb..11e7e5fac3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ branches: # Build matrix #============================================================================= matrix: + fast_finish: true include: - python: '2.6' os: linux diff --git a/lib/spack/external/distro.py b/lib/spack/external/distro.py index ca25339ec9b..c4905c25a55 100644 --- a/lib/spack/external/distro.py +++ b/lib/spack/external/distro.py @@ -993,13 +993,18 @@ def _get_distro_release_info(self): continue match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename) if match: - filepath = os.path.join(_UNIXCONFDIR, basename) - distro_info = self._parse_distro_release_file(filepath) - if 'name' in distro_info: - # The name is always present if the pattern matches - self.distro_release_file = filepath - distro_info['id'] = match.group(1) - return distro_info + try: + filepath = os.path.join(_UNIXCONFDIR, basename) + distro_info = self._parse_distro_release_file(filepath) + if 'name' in distro_info: + # The name is always present if the pattern matches + self.distro_release_file = filepath + distro_info['id'] = match.group(1) + return distro_info + except IOError: + # We found a file we do not have permission to read + # Continue checking candidate files for distro file. + continue return {} def _parse_distro_release_file(self, filepath): diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 23f3b9a41ee..eadcef85f3f 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -719,7 +719,7 @@ def fetch(self): tty.msg("Trying to check out svn repository: %s" % self.url) - args = ['checkout', '--force'] + args = ['checkout', '--force', '--quiet'] if self.revision: args += ['-r', self.revision] args.append(self.url) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 885f2197eff..a6ffded9353 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -389,7 +389,6 @@ def write(self, overwrite=False): for mod in modules: set_module_variables_for_package(package, mod) set_module_variables_for_package(package, package.module) - package.setup_environment(spack_env, env) package.setup_dependent_package(self.pkg.module, self.spec) package.setup_dependent_environment(spack_env, env, self.spec) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index e5ea8c56add..361691379ec 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1452,7 +1452,7 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec): This is useful if there are some common steps to installing all extensions for a certain package. """ - self.setup_environment(spack_env, run_env) + pass def setup_dependent_package(self, module, dependent_spec): """Set up Python module-scope variables for dependent packages. diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 4f35df19827..bb1b0006f80 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -357,6 +357,21 @@ def test_suffixes(self, tcl_factory): generator = tcl_factory(spec) assert 'bar' in generator.use_name + def test_setup_environment(self, tcl_factory): + spec = spack.spec.Spec('mpileaks') + spec.concretize() + content = get_modulefile_content(tcl_factory, spec) + assert len([x for x in content if 'setenv FOOBAR' in x]) == 1 + assert len( + [x for x in content if 'setenv FOOBAR "mpileaks"' in x] + ) == 1 + + content = get_modulefile_content(tcl_factory, spec['callpath']) + assert len([x for x in content if 'setenv FOOBAR' in x]) == 1 + assert len( + [x for x in content if 'setenv FOOBAR "callpath"' in x] + ) == 1 + @pytest.mark.usefixtures('config', 'builtin_mock', 'stringio_open') class TestLmod(object): diff --git a/var/spack/repos/builtin.mock/packages/callpath/package.py b/var/spack/repos/builtin.mock/packages/callpath/package.py index 56b969df98a..c00f4088662 100644 --- a/var/spack/repos/builtin.mock/packages/callpath/package.py +++ b/var/spack/repos/builtin.mock/packages/callpath/package.py @@ -40,3 +40,6 @@ def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() make("install") + + def setup_environment(self, senv, renv): + renv.set('FOOBAR', self.name) diff --git a/var/spack/repos/builtin.mock/packages/mpileaks/package.py b/var/spack/repos/builtin.mock/packages/mpileaks/package.py index 10fbf3845eb..749fcc601ad 100644 --- a/var/spack/repos/builtin.mock/packages/mpileaks/package.py +++ b/var/spack/repos/builtin.mock/packages/mpileaks/package.py @@ -44,3 +44,6 @@ class Mpileaks(Package): def install(self, spec, prefix): pass + + def setup_environment(self, senv, renv): + renv.set('FOOBAR', self.name) diff --git a/var/spack/repos/builtin/packages/adlbx/package.py b/var/spack/repos/builtin/packages/adlbx/package.py new file mode 100644 index 00000000000..4bb6c438aa0 --- /dev/null +++ b/var/spack/repos/builtin/packages/adlbx/package.py @@ -0,0 +1,41 @@ +############################################################################## +# 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 +############################################################################## + +from spack import * + + +class Adlbx(AutotoolsPackage): + """ADLB/X: Master-worker library + work stealing and data dependencies""" + + homepage = "http://swift-lang.org/Swift-T" + url = "http://swift-lang.github.io/swift-t-downloads/adlbx-0.8.0.tar.gz" + version('0.8.0', '34ade59ce3be5bc296955231d47a27dd') + + depends_on('exmcutils') + depends_on('mpi') + + def configure_args(self): + args = ["--with-c-utils=" + self.spec['exmcutils'].prefix] + return args diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index a9691fab8b1..2615266c8ad 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -35,6 +35,8 @@ class Bison(AutotoolsPackage): version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') - depends_on("m4", type='build') + depends_on('m4', type='build') + + patch('pgi.patch', when='@3.0.4') build_directory = 'spack-build' diff --git a/var/spack/repos/builtin/packages/bison/pgi.patch b/var/spack/repos/builtin/packages/bison/pgi.patch new file mode 100644 index 00000000000..8aeaa96a516 --- /dev/null +++ b/var/spack/repos/builtin/packages/bison/pgi.patch @@ -0,0 +1,10 @@ +--- a/lib/config.in.h ++++ b/lib/config.in.h +@@ -2182,6 +2182,7 @@ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ ++ && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) + # define _GL_INLINE inline diff --git a/var/spack/repos/builtin/packages/es/package.py b/var/spack/repos/builtin/packages/es/package.py index 80891b66006..3ca39c74a21 100644 --- a/var/spack/repos/builtin/packages/es/package.py +++ b/var/spack/repos/builtin/packages/es/package.py @@ -37,3 +37,5 @@ class Es(AutotoolsPackage): url = "https://github.com/wryun/es-shell/releases/download/v0.9.1/es-0.9.1.tar.gz" version('0.9.1', 'bf4db55b47bcc99892468b2e0aec0c9e') + + depends_on('readline') diff --git a/var/spack/repos/builtin/packages/exmcutils/package.py b/var/spack/repos/builtin/packages/exmcutils/package.py new file mode 100644 index 00000000000..c0b2cdac973 --- /dev/null +++ b/var/spack/repos/builtin/packages/exmcutils/package.py @@ -0,0 +1,37 @@ +############################################################################## +# 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 +############################################################################## + +from spack import * + + +class Exmcutils(AutotoolsPackage): + """ExM C-Utils: Generic C utility library for ADLB/X and Swift/T""" + + homepage = "http://swift-lang.org/Swift-T" + url = "http://swift-lang.github.io/swift-t-downloads/exmcutils-0.5.3.tar.gz" + + version('0.5.3', '0e3ed6cc2991c684cd8f08db45c99a39') + + # This package has no dependencies. diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index cede9ae0ae8..91343043669 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -34,6 +34,7 @@ class Glib(AutotoolsPackage): homepage = "https://developer.gnome.org/glib/" url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" + version('2.49.7', '397ead3fcf325cb921d54e2c9e7dfd7a') version('2.49.4', 'e2c87c03017b0cd02c4c73274b92b148') version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb') version('2.42.1', '89c4119e50e767d3532158605ee9121a') diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index 1d7ea1ee898..eb3ce37c370 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -43,6 +43,8 @@ class IntelMkl(IntelInstaller): homepage = "https://software.intel.com/en-us/intel-mkl" + version('2017.0.098', '3cdcb739ab5ab1e047eb130b9ffdd8d0', + url="file://%s/l_mkl_2017.0.098.tgz" % os.getcwd()) version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65', url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd()) version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34', diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py index c48ace79c13..a9765e1a0ad 100644 --- a/var/spack/repos/builtin/packages/ipp/package.py +++ b/var/spack/repos/builtin/packages/ipp/package.py @@ -37,6 +37,8 @@ class Ipp(IntelInstaller): homepage = "https://software.intel.com/en-us/intel-ipp" + version('2017.0.098', 'e7be757ebe351d9f9beed7efdc7b7118', + url="file://%s/l_ipp_2017.0.098.tgz" % os.getcwd()) version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3', url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd()) diff --git a/var/spack/repos/builtin/packages/jmol/package.py b/var/spack/repos/builtin/packages/jmol/package.py new file mode 100644 index 00000000000..ec58fa844a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/jmol/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 +############################################################################## +from spack import * +from distutils.dir_util import copy_tree + + +class Jmol(Package): + """Jmol: an open-source Java viewer for chemical structures in 3D + with features for chemicals, crystals, materials and biomolecules.""" + + homepage = "http://jmol.sourceforge.net/" + url = "https://sourceforge.net/projects/jmol/files/Jmol/Version%2014.8/Jmol%2014.8.0/Jmol-14.8.0-binary.tar.gz" + + version('14.8.0', '3c9f4004b9e617ea3ea0b78ab32397ea') + + depends_on('jdk', type='run') + + def install(self, spec, prefix): + copy_tree('jmol-{0}'.format(self.version), prefix) + + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PATH', self.prefix) + run_env.set('JMOL_HOME', self.prefix) diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py index 39c4f3d8c08..8a807399e8a 100644 --- a/var/spack/repos/builtin/packages/mpc/package.py +++ b/var/spack/repos/builtin/packages/mpc/package.py @@ -35,11 +35,18 @@ class Mpc(AutotoolsPackage): version('1.0.3', 'd6a1d5f8ddea3abd2cc3e98f58352d26') version('1.0.2', '68fadff3358fb3e7976c7a398a0af4c3') - depends_on('gmp') # mpir is a drop-in replacement for this - depends_on('mpfr') # Could also be built against mpir + depends_on('gmp@4.3.2:') # mpir is a drop-in replacement for this + depends_on('mpfr@2.4.2:') # Could also be built against mpir def url_for_version(self, version): if version < Version("1.0.1"): return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version else: return "https://ftp.gnu.org/gnu/mpc/mpc-%s.tar.gz" % version + + def configure_args(self): + spec = self.spec + return [ + '--with-mpfr={0}'.format(spec['mpfr'].prefix), + '--with-gmp={0}'.format(spec['gmp'].prefix) + ] diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index 0a912d3db98..64ba565032c 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import sys class Numdiff(AutotoolsPackage): @@ -34,6 +33,35 @@ class Numdiff(AutotoolsPackage): homepage = 'https://www.nongnu.org/numdiff' url = 'http://nongnu.askapache.com/numdiff/numdiff-5.8.1.tar.gz' - version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') - depends_on('gettext', when=sys.platform == 'darwin') + variant('nls', default=False, + description="Enable Natural Language Support") + variant('gmp', default=False, + description="Use GNU Multiple Precision Arithmetic Library") + + depends_on('gettext', when='+nls') + depends_on('gmp', when='+gmp') + + def configure_args(self): + spec = self.spec + args = [] + if '+nls' in spec: + args.append('--enable-nls') + else: + args.append('--disable-nls') + + if '+gmp' in spec: + # compile with -O0 as per upstream known issue with optimization + # and GMP; https://launchpad.net/ubuntu/+source/numdiff/+changelog + # http://www.nongnu.org/numdiff/#issues + # keep this variant off by default as one still encounter + # GNU MP: Cannot allocate memory (size=2305843009206983184) + args.extend([ + '--enable-gmp', + 'CFLAGS=-O0' + ]) + else: + args.append('--disable-gmp') + + return args diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index e8a2f53497b..fe52dc24ae4 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -40,9 +40,10 @@ class Pgi(Package): homepage = "http://www.pgroup.com/" - version('16.5', 'a40e8852071b5d600cb42f31631b3de1') - version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') - version('15.7', '84a689217b17cdaf78c39270c70bea5d') + version('16.10', '9bb6bfb7b1052f9e6a45829ba7a24e47') + version('16.5', 'a40e8852071b5d600cb42f31631b3de1') + version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') + version('15.7', '84a689217b17cdaf78c39270c70bea5d') variant('network', default=True, description="Perform a network install") diff --git a/var/spack/repos/builtin/packages/turbine/package.py b/var/spack/repos/builtin/packages/turbine/package.py new file mode 100644 index 00000000000..20bc0303a09 --- /dev/null +++ b/var/spack/repos/builtin/packages/turbine/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 +############################################################################## + +from spack import * + + +class Turbine(AutotoolsPackage): + + homepage = "http://swift-lang.org/Swift-T" + url = "http://swift-lang.github.io/swift-t-downloads/turbine-1.0.0.tar.gz" + + version('1.0.0', '7ed56d65d6db0bfe15a439d818b4259e') + + depends_on('adlbx') + depends_on('tcl') + depends_on('zsh') + + def configure_args(self): + args = ["--with-c-utils=" + self.spec['exmcutils'].prefix, + "--with-adlb=" + self.spec['adlbx'].prefix, + "--with-tcl=" + self.spec['tcl'].prefix, + "--with-mpi=" + self.spec['mpi'].prefix] + return args diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py index 0794e77ba09..b84c95fb8a4 100644 --- a/var/spack/repos/builtin/packages/valgrind/package.py +++ b/var/spack/repos/builtin/packages/valgrind/package.py @@ -22,11 +22,11 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## - from spack import * +import sys -class Valgrind(Package): +class Valgrind(AutotoolsPackage): """An instrumentation framework for building dynamic analysis. There are Valgrind tools that can automatically detect many memory @@ -44,17 +44,31 @@ class Valgrind(Package): version('3.11.0', '4ea62074da73ae82e0162d6550d3f129') version('3.10.1', '60ddae962bc79e7c95cfc4667245707f') version('3.10.0', '7c311a72a20388aceced1aa5573ce970') + version('develop', svn='svn://svn.valgrind.org/valgrind/trunk') - variant('mpi', default=True, description='Activates MPI support for valgrind') + variant('mpi', default=True, + description='Activates MPI support for valgrind') variant('boost', default=True, description='Activates boost support for valgrind') depends_on('mpi', when='+mpi') depends_on('boost', when='+boost') - def install(self, spec, prefix): - options = ['--prefix=%s' % prefix, - '--enable-ubsan'] - configure(*options) - make() - make("install") + depends_on("autoconf", type='build', when='@develop') + depends_on("automake", type='build', when='@develop') + depends_on("libtool", type='build', when='@develop') + + def configure_args(self): + spec = self.spec + options = [] + if not (spec.satisfies('%clang') and sys.platform == 'darwin'): + # Otherwise with (Apple's) clang there is a linker error: + # clang: error: unknown argument: '-static-libubsan' + options.append('--enable-ubsan') + + if sys.platform == 'darwin': + options.extend([ + '--build=amd64-darwin', + '--enable-only64bit' + ]) + return options