summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2016-06-20 10:16:02 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2016-06-20 10:16:02 -0700
commit1dc62e8a19eb709c14bbc584c6fe04395da6ff67 (patch)
treed26c9773461c020ad7be344bb6c491e3c611f075 /var
parent3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc (diff)
parent12b9d6da104925841d731d910c6423ee81a5464f (diff)
downloadspack-1dc62e8a19eb709c14bbc584c6fe04395da6ff67.tar.gz
spack-1dc62e8a19eb709c14bbc584c6fe04395da6ff67.tar.bz2
spack-1dc62e8a19eb709c14bbc584c6fe04395da6ff67.tar.xz
spack-1dc62e8a19eb709c14bbc584c6fe04395da6ff67.zip
Merge branch 'develop' into features/cache-archives
Diffstat (limited to 'var')
-rw-r--r--var/spack/mock_configs/site_spackconfig/compilers.yaml40
-rw-r--r--var/spack/packages/adios/package.py38
-rw-r--r--var/spack/packages/mxml/package.py26
-rw-r--r--var/spack/repos/builtin.mock/packages/externalmodule/package.py37
-rw-r--r--var/spack/repos/builtin.mock/packages/multimethod/package.py42
-rw-r--r--var/spack/repos/builtin/packages/bertini/package.py50
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py3
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py79
-rw-r--r--var/spack/repos/builtin/packages/c-blosc/package.py51
-rw-r--r--var/spack/repos/builtin/packages/caliper/package.py2
-rw-r--r--var/spack/repos/builtin/packages/daal/package.py28
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py184
-rw-r--r--var/spack/repos/builtin/packages/espresso/package.py26
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py176
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py206
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py1
-rw-r--r--var/spack/repos/builtin/packages/hpl/package.py119
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py144
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py125
-rw-r--r--var/spack/repos/builtin/packages/ipp/package.py26
-rw-r--r--var/spack/repos/builtin/packages/libdwarf/package.py13
-rw-r--r--var/spack/repos/builtin/packages/libpciaccess/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libpthread-stubs/package.py39
-rw-r--r--var/spack/repos/builtin/packages/libxau/package.py44
-rw-r--r--var/spack/repos/builtin/packages/libxcb/package.py7
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py34
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py26
-rw-r--r--var/spack/repos/builtin/packages/lua-luafilesystem/package.py51
-rw-r--r--var/spack/repos/builtin/packages/lua/package.py9
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py190
-rw-r--r--var/spack/repos/builtin/packages/mkl/package.py28
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py88
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py7
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py38
-rw-r--r--var/spack/repos/builtin/packages/openssl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py44
-rw-r--r--var/spack/repos/builtin/packages/pcre/intel.patch12
-rw-r--r--var/spack/repos/builtin/packages/pcre/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-beautifulsoup4/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-emcee/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-iminuit/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-nestle/package.py44
-rw-r--r--var/spack/repos/builtin/packages/py-ply/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-sncosmo/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-wcsaxes/package.py43
-rw-r--r--var/spack/repos/builtin/packages/python/package.py193
-rw-r--r--var/spack/repos/builtin/packages/rust-bindgen/package.py18
-rw-r--r--var/spack/repos/builtin/packages/rust/package.py63
-rw-r--r--var/spack/repos/builtin/packages/serf/package.py11
-rw-r--r--var/spack/repos/builtin/packages/stream/package.py62
-rw-r--r--var/spack/repos/builtin/packages/tetgen/package.py11
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py17
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py207
-rw-r--r--var/spack/repos/builtin/packages/xorg-util-macros/package.py38
-rw-r--r--var/spack/repos/builtin/packages/xproto/package.py41
57 files changed, 2578 insertions, 501 deletions
diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml
new file mode 100644
index 0000000000..5f8b38007b
--- /dev/null
+++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml
@@ -0,0 +1,40 @@
+compilers:
+ all:
+ clang@3.3:
+ cc: /path/to/clang
+ cxx: /path/to/clang++
+ f77: None
+ fc: None
+ modules: None
+ strategy: PATH
+ gcc@4.5.0:
+ cc: /path/to/gcc
+ cxx: /path/to/g++
+ f77: /path/to/gfortran
+ fc: /path/to/gfortran
+ modules: None
+ strategy: PATH
+ gcc@5.2.0:
+ cc: cc
+ cxx: CC
+ f77: ftn
+ fc: ftn
+ modules:
+ - PrgEnv-gnu
+ - gcc/5.2.0
+ strategy: MODULES
+ intel@15.0.1:
+ cc: cc
+ ccx: CC
+ f77: ftn
+ fc: ftn
+ modules:
+ - PrgEnv-intel
+ - intel/15.0.1
+ strategy: MODULES
+ intel@15.1.2:
+ cc: /path/to/icc
+ cxx: /path/to/ic++
+ f77: /path/to/ifort
+ fc: /path/to/ifort
+ strategy: PATH \ No newline at end of file
diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py
new file mode 100644
index 0000000000..260dcbe851
--- /dev/null
+++ b/var/spack/packages/adios/package.py
@@ -0,0 +1,38 @@
+import os
+
+from spack import *
+class Adios(Package):
+ """The Adaptable IO System (ADIOS) provides a simple,
+ flexible way for scientists to describe the
+ data in their code that may need to be written,
+ read, or processed outside of the running simulation
+ """
+
+ homepage = "http://www.olcf.ornl.gov/center-projects/adios/"
+ url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz"
+
+ version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76')
+
+ # Lots of setting up here for this package
+ # module swap PrgEnv-intel PrgEnv-$COMP
+ # module load cray-netcdf/4.3.3.1
+ # module load cray-hdf5/1.8.14
+ # module load python/2.7.10
+ depends_on('hdf5')
+ depends_on('mxml')
+
+ def install(self, spec, prefix):
+ configure_args = ["--prefix=%s" % prefix,
+ "--with-mxml=%s" % spec['mxml'].prefix,
+ "--with-hdf5=%s" % spec['hdf5'].prefix,
+ "--with-netcdf=%s" % os.environ["NETCDF_DIR"],
+ "--with-infiniband=no",
+ "MPICC=cc","MPICXX=CC","MPIFC=ftn",
+ "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"]
+
+ if spec.satisfies('%gcc'):
+ configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"])
+
+ configure(*configure_args)
+ make()
+ make("install")
diff --git a/var/spack/packages/mxml/package.py b/var/spack/packages/mxml/package.py
new file mode 100644
index 0000000000..f79251d312
--- /dev/null
+++ b/var/spack/packages/mxml/package.py
@@ -0,0 +1,26 @@
+import os
+from spack import *
+
+class Mxml(Package):
+ """Mini-XML is a small XML library that you can use to read and write XML
+ and XML-like data files in your application without requiring large
+ non-standard libraries
+ """
+
+ homepage = "http://www.msweet.org"
+ url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz"
+
+ version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19')
+ version('2.8', 'd85ee6d30de053581242c4a86e79a5d2')
+ version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9')
+ version('2.6', '68977789ae64985dddbd1a1a1652642e')
+ version('2.5', 'f706377fba630b39fa02fd63642b17e5')
+
+ # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use)
+ # Case statement to change CC and CXX flags
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static')
+ make()
+ make("install")
+
diff --git a/var/spack/repos/builtin.mock/packages/externalmodule/package.py b/var/spack/repos/builtin.mock/packages/externalmodule/package.py
new file mode 100644
index 0000000000..f7b0da3fd9
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/externalmodule/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 Externalmodule(Package):
+ homepage = "http://somewhere.com"
+ url = "http://somewhere.com/module-1.0.tar.gz"
+
+ version('1.0', '1234567890abcdef1234567890abcdef')
+
+ depends_on('externalprereq')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py
index def73ad82e..649afa5945 100644
--- a/var/spack/repos/builtin.mock/packages/multimethod/package.py
+++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py
@@ -22,8 +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
##############################################################################
+import imp
+from llnl.util.filesystem import join_path
+from spack.util.naming import mod_to_class
from spack import *
-
+import spack.architecture
class Multimethod(Package):
"""This package is designed for use with Spack's multimethod test.
@@ -101,25 +104,26 @@ class Multimethod(Package):
#
- # Make sure we can switch methods on different architectures
+ # Make sure we can switch methods on different target
#
- @when('arch=x86_64')
- def different_by_architecture(self):
- return 'x86_64'
-
- @when('arch=ppc64')
- def different_by_architecture(self):
- return 'ppc64'
-
- @when('arch=ppc32')
- def different_by_architecture(self):
- return 'ppc32'
-
- @when('arch=arm64')
- def different_by_architecture(self):
- return 'arm64'
-
-
+# for platform_name in ['cray_xc', 'darwin', 'linux']:
+# file_path = join_path(spack.platform_path, platform_name)
+# platform_mod = imp.load_source('spack.platforms', file_path + '.py')
+# cls = getattr(platform_mod, mod_to_class(platform_name))
+
+# platform = cls()
+ platform = spack.architecture.sys_type()
+ targets = platform.targets.values()
+ if len(targets) > 1:
+ targets = targets[:-1]
+
+ for target in targets:
+ @when('target='+target.name)
+ def different_by_target(self):
+ if isinstance(self.spec.architecture.target,basestring):
+ return self.spec.architecture.target
+ else:
+ return self.spec.architecture.target.name
#
# Make sure we can switch methods on different dependencies
#
diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py
new file mode 100644
index 0000000000..8d7da705e4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bertini/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 Bertini(Package):
+ """Bertini is a general-purpose solver, written in C, that was created
+ for research about polynomial continuation. It solves for the numerical
+ solution of systems of polynomial equations using homotopy continuation."""
+
+ homepage = "https://bertini.nd.edu/"
+ url = "https://bertini.nd.edu/BertiniSource_v1.5.tar.gz"
+
+ version('1.5', 'e3f6cc6e7f9a0cf1d73185e8671af707')
+
+ variant('mpi', default=True, description='Compile in parallel')
+
+ depends_on('flex')
+ depends_on('bison')
+ depends_on('gmp')
+ depends_on('mpfr')
+ depends_on('mpi', when='+mpi')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index 9e4cc98ae6..5f305abb02 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -30,8 +30,9 @@ class Binutils(Package):
url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
+ # 2.26 is incompatible with py-pillow build for some reason.
version('2.26', '64146a0faa3b411ba774f47d41de239f')
- version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
+ version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66', preferred=True)
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 2f2965eb12..cde76c590a 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -27,7 +27,7 @@ import spack
import sys
import os
-import sys
+
class Boost(Package):
"""Boost provides free peer-reviewed portable C++ source
@@ -75,23 +75,23 @@ class Boost(Package):
version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0')
default_install_libs = set(['atomic',
- 'chrono',
- 'date_time',
- 'filesystem',
- 'graph',
- 'iostreams',
- 'locale',
- 'log',
- 'math',
- 'program_options',
- 'random',
- 'regex',
- 'serialization',
- 'signals',
- 'system',
- 'test',
- 'thread',
- 'wave'])
+ 'chrono',
+ 'date_time',
+ 'filesystem',
+ 'graph',
+ 'iostreams',
+ 'locale',
+ 'log',
+ 'math',
+ 'program_options',
+ 'random',
+ 'regex',
+ 'serialization',
+ 'signals',
+ 'system',
+ 'test',
+ 'thread',
+ 'wave'])
# mpi/python are not installed by default because they pull in many
# dependencies and/or because there is a great deal of customization
@@ -109,6 +109,7 @@ class Boost(Package):
variant('multithreaded', default=True, description="Build multi-threaded versions of libraries")
variant('singlethreaded', default=True, description="Build single-threaded versions of libraries")
variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)")
+ variant('graph', default=False, description="Build the Boost Graph library")
depends_on('icu', when='+icu_support')
depends_on('python', when='+python')
@@ -120,15 +121,18 @@ class Boost(Package):
patch('boost_11856.patch', when='@1.60.0%gcc@4.4.7')
def url_for_version(self, version):
- """Handle Boost's weird URLs, which write the version two different ways."""
+ """
+ Handle Boost's weird URLs,
+ which write the version two different ways.
+ """
parts = [str(p) for p in Version(version)]
dots = ".".join(parts)
underscores = "_".join(parts)
- return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % (
- dots, underscores)
+ return "http://downloads.sourceforge.net/project/boost" \
+ "/boost/%s/boost_%s.tar.bz2" % (dots, underscores)
def determine_toolset(self, spec):
- if spec.satisfies("arch=darwin-x86_64"):
+ if spec.satisfies("platform=darwin"):
return 'darwin'
toolsets = {'g++': 'gcc',
@@ -149,20 +153,20 @@ class Boost(Package):
if '+python' in spec:
options.append('--with-python=%s' %
- join_path(spec['python'].prefix.bin, 'python'))
+ join_path(spec['python'].prefix.bin, 'python'))
with open('user-config.jam', 'w') as f:
compiler_wrapper = join_path(spack.build_env_path, 'c++')
f.write("using {0} : : {1} ;\n".format(boostToolsetId,
- compiler_wrapper))
+ compiler_wrapper))
if '+mpi' in spec:
f.write('using mpi : %s ;\n' %
- join_path(spec['mpi'].prefix.bin, 'mpicxx'))
+ join_path(spec['mpi'].prefix.bin, 'mpicxx'))
if '+python' in spec:
f.write('using python : %s : %s ;\n' %
- (spec['python'].version,
- join_path(spec['python'].prefix.bin, 'python')))
+ (spec['python'].version,
+ join_path(spec['python'].prefix.bin, 'python')))
def determine_b2_options(self, spec, options):
if '+debug' in spec:
@@ -178,8 +182,7 @@ class Boost(Package):
'-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include,
'-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib,
'-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include,
- '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib,
- ])
+ '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib])
linkTypes = ['static']
if '+shared' in spec:
@@ -191,7 +194,8 @@ class Boost(Package):
if '+singlethreaded' in spec:
threadingOpts.append('single')
if not threadingOpts:
- raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled")
+ raise RuntimeError("""At least one of {singlethreaded,
+ multithreaded} must be enabled""")
options.extend([
'toolset=%s' % self.determine_toolset(spec),
@@ -202,9 +206,9 @@ class Boost(Package):
def install(self, spec, prefix):
# On Darwin, Boost expects the Darwin libtool. However, one of the
- # dependencies may have pulled in Spack's GNU libtool, and these two are
- # not compatible. We thus create a symlink to Darwin's libtool and add
- # it at the beginning of PATH.
+ # dependencies may have pulled in Spack's GNU libtool, and these two
+ # are not compatible. We thus create a symlink to Darwin's libtool
+ # and add it at the beginning of PATH.
if sys.platform == 'darwin':
newdir = os.path.abspath('darwin-libtool')
mkdirp(newdir)
@@ -217,7 +221,8 @@ class Boost(Package):
withLibs.append(lib)
if not withLibs:
# if no libraries are specified for compilation, then you dont have
- # to configure/build anything, just copy over to the prefix directory.
+ # to configure/build anything, just copy over to the prefix
+ # directory.
src = join_path(self.stage.source_path, 'boost')
mkdirp(join_path(prefix, 'include'))
dst = join_path(prefix, 'include', 'boost')
@@ -235,6 +240,9 @@ class Boost(Package):
withLibs.remove('chrono')
if not spec.satisfies('@1.43.0:'):
withLibs.remove('random')
+ if '+graph' in spec and '+mpi' in spec:
+ withLibs.remove('graph')
+ withLibs.append('graph_parallel')
# to make Boost find the user-config.jam
env['BOOST_BUILD_PATH'] = './'
@@ -259,6 +267,7 @@ class Boost(Package):
for threadingOpt in threadingOpts:
b2('install', 'threading=%s' % threadingOpt, *b2_options)
- # The shared libraries are not installed correctly on Darwin; correct this
+ # The shared libraries are not installed correctly
+ # on Darwin; correct this
if (sys.platform == 'darwin') and ('+shared' in spec):
fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py
new file mode 100644
index 0000000000..dee332be14
--- /dev/null
+++ b/var/spack/repos/builtin/packages/c-blosc/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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
+##############################################################################
+
+import sys
+
+from spack import *
+
+class CBlosc(Package):
+ """Blosc, an extremely fast, multi-threaded, meta-compressor library"""
+ homepage = "http://www.blosc.org"
+ url = "https://github.com/Blosc/c-blosc/archive/v1.9.2.tar.gz"
+
+ version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5')
+ version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2')
+ version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a')
+ version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05')
+ version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f')
+
+ depends_on("cmake")
+ depends_on("snappy")
+ depends_on("zlib")
+
+ def install(self, spec, prefix):
+ cmake('.', *std_cmake_args)
+
+ make()
+ make("install")
+ if sys.platform == 'darwin':
+ fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py
index 4b8fe0d8af..a424c73859 100644
--- a/var/spack/repos/builtin/packages/caliper/package.py
+++ b/var/spack/repos/builtin/packages/caliper/package.py
@@ -34,7 +34,7 @@ class Caliper(Package):
homepage = "https://github.com/LLNL/Caliper"
url = ""
- version('master', git='ssh://git@github.com:LLNL/Caliper.git')
+ version('master', git='https://github.com/LLNL/Caliper.git')
variant('mpi', default=False, description='Enable MPI function wrappers.')
diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py
new file mode 100644
index 0000000000..e13dd80e19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/daal/package.py
@@ -0,0 +1,28 @@
+from spack import *
+import os
+
+from spack.pkg.builtin.intel import IntelInstaller
+
+
+class Daal(IntelInstaller):
+ """Intel Data Analytics Acceleration Library.
+
+ Note: You will have to add the download file to a
+ mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://software.llnl.gov/spack/mirrors.html"""
+
+ homepage = "https://software.intel.com/en-us/daal"
+
+ version('2016.2.181', 'aad2aa70e5599ebfe6f85b29d8719d46',
+ url="file://%s/l_daal_2016.2.181.tgz" % os.getcwd())
+ version('2016.3.210', 'ad747c0dd97dace4cad03cf2266cad28',
+ url="file://%s/l_daal_2016.3.210.tgz" % os.getcwd())
+
+ def install(self, spec, prefix):
+
+ self.intel_prefix = os.path.join(prefix, "pkg")
+ IntelInstaller.install(self, spec, prefix)
+
+ daal_dir = os.path.join(self.intel_prefix, "daal")
+ for f in os.listdir(daal_dir):
+ os.symlink(os.path.join(daal_dir, f), os.path.join(self.prefix, f))
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 49dc971d3a..54b6426d36 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -25,18 +25,24 @@
from spack import *
import sys
+
class Dealii(Package):
- """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs."""
+ """C++ software library providing well-documented tools to build finite
+ element codes for a broad variety of PDEs."""
homepage = "https://www.dealii.org"
- url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz"
+ url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz"
+ version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d')
version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00')
+ version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa')
+ version('8.2.1', '71c728dbec14f371297cd405776ccf08')
+ version('8.1.0', 'aa8fadc2ce5eb674f44f997461bf668d')
version('dev', git='https://github.com/dealii/dealii.git')
variant('mpi', default=True, description='Compile with MPI')
variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)')
variant('doc', default=False, description='Compile with documentation')
- variant('gsl' , default=True, description='Compile with GSL')
+ variant('gsl', default=True, description='Compile with GSL')
variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)')
variant('metis', default=True, description='Compile with Metis')
variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)')
@@ -47,38 +53,40 @@ class Dealii(Package):
variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)')
# required dependencies, light version
- depends_on ("blas")
- # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591
- # require at least 1.59
- depends_on ("boost@1.59.0:", when='~mpi')
- depends_on ("boost@1.59.0:+mpi", when='+mpi')
- depends_on ("bzip2")
- depends_on ("cmake")
- depends_on ("lapack")
- depends_on ("muparser")
- depends_on ("suite-sparse")
- depends_on ("tbb")
- depends_on ("zlib")
+ depends_on("blas")
+ # Boost 1.58 is blacklisted, see
+ # https://github.com/dealii/dealii/issues/1591
+ # Require at least 1.59
+ depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') # NOQA: ignore=E501
+ depends_on("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') # NOQA: ignore=E501
+ depends_on("bzip2")
+ depends_on("cmake")
+ depends_on("lapack")
+ depends_on("muparser")
+ depends_on("suite-sparse")
+ depends_on("tbb")
+ depends_on("zlib")
# optional dependencies
- depends_on ("mpi", when="+mpi")
- depends_on ("arpack-ng+mpi", when='+arpack+mpi')
- depends_on ("doxygen", when='+doc')
- depends_on ("gsl", when='@8.5.0:+gsl')
- depends_on ("gsl", when='@dev+gsl')
- depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why?
- depends_on ("metis@5:", when='+metis')
- depends_on ("netcdf+mpi", when="+netcdf+mpi")
- depends_on ("netcdf-cxx", when='+netcdf+mpi')
- depends_on ("oce", when='+oce')
- depends_on ("p4est", when='+p4est+mpi')
- depends_on ("petsc+mpi", when='+petsc+mpi')
- depends_on ("slepc", when='+slepc+petsc+mpi')
- depends_on ("trilinos", when='+trilinos+mpi')
+ depends_on("mpi", when="+mpi")
+ depends_on("arpack-ng+mpi", when='+arpack+mpi')
+ depends_on("doxygen+graphviz", when='+doc')
+ depends_on("graphviz", when='+doc')
+ depends_on("gsl", when='@8.5.0:+gsl')
+ depends_on("gsl", when='@dev+gsl')
+ depends_on("hdf5+mpi", when='+hdf5+mpi')
+ depends_on("metis@5:", when='+metis')
+ depends_on("netcdf+mpi", when="+netcdf+mpi")
+ depends_on("netcdf-cxx", when='+netcdf+mpi')
+ depends_on("oce", when='+oce')
+ depends_on("p4est", when='+p4est+mpi')
+ depends_on("petsc+mpi", when='+petsc+mpi')
+ depends_on("slepc", when='+slepc+petsc+mpi')
+ depends_on("trilinos", when='+trilinos+mpi')
# developer dependnecies
- depends_on ("numdiff", when='@dev')
- depends_on ("astyle@2.04", when='@dev')
+ depends_on("numdiff", when='@dev')
+ depends_on("astyle@2.04", when='@dev')
def install(self, spec, prefix):
options = []
@@ -96,17 +104,17 @@ class Dealii(Package):
'-DDEAL_II_WITH_THREADS:BOOL=ON',
'-DBOOST_DIR=%s' % spec['boost'].prefix,
'-DBZIP2_DIR=%s' % spec['bzip2'].prefix,
- # CMake's FindBlas/Lapack may pickup system's blas/lapack instead of Spack's.
- # Be more specific to avoid this.
- # Note that both lapack and blas are provided in -DLAPACK_XYZ variables
+ # CMake's FindBlas/Lapack may pickup system's blas/lapack instead
+ # of Spack's. Be more specific to avoid this.
+ # Note that both lapack and blas are provided in -DLAPACK_XYZ.
'-DLAPACK_FOUND=true',
'-DLAPACK_INCLUDE_DIRS=%s;%s' %
(spec['lapack'].prefix.include,
spec['blas'].prefix.include),
'-DLAPACK_LIBRARIES=%s;%s' %
- (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names
- join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names
- '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix,
+ (spec['lapack'].lapack_shared_lib,
+ spec['blas'].blas_shared_lib),
+ '-DMUPARSER_DIR=%s' % spec['muparser'].prefix,
'-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix,
'-DTBB_DIR=%s' % spec['tbb'].prefix,
'-DZLIB_DIR=%s' % spec['zlib'].prefix
@@ -116,33 +124,34 @@ class Dealii(Package):
if '+mpi' in spec:
options.extend([
'-DDEAL_II_WITH_MPI:BOOL=ON',
- '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names
- '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'),
- '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ '-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
+ '-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
+ '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
])
else:
options.extend([
'-DDEAL_II_WITH_MPI:BOOL=OFF',
])
- # Optional dependencies for which librariy names are the same as CMake variables
- for library in ('gsl','hdf5','p4est','petsc','slepc','trilinos','metis'):
+ # Optional dependencies for which librariy names are the same as CMake
+ # variables:
+ for library in ('gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis'): # NOQA: ignore=E501
if library in spec:
options.extend([
- '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix),
- '-DDEAL_II_WITH_{library}:BOOL=ON'.format(library=library.upper())
+ '-D%s_DIR=%s' % (library.upper(), spec[library].prefix),
+ '-DDEAL_II_WITH_%s:BOOL=ON' % library.upper()
])
else:
options.extend([
- '-DDEAL_II_WITH_{library}:BOOL=OFF'.format(library=library.upper())
+ '-DDEAL_II_WITH_%s:BOOL=OFF' % library.upper()
])
# doxygen
options.extend([
- '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doc' in spec else 'OFF'),
+ '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' %
+ ('ON' if '+doc' in spec else 'OFF'),
])
-
# arpack
if '+arpack' in spec:
options.extend([
@@ -160,11 +169,13 @@ class Dealii(Package):
options.extend([
'-DNETCDF_FOUND=true',
'-DNETCDF_LIBRARIES=%s;%s' %
- (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf),
- join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)),
+ (join_path(spec['netcdf-cxx'].prefix.lib,
+ 'libnetcdf_c++.%s' % dsuf),
+ join_path(spec['netcdf'].prefix.lib,
+ 'libnetcdf.%s' % dsuf)),
'-DNETCDF_INCLUDE_DIRS=%s;%s' %
(spec['netcdf-cxx'].prefix.include,
- spec['netcdf'].prefix.include),
+ spec['netcdf'].prefix.include),
])
else:
options.extend([
@@ -200,7 +211,7 @@ class Dealii(Package):
with working_dir('examples/step-3'):
cmake('.')
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
# An example which uses Metis + PETSc
# FIXME: switch step-18 to MPI
@@ -213,7 +224,7 @@ class Dealii(Package):
if '^petsc' in spec and '^metis' in spec:
cmake('.')
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
# take step-40 which can use both PETSc and Trilinos
# FIXME: switch step-40 to MPI run
@@ -222,43 +233,58 @@ class Dealii(Package):
print('========== Step-40 PETSc ============')
print('=====================================')
# list the number of cycles to speed up
- filter_file(r'(const unsigned int n_cycles = 8;)', ('const unsigned int n_cycles = 2;'), 'step-40.cc')
+ filter_file(r'(const unsigned int n_cycles = 8;)',
+ ('const unsigned int n_cycles = 2;'), 'step-40.cc')
cmake('.')
if '^petsc' in spec:
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
print('=====================================')
print('========= Step-40 Trilinos ==========')
print('=====================================')
# change Linear Algebra to Trilinos
- filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
+ # The below filter_file should be different for versions
+ # before and after 8.4.0
+ if spec.satisfies('@8.4.0:'):
+ filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
+ ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
+ else:
+ filter_file(r'(#define USE_PETSC_LA.*)',
+ ('// #define USE_PETSC_LA'), 'step-40.cc')
if '^trilinos+hypre' in spec:
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
- print('=====================================')
- print('=== Step-40 Trilinos SuperluDist ====')
- print('=====================================')
- # change to direct solvers
- filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)', (''), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', (''), 'step-40.cc')
- filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), 'step-40.cc')
- filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc')
- filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
- if '^trilinos+superlu-dist' in spec:
- make('release')
- make('run',paralle=False)
+ # the rest of the tests on step 40 only works for
+ # dealii version 8.4.0 and after
+ if spec.satisfies('@8.4.0:'):
+ print('=====================================')
+ print('=== Step-40 Trilinos SuperluDist ====')
+ print('=====================================')
+ # change to direct solvers
+ filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
+ (''), 'step-40.cc')
+ filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
+ (''), 'step-40.cc')
+ filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
+ (''), 'step-40.cc')
+ filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
+ if '^trilinos+superlu-dist' in spec:
+ make('release')
+ make('run', paralle=False)
- print('=====================================')
- print('====== Step-40 Trilinos MUMPS =======')
- print('=====================================')
- # switch to Mumps
- filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc')
- if '^trilinos+mumps' in spec:
- make('release')
- make('run',parallel=False)
+ print('=====================================')
+ print('====== Step-40 Trilinos MUMPS =======')
+ print('=====================================')
+ # switch to Mumps
+ filter_file(r'(Amesos_Superludist)',
+ ('Amesos_Mumps'), 'step-40.cc')
+ if '^trilinos+mumps' in spec:
+ make('release')
+ make('run', parallel=False)
print('=====================================')
print('============ Step-36 ================')
@@ -267,7 +293,7 @@ class Dealii(Package):
if 'slepc' in spec:
cmake('.')
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
print('=====================================')
print('============ Step-54 ================')
@@ -276,7 +302,7 @@ class Dealii(Package):
if 'oce' in spec:
cmake('.')
make('release')
- make('run',parallel=False)
+ make('run', parallel=False)
def setup_environment(self, spack_env, env):
env.set('DEAL_II_DIR', self.prefix)
diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py
index ef6a3ccc7b..447964f286 100644
--- a/var/spack/repos/builtin/packages/espresso/package.py
+++ b/var/spack/repos/builtin/packages/espresso/package.py
@@ -26,20 +26,28 @@ from spack import *
import os
+
class Espresso(Package):
"""
- QE is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials
- modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.
+ QE is an integrated suite of Open-Source computer codes for
+ electronic-structure calculations and materials modeling at
+ the nanoscale. It is based on density-functional theory, plane
+ waves, and pseudopotentials.
"""
homepage = 'http://quantum-espresso.org'
url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz'
+ version(
+ '5.4.0',
+ '8bb78181b39bd084ae5cb7a512c1cfe7',
+ url='http://www.qe-forge.org/gf/download/frsrelease/211/968/espresso-5.4.0.tar.gz'
+ )
version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3')
- variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support')
+ variant('mpi', default=True, description='Builds with mpi support')
variant('openmp', default=False, description='Enables openMP support')
variant('scalapack', default=True, description='Enables scalapack support')
- variant('elpa', default=True, description='Use elpa as an eigenvalue solver')
+ variant('elpa', default=True, description='Uses elpa as an eigenvalue solver')
depends_on('blas')
depends_on('lapack')
@@ -47,7 +55,12 @@ class Espresso(Package):
depends_on('mpi', when='+mpi')
depends_on('fftw~mpi', when='~mpi')
depends_on('fftw+mpi', when='+mpi')
- depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation
+ # TODO : + mpi needed to avoid false dependencies installation
+ depends_on('scalapack', when='+scalapack+mpi')
+
+ # Spurious problems running in parallel the Makefile
+ # generated by qe configure
+ parallel = False
def check_variants(self, spec):
error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
@@ -87,10 +100,9 @@ class Espresso(Package):
configure(*options)
make('all')
- if spec.architecture.startswith('darwin'):
+ if spec.satisfies('platform=darwin'):
mkdirp(prefix.bin)
for filename in glob("bin/*.x"):
install(filename, prefix.bin)
else:
make('install')
-
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
new file mode 100644
index 0000000000..0845237656
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -0,0 +1,176 @@
+##############################################################################
+# 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 Fenics(Package):
+ """FEniCS is organized as a collection of interoperable components
+ that together form the FEniCS Project. These components include
+ the problem-solving environment DOLFIN, the form compiler FFC, the
+ finite element tabulator FIAT, the just-in-time compiler Instant,
+ the code generation interface UFC, the form language UFL and a
+ range of additional components."""
+
+ homepage = "http://fenicsproject.org/"
+ url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz"
+
+ base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" # NOQA: ignore E501
+
+ variant('hdf5', default=True, description='Compile with HDF5')
+ variant('parmetis', default=True, description='Compile with ParMETIS')
+ variant('scotch', default=True, description='Compile with Scotch')
+ variant('petsc', default=True, description='Compile with PETSc')
+ variant('slepc', default=True, description='Compile with SLEPc')
+ variant('trilinos', default=True, description='Compile with Trilinos')
+ variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers')
+ variant('vtk', default=False, description='Compile with VTK')
+ variant('qt', default=False, description='Compile with QT')
+ variant('mpi', default=True, description='Enables the distributed memory support')
+ variant('openmp', default=True, description='Enables the shared memory support')
+ variant('shared', default=True, description='Enables the build of shared libraries')
+ variant('debug', default=False, description='Builds a debug version of the libraries')
+
+ # not part of spack list for now
+ # variant('petsc4py', default=True, description='Uses PETSc4py')
+ # variant('slepc4py', default=True, description='Uses SLEPc4py')
+ # variant('pastix', default=True, description='Compile with Pastix')
+
+ extends('python')
+
+ depends_on('py-numpy')
+ depends_on('py-ply')
+ depends_on('py-six')
+ depends_on('py-sphinx@1.0.1:', when='+doc')
+ depends_on('eigen@3.2.0:')
+ depends_on('boost')
+ depends_on('mpi', when='+mpi')
+ depends_on('hdf5', when='+hdf5')
+ depends_on('parmetis@4.0.2:^metis+real64', when='+parmetis')
+ depends_on('scotch~metis', when='+scotch~mpi')
+ depends_on('scotch+mpi~metis', when='+scotch+mpi')
+ depends_on('petsc@3.4:', when='+petsc')
+ depends_on('slepc@3.4:', when='+slepc')
+ depends_on('trilinos', when='+trilinos')
+ depends_on('vtk', when='+vtk')
+ depends_on('suite-sparse', when='+suite-sparse')
+ depends_on('qt', when='+qt')
+
+ # This are the build dependencies
+ depends_on('py-setuptools')
+ depends_on('cmake@2.8.12:')
+ depends_on('swig@3.0.3:')
+
+ releases = [
+ {
+ 'version': '1.6.0',
+ 'md5': '35cb4baf7ab4152a40fb7310b34d5800',
+ 'resources': {
+ 'ffc': '358faa3e9da62a1b1a717070217b793e',
+ 'fiat': 'f4509d05c911fd93cea8d288a78a6c6f',
+ 'instant': '5f2522eb032a5bebbad6597b6fe0732a',
+ 'ufl': 'c40c5f04eaa847377ab2323122284016',
+ }
+ },
+ {
+ 'version': '1.5.0',
+ 'md5': '9b589a3534299a5e6d22c13c5eb30bb8',
+ 'resources': {
+ 'ffc': '343f6d30e7e77d329a400fd8e73e0b63',
+ 'fiat': 'da3fa4dd8177bb251e7f68ec9c7cf6c5',
+ 'instant': 'b744023ded27ee9df4a8d8c6698c0d58',
+ 'ufl': '130d7829cf5a4bd5b52bf6d0955116fd',
+ }
+ },
+ ]
+
+ for release in releases:
+ version(release['version'], release['md5'], url=base_url.format(pkg='dolfin', version=release['version']))
+ for name, md5 in release['resources'].items():
+ resource(name=name,
+ url=base_url.format(pkg=name, **release),
+ md5=md5,
+ destination='depends',
+ when='@{version}'.format(**release),
+ placement=name)
+
+ def cmake_is_on(self, option):
+ return 'ON' if option in self.spec else 'OFF'
+
+ def install(self, spec, prefix):
+ for package in ['ufl', 'ffc', 'fiat', 'instant']:
+ with working_dir(join_path('depends', package)):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
+
+ cmake_args = [
+ '-DCMAKE_BUILD_TYPE:STRING={0}'.format(
+ 'Debug' if '+debug' in spec else 'RelWithDebInfo'),
+ '-DBUILD_SHARED_LIBS:BOOL={0}'.format(
+ self.cmake_is_on('+shared')),
+ '-DDOLFIN_SKIP_BUILD_TESTS:BOOL=ON',
+ '-DDOLFIN_ENABLE_OPENMP:BOOL={0}'.format(
+ self.cmake_is_on('+openmp')),
+ '-DDOLFIN_ENABLE_CHOLMOD:BOOL={0}'.format(
+ self.cmake_is_on('suite-sparse')),
+ '-DDOLFIN_ENABLE_HDF5:BOOL={0}'.format(
+ self.cmake_is_on('hdf5')),
+ '-DDOLFIN_ENABLE_MPI:BOOL={0}'.format(
+ self.cmake_is_on('mpi')),
+ '-DDOLFIN_ENABLE_PARMETIS:BOOL={0}'.format(
+ self.cmake_is_on('parmetis')),
+ '-DDOLFIN_ENABLE_PASTIX:BOOL={0}'.format(
+ self.cmake_is_on('pastix')),
+ '-DDOLFIN_ENABLE_PETSC:BOOL={0}'.format(
+ self.cmake_is_on('petsc')),
+ '-DDOLFIN_ENABLE_PETSC4PY:BOOL={0}'.format(
+ self.cmake_is_on('py-petsc4py')),
+ '-DDOLFIN_ENABLE_PYTHON:BOOL={0}'.format(
+ self.cmake_is_on('python')),
+ '-DDOLFIN_ENABLE_QT:BOOL={0}'.format(
+ self.cmake_is_on('qt')),
+ '-DDOLFIN_ENABLE_SCOTCH:BOOL={0}'.format(
+ self.cmake_is_on('scotch')),
+ '-DDOLFIN_ENABLE_SLEPC:BOOL={0}'.format(
+ self.cmake_is_on('slepc')),
+ '-DDOLFIN_ENABLE_SLEPC4PY:BOOL={0}'.format(
+ self.cmake_is_on('py-slepc4py')),
+ '-DDOLFIN_ENABLE_SPHINX:BOOL={0}'.format(
+ self.cmake_is_on('py-sphinx')),
+ '-DDOLFIN_ENABLE_TRILINOS:BOOL={0}'.format(
+ self.cmake_is_on('trilinos')),
+ '-DDOLFIN_ENABLE_UMFPACK:BOOL={0}'.format(
+ self.cmake_is_on('suite-sparse')),
+ '-DDOLFIN_ENABLE_VTK:BOOL={0}'.format(
+ self.cmake_is_on('vtk')),
+ '-DDOLFIN_ENABLE_ZLIB:BOOL={0}'.format(
+ self.cmake_is_on('zlib')),
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
new file mode 100644
index 0000000000..50f380083c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -0,0 +1,206 @@
+##############################################################################
+# 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
+##############################################################################
+
+import os
+import shutil
+import sys
+
+from spack import *
+
+def _install_shlib(name, src, dst):
+ """Install a shared library from directory src to directory dst"""
+ if sys.platform == "darwin":
+ shlib0 = name + ".0.dylib"
+ shlib = name + ".dylib"
+ shutil.copyfile(join_path(src, shlib0), join_path(dst, shlib0))
+ os.symlink(shlib0, join_path(dst, shlib))
+ else:
+ shlib000 = name + ".so.0.0.0"
+ shlib0 = name + ".so.0"
+ shlib = name + ".dylib"
+ shutil.copyfile(join_path(src, shlib000), join_path(dst, shlib000))
+ os.symlink(shlib000, join_path(dst, shlib0))
+ os.symlink(shlib0, join_path(dst, shlib))
+
+class Hdf5Blosc(Package):
+ """Blosc filter for HDF5"""
+ homepage = "https://github.com/Blosc/hdf5-blosc"
+ url = "https://github.com/Blosc/hdf5-blosc/archive/master.zip"
+
+ version('master', '02c04acbf4bec66ec8a35bf157d1c9de')
+
+ depends_on("c-blosc")
+ depends_on("hdf5")
+ depends_on("libtool")
+
+ parallel = False
+
+ def install(self, spec, prefix):
+ # The included cmake recipe doesn"t work for Darwin
+ # cmake(".", *std_cmake_args)
+ #
+ # make()
+ # make("install")
+ # if sys.platform == "darwin":
+ # fix_darwin_install_name(prefix.lib)
+
+ libtool = Executable(join_path(spec["libtool"].prefix.bin, "libtool"))
+ if "+mpi" in spec["hdf5"]:
+ cc = "mpicc"
+ else:
+ cc = "cc"
+ shlibext = "so" if sys.platform!="darwin" else "dylib"
+ mkdirp(prefix.include)
+ mkdirp(prefix.lib)
+
+ # Build and install filter
+ with working_dir("src"):
+ libtool("--mode=compile", "--tag=CC",
+ "cc", "-g", "-O",
+ "-c", "blosc_filter.c")
+ libtool("--mode=link", "--tag=CC",
+ "cc", "-g", "-O",
+ "-rpath", prefix.lib,
+ "-o", "libblosc_filter.la",
+ "blosc_filter.lo",
+ "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc",
+ "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
+ _install_shlib("libblosc_filter", ".libs", prefix.lib)
+
+ # Build and install plugin
+ # The plugin requires at least HDF5 1.8.11:
+ if spec["hdf5"].satisfies("@1.8.11:"):
+ libtool("--mode=compile", "--tag=CC",
+ "cc", "-g", "-O",
+ "-c", "blosc_plugin.c")
+ libtool("--mode=link", "--tag=CC",
+ "cc", "-g", "-O",
+ "-rpath", prefix.lib,
+ "-o", "libblosc_plugin.la",
+ "blosc_plugin.lo",
+ "-L%s" % prefix.lib, "-lblosc_filter",
+ "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc",
+ "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
+ _install_shlib("libblosc_plugin", ".libs", prefix.lib)
+
+ self.check_install(spec)
+
+ def check_install(self, spec):
+ "Build and run a small program to test the installed HDF5 Blosc plugin"
+ print "Checking HDF5-Blosc plugin..."
+ checkdir = "spack-check"
+ with working_dir(checkdir, create=True):
+ source = r"""\
+#include <hdf5.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILTER_BLOSC 32001 /* Blosc filter ID registered with the HDF group */
+
+int main(int argc, char **argv) {
+ herr_t herr;
+ hid_t file = H5Fcreate("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ assert(file >= 0);
+ hsize_t dims[3] = {10, 10, 10};
+ hid_t space = H5Screate_simple(3, dims, NULL);
+ assert(space >= 0);
+ hid_t create_proplist = H5Pcreate(H5P_DATASET_CREATE);
+ assert(create_proplist >= 0);
+ herr = H5Pset_chunk(create_proplist, 3, dims);
+ assert(herr >= 0);
+ herr = H5Pset_filter(create_proplist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0,
+ NULL);
+ assert(herr >= 0);
+ htri_t all_filters_avail = H5Pall_filters_avail(create_proplist);
+ assert(all_filters_avail > 0);
+ hid_t dataset = H5Dcreate(file, "dataset", H5T_NATIVE_DOUBLE, space,
+ H5P_DEFAULT, create_proplist, H5P_DEFAULT);
+ assert(dataset >= 0);
+ double data[10][10][10];
+ for (int k=0; k<10; ++k) {
+ for (int j=0; j<10; ++j) {
+ for (int i=0; i<10; ++i) {
+ data[k][j][i] = 1.0 / (1.0 + i + j + k);
+ }
+ }
+ }
+ herr = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT,
+ &data[0][0][0]);
+ assert(herr >= 0);
+ herr = H5Pclose(create_proplist);
+ assert(herr >= 0);
+ herr = H5Dclose(dataset);
+ assert(herr >= 0);
+ herr = H5Sclose(space);
+ assert(herr >= 0);
+ herr = H5Fclose(file);
+ assert(herr >= 0);
+ printf("Done.\n");
+ return 0;
+}
+"""
+ expected = """\
+Done.
+"""
+ with open("check.c", "w") as f:
+ f.write(source)
+ if "+mpi" in spec["hdf5"]:
+ cc = which("mpicc")
+ else:
+ cc = which("cc")
+ # TODO: Automate these path and library settings
+ cc("-c", "-I%s" % spec["hdf5"].prefix.include, "check.c")
+ cc("-o", "check", "check.o",
+ "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
+ try:
+ check = Executable("./check")
+ output = check(return_output=True)
+ except:
+ output = ""
+ success = output == expected
+ if not success:
+ print "Produced output does not match expected output."
+ print "Expected output:"
+ print "-"*80
+ print expected
+ print "-"*80
+ print "Produced output:"
+ print "-"*80
+ print output
+ print "-"*80
+ print "Environment:"
+ env = which("env")
+ env()
+ raise RuntimeError("HDF5 Blosc plugin check failed")
+ shutil.rmtree(checkdir)
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
+ run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
+ run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 21137ef356..e46f432be5 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -38,6 +38,7 @@ class Hdf5(Package):
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
+ version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295')
version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199')
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True)
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py
new file mode 100644
index 0000000000..efd5c8bb1d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpl/package.py
@@ -0,0 +1,119 @@
+##############################################################################
+# 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 *
+import os
+import platform
+
+
+class Hpl(Package):
+ """HPL is a software package that solves a (random) dense linear system
+ in double precision (64 bits) arithmetic on distributed-memory computers.
+ It can thus be regarded as a portable as well as freely available
+ implementation of the High Performance Computing Linpack Benchmark."""
+
+ homepage = "http://www.netlib.org/benchmark/hpl/"
+ url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz"
+
+ version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320')
+
+ variant('openmp', default=False, description='Enable OpenMP support')
+
+ depends_on('mpi@1.1:')
+ depends_on('blas')
+
+ parallel = False
+
+ def configure(self, spec, arch):
+ # List of configuration options
+ # Order is important
+ config = []
+
+ # OpenMP support
+ if '+openmp' in spec:
+ config.append(
+ 'OMP_DEFS = {0}'.format(self.compiler.openmp_flag)
+ )
+
+ config.extend([
+ # Shell
+ 'SHELL = /bin/sh',
+ 'CD = cd',
+ 'CP = cp',
+ 'LN_S = ln -fs',
+ 'MKDIR = mkdir -p',
+ 'RM = /bin/rm -f',
+ 'TOUCH = touch',
+ # Platform identifier
+ 'ARCH = {0}'.format(arch),
+ # HPL Directory Structure / HPL library
+ 'TOPdir = {0}'.format(os.getcwd()),
+ 'INCdir = $(TOPdir)/include',
+ 'BINdir = $(TOPdir)/bin/$(ARCH)',
+ 'LIBdir = $(TOPdir)/lib/$(ARCH)',
+ 'HPLlib = $(LIBdir)/libhpl.a',
+ # Message Passing library (MPI)
+ 'MPinc = -I{0}'.format(spec['mpi'].prefix.include),
+ 'MPlib = -L{0}'.format(spec['mpi'].prefix.lib),
+ # Linear Algebra library (BLAS or VSIPL)
+ 'LAinc = {0}'.format(spec['blas'].prefix.include),
+ 'LAlib = {0}'.format(spec['blas'].blas_shared_lib),
+ # F77 / C interface
+ 'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle',
+ # HPL includes / libraries / specifics
+ 'HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) ' +
+ '-I$(LAinc) -I$(MPinc)',
+ 'HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib)',
+ 'HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT',
+ 'HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)',
+ # Compilers / linkers - Optimization flags
+ 'CC = {0}'.format(spec['mpi'].mpicc),
+ 'CCNOOPT = $(HPL_DEFS)',
+ 'CCFLAGS = $(HPL_DEFS) -O3',
+ 'LINKER = $(CC)',
+ 'LINKFLAGS = $(CCFLAGS) $(OMP_DEFS)',
+ 'ARCHIVER = ar',
+ 'ARFLAGS = r',
+ 'RANLIB = echo'
+ ])
+
+ # Write configuration options to include file
+ with open('Make.{0}'.format(arch), 'w') as makefile:
+ for var in config:
+ makefile.write('{0}\n'.format(var))
+
+ def install(self, spec, prefix):
+ # Arch used for file naming purposes only
+ arch = '{0}-{1}'.format(platform.system(), platform.processor())
+
+ # Generate Makefile include
+ self.configure(spec, arch)
+
+ make('arch={0}'.format(arch))
+
+ # Manual installation
+ install_tree(join_path('bin', arch), prefix.bin)
+ install_tree(join_path('lib', arch), prefix.lib)
+ install_tree(join_path('include', arch), prefix.include)
+ install_tree('man', prefix.man)
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
new file mode 100644
index 0000000000..493ca16417
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -0,0 +1,144 @@
+from spack import *
+import os
+import re
+
+from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \
+ get_all_components
+
+
+class IntelParallelStudio(IntelInstaller):
+ """Intel Parallel Studio.
+
+ Note: You will have to add the download file to a
+ mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://software.llnl.gov/spack/mirrors.html"""
+
+ homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
+
+ # TODO: can also try the online installer (will download files on demand)
+ version('composer.2016.2', '1133fb831312eb519f7da897fec223fa',
+ url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501
+ % os.getcwd())
+ version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
+ url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501
+ version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
+ url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501
+ version('composer.2016.3', '3208eeabee951fc27579177b593cefe9',
+ url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501
+ % os.getcwd())
+ version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
+ url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501
+ version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
+ url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501
+
+ variant('rpath', default=True, description="Add rpath to .cfg files")
+ variant('newdtags', default=False,
+ description="Allow use of --enable-new-dtags in MPI wrappers")
+ variant('all', default=False,
+ description="Install all files with the requested edition")
+ variant('mpi', default=True,
+ description="Install the Intel MPI library and ITAC tool")
+ variant('mkl', default=True, description="Install the Intel MKL library")
+ 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""")
+
+ provides('mpi', when='@cluster:+mpi')
+ provides('mkl', when='+mkl')
+ provides('daal', when='+daal')
+ provides('ipp', when='+ipp')
+
+ def install(self, spec, prefix):
+
+ base_components = "ALL" # when in doubt, install everything
+ mpi_components = ""
+ mkl_components = ""
+ daal_components = ""
+ ipp_components = ""
+
+ if spec.satisfies('+all'):
+ base_components = "ALL"
+ else:
+ all_components = get_all_components()
+ regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
+ base_components = \
+ filter_pick(all_components, re.compile(regex).search)
+ regex = '(icsxe|imb|mpi|itac|intel-tc|clck)'
+ 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)
+
+ components = base_components
+ if not spec.satisfies('+all'):
+ if spec.satisfies('+mpi') and 'cluster' in str(spec.version):
+ components += mpi_components
+ if spec.satisfies('+mkl'):
+ components += mkl_components
+ if spec.satisfies('+daal'):
+ components += daal_components
+ if spec.satisfies('+ipp'):
+ components += ipp_components
+ if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
+ spec.satisfies('@professional')):
+ components += tool_components
+
+ self.intel_components = ';'.join(components)
+ IntelInstaller.install(self, spec, prefix)
+
+ 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")))
+
+ os.symlink(self.global_license_file, os.path.join(absbindir,
+ "license.lic"))
+ if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
+ spec.satisfies('@professional')):
+ os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses"))
+ os.symlink(self.global_license_file, os.path.join(
+ self.prefix, "inspector_xe/licenses", "license.lic"))
+ os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses"))
+ os.symlink(self.global_license_file, os.path.join(
+ self.prefix, "advisor_xe/licenses", "license.lic"))
+ os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses"))
+ os.symlink(self.global_license_file, os.path.join(
+ self.prefix, "vtune_amplifier_xe/licenses", "license.lic"))
+
+ 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"))
+ 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)
+
+ if spec.satisfies('+rpath'):
+ for compiler_command in ["icc", "icpc", "ifort"]:
+ cfgfilename = os.path.join(absbindir, "%s.cfg" %
+ compiler_command)
+ with open(cfgfilename, "w") as f:
+ f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
+
+ os.symlink(os.path.join(self.prefix.man, "common", "man1"),
+ os.path.join(self.prefix.man, "man1"))
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
new file mode 100644
index 0000000000..ec3192380a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -0,0 +1,125 @@
+from spack import *
+import os
+import re
+
+
+def filter_pick(input_list, regex_filter):
+ """Returns the items in input_list that are found in the regex_filter"""
+ return [l for l in input_list for m in (regex_filter(l),) if m]
+
+
+def unfilter_pick(input_list, regex_filter):
+ """Returns the items in input_list that are not found in the
+ regex_filter"""
+ return [l for l in input_list for m in (regex_filter(l),) if not m]
+
+
+def get_all_components():
+ """Returns a list of all the components associated with the downloaded
+ Intel package"""
+ all_components = []
+ with open("pset/mediaconfig.xml", "r") as f:
+ lines = f.readlines()
+ for line in lines:
+ if line.find('<Abbr>') != -1:
+ component = line[line.find('<Abbr>') + 6:line.find('</Abbr>')]
+ all_components.append(component)
+ return all_components
+
+
+class IntelInstaller(Package):
+ """Base package containing common methods for installing Intel software"""
+
+ homepage = "https://software.intel.com/en-us"
+ intel_components = "ALL"
+ license_required = True
+ license_comment = '#'
+ license_files = ['Licenses/license.lic']
+ license_vars = ['INTEL_LICENSE_FILE']
+ license_url = \
+ 'https://software.intel.com/en-us/articles/intel-license-manager-faq'
+
+ @property
+ def global_license_file(self):
+ """Returns the path where a global license file should be stored."""
+ if not self.license_files:
+ return
+ return join_path(self.global_license_dir, "intel",
+ os.path.basename(self.license_files[0]))
+
+ 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
+
+ silent_config_filename = 'silent.cfg'
+ with open(silent_config_filename, 'w') as f:
+ f.write("""
+ACCEPT_EULA=accept
+PSET_MODE=install
+CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
+PSET_INSTALL_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))
+
+ install_script = which("install.sh")
+ install_script('--silent', silent_config_filename)
+
+
+class Intel(IntelInstaller):
+ """Intel Compilers.
+
+ Note: You will have to add the download file to a
+ mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://software.llnl.gov/spack/mirrors.html"""
+
+ homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
+
+ # TODO: can also try the online installer (will download files on demand)
+ version('16.0.2', '1133fb831312eb519f7da897fec223fa',
+ url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501
+ % os.getcwd())
+ version('16.0.3', '3208eeabee951fc27579177b593cefe9',
+ url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501
+ % os.getcwd())
+
+ variant('rpath', default=True, description="Add rpath to .cfg files")
+
+ def install(self, spec, prefix):
+ components = []
+ all_components = get_all_components()
+ regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
+ components = filter_pick(all_components, re.compile(regex).search)
+
+ self.intel_components = ';'.join(components)
+ IntelInstaller.install(self, spec, prefix)
+
+ absbindir = os.path.split(os.path.realpath(os.path.join(
+ self.prefix.bin, "icc")))[0]
+ abslibdir = os.path.split(os.path.realpath(os.path.join(
+ self.prefix.lib, "intel64", "libimf.a")))[0]
+
+ # symlink or copy?
+ os.symlink(self.global_license_file, os.path.join(absbindir,
+ "license.lic"))
+
+ if spec.satisfies('+rpath'):
+ for compiler_command in ["icc", "icpc", "ifort"]:
+ cfgfilename = os.path.join(absbindir, "%s.cfg" %
+ compiler_command)
+ with open(cfgfilename, "w") as f:
+ f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
+
+ os.symlink(os.path.join(self.prefix.man, "common", "man1"),
+ os.path.join(self.prefix.man, "man1"))
diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py
new file mode 100644
index 0000000000..2bd931d5bd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ipp/package.py
@@ -0,0 +1,26 @@
+from spack import *
+import os
+
+from spack.pkg.builtin.intel import IntelInstaller
+
+
+class Ipp(IntelInstaller):
+ """Intel Integrated Performance Primitives.
+
+ Note: You will have to add the download file to a
+ mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://software.llnl.gov/spack/mirrors.html"""
+
+ homepage = "https://software.intel.com/en-us/intel-ipp"
+
+ version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3',
+ url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd())
+
+ def install(self, spec, prefix):
+
+ self.intel_prefix = os.path.join(prefix, "pkg")
+ IntelInstaller.install(self, spec, prefix)
+
+ ipp_dir = os.path.join(self.intel_prefix, "ipp")
+ for f in os.listdir(ipp_dir):
+ os.symlink(os.path.join(ipp_dir, f), os.path.join(self.prefix, f))
diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py
index 3f5a72116e..594271f655 100644
--- a/var/spack/repos/builtin/packages/libdwarf/package.py
+++ b/var/spack/repos/builtin/packages/libdwarf/package.py
@@ -23,11 +23,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
# Only build certain parts of dwarf because the other ones break.
dwarf_dirs = ['libdwarf', 'dwarfdump2']
+
class Libdwarf(Package):
"""The DWARF Debugging Information Format is of interest to
programmers working on compilers and debuggers (and any one
@@ -41,18 +41,17 @@ class Libdwarf(Package):
MIPS/IRIX C compiler."""
homepage = "http://www.prevanders.net/dwarf.html"
- url = "http://www.prevanders.net/libdwarf-20130729.tar.gz"
+ url = "http://www.prevanders.net/libdwarf-20160507.tar.gz"
list_url = homepage
+ version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811')
version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d')
version('20130207', '64b42692e947d5180e162e46c689dfbf')
version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db')
-
depends_on("libelf")
parallel = False
-
def install(self, spec, prefix):
# dwarf build does not set arguments for ar properly
make.add_default_arg('ARFLAGS=rcs')
@@ -69,7 +68,11 @@ class Libdwarf(Package):
install('libdwarf.h', prefix.include)
install('dwarf.h', prefix.include)
- with working_dir('dwarfdump2'):
+ if spec.satisfies('@20130126:20130729'):
+ dwarfdump_dir = 'dwarfdump2'
+ else:
+ dwarfdump_dir = 'dwarfdump'
+ with working_dir(dwarfdump_dir):
configure("--prefix=" + prefix)
# This makefile has strings of copy commands that
diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py
index 42e8711a7d..91cef95cec 100644
--- a/var/spack/repos/builtin/packages/libpciaccess/package.py
+++ b/var/spack/repos/builtin/packages/libpciaccess/package.py
@@ -37,7 +37,7 @@ class Libpciaccess(Package):
def install(self, spec, prefix):
# libpciaccess does not support OS X
- if spec.satisfies('arch=darwin-x86_64'):
+ if spec.satisfies('platform=darwin'):
# create a dummy directory
mkdir(prefix.lib)
return
diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
new file mode 100644
index 0000000000..4bcca43c24
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpthread-stubs/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# 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 LibpthreadStubs(Package):
+ """The libpthread-stubs package provides weak aliases for pthread
+ functions not provided in libc or otherwise available by
+ default. """
+ homepage = "http://xcb.freedesktop.org/"
+ url = "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2"
+
+ version('0.3', 'e8fa31b42e13f87e8f5a7a2b731db7ee')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py
new file mode 100644
index 0000000000..55816ecdbd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libxau/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 Libxau(Package):
+ """The libXau package contains a library implementing the X11
+ Authorization Protocol. This is useful for restricting client
+ access to the display."""
+ homepage = "http://xcb.freedesktop.org/"
+ url = "http://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2"
+
+ version('1.0.8', '685f8abbffa6d145c0f930f00703b21b')
+
+ depends_on('xproto')
+
+ def install(self, spec, prefix):
+ # FIXME: Modify the configure line to suit your build system here.
+ configure('--prefix=%s' % prefix)
+
+ # FIXME: Add logic to build and install here
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py
index 0f39bb0f1d..746d4567e2 100644
--- a/var/spack/repos/builtin/packages/libxcb/package.py
+++ b/var/spack/repos/builtin/packages/libxcb/package.py
@@ -35,18 +35,19 @@ class Libxcb(Package):
version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb')
version('1.11.1', '118623c15a96b08622603a71d8789bf3')
+
depends_on("python")
depends_on("xcb-proto")
depends_on("pkg-config")
-
- # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev
- # depends_on('xau') # Ubuntu: apt-get install libxau-dev
+ depends_on("libpthread-stubs")
+ depends_on('libxau')
def patch(self):
filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h')
def install(self, spec, prefix):
+ env['PKG_CONFIG_PATH'] = env['PKG_CONFIG_PATH'] + ':/usr/lib64/pkgconfig'
configure("--prefix=%s" % prefix)
make()
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index c090c131c6..7a6ea7401c 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os, shutil
+import os, glob
class Llvm(Package):
@@ -46,7 +46,9 @@ class Llvm(Package):
variant('libcxx', default=True, description="Build the LLVM C++ standard library")
variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers")
variant('gold', default=True, description="Add support for LTO with the gold linker plugin")
-
+ variant('shared_libs', default=False, description="Build all components as shared libraries, faster, less memory to build, less stable")
+ variant('link_dylib', default=False, description="Build and link the libLLVM shared library rather than static")
+ variant('all_targets', default=True, description="Build all supported targets, default targets <current arch>,NVPTX,AMDGPU,CppBackend")
# Build dependency
depends_on('cmake @2.8.12.2:')
@@ -257,6 +259,28 @@ class Llvm(Package):
if '+compiler-rt' not in spec:
cmake_args.append('-DLLVM_EXTERNAL_COMPILER_RT_BUILD:Bool=OFF')
+ if '+shared_libs' in spec:
+ cmake_args.append('-DBUILD_SHARED_LIBS:Bool=ON')
+
+ if '+link_dylib' in spec:
+ cmake_args.append('-DLLVM_LINK_LLVM_DYLIB:Bool=ON')
+
+ if '+all_targets' not in spec: # all is default on cmake
+ targets = ['CppBackend', 'NVPTX', 'AMDGPU']
+ if 'x86' in spec.architecture.target.lower():
+ targets.append('X86')
+ elif 'arm' in spec.architecture.target.lower():
+ targets.append('ARM')
+ elif 'aarch64' in spec.architecture.target.lower():
+ targets.append('AArch64')
+ elif 'sparc' in spec.architecture.target.lower():
+ targets.append('sparc')
+ elif ('ppc' in spec.architecture.target.lower() or
+ 'power' in spec.architecture.target.lower()):
+ targets.append('PowerPC')
+
+ cmake_args.append('-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets))
+
if '+clang' not in spec:
if '+clang_extra' in spec:
raise SpackException('The clang_extra variant requires the clang variant to be selected')
@@ -267,7 +291,5 @@ class Llvm(Package):
cmake(*cmake_args)
make()
make("install")
- query_path = os.path.join('bin', 'clang-query')
- # Manually install clang-query, because llvm doesn't...
- if os.path.exists(query_path):
- shutil.copy(query_path, os.path.join(prefix, 'bin'))
+ cp = which('cp')
+ cp('-a', 'bin/', prefix)
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index 0a8b9b4577..7d75866d52 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
+
class Lmod(Package):
"""
@@ -34,17 +34,25 @@ class Lmod(Package):
variable. Modulefiles for Library packages provide environment variables
that specify where the library and header files can be found.
"""
- homepage = "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod"
- url = "http://sourceforge.net/projects/lmod/files/Lmod-6.0.1.tar.bz2/download"
+ homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' # NOQA: ignore=E501
+ url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz'
+ version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4')
+ version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1')
version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9')
- depends_on("lua@5.2:")
+ depends_on('lua@5.2:')
+ depends_on('lua-luaposix')
+ depends_on('lua-luafilesystem')
+
+ parallel = False
+
+ def setup_environment(self, spack_env, run_env):
+ stage_lua_path = join_path(
+ self.stage.path, 'Lmod-{version}', 'src', '?.lua')
+ spack_env.append_path('LUA_PATH', stage_lua_path.format(
+ version=self.version), separator=';')
def install(self, spec, prefix):
- # Add our lua to PATH
- os.environ['PATH'] = spec['lua'].prefix.bin + ';' + os.environ['PATH']
-
configure('--prefix=%s' % prefix)
- make()
- make("install")
+ make('install')
diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
new file mode 100644
index 0000000000..a61b9dd675
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 LuaLuafilesystem(Package):
+ """
+ LuaFileSystem is a Lua library developed to complement the set of
+ functions related to file systems offered by the standard Lua distribution.
+
+ LuaFileSystem offers a portable way to access the underlying directory
+ structure and file attributes.
+
+ LuaFileSystem is free software and uses the same license as Lua 5.1
+ """
+ homepage = 'http://keplerproject.github.io/luafilesystem'
+ url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz'
+
+ version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95')
+
+ extends('lua')
+
+ def install(self, spec, prefix):
+ rockspec_fmt = join_path(self.stage.path,
+ 'luafilesystem-v_{version.underscored}',
+ 'rockspecs',
+ 'luafilesystem-{version.dotted}-1.rockspec')
+ luarocks('--tree=' + prefix, 'install',
+ rockspec_fmt.format(version=self.spec.version))
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py
index 170f90516a..761932361b 100644
--- a/var/spack/repos/builtin/packages/lua/package.py
+++ b/var/spack/repos/builtin/packages/lua/package.py
@@ -57,7 +57,7 @@ class Lua(Package):
placement='luarocks')
def install(self, spec, prefix):
- if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"):
+ if spec.satisfies("platform=darwin"):
target = 'macosx'
else:
target = 'linux'
@@ -105,6 +105,9 @@ class Lua(Package):
spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';')
spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';')
+ # Add LUA to PATH for dependent packages
+ spack_env.prepend_path('PATH', self.prefix.bin)
+
# For run time environment set only the path for extension_spec and
# prepend it to LUAPATH
if extension_spec.package.extends(self.spec):
@@ -153,5 +156,5 @@ class Lua(Package):
"""
# Lua extension builds can have lua and luarocks executable functions
module.lua = Executable(join_path(self.spec.prefix.bin, 'lua'))
- module.luarocks = Executable(join_path(self.spec.prefix.bin,
- 'luarocks'))
+ module.luarocks = Executable(
+ join_path(self.spec.prefix.bin, 'luarocks'))
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 061179b78e..c4f2afaff2 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -24,55 +24,61 @@
##############################################################################
from spack import *
-import glob, sys, os
+import glob
+import sys
+import os
+
class Metis(Package):
- """
- METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill
- reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel
- recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.
- """
+ """METIS is a set of serial programs for partitioning graphs, partitioning
+ finite element meshes, and producing fill reducing orderings for sparse
+ matrices. The algorithms implemented in METIS are based on the
+ multilevel recursive-bisection, multilevel k-way, and multi-constraint
+ partitioning schemes."""
- homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview'
- url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
+ homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview"
+ base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis"
- version('5.1.0', '5465e67079419a69e0116de24fce58fe',
- url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz')
- version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55',
- url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz')
+ version('5.1.0', '5465e67079419a69e0116de24fce58fe')
+ version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5')
+ version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds the library in debug mode')
variant('gdb', default=False, description='Enables gdb support')
variant('idx64', default=False, description='Use int64_t as default index type')
- variant('double', default=False, description='Use double precision floating point types')
+ variant('real64', default=False, description='Use double precision floating point types')
- depends_on('cmake @2.8:', when='@5:') # build-time dependency
- depends_on('gdb', when='+gdb')
+ depends_on('cmake@2.8:', when='@5:') # build-time dependency
patch('install_gklib_defs_rename.patch', when='@5:')
+ def url_for_version(self, version):
+ verdir = 'OLD/' if version < Version('4.0.3') else ''
+ return '%s/%smetis-%s.tar.gz' % (Metis.base_url, verdir, version)
- @when('@4:4.0.3')
+ @when('@:4')
def install(self, spec, prefix):
-
- if '+gdb' in spec:
- raise InstallError('gdb support not implemented in METIS 4!')
- if '+idx64' in spec:
- raise InstallError('idx64 option not implemented in METIS 4!')
- if '+double' in spec:
- raise InstallError('double option not implemented for METIS 4!')
+ # Process library spec and options
+ unsupp_vars = [v for v in ('+gdb', '+idx64', '+real64') if v in spec]
+ if unsupp_vars:
+ msg = 'Given variants %s are unsupported by METIS 4!' % unsupp_vars
+ raise InstallError(msg)
options = ['COPTIONS=-fPIC']
if '+debug' in spec:
options.append('OPTFLAGS=-g -O0')
make(*options)
+ # Compile and install library files
+ ccompile = Executable(self.compiler.cc)
+
mkdir(prefix.bin)
- for x in ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh',
- 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk'):
- install(x, prefix.bin)
+ binfiles = ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh',
+ 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk')
+ for binfile in binfiles:
+ install(binfile, prefix.bin)
mkdir(prefix.lib)
install('libmetis.a', prefix.lib)
@@ -82,106 +88,120 @@ class Metis(Package):
install(h, prefix.include)
mkdir(prefix.share)
- for f in (join_path(*p)
- for p in (('Programs', 'io.c'),
- ('Test','mtest.c'),
- ('Graphs','4elt.graph'),
- ('Graphs', 'metis.mesh'),
- ('Graphs', 'test.mgraph'))):
- install(f, prefix.share)
+ sharefiles = (('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'),
+ ('Graphs', 'test.mgraph'))
+ for sharefile in tuple(join_path(*sf) for sf in sharefiles):
+ install(sharefile, prefix.share)
if '+shared' in spec:
+ shared_flags = ['-fPIC', '-shared']
if sys.platform == 'darwin':
- lib_dsuffix = 'dylib'
- load_flag = '-Wl,-all_load'
- no_load_flag = ''
+ shared_suffix = 'dylib'
+ shared_flags.extend(['-Wl,-all_load', 'libmetis.a'])
else:
- lib_dsuffix = 'so'
- load_flag = '-Wl,-whole-archive'
- no_load_flag = '-Wl,-no-whole-archive'
+ shared_suffix = 'so'
+ shared_flags.extend(['-Wl,-whole-archive', 'libmetis.a',
+ '-Wl,-no-whole-archive'])
- os.system(spack_cc + ' -fPIC -shared ' + load_flag +
- ' libmetis.a ' + no_load_flag + ' -o libmetis.' +
- lib_dsuffix)
- install('libmetis.' + lib_dsuffix, prefix.lib)
+ shared_out = '%s/libmetis.%s' % (prefix.lib, shared_suffix)
+ shared_flags.extend(['-o', shared_out])
- # Set up and run tests on installation
- symlink(join_path(prefix.share, 'io.c'), 'io.c')
- symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c')
- os.system(spack_cc + ' -I%s' % prefix.include + ' -c io.c')
- os.system(spack_cc + ' -I%s' % prefix.include +
- ' -L%s' % prefix.lib + ' -lmetis mtest.c io.o -o mtest')
- _4eltgraph = join_path(prefix.share, '4elt.graph')
- test_mgraph = join_path(prefix.share, 'test.mgraph')
- metis_mesh = join_path(prefix.share, 'metis.mesh')
- kmetis = join_path(prefix.bin, 'kmetis')
- os.system('./mtest ' + _4eltgraph)
- os.system(kmetis + ' ' + _4eltgraph + ' 40')
- os.system(join_path(prefix.bin, 'onmetis') + ' ' + _4eltgraph)
- os.system(join_path(prefix.bin, 'pmetis') + ' ' + test_mgraph + ' 2')
- os.system(kmetis + ' ' + test_mgraph + ' 2')
- os.system(kmetis + ' ' + test_mgraph + ' 5')
- os.system(join_path(prefix.bin, 'partnmesh') + metis_mesh + ' 10')
- os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10')
- os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh)
+ ccompile(*shared_flags)
+ # Set up and run tests on installation
+ ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib,
+ '-Wl,-rpath=%s' % (prefix.lib if '+shared' in spec else ''),
+ join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'),
+ '-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm')
+
+ test_bin = lambda testname: join_path(prefix.bin, testname)
+ test_graph = lambda graphname: join_path(prefix.share, graphname)
+
+ graph = test_graph('4elt.graph')
+ os.system('%s %s' % (test_bin('mtest'), graph))
+ os.system('%s %s 40' % (test_bin('kmetis'), graph))
+ os.system('%s %s' % (test_bin('onmetis'), graph))
+ graph = test_graph('test.mgraph')
+ os.system('%s %s 2' % (test_bin('pmetis'), graph))
+ os.system('%s %s 2' % (test_bin('kmetis'), graph))
+ os.system('%s %s 5' % (test_bin('kmetis'), graph))
+ graph = test_graph('metis.mesh')
+ os.system('%s %s 10' % (test_bin('partnmesh'), graph))
+ os.system('%s %s 10' % (test_bin('partdmesh'), graph))
+ os.system('%s %s' % (test_bin('mesh2dual'), graph))
+
+ # FIXME: The following code should replace the testing code in the
+ # block above since it causes installs to fail when one or more of the
+ # Metis tests fail, but it currently doesn't work because the 'mtest',
+ # 'onmetis', and 'partnmesh' tests return error codes that trigger
+ # false positives for failure.
+ """
+ Executable(test_bin('mtest'))(test_graph('4elt.graph'))
+ Executable(test_bin('kmetis'))(test_graph('4elt.graph'), '40')
+ Executable(test_bin('onmetis'))(test_graph('4elt.graph'))
+
+ Executable(test_bin('pmetis'))(test_graph('test.mgraph'), '2')
+ Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '2')
+ Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '5')
+
+ Executable(test_bin('partnmesh'))(test_graph('metis.mesh'), '10')
+ Executable(test_bin('partdmesh'))(test_graph('metis.mesh'), '10')
+ Executable(test_bin('mesh2dual'))(test_graph('metis.mesh'))
+ """
@when('@5:')
def install(self, spec, prefix):
-
options = []
options.extend(std_cmake_args)
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
- options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory))
+ options.append('-DGKLIB_PATH:PATH=%s/GKlib' % source_directory)
options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
if '+shared' in spec:
options.append('-DSHARED:BOOL=ON')
-
if '+debug' in spec:
options.extend(['-DDEBUG:BOOL=ON',
'-DCMAKE_BUILD_TYPE:STRING=Debug'])
-
if '+gdb' in spec:
options.append('-DGDB:BOOL=ON')
metis_header = join_path(source_directory, 'include', 'metis.h')
-
if '+idx64' in spec:
filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
-
- if '+double' in spec:
+ if '+real64' in spec:
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
# Make clang 7.3 happy.
# Prevents "ld: section __DATA/__thread_bss extends beyond end of file"
# See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059
- # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb
+ # and https://github.com/Homebrew/homebrew-science/blob/master/metis.rb
if spec.satisfies('%clang@7.3.0'):
- filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c'))
+ filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24',
+ join_path(source_directory, 'GKlib', 'error.c'))
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
- make("install")
+ make('install')
+
# now run some tests:
- for f in ["4elt", "copter2", "mdual"]:
- graph = join_path(source_directory,'graphs','%s.graph' % f)
- Executable(join_path(prefix.bin,'graphchk'))(graph)
- Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
- Executable(join_path(prefix.bin,'ndmetis'))(graph)
+ for f in ['4elt', 'copter2', 'mdual']:
+ graph = join_path(source_directory, 'graphs', '%s.graph' % f)
+ Executable(join_path(prefix.bin, 'graphchk'))(graph)
+ Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2')
+ Executable(join_path(prefix.bin, 'ndmetis'))(graph)
- graph = join_path(source_directory,'graphs','test.mgraph')
- Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
- graph = join_path(source_directory,'graphs','metis.mesh')
- Executable(join_path(prefix.bin,'mpmetis'))(graph,'2')
+ graph = join_path(source_directory, 'graphs', 'test.mgraph')
+ Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2')
+ graph = join_path(source_directory, 'graphs', 'metis.mesh')
+ Executable(join_path(prefix.bin, 'mpmetis'))(graph, '2')
# install GKlib headers, which will be needed for ParMETIS
- GKlib_dist = join_path(prefix.include,'GKlib')
+ GKlib_dist = join_path(prefix.include, 'GKlib')
mkdirp(GKlib_dist)
- fs = glob.glob(join_path(source_directory,'GKlib',"*.h"))
- for f in fs:
- install(f, GKlib_dist)
+ hfiles = glob.glob(join_path(source_directory, 'GKlib', '*.h'))
+ for hfile in hfiles:
+ install(hfile, GKlib_dist)
diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py
new file mode 100644
index 0000000000..454e78d29c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mkl/package.py
@@ -0,0 +1,28 @@
+from spack import *
+import os
+
+from spack.pkg.builtin.intel import IntelInstaller
+
+
+class Mkl(IntelInstaller):
+ """Intel Math Kernel Library.
+
+ Note: You will have to add the download file to a
+ mirror so that Spack can find it. For instructions on how to set up a
+ mirror, see http://software.llnl.gov/spack/mirrors.html"""
+
+ homepage = "https://software.intel.com/en-us/intel-mkl"
+
+ version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65',
+ url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd())
+ version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34',
+ url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd())
+
+ def install(self, spec, prefix):
+
+ self.intel_prefix = os.path.join(prefix, "pkg")
+ IntelInstaller.install(self, spec, prefix)
+
+ mkl_dir = os.path.join(self.intel_prefix, "mkl")
+ for f in os.listdir(mkl_dir):
+ os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f))
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index f4997bdfa1..d1944023d1 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -25,6 +25,7 @@
from spack import *
import os
+
class Mvapich2(Package):
"""MVAPICH2 is an MPI implementation for Infiniband networks."""
homepage = "http://mvapich.cse.ohio-state.edu/"
@@ -43,8 +44,9 @@ class Mvapich2(Package):
variant('debug', default=False, description='Enables debug information and error messages at run-time')
##########
- # TODO : Process managers should be grouped into the same variant, as soon as variant capabilities will be extended
- # See https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so
+ # TODO : Process managers should be grouped into the same variant,
+ # as soon as variant capabilities will be extended See
+ # https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so
SLURM = 'slurm'
HYDRA = 'hydra'
GFORKER = 'gforker'
@@ -57,7 +59,8 @@ class Mvapich2(Package):
##########
##########
- # TODO : Network types should be grouped into the same variant, as soon as variant capabilities will be extended
+ # TODO : Network types should be grouped into the same variant, as
+ # soon as variant capabilities will be extended
PSM = 'psm'
SOCK = 'sock'
NEMESISIBTCP = 'nemesisibtcp'
@@ -84,8 +87,8 @@ class Mvapich2(Package):
@staticmethod
def enabled(x):
- """
- Given a variant name returns the string that means the variant is enabled
+ """Given a variant name returns the string that means the variant is
+ enabled
:param x: variant name
:return:
@@ -93,8 +96,8 @@ class Mvapich2(Package):
return '+' + x
def set_build_type(self, spec, configure_args):
- """
- Appends to configure_args the flags that depends only on the build type (i.e. release or debug)
+ """Appends to configure_args the flags that depends only on the build
+ type (i.e. release or debug)
:param spec: spec
:param configure_args: list of current configure arguments
@@ -104,7 +107,8 @@ class Mvapich2(Package):
"--disable-fast",
"--enable-error-checking=runtime",
"--enable-error-messages=all",
- "--enable-g=dbg", "--enable-debuginfo" # Permits debugging with TotalView
+ # Permits debugging with TotalView
+ "--enable-g=dbg", "--enable-debuginfo"
]
else:
build_type_options = ["--enable-fast=all"]
@@ -112,25 +116,41 @@ class Mvapich2(Package):
configure_args.extend(build_type_options)
def set_process_manager(self, spec, configure_args):
- """
- Appends to configure_args the flags that will enable the appropriate process managers
+ """Appends to configure_args the flags that will enable the
+ appropriate process managers
:param spec: spec
:param configure_args: list of current configure arguments
"""
- # Check that slurm variant is not activated together with other pm variants
- has_slurm_incompatible_variants = any(self.enabled(x) in spec for x in Mvapich2.SLURM_INCOMPATIBLE_PMS)
- if self.enabled(Mvapich2.SLURM) in spec and has_slurm_incompatible_variants:
- raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name)
+ # Check that slurm variant is not activated together with
+ # other pm variants
+ has_slurm_incompatible_variants = \
+ any(self.enabled(x) in spec
+ for x in Mvapich2.SLURM_INCOMPATIBLE_PMS)
+
+ if self.enabled(Mvapich2.SLURM) in spec and \
+ has_slurm_incompatible_variants:
+ raise RuntimeError(" %s : 'slurm' cannot be activated \
+ together with other process managers" % self.name)
process_manager_options = []
+ # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2
if self.enabled(Mvapich2.SLURM) in spec:
- process_manager_options = [
- "--with-pm=slurm"
- ]
+ if self.version > Version('2.0'):
+ process_manager_options = [
+ "--with-pmi=pmi2",
+ "--with-pm=slurm"
+ ]
+ else:
+ process_manager_options = [
+ "--with-pmi=slurm",
+ "--with-pm=no"
+ ]
+
elif has_slurm_incompatible_variants:
pms = []
- # The variant name is equal to the process manager name in the configuration options
+ # The variant name is equal to the process manager name in
+ # the configuration options
for x in Mvapich2.SLURM_INCOMPATIBLE_PMS:
if self.enabled(x) in spec:
pms.append(x)
@@ -146,7 +166,9 @@ class Mvapich2(Package):
if self.enabled(x) in spec:
count += 1
if count > 1:
- raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)')
+ raise RuntimeError('network variants are mutually exclusive \
+ (only one can be selected at a time)')
+
network_options = []
# From here on I can suppose that only one variant has been selected
if self.enabled(Mvapich2.PSM) in spec:
@@ -164,6 +186,11 @@ class Mvapich2(Package):
configure_args.extend(network_options)
+ def setup_environment(self, spack_env, run_env):
+ if self.enabled(Mvapich2.SLURM) in self.spec and \
+ self.version > Version('2.0'):
+ run_env.set('SLURM_MPI_TYPE', 'pmi2')
+
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
spack_env.set('MPICH_CC', spack_cc)
spack_env.set('MPICH_CXX', spack_cxx)
@@ -178,7 +205,8 @@ class Mvapich2(Package):
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
def install(self, spec, prefix):
- # we'll set different configure flags depending on our environment
+ # we'll set different configure flags depending on our
+ # environment
configure_args = [
"--prefix=%s" % prefix,
"--enable-shared",
@@ -208,7 +236,6 @@ class Mvapich2(Package):
self.filter_compilers()
-
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
compilers that Spack built the package with.
@@ -228,8 +255,17 @@ class Mvapich2(Package):
spack_f77 = os.environ['F77']
spack_fc = os.environ['FC']
- kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
- filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
- filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
- filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
- filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+ kwargs = {
+ 'ignore_absent': True,
+ 'backup': False,
+ 'string': True
+ }
+
+ filter_file('CC="%s"' % spack_cc,
+ 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
+ filter_file('CXX="%s"' % spack_cxx,
+ 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
+ filter_file('F77="%s"' % spack_f77,
+ 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
+ filter_file('FC="%s"' % spack_fc,
+ 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 22e49daaa7..d09ebd6739 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -48,6 +48,13 @@ class Openblas(Package):
patch('make.patch')
def install(self, spec, prefix):
+ # As of 06/2016 there is no mechanism to specify that packages which
+ # depends on Blas/Lapack need C or/and Fortran symbols. For now
+ # require both.
+ if self.compiler.f77 is None:
+ raise InstallError('OpenBLAS requires both C and Fortran ',
+ 'compilers!')
+
# Configure fails to pick up fortran from FC=/abs/path/to/f77, but
# works fine with FC=/abs/path/to/gfortran.
# When mixing compilers make sure that
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 0e3185db25..be3d1342fc 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -27,6 +27,26 @@ import os
from spack import *
+def _verbs_dir():
+ """
+ Try to find the directory where the OpenFabrics verbs package is
+ installed. Return None if not found.
+ """
+ try:
+ # Try to locate Verbs by looking for a utility in the path
+ ibv_devices = which("ibv_devices")
+ # Run it (silently) to ensure it works
+ ibv_devices(output=str, error=str)
+ # Get path to executable
+ path = ibv_devices.exe[0]
+ # Remove executable name and "bin" directory
+ path = os.path.dirname(path)
+ path = os.path.dirname(path)
+ return path
+ except:
+ return None
+
+
class Openmpi(Package):
"""Open MPI is a project combining technologies and resources from
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI)
@@ -54,7 +74,7 @@ class Openmpi(Package):
variant('psm', default=False, description='Build support for the PSM library.')
variant('psm2', default=False, description='Build support for the Intel PSM2 library.')
variant('pmi', default=False, description='Build support for PMI-based launchers')
- variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+ variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.')
variant('mxm', default=False, description='Build Mellanox Messaging support')
variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support')
@@ -101,6 +121,13 @@ class Openmpi(Package):
return 'verbs'
def install(self, spec, prefix):
+ # As of 06/2016 there is no mechanism to specify that packages which
+ # depends on MPI need C or/and Fortran implementation. For now
+ # require both.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError('OpenMPI requires both C and Fortran ',
+ 'compilers!')
+
config_args = ["--prefix=%s" % prefix,
"--with-hwloc=%s" % spec['hwloc'].prefix,
"--enable-shared",
@@ -113,7 +140,6 @@ class Openmpi(Package):
# Fabrics
'--with-psm' if '+psm' in spec else '--without-psm',
'--with-psm2' if '+psm2' in spec else '--without-psm2',
- ('--with-%s' % self.verbs) if '+verbs' in spec else ('--without-%s' % self.verbs),
'--with-mxm' if '+mxm' in spec else '--without-mxm',
# Other options
'--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple',
@@ -121,6 +147,14 @@ class Openmpi(Package):
'--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3',
'--enable-vt' if '+vt' in spec else '--disable-vt'
])
+ if '+verbs' in spec:
+ path = _verbs_dir()
+ if path is not None and path not in ('/usr', '/usr/local'):
+ config_args.append('--with-%s=%s' % (self.verbs, path))
+ else:
+ config_args.append('--with-%s' % self.verbs)
+ else:
+ config_args.append('--without-%s' % self.verbs)
# TODO: use variants for this, e.g. +lanl, +llnl, etc.
# use this for LANL builds, but for LLNL builds, we need:
diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py
index 34ab0703ad..377bffe723 100644
--- a/var/spack/repos/builtin/packages/openssl/package.py
+++ b/var/spack/repos/builtin/packages/openssl/package.py
@@ -100,7 +100,7 @@ class Openssl(Package):
# in the environment, then this will override what is set in the
# Makefile, leading to build errors.
env.pop('APPS', None)
- if spec.satisfies("arch=darwin-x86_64") or spec.satisfies("arch=ppc64"):
+ if spec.satisfies("target=x86_64") or spec.satisfies("target=ppc64"):
# This needs to be done for all 64-bit architectures (except Linux,
# where it happens automatically?)
env['KERNEL_BITS'] = '64'
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index 2dead4a76a..9b36f273e4 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -26,33 +26,36 @@
from spack import *
import sys
+
class Parmetis(Package):
- """
- ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured
- graphs, meshes, and for computing fill-reducing orderings of sparse matrices.
- """
+ """ParMETIS is an MPI-based parallel library that implements a variety of
+ algorithms for partitioning unstructured graphs, meshes, and for
+ computing fill-reducing orderings of sparse matrices."""
+
homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview'
- url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz'
+ base_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis'
version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628')
+ version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds the library in debug mode')
variant('gdb', default=False, description='Enables gdb support')
- depends_on('cmake @2.8:') # build dependency
+ depends_on('cmake@2.8:') # build dependency
depends_on('mpi')
-
- patch('enable_external_metis.patch')
depends_on('metis@5:')
+ patch('enable_external_metis.patch')
# bug fixes from PETSc developers
- # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
+ # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ # NOQA: ignore=E501
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
- # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
+ # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ # NOQA: ignore=E501
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
- depends_on('gdb', when='+gdb')
+ def url_for_version(self, version):
+ verdir = 'OLD/' if version < Version('3.2.0') else ''
+ return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, verdir, version)
def install(self, spec, prefix):
options = []
@@ -60,30 +63,27 @@ class Parmetis(Package):
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
- metis_source = join_path(source_directory, 'metis')
- # FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case
- # FIXME : they use a non-standard name
- options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=spec['metis'].prefix.include),
- '-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix),
- '-DCMAKE_C_COMPILER:STRING=mpicc',
- '-DCMAKE_CXX_COMPILER:STRING=mpicxx'])
+ options.extend([
+ '-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include,
+ '-DMETIS_PATH:PATH=%s' % spec['metis'].prefix,
+ '-DCMAKE_C_COMPILER:STRING=%s' % spec['mpi'].mpicc,
+ '-DCMAKE_CXX_COMPILER:STRING=%s' % spec['mpi'].mpicxx
+ ])
if '+shared' in spec:
options.append('-DSHARED:BOOL=ON')
-
if '+debug' in spec:
options.extend(['-DDEBUG:BOOL=ON',
'-DCMAKE_BUILD_TYPE:STRING=Debug'])
-
if '+gdb' in spec:
options.append('-DGDB:BOOL=ON')
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
- make("install")
+ make('install')
- # The shared library is not installed correctly on Darwin; correct this
+ # The shared library is not installed correctly on Darwin; fix this
if (sys.platform == 'darwin') and ('+shared' in spec):
fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/pcre/intel.patch b/var/spack/repos/builtin/packages/pcre/intel.patch
new file mode 100644
index 0000000000..f160f55e1b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pcre/intel.patch
@@ -0,0 +1,12 @@
+diff -up pcre-8.38/pcrecpp.cc.intel pcre-8.38/pcrecpp.cc
+--- pcre-8.38/pcrecpp.cc.intel 2014-09-15 07:48:59.000000000 -0600
++++ pcre-8.38/pcrecpp.cc 2016-06-08 16:16:56.702721214 -0600
+@@ -66,7 +66,7 @@ Arg RE::no_arg((void*)NULL);
+ // inclusive test if we ever needed it. (Note that not only the
+ // __attribute__ syntax, but also __USER_LABEL_PREFIX__, are
+ // gnu-specific.)
+-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__)
++#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) && !defined(__INTEL_COMPILER)
+ # define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x)
+ # define ULP_AS_STRING_INTERNAL(x) #x
+ # define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__)
diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py
index 7a9f3b911d..8e0f83110e 100644
--- a/var/spack/repos/builtin/packages/pcre/package.py
+++ b/var/spack/repos/builtin/packages/pcre/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class Pcre(Package):
"""The PCRE package contains Perl Compatible Regular Expression
libraries. These are useful for implementing regular expression
@@ -34,6 +35,8 @@ class Pcre(Package):
version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97')
version('8.38', '00aabbfe56d5a48b270f999b508c5ad2')
+ patch("intel.patch")
+
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index 86875bbcae..a9962777dc 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -24,29 +24,38 @@
##############################################################################
from spack import *
+
class PyAstropy(Package):
- """
- The Astropy Project is a community effort to develop a single core
+ """The Astropy Project is a community effort to develop a single core
package for Astronomy in Python and foster interoperability between
- Python astronomy packages.
- """
+ Python astronomy packages."""
+
homepage = 'http://www.astropy.org/'
+ url = 'https://pypi.python.org/packages/source/a/astropy/astropy-1.1.2.tar.gz'
+ version('1.1.2', 'cbe32023b5b1177d1e2498a0d00cda51')
version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d')
- def url_for_version(self, version):
- return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version)
-
+ # Required dependencies
extends('python')
+ depends_on('py-numpy')
- depends_on('cfitsio')
- depends_on('expat')
+ # Optional dependencies
depends_on('py-h5py')
- depends_on('py-numpy')
+ depends_on('py-beautifulsoup4')
+ depends_on('py-pyyaml')
depends_on('py-scipy')
+ depends_on('libxml2')
+ depends_on('py-matplotlib')
+ depends_on('py-pytz')
+ depends_on('py-scikit-image')
+ depends_on('py-pandas')
+
+ # System dependencies
+ depends_on('cfitsio')
+ depends_on('expat')
def install(self, spec, prefix):
python('setup.py', 'build', '--use-system-cfitsio',
- '--use-system-expat')
- python('setup.py', 'install', '--prefix=' + prefix)
-
+ '--use-system-expat')
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py
new file mode 100644
index 0000000000..64368fe70d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/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 PyBeautifulsoup4(Package):
+ """Beautiful Soup is a Python library for pulling data out of HTML and
+ XML files. It works with your favorite parser to provide idiomatic ways
+ of navigating, searching, and modifying the parse tree."""
+
+ homepage = "https://www.crummy.com/software/BeautifulSoup"
+ url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.4.1.tar.gz"
+
+ version('4.4.1', '8fbd9a7cac0704645fa20d1419036815')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py
new file mode 100644
index 0000000000..d57ef4bd76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-emcee/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 PyEmcee(Package):
+ """emcee is an MIT licensed pure-Python implementation of Goodman & Weare's
+ Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler."""
+
+ homepage = "http://dan.iel.fm/emcee/current/"
+ url = "https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz"
+
+ version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7')
+
+ extends('python')
+ depends_on('py-numpy')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index de72bac44e..0180b658f5 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -23,21 +23,42 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import re
+
class PyH5py(Package):
- """The h5py package provides both a high- and low-level interface to the HDF5 library from Python."""
+ """The h5py package provides both a high- and low-level interface to the
+ HDF5 library from Python."""
+
homepage = "https://pypi.python.org/pypi/h5py"
url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz"
- version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758')
+ version('2.6.0', 'ec476211bd1de3f5ac150544189b0bf4')
version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74')
+ version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758')
+
+ variant('mpi', default=False, description='Build with MPI support')
- extends('python', ignore=lambda f: re.match(r'bin/cy*', f))
- depends_on('hdf5')
- depends_on('py-numpy')
- depends_on('py-cython')
+ extends('python')
+
+ # Build dependencies
+ depends_on('py-cython@0.19:')
+ depends_on('pkg-config')
+ depends_on('hdf5@1.8.4:+mpi', when='+mpi')
+ depends_on('hdf5@1.8.4:~mpi', when='~mpi')
+ depends_on('mpi', when='+mpi')
+
+ # Build and runtime dependencies
+ depends_on('py-numpy@1.6.1:')
+
+ # Runtime dependencies
+ depends_on('py-six')
def install(self, spec, prefix):
- python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix)
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ python('setup.py', 'configure',
+ '--hdf5={0}'.format(spec['hdf5'].prefix))
+
+ if '+mpi' in spec:
+ env['CC'] = spec['mpi'].mpicc
+ python('setup.py', 'configure', '--mpi')
+
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py
new file mode 100644
index 0000000000..47751a702d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-iminuit/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# 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 PyIminuit(Package):
+ """Interactive IPython-Friendly Minimizer based on SEAL Minuit2."""
+
+ homepage = "https://pypi.python.org/pypi/iminuit"
+ url = "https://pypi.python.org/packages/source/i/iminuit/iminuit-1.2.tar.gz"
+
+ version('1.2', '4701ec472cae42015e26251703e6e984')
+
+ # Required dependencies
+ extends('python')
+ depends_on('py-setuptools')
+
+ # Optional dependencies
+ depends_on('py-numpy')
+ depends_on('py-matplotlib')
+ depends_on('py-cython')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py
new file mode 100644
index 0000000000..16506e3eca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-nestle/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 PyNestle(Package):
+ """Nested sampling algorithms for evaluating Bayesian evidence."""
+
+ homepage = "http://kbarbary.github.io/nestle/"
+ url = "https://pypi.python.org/packages/source/n/nestle/nestle-0.1.1.tar.gz"
+
+ version('0.1.1', '4875c0f9a0a8e263c1d7f5fa6ce604c5')
+
+ # Required dependencies
+ extends('python')
+ depends_on('py-numpy')
+
+ # Optional dependencies
+ depends_on('py-scipy')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-ply/package.py b/var/spack/repos/builtin/packages/py-ply/package.py
new file mode 100644
index 0000000000..47cd3b5dc8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ply/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# 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 PyPly(Package):
+ """PLY is nothing more than a straightforward lex/yacc implementation."""
+ homepage = "http://www.dabeaz.com/ply"
+ url = "http://www.dabeaz.com/ply/ply-3.8.tar.gz"
+
+ version('3.8', '94726411496c52c87c2b9429b12d5c50')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py
new file mode 100644
index 0000000000..82ae2a2e69
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 PySncosmo(Package):
+ """SNCosmo is a Python library for high-level supernova cosmology
+ analysis."""
+
+ homepage = "http://sncosmo.readthedocs.io/"
+ url = "https://pypi.python.org/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz"
+
+ version('1.2.0', '028e6d1dc84ab1c17d2f3b6378b2cb1e')
+
+ # Required dependencies
+ # py-sncosmo binaries are duplicates of those from py-astropy
+ extends('python', ignore=r'bin/.*')
+ depends_on('py-numpy')
+ depends_on('py-scipy')
+ depends_on('py-astropy')
+
+ # Recommended dependencies
+ depends_on('py-matplotlib')
+ depends_on('py-iminuit')
+ depends_on('py-emcee')
+ depends_on('py-nestle')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-wcsaxes/package.py b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
new file mode 100644
index 0000000000..b0adbe3658
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 PyWcsaxes(Package):
+ """WCSAxes is a framework for making plots of Astronomical data
+ in Matplotlib."""
+
+ homepage = "http://wcsaxes.readthedocs.io/en/latest/index.html"
+ url = "https://github.com/astrofrog/wcsaxes/archive/v0.8.tar.gz"
+
+ version('0.8', 'de1c60fdae4c330bf5ddb9f1ab5ab920')
+
+ extends('python', ignore=r'bin/pbr')
+ depends_on('py-numpy')
+ depends_on('py-matplotlib')
+ depends_on('py-astropy')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 86c12498e1..b6a62bf742 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -22,9 +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 functools
-import glob
-import inspect
import os
import re
from contextlib import closing
@@ -37,11 +34,10 @@ from spack.util.environment import *
class Python(Package):
"""The Python programming language."""
+
homepage = "http://www.python.org"
url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
- extendable = True
-
version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe')
version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36')
version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True)
@@ -49,6 +45,8 @@ class Python(Package):
version('2.7.9', '5eebcaa0030dc4061156d3429657fb83')
version('2.7.8', 'd4bca0159acb0b44a781292b5231936f')
+ extendable = True
+
depends_on("openssl")
depends_on("bzip2")
depends_on("readline")
@@ -64,39 +62,63 @@ class Python(Package):
# Rest of install is pretty standard except setup.py needs to
# be able to read the CPPFLAGS and LDFLAGS as it scans for the
# library and headers to build
- configure_args= [
- "--prefix=%s" % prefix,
- "--with-threads",
- "--enable-shared",
- "CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % (
- spec['openssl'].prefix, spec['bzip2'].prefix,
- spec['readline'].prefix, spec['ncurses'].prefix,
- spec['sqlite'].prefix, spec['zlib'].prefix),
- "LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % (
- spec['openssl'].prefix, spec['bzip2'].prefix,
- spec['readline'].prefix, spec['ncurses'].prefix,
- spec['sqlite'].prefix, spec['zlib'].prefix)
- ]
+ cppflags = ' -I'.join([
+ spec['openssl'].prefix.include, spec['bzip2'].prefix.include,
+ spec['readline'].prefix.include, spec['ncurses'].prefix.include,
+ spec['sqlite'].prefix.include, spec['zlib'].prefix.include
+ ])
+
+ ldflags = ' -L'.join([
+ spec['openssl'].prefix.lib, spec['bzip2'].prefix.lib,
+ spec['readline'].prefix.lib, spec['ncurses'].prefix.lib,
+ spec['sqlite'].prefix.lib, spec['zlib'].prefix.lib
+ ])
+
+ config_args = [
+ "--prefix={0}".format(prefix),
+ "--with-threads",
+ "--enable-shared",
+ "CPPFLAGS=-I{0}".format(cppflags),
+ "LDFLAGS=-L{0}".format(ldflags)
+ ]
+
if spec.satisfies('@3:'):
- configure_args.append('--without-ensurepip')
- configure(*configure_args)
+ config_args.append('--without-ensurepip')
+
+ configure(*config_args)
+
make()
make("install")
- # Modify compiler paths in configuration files. This is necessary for
- # building site packages outside of spack
- filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
- (r'\4\5'),
- join_path(prefix.lib, 'python%d.%d' % self.version[:2], '_sysconfigdata.py'))
+ self.filter_compilers(spec, prefix)
+
+ def filter_compilers(self, spec, prefix):
+ """Run after install to tell the configuration files and Makefiles
+ to use the compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC and CXX set to Spack's generic
+ cc and c++. We want them to be bound to whatever compiler
+ they were built with."""
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
- python3_version = ''
+ dirname = join_path(prefix.lib,
+ 'python{0}'.format(self.version.up_to(2)))
+
+ config = 'config'
if spec.satisfies('@3:'):
- python3_version = '-%d.%dm' % self.version[:2]
- makefile_filepath = join_path(prefix.lib, 'python%d.%d' % self.version[:2], 'config%s' % python3_version, 'Makefile')
- filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
- (r'\4\5'),
- makefile_filepath)
+ config = 'config-{0}m'.format(self.version.up_to(2))
+
+ files = [
+ '_sysconfigdata.py',
+ join_path(config, 'Makefile')
+ ]
+ for filename in files:
+ filter_file(env['CC'], self.compiler.cc,
+ join_path(dirname, filename), **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx,
+ join_path(dirname, filename), **kwargs)
# ========================================================================
# Set up environment to make install easy for python extensions.
@@ -104,57 +126,59 @@ class Python(Package):
@property
def python_lib_dir(self):
- return os.path.join('lib', 'python%d.%d' % self.version[:2])
-
+ return join_path('lib', 'python{0}'.format(self.version.up_to(2)))
@property
def python_include_dir(self):
- return os.path.join('include', 'python%d.%d' % self.version[:2])
-
+ return join_path('include', 'python{0}'.format(self.version.up_to(2)))
@property
def site_packages_dir(self):
- return os.path.join(self.python_lib_dir, 'site-packages')
-
+ return join_path(self.python_lib_dir, 'site-packages')
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
- # TODO: do this only for actual extensions.
+ """Set PYTHONPATH to include site-packages dir for the
+ extension and any other python extensions it depends on."""
- # Set PYTHONPATH to include site-packages dir for the
- # extension and any other python extensions it depends on.
python_paths = []
for d in extension_spec.traverse():
if d.package.extends(self.spec):
- python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
+ python_paths.append(join_path(d.prefix,
+ self.site_packages_dir))
pythonpath = ':'.join(python_paths)
spack_env.set('PYTHONPATH', pythonpath)
- # For run time environment set only the path for extension_spec and prepend it to PYTHONPATH
+ # For run time environment set only the path for
+ # extension_spec and prepend it to PYTHONPATH
if extension_spec.package.extends(self.spec):
- run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir))
-
+ run_env.prepend_path('PYTHONPATH', join_path(
+ extension_spec.prefix, self.site_packages_dir))
def setup_dependent_package(self, module, ext_spec):
- """
- Called before python modules' install() methods.
+ """Called before python modules' install() methods.
In most cases, extensions will only need to have one line::
- python('setup.py', 'install', '--prefix=%s' % prefix)
- """
+ python('setup.py', 'install', '--prefix={0}'.format(prefix))"""
+
# Python extension builds can have a global python executable function
- if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
- module.python = Executable(join_path(self.spec.prefix.bin, 'python3'))
+ if Version("3.0.0") <= self.version < Version("4.0.0"):
+ module.python = Executable(join_path(self.spec.prefix.bin,
+ 'python3'))
else:
- module.python = Executable(join_path(self.spec.prefix.bin, 'python'))
+ module.python = Executable(join_path(self.spec.prefix.bin,
+ 'python'))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
- module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
- module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir)
- module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
-
- # Make the site packages directory for extensions, if it does not exist already.
+ module.python_lib_dir = join_path(ext_spec.prefix,
+ self.python_lib_dir)
+ module.python_include_dir = join_path(ext_spec.prefix,
+ self.python_include_dir)
+ module.site_packages_dir = join_path(ext_spec.prefix,
+ self.site_packages_dir)
+
+ # Make the site packages directory for extensions
if ext_spec.package.is_extension:
mkdirp(module.site_packages_dir)
@@ -167,25 +191,28 @@ class Python(Package):
ignore_arg = args.get('ignore', lambda f: False)
# Always ignore easy-install.pth, as it needs to be merged.
- patterns = [r'easy-install\.pth$']
+ patterns = [r'site-packages/easy-install\.pth$']
# Ignore pieces of setuptools installed by other packages.
+ # Must include directory name or it will remove all site*.py files.
if ext_pkg.name != 'py-setuptools':
- patterns.append(r'/site[^/]*\.pyc?$')
- patterns.append(r'setuptools\.pth')
- patterns.append(r'bin/easy_install[^/]*$')
- patterns.append(r'setuptools.*egg$')
+ patterns.extend([
+ r'bin/easy_install[^/]*$',
+ r'site-packages/setuptools[^/]*\.egg$',
+ r'site-packages/setuptools\.pth$',
+ r'site-packages/site[^/]*\.pyc?$',
+ r'site-packages/__pycache__/site[^/]*\.pyc?$'
+ ])
if ext_pkg.name != 'py-numpy':
patterns.append(r'bin/f2py$')
return match_predicate(ignore_arg, patterns)
-
def write_easy_install_pth(self, exts):
paths = []
for ext in sorted(exts.values()):
- ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir)
- easy_pth = "%s/easy-install.pth" % ext_site_packages
+ ext_site_packages = join_path(ext.prefix, self.site_packages_dir)
+ easy_pth = join_path(ext_site_packages, "easy-install.pth")
if not os.path.isfile(easy_pth):
continue
@@ -195,15 +222,18 @@ class Python(Package):
line = line.rstrip()
# Skip lines matching these criteria
- if not line: continue
- if re.search(r'^(import|#)', line): continue
- if (ext.name != 'py-setuptools' and
- re.search(r'setuptools.*egg$', line)): continue
+ if not line:
+ continue
+ if re.search(r'^(import|#)', line):
+ continue
+ if ((ext.name != 'py-setuptools' and
+ re.search(r'setuptools.*egg$', line))):
+ continue
paths.append(line)
- site_packages = os.path.join(self.prefix, self.site_packages_dir)
- main_pth = "%s/easy-install.pth" % site_packages
+ site_packages = join_path(self.prefix, self.site_packages_dir)
+ main_pth = join_path(site_packages, "easy-install.pth")
if not paths:
if os.path.isfile(main_pth):
@@ -211,15 +241,22 @@ class Python(Package):
else:
with closing(open(main_pth, 'w')) as f:
- f.write("import sys; sys.__plen = len(sys.path)\n")
+ f.write("""
+import sys
+sys.__plen = len(sys.path)
+""")
for path in paths:
- f.write("%s\n" % path)
- f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; "
- "p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n")
-
+ f.write("{0}\n".format(path))
+ f.write("""
+new = sys.path[sys.__plen:]
+del sys.path[sys.__plen:]
+p = getattr(sys, '__egginsert', 0)
+sys.path[p:p] = new
+sys.__egginsert = p + len(new)
+""")
def activate(self, ext_pkg, **args):
- ignore=self.python_ignore(ext_pkg, args)
+ ignore = self.python_ignore(ext_pkg, args)
args.update(ignore=ignore)
super(Python, self).activate(ext_pkg, **args)
@@ -228,12 +265,12 @@ class Python(Package):
exts[ext_pkg.name] = ext_pkg.spec
self.write_easy_install_pth(exts)
-
def deactivate(self, ext_pkg, **args):
args.update(ignore=self.python_ignore(ext_pkg, args))
super(Python, self).deactivate(ext_pkg, **args)
exts = spack.install_layout.extension_map(self.spec)
- if ext_pkg.name in exts: # Make deactivate idempotent.
+ # Make deactivate idempotent
+ if ext_pkg.name in exts:
del exts[ext_pkg.name]
self.write_easy_install_pth(exts)
diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py
new file mode 100644
index 0000000000..854016d12a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py
@@ -0,0 +1,18 @@
+from spack import *
+import os
+
+
+class RustBindgen(Package):
+ """The rust programming language toolchain"""
+ homepage = "http://www.rust-lang.org"
+ url = "https://github.com/crabtw/rust-bindgen"
+
+ version('0.16', tag='0.16', git='https://github.com/crabtw/rust-bindgen')
+
+ extends("rust")
+ depends_on("llvm")
+
+ def install(self, spec, prefix):
+ env = dict(os.environ)
+ env['LIBCLANG_PATH'] = os.path.join(spec['llvm'].prefix, 'lib')
+ cargo('install', '--root', prefix, env=env)
diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py
new file mode 100644
index 0000000000..65f81ce534
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rust/package.py
@@ -0,0 +1,63 @@
+from spack import *
+import os
+
+
+def get_submodules():
+ git = which('git')
+ git('submodule', 'update', '--init', '--recursive')
+
+class Rust(Package):
+ """The rust programming language toolchain"""
+ homepage = "http://www.rust-lang.org"
+ url = "https://github.com/rust-lang/rust"
+
+ version('1.8.0', tag='1.8.0', git="https://github.com/rust-lang/rust")
+
+ resource(name='cargo',
+ git="https://github.com/rust-lang/cargo.git",
+ tag='0.10.0',
+ destination='cargo')
+
+ extendable = True
+
+ # Rust
+ depends_on("llvm")
+ depends_on("curl")
+ depends_on("git")
+ depends_on("cmake")
+ depends_on("python@:2.8")
+
+ # Cargo
+ depends_on("openssl")
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix,
+ '--llvm-root=' + spec['llvm'].prefix)
+
+ make()
+ make("install")
+
+ # Install cargo, rust package manager
+ with working_dir(os.path.join('cargo', 'cargo')):
+ get_submodules()
+ configure('--prefix=' + prefix,
+ '--local-rust-root=' + prefix)
+
+ make()
+ make("install")
+
+ def setup_dependent_package(self, module, ext_spec):
+ """
+ Called before python modules' install() methods.
+
+ In most cases, extensions will only need to have one or two lines::
+
+ cargo('build')
+ cargo('install', '--root', prefix)
+
+ or
+
+ cargo('install', '--root', prefix)
+ """
+ # Rust extension builds can have a global cargo executable function
+ module.cargo = Executable(join_path(self.spec.prefix.bin, 'cargo'))
diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py
index 3b1d08889c..817db68241 100644
--- a/var/spack/repos/builtin/packages/serf/package.py
+++ b/var/spack/repos/builtin/packages/serf/package.py
@@ -24,8 +24,10 @@
##############################################################################
from spack import *
+
class Serf(Package):
- """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library"""
+ """Apache Serf - a high performance C-based HTTP client library
+ built upon the Apache Portable Runtime (APR) library"""
homepage = 'https://serf.apache.org/'
url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2'
@@ -36,6 +38,7 @@ class Serf(Package):
depends_on('scons')
depends_on('expat')
depends_on('openssl')
+ depends_on('zlib')
def install(self, spec, prefix):
scons = which("scons")
@@ -44,8 +47,10 @@ class Serf(Package):
options.append('APR=%s' % spec['apr'].prefix)
options.append('APU=%s' % spec['apr-util'].prefix)
options.append('OPENSSL=%s' % spec['openssl'].prefix)
- options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix)
- options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix)
+ options.append('LINKFLAGS=-L%s/lib -L%s/lib' %
+ (spec['expat'].prefix, spec['zlib'].prefix))
+ options.append('CPPFLAGS=-I%s/include -I%s/include' %
+ (spec['expat'].prefix, spec['zlib'].prefix))
scons(*options)
scons('install')
diff --git a/var/spack/repos/builtin/packages/stream/package.py b/var/spack/repos/builtin/packages/stream/package.py
new file mode 100644
index 0000000000..8b3f32af8a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/stream/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# 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 Stream(Package):
+ """The STREAM benchmark is a simple synthetic benchmark program that
+ measures sustainable memory bandwidth (in MB/s) and the corresponding
+ computation rate for simple vector kernels."""
+
+ homepage = "https://www.cs.virginia.edu/stream/ref.html"
+
+ version('5.10', git='https://github.com/jeffhammond/STREAM.git')
+
+ variant('openmp', default=False, description='Build with OpenMP support')
+
+ def patch(self):
+ makefile = FileFilter('Makefile')
+
+ # Use the Spack compiler wrappers
+ makefile.filter('CC = .*', 'CC = cc')
+ makefile.filter('FC = .*', 'FC = f77')
+
+ cflags = '-O2'
+ fflags = '-O2'
+ if '+openmp' in self.spec:
+ cflags += ' ' + self.compiler.openmp_flag
+ fflags += ' ' + self.compiler.openmp_flag
+
+ # Set the appropriate flags for this compiler
+ makefile.filter('CFLAGS = .*', 'CFLAGS = {0}'.format(cflags))
+ makefile.filter('FFLAGS = .*', 'FFLAGS = {0}'.format(fflags))
+
+ def install(self, spec, prefix):
+ make()
+
+ # Manual installation
+ mkdir(prefix.bin)
+ install('stream_c.exe', prefix.bin)
+ install('stream_f.exe', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py
index 5e87ed7fba..c301a5b4e5 100644
--- a/var/spack/repos/builtin/packages/tetgen/package.py
+++ b/var/spack/repos/builtin/packages/tetgen/package.py
@@ -24,16 +24,19 @@
##############################################################################
from spack import *
+
class Tetgen(Package):
- """TetGen is a program and library that can be used to generate tetrahedral
- meshes for given 3D polyhedral domains. TetGen generates exact constrained
- Delaunay tetrahedralizations, boundary conforming Delaunay meshes, and
- Voronoi paritions."""
+ """TetGen is a program and library that can be used to generate
+ tetrahedral meshes for given 3D polyhedral domains. TetGen
+ generates exact constrained Delaunay tetrahedralizations,
+ boundary conforming Delaunay meshes, and Voronoi paritions.
+ """
homepage = "http://www.tetgen.org"
url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz"
version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18')
+ version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz')
# TODO: Make this a build dependency once build dependencies are supported
# (see: https://github.com/LLNL/spack/pull/378).
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index c46425c0d3..573ee38a79 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -24,26 +24,33 @@
##############################################################################
from spack import *
+
class Tmux(Package):
"""tmux is a terminal multiplexer. What is a terminal multiplexer? It lets
- you switch easily between several programs in one terminal, detach them (they
- keep running in the background) and reattach them to a different terminal. And
- do a lot more.
+ you switch easily between several programs in one terminal, detach them
+ (they keep running in the background) and reattach them to a different
+ terminal. And do a lot more.
"""
homepage = "http://tmux.github.io"
- url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
+ url = "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz"
version('1.9a', 'b07601711f96f1d260b390513b509a2d')
version('2.1', '74a2855695bccb51b6e301383ad4818c')
+ version('2.2', 'bd95ee7205e489c62c616bb7af040099')
depends_on('libevent')
depends_on('ncurses')
def install(self, spec, prefix):
+ pkg_config_path = ':'.join([
+ spec['libevent'].prefix,
+ spec['ncurses'].prefix
+ ])
+
configure(
"--prefix=%s" % prefix,
- "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix))
+ "PKG_CONFIG_PATH=%s" % pkg_config_path)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 1eaec86405..6913d79dcc 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -23,18 +23,23 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os, sys, glob
+import os
+import sys
-# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it:
+# Trilinos is complicated to build, as an inspiration a couple of links to
+# other repositories which build it:
# https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111
# https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package
# https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh
-# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb
-# and some relevant documentation/examples:
+# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb and some
+# relevant documentation/examples:
# https://github.com/trilinos/Trilinos/issues/175
+
+
class Trilinos(Package):
- """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented
- software framework for the solution of large-scale, complex multi-physics engineering and scientific problems.
+ """The Trilinos Project is an effort to develop algorithms and enabling
+ technologies within an object-oriented software framework for the solution
+ of large-scale, complex multi-physics engineering and scientific problems.
A unique design feature of Trilinos is its focus on packages.
"""
homepage = "https://trilinos.org/"
@@ -54,49 +59,51 @@ class Trilinos(Package):
variant('hypre', default=True, description='Compile with Hypre preconditioner')
variant('hdf5', default=True, description='Compile with HDF5')
variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers')
- # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors
+ # not everyone has py-numpy activated, keep it disabled by default to avoid
+ # configure errors
variant('python', default=False, description='Build python wrappers')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds a debug version of the libraries')
+ variant('boost', default=True, description='Compile with Boost')
# Everything should be compiled with -fpic
depends_on('blas')
depends_on('lapack')
- depends_on('boost')
+ depends_on('boost', when='+boost')
depends_on('matio')
depends_on('glm')
depends_on('swig')
- depends_on('metis@5:',when='+metis')
- depends_on('suite-sparse',when='+suite-sparse')
+ depends_on('metis@5:', when='+metis')
+ depends_on('suite-sparse', when='+suite-sparse')
# MPI related dependencies
depends_on('mpi')
depends_on('netcdf+mpi')
- depends_on('parmetis',when='+metis')
- # Trilinos' Tribits config system is limited which makes it
- # very tricky to link Amesos with static MUMPS, see
+ depends_on('parmetis', when='+metis')
+ # Trilinos' Tribits config system is limited which makes it very tricky to
+ # link Amesos with static MUMPS, see
# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html
- # One could work it out by getting linking flags from mpif90 --showme:link (or alike)
- # and adding results to -DTrilinos_EXTRA_LINK_FLAGS
- # together with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and
- # it may work at the end. But let's avoid all this by simply using shared libs
- depends_on('mumps@5.0:+mpi+shared',when='+mumps')
- depends_on('scalapack',when='+mumps')
- depends_on('superlu-dist',when='+superlu-dist')
- depends_on('hypre~internal-superlu',when='+hypre')
- depends_on('hdf5+mpi',when='+hdf5')
-
- depends_on('python',when='+python')
+ # One could work it out by getting linking flags from mpif90 --showme:link
+ # (or alike) and adding results to -DTrilinos_EXTRA_LINK_FLAGS together
+ # with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and it may
+ # work at the end. But let's avoid all this by simply using shared libs
+ depends_on('mumps@5.0:+mpi+shared', when='+mumps')
+ depends_on('scalapack', when='+mumps')
+ depends_on('superlu-dist', when='+superlu-dist')
+ depends_on('hypre~internal-superlu', when='+hypre')
+ depends_on('hdf5+mpi', when='+hdf5')
+ depends_on('python', when='+python')
patch('umfpack_from_suitesparse.patch')
# check that the combination of variants makes sense
def variants_check(self):
if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'):
- # For Trilinos v11 we need to force SuperLUDist=OFF,
- # since only the deprecated SuperLUDist v3.3 together with an Amesos patch
- # is working.
- raise RuntimeError('The superlu-dist variant can only be used with Trilinos @12.0.1:')
+ # For Trilinos v11 we need to force SuperLUDist=OFF, since only the
+ # deprecated SuperLUDist v3.3 together with an Amesos patch is
+ # working.
+ raise RuntimeError('The superlu-dist variant can only be used' +
+ ' with Trilinos @12.0.1:')
def install(self, spec, prefix):
self.variants_check()
@@ -106,54 +113,75 @@ class Trilinos(Package):
options.extend(std_cmake_args)
mpi_bin = spec['mpi'].prefix.bin
- options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
- '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON',
- '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF',
- '-DTrilinos_ENABLE_TESTS:BOOL=OFF',
- '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
- '-DCMAKE_BUILD_TYPE:STRING=%s' % ('DEBUG' if '+debug' in spec else 'RELEASE'),
- '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'),
- '-DTPL_ENABLE_MPI:BOOL=ON',
- '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix,
- '-DTPL_ENABLE_BLAS=ON',
- '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names
- '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib,
- '-DTPL_ENABLE_LAPACK=ON',
- '-DLAPACK_LIBRARY_NAMES=lapack',
- '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix,
- '-DTPL_ENABLE_Boost:BOOL=ON',
- '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include,
- '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib,
- '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
- '-DTrilinos_ENABLE_CXX11:BOOL=ON',
- '-DTPL_ENABLE_Netcdf:BOOL=ON',
- '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'),
- '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'),
- ])
+ options.extend([
+ '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
+ '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON',
+ '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF',
+ '-DTrilinos_ENABLE_TESTS:BOOL=OFF',
+ '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
+ '-DCMAKE_BUILD_TYPE:STRING=%s' % (
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ '-DBUILD_SHARED_LIBS:BOOL=%s' % (
+ 'ON' if '+shared' in spec else 'OFF'),
+ '-DTPL_ENABLE_MPI:BOOL=ON',
+ '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix,
+ '-DTPL_ENABLE_BLAS=ON',
+ '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names
+ '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib,
+ '-DTPL_ENABLE_LAPACK=ON',
+ '-DLAPACK_LIBRARY_NAMES=lapack',
+ '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix,
+ '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
+ '-DTrilinos_ENABLE_CXX11:BOOL=ON',
+ '-DTPL_ENABLE_Netcdf:BOOL=ON',
+ '-DTPL_ENABLE_HYPRE:BOOL=%s' % (
+ 'ON' if '+hypre' in spec else 'OFF'),
+ '-DTPL_ENABLE_HDF5:BOOL=%s' % (
+ 'ON' if '+hdf5' in spec else 'OFF'),
+ ])
+
+ if '+boost' in spec:
+ options.extend([
+ '-DTPL_ENABLE_Boost:BOOL=ON',
+ '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include,
+ '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib
+ ])
+ else:
+ options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF'])
# Fortran lib
- libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read())
+ libgfortran = os.path.dirname(os.popen(
+ '%s --print-file-name libgfortran.a' %
+ join_path(mpi_bin, 'mpif90')).read())
options.extend([
- '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran,
+ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % (
+ libgfortran),
'-DTrilinos_ENABLE_Fortran=ON'
])
# for build-debug only:
- #options.extend([
- # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
- #])
+ # options.extend([
+ # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE'
+ # ])
# suite-sparse related
if '+suite-sparse' in spec:
options.extend([
- '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file?
- #'-DTPL_ENABLE_Cholmod:BOOL=ON',
- #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib,
- #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include,
+ # FIXME: Trilinos seems to be looking for static libs only,
+ # patch CMake TPL file?
+ '-DTPL_ENABLE_Cholmod:BOOL=OFF',
+ # '-DTPL_ENABLE_Cholmod:BOOL=ON',
+ # '-DCholmod_LIBRARY_DIRS:PATH=%s' % (
+ # spec['suite-sparse'].prefix.lib,
+ # '-DCholmod_INCLUDE_DIRS:PATH=%s' % (
+ # spec['suite-sparse'].prefix.include,
'-DTPL_ENABLE_UMFPACK:BOOL=ON',
- '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib,
- '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include,
- '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig'
+ '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % (
+ spec['suite-sparse'].prefix.lib),
+ '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % (
+ spec['suite-sparse'].prefix.include),
+ '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;' +
+ 'suitesparseconfig'
])
else:
options.extend([
@@ -169,9 +197,11 @@ class Trilinos(Package):
'-DMETIS_LIBRARY_NAMES=metis',
'-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include,
'-DTPL_ENABLE_ParMETIS:BOOL=ON',
- '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib),
+ '-DParMETIS_LIBRARY_DIRS=%s;%s' % (
+ spec['parmetis'].prefix.lib, spec['metis'].prefix.lib),
'-DParMETIS_LIBRARY_NAMES=parmetis;metis',
- '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include
+ '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % (
+ spec['parmetis'].prefix.include)
])
else:
options.extend([
@@ -184,11 +214,14 @@ class Trilinos(Package):
options.extend([
'-DTPL_ENABLE_MUMPS:BOOL=ON',
'-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib,
- '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', # order is important!
+ # order is important!
+ '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord',
'-DTPL_ENABLE_SCALAPACK:BOOL=ON',
- '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64
+ # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64
+ '-DSCALAPACK_LIBRARY_NAMES=scalapack'
])
- # see https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS
+ # see
+ # https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS
cxx_flags.extend([
'-DMUMPS_5_0'
])
@@ -201,16 +234,20 @@ class Trilinos(Package):
# superlu-dist:
if '+superlu-dist' in spec:
# Amesos, conflicting types of double and complex SLU_D
- # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html
- # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
+ # see
+ # https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html
+ # and
+ # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
options.extend([
'-DTeuchos_ENABLE_COMPLEX:BOOL=OFF',
'-DKokkosTSQR_ENABLE_Complex:BOOL=OFF'
])
options.extend([
'-DTPL_ENABLE_SuperLUDist:BOOL=ON',
- '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib,
- '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include
+ '-DSuperLUDist_LIBRARY_DIRS=%s' %
+ spec['superlu-dist'].prefix.lib,
+ '-DSuperLUDist_INCLUDE_DIRS=%s' %
+ spec['superlu-dist'].prefix.include
])
if spec.satisfies('^superlu-dist@4.0:'):
options.extend([
@@ -221,7 +258,6 @@ class Trilinos(Package):
'-DTPL_ENABLE_SuperLUDist:BOOL=OFF',
])
-
# python
if '+python' in spec:
options.extend([
@@ -248,23 +284,26 @@ class Trilinos(Package):
'-DTrilinos_ENABLE_FEI=OFF'
])
-
with working_dir('spack-build', create=True):
cmake('..', *options)
make()
make('install')
- # When trilinos is built with Python, libpytrilinos is included through
- # cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake
- # contains pytrilinos. This leads to a run-time error:
- # Symbol not found: _PyBool_Type
- # and prevents Trilinos to be used in any C++ code, which links executable
- # against the libraries listed in Trilinos_LIBRARIES.
- # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509
+ # When trilinos is built with Python, libpytrilinos is included
+ # through cmake configure files. Namely, Trilinos_LIBRARIES in
+ # TrilinosConfig.cmake contains pytrilinos. This leads to a
+ # run-time error: Symbol not found: _PyBool_Type and prevents
+ # Trilinos to be used in any C++ code, which links executable
+ # against the libraries listed in Trilinos_LIBRARIES. See
+ # https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509
# A workaround it to remove PyTrilinos from the COMPONENTS_LIST :
if '+python' in self.spec:
- filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib)
+ filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)',
+ (r'\1\3'),
+ '%s/cmake/Trilinos/TrilinosConfig.cmake' %
+ prefix.lib)
- # The shared libraries are not installed correctly on Darwin; correct this
+ # The shared libraries are not installed correctly on Darwin;
+ # correct this
if (sys.platform == 'darwin') and ('+shared' in spec):
fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/xorg-util-macros/package.py b/var/spack/repos/builtin/packages/xorg-util-macros/package.py
new file mode 100644
index 0000000000..963d93442f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xorg-util-macros/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# 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 XorgUtilMacros(Package):
+ """The util-macros package contains the m4 macros used by all of the Xorg packages."""
+
+ homepage = "http://www.example.com"
+ url = "http://ftp.x.org/pub/individual/util/util-macros-1.19.0.tar.bz2"
+
+ version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py
new file mode 100644
index 0000000000..7be6defb83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xproto/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 Xproto(Package):
+ """The Xorg protocol headers provide the header files required to
+ build the system, and to allow other applications to build against
+ the installed X Window system."""
+ homepage = "http://www.x.org/"
+ url = "https://www.x.org/archive//individual/proto/xproto-7.0.29.tar.gz"
+
+ version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af')
+
+ depends_on("xorg-util-macros")
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix)
+ make()
+ make("install")