Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Jim Galarowicz 2017-02-13 09:53:04 -08:00
commit b4d3fd0071
22 changed files with 291 additions and 28 deletions

View File

@ -12,6 +12,7 @@ branches:
# Build matrix
#=============================================================================
matrix:
fast_finish: true
include:
- python: '2.6'
os: linux

View File

@ -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):

View File

@ -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)

View File

@ -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)

View File

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

View File

@ -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):

View File

@ -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)

View File

@ -44,3 +44,6 @@ class Mpileaks(Package):
def install(self, spec, prefix):
pass
def setup_environment(self, senv, renv):
renv.set('FOOBAR', self.name)

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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')

View File

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

View File

@ -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')

View File

@ -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',

View File

@ -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())

View File

@ -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)

View File

@ -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)
]

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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