Merge branch 'develop' of https://github.com/LLNL/spack into packages/blas_lapack_providers

Conflicts:
	var/spack/repos/builtin/packages/netlib-lapack/package.py
This commit is contained in:
alalazo
2016-03-23 17:25:00 +01:00
131 changed files with 4379 additions and 1017 deletions

View File

@@ -0,0 +1,34 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://scalability-llnl.github.io/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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Externalprereq(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/prereq-1.0.tar.gz"
version('1.4', 'f1234567890abcdef1234567890abcde')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,37 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://scalability-llnl.github.io/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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Externaltest(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/test-1.0.tar.gz"
version('1.0', '1234567890abcdef1234567890abcdef')
depends_on('stuff')
depends_on('externaltool')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,36 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://scalability-llnl.github.io/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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Externaltool(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/tool-1.0.tar.gz"
version('1.0', '1234567890abcdef1234567890abcdef')
depends_on('externalprereq')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,37 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://scalability-llnl.github.io/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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Externalvirtual(Package):
homepage = "http://somewhere.com"
url = "http://somewhere.com/stuff-1.0.tar.gz"
version('1.0', '1234567890abcdef1234567890abcdef')
version('2.0', '234567890abcdef1234567890abcdef1')
provides('stuff')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,39 @@
##############################################################################
# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written 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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Hypre(Package):
"""Hypre is included here as an example of a package that depends on
both LAPACK and BLAS."""
homepage = "http://www.openblas.net"
url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
depends_on('lapack')
depends_on('blas')
def install(self, spec, prefix):
pass

View File

@@ -38,6 +38,7 @@ class Mpich(Package):
version('3.0.2', 'foobarbaz')
version('3.0.1', 'foobarbaz')
version('3.0', 'foobarbaz')
version('1.0', 'foobarbas')
provides('mpi@:3', when='@3:')
provides('mpi@:1', when='@:1')

View File

@@ -0,0 +1,38 @@
##############################################################################
# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written 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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 OpenblasWithLapack(Package):
"""Dummy version of OpenBLAS that also provides LAPACK, for testing."""
homepage = "http://www.openblas.net"
url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
provides('lapack')
provides('blas')
def install(self, spec, prefix):
pass

View File

@@ -0,0 +1,43 @@
##############################################################################
# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written 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 General Public License (as published by
# the Free Software Foundation) version 2.1 dated 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 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 Python(Package):
"""Dummy Python package to demonstrate preferred versions."""
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)
version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521')
version('2.7.9', '5eebcaa0030dc4061156d3429657fb83')
version('2.7.8', 'd4bca0159acb0b44a781292b5231936f')
def install(self, spec, prefix):
pass

View File

@@ -35,6 +35,10 @@ class ArpackNg(Package):
variant('shared', default=True, description='Enables the build of shared libraries')
variant('mpi', default=False, description='Activates MPI support')
# The function pdlamch10 does not set the return variable. This is fixed upstream
# see https://github.com/opencollab/arpack-ng/issues/34
patch('pdlamch10.patch', when='@3.3:')
depends_on('blas')
depends_on('lapack')
depends_on('mpi', when='+mpi')
@@ -46,7 +50,10 @@ def install(self, spec, prefix):
options = ['--prefix=%s' % prefix]
if '+mpi' in spec:
options.append('--enable-mpi')
options.extend([
'--enable-mpi',
'F77=mpif77' #FIXME: avoid hardcoding MPI wrapper names
])
if '~shared' in spec:
options.append('--enable-shared=no')

View File

@@ -0,0 +1,15 @@
diff --git a/PARPACK/SRC/MPI/pdlamch10.f b/PARPACK/SRC/MPI/pdlamch10.f
index 6571da9..2882c2e 100644
--- a/PARPACK/SRC/MPI/pdlamch10.f
+++ b/PARPACK/SRC/MPI/pdlamch10.f
@@ -86,8 +86,8 @@
TEMP = TEMP1
END IF
*
- PDLAMCH = TEMP
+ PDLAMCH10 = TEMP
*
-* End of PDLAMCH
+* End of PDLAMCH10
*
END

View File

@@ -6,6 +6,7 @@ class Autoconf(Package):
url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz"
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)

View File

@@ -5,7 +5,9 @@ class Automake(Package):
homepage = "http://www.gnu.org/software/automake/"
url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz"
version('1.15', '716946a105ca228ab545fc37a70df3a3')
version('1.14.1', 'd052a3e884631b9c7892f2efce542d75')
version('1.11.6', '0286dc30295b62985ca51919202ecfcc')
depends_on('autoconf')

View File

@@ -4,10 +4,13 @@ class Binutils(Package):
"""GNU binutils, which contain the linker, assembler, objdump and others"""
homepage = "http://www.gnu.org/software/binutils/"
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2")
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2")
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2")
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2")
url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
version('2.26', '64146a0faa3b411ba774f47d41de239f')
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
# Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
variant('krellpatch', default=False, description="build with openspeedshop based patch.")

View File

@@ -0,0 +1,15 @@
from spack import *
class Blitz(Package):
"""N-dimensional arrays for C++"""
homepage = "http://github.com/blitzpp/blitz"
url = "https://github.com/blitzpp/blitz/tarball/1.0.0"
version('1.0.0', '9f040b9827fe22228a892603671a77af')
# No dependencies
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

View File

@@ -30,6 +30,7 @@ class Cmake(Package):
homepage = 'https://www.cmake.org'
url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e')
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8')
version('3.3.1', '52638576f4e1e621fed6c3410d3a1b12')
@@ -37,16 +38,48 @@ class Cmake(Package):
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
variant('qt', default=False, description='Enables the build of cmake-gui')
variant('doc', default=False, description='Enables the generation of html and man page documentation')
depends_on('ncurses', when='+ncurses')
depends_on('qt', when='+qt')
depends_on('python@2.7.11:', when='+doc')
depends_on('py-sphinx', when='+doc')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version)
def validate(self, spec):
"""
Checks if incompatible versions of qt were specified
:param spec: spec of the package
:raises RuntimeError: in case of inconsistencies
"""
if '+qt' in spec and spec.satisfies('^qt@5.4.0'):
msg = 'qt-5.4.0 has broken CMake modules.'
raise RuntimeError(msg)
def install(self, spec, prefix):
configure('--prefix=' + prefix,
'--parallel=' + str(make_jobs),
'--', '-DCMAKE_USE_OPENSSL=ON')
# Consistency check
self.validate(spec)
# configure, build, install:
options = ['--prefix=%s' % prefix]
options.append('--parallel=%s' % str(make_jobs))
if '+qt' in spec:
options.append('--qt-gui')
if '+doc' in spec:
options.append('--sphinx-html')
options.append('--sphinx-man')
options.append('--')
options.append('-DCMAKE_USE_OPENSSL=ON')
configure(*options)
make()
make('install')

View File

@@ -8,8 +8,8 @@ class Cryptopp(Package):
public-key encryption (RSA, DSA), and a few obsolete/historical encryption
algorithms (MD5, Panama)."""
homepage = "http://www.cryptopp.com/"
url = "http://www.cryptopp.com/cryptopp563.zip"
homepage = "http://www.cryptopp.com"
base_url = "http://www.cryptopp.com"
version('5.6.3', '3c5b70e2ec98b7a24988734446242d07')
version('5.6.2', '7ed022585698df48e65ce9218f6c6a67')
@@ -25,7 +25,5 @@ def install(self, spec, prefix):
install('libcryptopp.a', prefix.lib)
def url_for_version(self, version):
version_tuple = tuple(v for v in iter(version))
version_string = reduce(lambda vs, nv: vs + str(nv), version_tuple, "")
return "%scryptopp%s.zip" % (Cryptopp.homepage, version_string)
version_string = str(version).replace('.', '')
return '%s/cryptopp%s.zip' % (Cryptopp.base_url, version_string)

View File

@@ -7,6 +7,7 @@ class Curl(Package):
homepage = "http://curl.haxx.se"
url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2"
version('7.47.1', '9ea3123449439bbd960cd25cf98796fb')
version('7.46.0', '9979f989a2a9930d10f1b3deeabc2148')
version('7.45.0', '62c1a352b28558f25ba6209214beadc8')
version('7.44.0', '6b952ca00e5473b16a11f05f06aa8dae')

View File

@@ -48,7 +48,7 @@ class Eigen(Package):
depends_on('metis', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
depends_on('SuiteSparse', when='+suitesparse')
depends_on('suite-sparse', when='+suitesparse')
depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0
depends_on('gmp')

View File

@@ -0,0 +1,21 @@
from spack import *
class Emacs(Package):
"""The Emacs programmable text editor."""
homepage = "https://www.gnu.org/software/emacs"
url = "http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.gz"
version('24.5', 'd74b597503a68105e61b5b9f6d065b44')
depends_on('ncurses')
# Emacs also depends on:
# GTK or other widget library
# libtiff, png, etc.
# For now, we assume the system provides all that stuff.
# For Ubuntu 14.04 LTS:
# sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

View File

@@ -0,0 +1,30 @@
from spack import *
class Gettext(Package):
"""GNU internationalization (i18n) and localization (l10n) library."""
homepage = "https://www.gnu.org/software/gettext/"
url = "http://ftpmirror.gnu.org/gettext/gettext-0.19.7.tar.xz"
version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5')
def install(self, spec, prefix):
options = ['--disable-dependency-tracking',
'--disable-silent-rules',
'--disable-debug',
'--prefix=%s' % prefix,
'--with-included-gettext',
'--with-included-glib',
'--with-included-libcroco',
'--with-included-libunistring',
'--with-emacs',
'--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share,
'--disable-java',
'--disable-csharp',
'--without-git', # Don't use VCS systems to create these archives
'--without-cvs',
'--without-xz']
configure(*options)
make()
make("install")

View File

@@ -5,14 +5,22 @@ class Git(Package):
system designed to handle everything from small to very large
projects with speed and efficiency."""
homepage = "http://git-scm.com"
url = "https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz"
url = "https://github.com/git/git/tarball/v2.7.1"
version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423')
version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8')
version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd')
version('2.6.0', 'eb76a07148d94802a1745d759716a57e')
version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b')
version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c')
version('2.8.0-rc2', 'c2cf9f2cc70e35f2fafbaf9258f82e4c')
version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6')
version('2.7.1', 'bf0706b433a8dedd27a63a72f9a66060')
# See here for info on vulnerable Git versions:
# http://www.theregister.co.uk/2016/03/16/git_server_client_patch_now/
# All the following are vulnerable
#version('2.6.3', 'b711be7628a4a2c25f38d859ee81b423')
#version('2.6.2', 'da293290da69f45a86a311ad3cd43dc8')
#version('2.6.1', '4c62ee9c5991fe93d99cf2a6b68397fd')
#version('2.6.0', 'eb76a07148d94802a1745d759716a57e')
#version('2.5.4', '3eca2390cf1fa698b48e2a233563a76b')
#version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c')
# Git compiles with curl support by default on but if your system
@@ -24,6 +32,7 @@ class Git(Package):
variant("expat", default=False, description="Add the internal support of expat for https push")
depends_on("openssl")
depends_on("autoconf")
depends_on("curl", when="+curl")
depends_on("expat", when="+expat")
@@ -47,6 +56,7 @@ def install(self, spec, prefix):
if '+expat' in spec:
configure_args.append("--with-expat=%s" % spec['expat'].prefix)
which('autoreconf')('-i')
configure(*configure_args)
make()
make("install")

View File

@@ -0,0 +1,18 @@
from spack import *
class Gl2ps(Package):
"""GL2PS is a C library providing high quality vector output for any
OpenGL application."""
homepage = "http://www.geuz.org/gl2ps/"
url = "http://geuz.org/gl2ps/src/gl2ps-1.3.9.tgz"
version('1.3.9', '377b2bcad62d528e7096e76358f41140')
depends_on("libpng")
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
make()
make("install")

View File

@@ -46,7 +46,6 @@ class Hdf5(Package):
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
variant('unsupported', default=True, description='Enables unsupported configuration options')
variant('mpi', default=False, description='Enable MPI support')
variant('szip', default=False, description='Enable szip support')
@@ -74,6 +73,13 @@ def install(self, spec, prefix):
self.validate(spec)
# Handle compilation after spec validation
extra_args = []
# Always enable this option. This does not actually enable any
# features: it only *allows* the user to specify certain
# combinations of other arguments. Enabling it just skips a
# sanity check in configure, so this doesn't merit a variant.
extra_args.append("--enable-unsupported")
if '+debug' in spec:
extra_args.append('--enable-debug=all')
else:
@@ -84,9 +90,6 @@ def install(self, spec, prefix):
else:
extra_args.append('--enable-static-exec')
if '+unsupported' in spec:
extra_args.append("--enable-unsupported")
if '+cxx' in spec:
extra_args.append('--enable-cxx')

View File

@@ -1,4 +1,5 @@
from spack import *
import os, sys
class Hypre(Package):
"""Hypre is a library of high performance preconditioners that
@@ -8,8 +9,12 @@ class Hypre(Package):
homepage = "http://computation.llnl.gov/project/linear_solvers/software.php"
url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
# hypre does not know how to build shared libraries on Darwin
variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)")
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
@@ -17,16 +22,26 @@ class Hypre(Package):
def install(self, spec, prefix):
blas_dir = spec['blas'].prefix
lapack_dir = spec['lapack'].prefix
mpi_dir = spec['mpi'].prefix
os.environ['CC'] = os.path.join(mpi_dir, 'bin', 'mpicc')
os.environ['CXX'] = os.path.join(mpi_dir, 'bin', 'mpicxx')
os.environ['F77'] = os.path.join(mpi_dir, 'bin', 'mpif77')
configure_args = [
"--prefix=%s" % prefix,
"--with-lapack-libs=lapack",
"--with-lapack-lib-dirs=%s/lib" % lapack_dir,
"--with-blas-libs=blas",
"--with-blas-lib-dirs=%s/lib" % blas_dir]
if '+shared' in self.spec:
configure_args.append("--enable-shared")
# Hypre's source is staged under ./src so we'll have to manually
# cd into it.
with working_dir("src"):
configure(
"--prefix=%s" % prefix,
"--with-blas-libs=blas",
"--with-blas-lib-dirs=%s/lib" % blas_dir,
"--with-lapack-libs=\"lapack blas\"",
"--with-lapack-lib-dirs=%s/lib" % lapack_dir,
"--with-MPI")
configure(*configure_args)
make()
make("install")

View File

@@ -28,7 +28,7 @@ class Jdk(Package):
'-H', # specify required License Agreement cookie
'Cookie: oraclelicense=accept-securebackup-cookie']
def do_fetch(self):
def do_fetch(self, mirror_only=False):
# Add our custom curl commandline options
tty.msg(
"[Jdk] Adding required commandline options to curl " +
@@ -39,7 +39,7 @@ def do_fetch(self):
spack.curl.add_default_arg(option)
# Now perform the actual fetch
super(Jdk, self).do_fetch()
super(Jdk, self).do_fetch(mirror_only)
def install(self, spec, prefix):

View File

@@ -38,6 +38,8 @@ class Libelf(Package):
provides('elf')
sanity_check_is_file = 'include/libelf.h'
def install(self, spec, prefix):
configure("--prefix=" + prefix,
"--enable-shared",

View File

@@ -22,9 +22,16 @@ class Libevent(Package):
version('2.0.13', 'af786b4b3f790c9d3279792edf7867fc')
version('2.0.12', '42986228baf95e325778ed328a93e070')
variant('openssl', default=True, description="Build with encryption enabled at the libevent level.")
depends_on('openssl', when='+openssl')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
configure_args = []
if '+openssl' in spec:
configure_args.append('--enable-openssl')
else:
configure_args.append('--enable-openssl')
configure("--prefix=%s" % prefix, *configure_args)
make()
make("install")

View File

@@ -0,0 +1,15 @@
from spack import *
class Libsigsegv(Package):
"""GNU libsigsegv is a library for handling page faults in user mode."""
homepage = "https://www.gnu.org/software/libsigsegv/"
url = "ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz"
version('2.10', '7f96fb1f65b3b8cbc1582fb7be774f0f')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix,
'--enable-shared')
make()
make("install")

View File

@@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Copyright (c) 2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -34,7 +34,7 @@ class Llvm(Package):
it is the full name of the project.
"""
homepage = 'http://llvm.org/'
url = 'http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz'
url = 'http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz'
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package
@@ -52,7 +52,7 @@ class Llvm(Package):
depends_on('cmake @2.8.12.2:')
# Universal dependency
depends_on('python@2.7:')
depends_on('python@2.7:2.8') # Seems not to support python 3.X.Y
# lldb dependencies
depends_on('ncurses', when='+lldb')
@@ -132,6 +132,36 @@ class Llvm(Package):
'llvm-libunwind' : 'http://llvm.org/svn/llvm-project/libunwind/trunk',
}
},
{
'version' : '3.8.0',
'md5':'07a7a74f3c6bd65de4702bf941b511a0',
'resources' : {
'compiler-rt' : 'd6fcbe14352ffb708e4d1ac2e48bb025',
'openmp' : '8fd7cc35d48051613cf1e750e9f22e40',
'polly' : '1b3b20f52d34a4024e21a4ea7112caa7',
'libcxx' : 'd6e0bdbbee39f7907ad74fd56d03b88a',
'libcxxabi' : 'bbe6b4d72c7c5978550d370af529bcf7',
'clang' : 'cc99e7019bb74e6459e80863606250c5',
'clang-tools-extra' : 'c2344f50e0eea0b402f0092a80ddc036',
'lldb' : 'a5da35ed9cc8c8817ee854e3dbfba00e',
'llvm-libunwind' : '162ade468607f153cca12be90b5194fa',
}
},
{
'version' : '3.7.1',
'md5':'bf8b3a2c79e61212c5409041dfdbd319',
'resources' : {
'compiler-rt' : '1c6975daf30bb3b0473b53c3a1a6ff01',
'openmp' : 'b4ad08cda4e5c22e42b66062b140438e',
'polly' : '3a2a7367002740881637f4d47bca4dc3',
'libcxx' : 'f9c43fa552a10e14ff53b94d04bea140',
'libcxxabi' : '52d925afac9f97e9dcac90745255c169',
'clang' : '0acd026b5529164197563d135a8fd83e',
'clang-tools-extra' : '5d49ff745037f061a7c86aeb6a24c3d2',
'lldb' : 'a106d8a0d21fc84d76953822fbaf3398',
'llvm-libunwind' : '814bd52c9247c5d04629658fbcb3ab8c',
}
},
{
'version' : '3.7.0',
'md5':'b98b9495e5655a672d6cb83e1a180f8e',

View File

@@ -7,7 +7,19 @@ class M4(Package):
version('1.4.17', 'a5e9954b1dae036762f7b13673a2cf76')
patch('pgi.patch', when='@1.4.17')
variant('sigsegv', default=True, description="Build the libsigsegv dependency")
depends_on('libsigsegv', when='+sigsegv')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
configure_args = []
if 'libsigsegv' in spec:
configure_args.append('--with-libsigsegv-prefix=%s' % spec['libsigsegv'].prefix)
else:
configure_args.append('--without-libsigsegv-prefix')
configure("--prefix=%s" % prefix, *configure_args)
make()
make("install")

View File

@@ -0,0 +1,10 @@
--- a/lib/config.hin
+++ b/lib/config.hin
@@ -1510,6 +1510,7 @@
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
+ && !defined __PGI \
&& !(defined __SUNPRO_C && __STDC__))) \
&& !defined _GL_EXTERN_INLINE_APPLE_BUG)
# define _GL_INLINE inline

View File

@@ -37,6 +37,12 @@ class Mpc(Package):
depends_on("gmp")
depends_on("mpfr")
def url_for_version(self, version):
if version < Version("1.0.1"):
return "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % version
else:
return "ftp://ftp.gnu.org/gnu/mpc/mpc-%s.tar.gz" % version
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()

View File

@@ -28,8 +28,9 @@ class Mpfr(Package):
"""The MPFR library is a C library for multiple-precision
floating-point computations with correct rounding."""
homepage = "http://www.mpfr.org"
url = "http://www.mpfr.org/mpfr-current/mpfr-3.1.3.tar.bz2"
url = "https://gforge.inria.fr/frs/download.php/latestfile/159/mpfr-3.1.2.tar.bz2"
version('3.1.4', 'b8a2f6b0e68bef46e53da2ac439e1cf4')
version('3.1.3', '5fdfa3cfa5c86514ee4a241a1affa138')
version('3.1.2', 'ee2c3ac63bf0c2359bf08fc3ee094c19')

View File

@@ -25,6 +25,7 @@
from spack import *
import os
class Mpich(Package):
"""MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard."""
@@ -46,14 +47,17 @@ class Mpich(Package):
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
def setup_dependent_environment(self, module, spec, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
os.environ['MPICH_CC'] = os.environ['CC']
os.environ['MPICH_CXX'] = os.environ['CXX']
os.environ['MPICH_F77'] = os.environ['F77']
os.environ['MPICH_F90'] = os.environ['FC']
os.environ['MPICH_FC'] = os.environ['FC']
def setup_dependent_environment(self, env, dependent_spec):
env.set('MPICH_CC', spack_cc)
env.set('MPICH_CXX', spack_cxx)
env.set('MPICH_F77', spack_f77)
env.set('MPICH_F90', spack_f90)
env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
# FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers?
module.mpicc = join_path(self.prefix.bin, 'mpicc')
def install(self, spec, prefix):
config_args = ["--prefix=" + prefix,

View File

@@ -20,10 +20,10 @@ class Mumps(Package):
variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps')
variant('idx64', default=False, description='Use int64_t/integer*8 as default index type')
depends_on('scotch + esmumps', when='~ptscotch+scotch')
depends_on('scotch + esmumps + mpi', when='+ptscotch')
depends_on('metis', when='~parmetis+metis')
depends_on('metis', when='+metis')
depends_on('parmetis', when="+parmetis")
depends_on('blas')
depends_on('lapack')
@@ -38,11 +38,11 @@ class Mumps(Package):
def write_makefile_inc(self):
if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec:
raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi')
makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib]
orderings = ['-Dpord']
if '+ptscotch' in self.spec or '+scotch' in self.spec:
join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '')
makefile_conf.extend(
@@ -54,15 +54,19 @@ def write_makefile_inc(self):
if '+ptscotch' in self.spec:
orderings.append('-Dptscotch')
if '+parmetis' in self.spec or '+metis' in self.spec:
if '+parmetis' in self.spec and '+metis' in self.spec:
libname = 'parmetis' if '+parmetis' in self.spec else 'metis'
makefile_conf.extend(
["IMETIS = -I%s" % self.spec[libname].prefix.include,
"LMETIS = -L%s -l%s" % (self.spec[libname].prefix.lib, libname)])
["IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
"LMETIS = -L%s -l%s -L%s -l%s" % (self.spec['parmetis'].prefix.lib, 'parmetis',self.spec['metis'].prefix.lib, 'metis')])
orderings.append('-Dparmetis')
elif '+metis' in self.spec:
makefile_conf.extend(
["IMETIS = -I%s" % self.spec['metis'].prefix.include,
"LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, 'metis')])
orderings.append('-Dmetis')
if '+parmetis' in self.spec:
orderings.append('-Dparmetis')
makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
@@ -101,12 +105,12 @@ def write_makefile_inc(self):
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
makefile_conf.append("CDEFS = -DAdd_")
makefile_inc_template = join_path(os.path.dirname(self.module.__file__),
'Makefile.inc')
with open(makefile_inc_template, "r") as fh:
makefile_conf.extend(fh.read().split('\n'))
with working_dir('.'):
with open("Makefile.inc", "w") as fh:
makefile_inc = '\n'.join(makefile_conf)
@@ -130,7 +134,7 @@ def install(self, spec, prefix):
make_libs.append('zexamples')
self.write_makefile_inc()
make(*make_libs)
install_tree('lib', prefix.lib)

View File

@@ -0,0 +1,18 @@
from spack import *
class Muparser(Package):
"""C++ math expression parser library."""
homepage = "http://muparser.beltoforion.de/"
url = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz"
version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7')
def install(self, spec, prefix):
options = ['--disable-debug',
'--disable-dependency-tracking',
'--prefix=%s' % prefix]
configure(*options)
make()
make("install")

View File

@@ -123,7 +123,7 @@ def set_network_type(self, spec, configure_args):
count += 1
if count > 1:
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:
network_options = ["--with-device=ch3:psm"]

View File

@@ -0,0 +1,15 @@
from spack import *
class NetcdfCxx4(Package):
"""C++ interface for NetCDF4"""
homepage = "http://www.unidata.ucar.edu/software/netcdf"
url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx4-4.2.tar.gz"
version('4.2', 'd019853802092cf686254aaba165fc81')
depends_on('netcdf')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

View File

@@ -0,0 +1,16 @@
from spack import *
class NetcdfFortran(Package):
"""Fortran interface for NetCDF4"""
homepage = "http://www.unidata.ucar.edu/software/netcdf"
url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.4.3.tar.gz"
version('4.4.3', 'bfd4ae23a34635b273d3eb0d91cbde9e')
depends_on('netcdf')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")

View File

@@ -6,14 +6,13 @@ class Netcdf(Package):
data formats that support the creation, access, and sharing of array-oriented
scientific data."""
homepage = "http://www.unidata.ucar.edu/software/netcdf/"
homepage = "http://www.unidata.ucar.edu/software/netcdf"
url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz"
version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e')
version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae')
variant('mpi', default=True, description='Enables MPI parallelism')
variant('fortran', default=False, description="Download and install NetCDF-Fortran")
variant('hdf4', default=False, description="Enable HDF4 support")
# Dependencies:
@@ -66,11 +65,7 @@ def install(self, spec, prefix):
# Fortran support
# In version 4.2+, NetCDF-C and NetCDF-Fortran have split.
# They can be installed separately, but this bootstrap procedure
# should be able to install both at the same time.
# Note: this is a new experimental feature.
if '+fortran' in spec:
config_args.append("--enable-remote-fortran-bootstrap")
# Use the netcdf-fortran package to install Fortran support.
config_args.append('CPPFLAGS=%s' % ' '.join(CPPFLAGS))
config_args.append('LDFLAGS=%s' % ' '.join(LDFLAGS))
@@ -79,8 +74,3 @@ def install(self, spec, prefix):
configure(*config_args)
make()
make("install")
# After installing NetCDF-C, install NetCDF-Fortran
if '+fortran' in spec:
make("build-netcdf-fortran")
make("install-netcdf-fortran")

View File

@@ -11,6 +11,7 @@ class NetlibLapack(Package):
homepage = "http://www.netlib.org/lapack/"
url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz"
version('3.6.0', 'f2f6c67134e851fe189bb3ca1fbb5101')
version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf')
version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478')
version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55')

View File

@@ -1,8 +1,9 @@
from spack import *
import sys
class NetlibScalapack(Package):
"""ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
homepage = "http://www.netlib.org/scalapack/"
url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
@@ -11,16 +12,16 @@ class NetlibScalapack(Package):
version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe')
# versions before 2.0.0 are not using cmake and requires blacs as
# a separated package
variant('shared', default=True, description='Build the shared library version')
variant('fpic', default=False, description="Build with -fpic compiler option")
provides('scalapack')
depends_on('mpi')
depends_on('lapack')
def install(self, spec, prefix):
def install(self, spec, prefix):
options = [
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'),
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else 'ON'),
@@ -32,19 +33,19 @@ def install(self, spec, prefix):
"-DCMAKE_C_FLAGS=-fPIC",
"-DCMAKE_Fortran_FLAGS=-fPIC"
])
options.extend(std_cmake_args)
with working_dir('spack-build', create=True):
cmake('..', *options)
make()
make("install")
def setup_dependent_environment(self, module, spec, dependent_spec):
# TODO treat OS that are not Linux...
lib_suffix = '.so' if '+shared' in spec['scalapack'] else '.a'
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib
spec['scalapack'].cc_link = spec['scalapack'].fc_link
spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib,
'libscalapack%s' % lib_suffix)]
spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib
spec.cc_link = spec.fc_link
spec.libraries = [join_path(spec.prefix.lib, 'libscalapack%s' % lib_suffix)]

View File

@@ -0,0 +1,47 @@
from spack import *
import platform
class Oce(Package):
"""
Open CASCADE Community Edition:
patches/improvements/experiments contributed by users over the official Open CASCADE library.
"""
homepage = "https://github.com/tpaviot/oce"
url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz"
version('0.17.1', '36c67b87093c675698b483454258af91')
version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d')
version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3')
version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca')
version('0.15' , '7ec541a1c350ca8a684f74980e48801c')
depends_on('cmake@2.8:')
def install(self, spec, prefix):
options = []
options.extend(std_cmake_args)
options.extend([
'-DOCE_INSTALL_PREFIX=%s' % prefix,
'-DOCE_BUILD_SHARED_LIB:BOOL=ON',
'-DOCE_BUILD_TYPE:STRING=Release',
'-DOCE_DATAEXCHANGE:BOOL=ON',
'-DOCE_DISABLE_X11:BOOL=ON',
'-DOCE_DRAW:BOOL=OFF',
'-DOCE_MODEL:BOOL=ON',
'-DOCE_MULTITHREAD_LIBRARY:STRING=NONE', # FIXME: add tbb
'-DOCE_OCAF:BOOL=ON',
'-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF',
'-DOCE_VISUALISATION:BOOL=OFF',
'-DOCE_WITH_FREEIMAGE:BOOL=OFF',
'-DOCE_WITH_GL2PS:BOOL=OFF',
'-DOCE_WITH_OPENCL:BOOL=OFF'
])
if platform.system() == 'Darwin':
options.extend([
'-DOCE_OSX_USE_COCOA:BOOL=ON',
])
cmake('.', *options)
make("install/strip")

View File

@@ -0,0 +1,183 @@
from spack import *
class Octave(Package):
"""GNU Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for solving
linear and nonlinear problems numerically, and for performing other
numerical experiments using a language that is mostly compatible with
Matlab. It may also be used as a batch-oriented language."""
homepage = "https://www.gnu.org/software/octave/"
url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz"
version('4.0.0' , 'a69f8320a4f20a8480c1b278b1adb799')
# Variants
variant('readline', default=True)
variant('arpack', default=False)
variant('curl', default=False)
variant('fftw', default=False)
variant('fltk', default=False)
variant('fontconfig', default=False)
variant('freetype', default=False)
variant('glpk', default=False)
variant('gl2ps', default=False)
variant('gnuplot', default=False)
variant('magick', default=False)
variant('hdf5', default=False)
variant('jdk', default=False)
variant('llvm', default=False)
variant('opengl', default=False)
variant('qhull', default=False)
variant('qrupdate', default=False)
variant('qscintilla', default=False)
variant('qt', default=False)
variant('suiteparse', default=False)
variant('zlib', default=False)
# Required dependencies
depends_on('blas')
depends_on('lapack')
depends_on('pcre')
# Strongly recommended dependencies
depends_on('readline', when='+readline')
# Optional dependencies
depends_on('arpack', when='+arpack')
depends_on('curl', when='+curl')
depends_on('fftw', when='+fftw')
depends_on('fltk', when='+fltk')
depends_on('fontconfig', when='+fontconfig')
depends_on('freetype', when='+freetype')
depends_on('glpk', when='+glpk')
depends_on('gl2ps', when='+gl2ps')
depends_on('gnuplot', when='+gnuplot')
depends_on('ImageMagick', when='+magick')
depends_on('hdf5', when='+hdf5')
depends_on('jdk', when='+jdk')
depends_on('llvm', when='+llvm')
#depends_on('opengl', when='+opengl') # TODO: add package
depends_on('qhull', when='+qhull')
depends_on('qrupdate', when='+qrupdate')
#depends_on('qscintilla', when='+qscintilla) # TODO: add package
depends_on('qt', when='+qt')
depends_on('suite-sparse',when='+suitesparse')
depends_on('zlib', when='+zlib')
def install(self, spec, prefix):
config_args = [
"--prefix=%s" % prefix
]
# Required dependencies
config_args.extend([
"--with-blas=%s" % spec['blas'].prefix.lib,
"--with-lapack=%s" % spec['lapack'].prefix.lib
])
# Strongly recommended dependencies
if '+readline' in spec:
config_args.append('--enable-readline')
else:
config_args.append('--disable-readline')
# Optional dependencies
if '+arpack' in spec:
config_args.extend([
"--with-arpack-includedir=%s" % spec['arpack'].prefix.include,
"--with-arpack-libdir=%s" % spec['arpack'].prefix.lib
])
else:
config_args.append("--without-arpack")
if '+curl' in spec:
config_args.extend([
"--with-curl-includedir=%s" % spec['curl'].prefix.include,
"--with-curl-libdir=%s" % spec['curl'].prefix.lib
])
else:
config_args.append("--without-curl")
if '+fftw' in spec:
config_args.extend([
"--with-fftw3-includedir=%s" % spec['fftw'].prefix.include,
"--with-fftw3-libdir=%s" % spec['fftw'].prefix.lib,
"--with-fftw3f-includedir=%s" % spec['fftw'].prefix.include,
"--with-fftw3f-libdir=%s" % spec['fftw'].prefix.lib
])
else:
config_args.extend([
"--without-fftw3",
"--without-fftw3f"
])
if '+fltk' in spec:
config_args.extend([
"--with-fltk-prefix=%s" % spec['fltk'].prefix,
"--with-fltk-exec-prefix=%s" % spec['fltk'].prefix
])
else:
config_args.append("--without-fltk")
if '+glpk' in spec:
config_args.extend([
"--with-glpk-includedir=%s" % spec['glpk'].prefix.include,
"--with-glpk-libdir=%s" % spec['glpk'].prefix.lib
])
else:
config_args.append("--without-glpk")
if '+magick' in spec:
config_args.append("--with-magick=%s" % spec['ImageMagick'].prefix.lib)
if '+hdf5' in spec:
config_args.extend([
"--with-hdf5-includedir=%s" % spec['hdf5'].prefix.include,
"--with-hdf5-libdir=%s" % spec['hdf5'].prefix.lib
])
else:
config_args.append("--without-hdf5")
if '+jdk' in spec:
config_args.extend([
"--with-java-homedir=%s" % spec['jdk'].prefix,
"--with-java-includedir=%s" % spec['jdk'].prefix.include,
"--with-java-libdir=%s" % spec['jdk'].prefix.lib
])
if '~opengl' in spec:
config_args.extend([
"--without-opengl",
"--without-framework-opengl"
])
if '+qhull' in spec:
config_args.extend([
"--with-qhull-includedir=%s" % spec['qhull'].prefix.include,
"--with-qhull-libdir=%s" % spec['qhull'].prefix.lib
])
else:
config_args.append("--without-qhull")
if '+qrupdate' in spec:
config_args.extend([
"--with-qrupdate-includedir=%s" % spec['qrupdate'].prefix.include,
"--with-qrupdate-libdir=%s" % spec['qrupdate'].prefix.lib
])
else:
config_args.append("--without-qrupdate")
if '+zlib' in spec:
config_args.extend([
"--with-z-includedir=%s" % spec['zlib'].prefix.include,
"--with-z-libdir=%s" % spec['zlib'].prefix.lib
])
else:
config_args.append("--without-z")
configure(*config_args)
make()
make("install")

View File

@@ -1,10 +1,12 @@
from spack import *
import sys
class Openblas(Package):
"""OpenBLAS: An optimized BLAS library"""
homepage = "http://www.openblas.net"
url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz"
version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc')
version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
# virtual dependency
@@ -15,13 +17,14 @@ def install(self, spec, prefix):
make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77')
make('install', "PREFIX='%s'" % prefix)
lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so'
# Blas virtual package should provide blas.a and libblas.a
with working_dir(prefix.lib):
symlink('libopenblas.a', 'blas.a')
symlink('libopenblas.a', 'libblas.a')
symlink('libopenblas.so', 'libblas.so')
symlink('libopenblas.%s' % lib_dsuffix, 'libblas.%s' % lib_dsuffix)
# Lapack virtual package should provide liblapack.a
with working_dir(prefix.lib):
symlink('libopenblas.a', 'liblapack.a')
symlink('libopenblas.so', 'liblapack.so')
symlink('libopenblas.%s' % lib_dsuffix, 'liblapack.%s' % lib_dsuffix)

View File

@@ -41,12 +41,13 @@ class Openmpi(Package):
def url_for_version(self, version):
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
def setup_dependent_environment(self, module, spec, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
os.environ['OMPI_CC'] = 'cc'
os.environ['OMPI_CXX'] = 'c++'
os.environ['OMPI_FC'] = 'f90'
os.environ['OMPI_F77'] = 'f77'
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.set('OMPI_CC', spack_cc)
spack_env.set('OMPI_CXX', spack_cxx)
spack_env.set('OMPI_FC', spack_fc)
spack_env.set('OMPI_F77', spack_f77)
def install(self, spec, prefix):
config_args = ["--prefix=%s" % prefix,

View File

@@ -0,0 +1,34 @@
from spack import *
class P4est(Package):
"""Dynamic management of a collection (a forest) of adaptive octrees in parallel"""
homepage = "http://www.p4est.org"
url = "http://p4est.github.io/release/p4est-1.1.tar.gz"
version('1.1', '37ba7f4410958cfb38a2140339dbf64f')
# disable by default to make it work on frontend of clusters
variant('tests', default=False, description='Run small tests')
depends_on('mpi')
def install(self, spec, prefix):
options = ['--enable-mpi',
'--enable-shared',
'--disable-vtk-binary',
'--without-blas',
'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL',
'CFLAGS=-O2',
'CC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # TODO: use ENV variables or MPI class wrappers
'CXX=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'),
'FC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
'F77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'),
]
configure('--prefix=%s' % prefix, *options)
make()
if '+tests' in self.spec:
make("check")
make("install")

View File

@@ -16,4 +16,4 @@ class Pango(Package):
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")
make("install", parallel=False)

View File

@@ -13,6 +13,7 @@ class Papi(Package):
homepage = "http://icl.cs.utk.edu/papi/index.html"
url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz"
version('5.4.3', '3211b5a5bb389fe692370f5cf4cc2412')
version('5.4.1', '9134a99219c79767a11463a76b0b01a2')
version('5.3.0', '367961dd0ab426e5ae367c2713924ffb')

View File

@@ -2,9 +2,11 @@
class Paraview(Package):
homepage = 'http://www.paraview.org'
url = 'http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz'
url = 'http://www.paraview.org/files/v5.0/ParaView-v'
_url_str = 'http://www.paraview.org/files/v%s/ParaView-v%s-source.tar.gz'
version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378', url='http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz')
version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378')
version('5.0.0', '4598f0b421460c8bbc635c9a1c3bdbee')
variant('python', default=False, description='Enable Python support')
@@ -14,9 +16,9 @@ class Paraview(Package):
variant('osmesa', default=False, description='Enable OSMesa support')
variant('qt', default=False, description='Enable Qt support')
variant('opengl2', default=False, description='Enable OPengl2 backend')
variant('opengl2', default=False, description='Enable OpenGL2 backend')
depends_on('python', when='+python')
depends_on('python@2:2.7', when='+python')
depends_on('py-numpy', when='+python')
depends_on('py-matplotlib', when='+python')
depends_on('tcl', when='+tcl')
@@ -25,8 +27,8 @@ class Paraview(Package):
depends_on('bzip2')
depends_on('freetype')
depends_on('hdf5')
depends_on('hdf5+mpi', when='+mpi')
depends_on('hdf5~mpi', when='~mpi')
depends_on('jpeg')
depends_on('libpng')
depends_on('libtiff')
@@ -36,6 +38,11 @@ class Paraview(Package):
#depends_on('sqlite') # external version not supported
depends_on('zlib')
def url_for_version(self, version):
"""Handle ParaView version-based custom URLs."""
return self._url_str % (version.up_to(2), version)
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
def feature_to_bool(feature, on='ON', off='OFF'):

View File

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca945dd..1bf94e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,7 +33,7 @@ include_directories(${GKLIB_PATH})
include_directories(${METIS_PATH}/include)
# List of directories that cmake will look for CMakeLists.txt
-add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
+#add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis)
add_subdirectory(include)
add_subdirectory(libparmetis)
add_subdirectory(programs)

View File

@@ -25,9 +25,6 @@
from spack import *
# FIXME : lot of code is duplicated from packages/metis/package.py . Inheriting from there may reduce
# FIXME : the installation rules to just a few lines
class Parmetis(Package):
"""
@@ -43,13 +40,17 @@ class Parmetis(Package):
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')
depends_on('cmake @2.8:') # build dependency
depends_on('mpi')
# FIXME : this should conflict with metis as it builds its own version internally
patch('enable_external_metis.patch')
depends_on('metis')
# bug fixes from PETSc developers
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
depends_on('gdb', when='+gdb')
@@ -63,8 +64,8 @@ def install(self, spec, prefix):
# 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=metis_source),
'-DMETIS_PATH:PATH={metis_source}'.format(metis_source=metis_source),
options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=metis_source), # still need headers from METIS source, and they are not installed with METIS. shame...
'-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix),
'-DCMAKE_C_COMPILER:STRING=mpicc',
'-DCMAKE_CXX_COMPILER:STRING=mpicxx'])
@@ -78,18 +79,7 @@ def install(self, spec, prefix):
if '+gdb' in spec:
options.append('-DGDB:BOOL=ON')
metis_header = join_path(metis_source, 'include', 'metis.h')
if '+idx64' in spec:
filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header)
if '+double' in spec:
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make("install")
# Parmetis build system doesn't allow for an external metis to be used, but doesn't copy the required
# metis header either
install(metis_header, self.prefix.include)

View File

@@ -0,0 +1,77 @@
From 1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b Mon Sep 17 00:00:00 2001
From: Jed Brown <jed@59A2.org>
Date: Fri, 12 Oct 2012 15:45:10 -0500
Subject: [PATCH] ParMetis bug fixes reported by John Fettig [petsc-maint
#133631]
'''
I have also reported to to Karypis but have received zero
response and he hasn't released any updates to the original release
either. At least he approved my forum posting so that other people
can see the bug and the fix.
http://glaros.dtc.umn.edu/gkhome/node/837
'''
Hg-commit: 1c2b9fe39201d404b493885093b5992028b9b8d4
---
libparmetis/xyzpart.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libparmetis/xyzpart.c b/libparmetis/xyzpart.c
index 3a2c289..63abfcb 100644
--- a/libparmetis/xyzpart.c
+++ b/libparmetis/xyzpart.c
@@ -104,7 +104,7 @@ void IRBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
for (i=0; i<nbins; i++)
emarkers[i] = gmin + (gmax-gmin)*i/nbins;
- emarkers[nbins] = gmax*(1.0+2.0*REAL_EPSILON);
+ emarkers[nbins] = gmax*(1.0+copysign(1.0,gmax)*2.0*REAL_EPSILON);
/* get into a iterative backet boundary refinement */
for (l=0; l<5; l++) {
@@ -152,7 +152,7 @@ void IRBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
}
}
nemarkers[0] = gmin;
- nemarkers[nbins] = gmax*(1.0+2.0*REAL_EPSILON);
+ nemarkers[nbins] = gmax*(1.0+copysign(1.0,gmax)*2.0*REAL_EPSILON);
rcopy(nbins+1, nemarkers, emarkers);
}
@@ -218,7 +218,7 @@ void RBBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
emarkers[0] = gmin;
emarkers[1] = gsum/gnvtxs;
- emarkers[2] = gmax*(1.0+2.0*REAL_EPSILON);
+ emarkers[2] = gmax*(1.0+(gmax < 0 ? -1. : 1.)*2.0*REAL_EPSILON);
cnbins = 2;
/* get into a iterative backet boundary refinement */
@@ -227,7 +227,7 @@ void RBBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
iset(cnbins, 0, lcounts);
rset(cnbins, 0, lsums);
for (j=0, i=0; i<nvtxs;) {
- if (cand[i].key < emarkers[j+1]) {
+ if (cand[i].key <= emarkers[j+1]) {
lcounts[j]++;
lsums[j] += cand[i].key;
i++;
@@ -272,12 +272,12 @@ void RBBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
rsorti(cnbins, nemarkers);
rcopy(cnbins, nemarkers, emarkers);
- emarkers[cnbins] = gmax*(1.0+2.0*REAL_EPSILON);
+ emarkers[cnbins] = gmax*(1.0+(gmax < 0 ? -1. : 1.)*2.0*REAL_EPSILON);
}
/* assign the coordinate to the appropriate bin */
for (j=0, i=0; i<nvtxs;) {
- if (cand[i].key < emarkers[j+1]) {
+ if (cand[i].key <= emarkers[j+1]) {
bxyz[cand[i].val*ndims+k] = j;
i++;
}
--
2.1.1.1.g1fb337f

View File

@@ -0,0 +1,35 @@
From 82409d68aa1d6cbc70740d0f35024aae17f7d5cb Mon Sep 17 00:00:00 2001
From: Sean Farley <sean@mcs.anl.gov>
Date: Tue, 20 Mar 2012 11:59:44 -0500
Subject: [PATCH] parmetis: fix bug reported by jfettig; '<' to '<=' in xyzpart
Hg-commit: 2dd2eae596acaabbc80e0ef875182616f868dbc2
---
libparmetis/xyzpart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libparmetis/xyzpart.c b/libparmetis/xyzpart.c
index 307aed9..3a2c289 100644
--- a/libparmetis/xyzpart.c
+++ b/libparmetis/xyzpart.c
@@ -111,7 +111,7 @@ void IRBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
/* determine bucket counts */
iset(nbins, 0, lcounts);
for (j=0, i=0; i<nvtxs;) {
- if (cand[i].key < emarkers[j+1]) {
+ if (cand[i].key <= emarkers[j+1]) {
lcounts[j]++;
i++;
}
@@ -158,7 +158,7 @@ void IRBinCoordinates(ctrl_t *ctrl, graph_t *graph, idx_t ndims, real_t *xyz,
/* assign the coordinate to the appropriate bin */
for (j=0, i=0; i<nvtxs;) {
- if (cand[i].key < emarkers[j+1]) {
+ if (cand[i].key <= emarkers[j+1]) {
bxyz[cand[i].val*ndims+k] = j;
i++;
}
--
2.1.1.1.g1fb337f

View File

@@ -1,40 +1,106 @@
import os
from spack import *
class Petsc(Package):
"""PETSc is a suite of data structures and routines for the
scalable (parallel) solution of scientific applications modeled by
partial differential equations."""
"""
PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
modeled by partial differential equations.
"""
homepage = "http://www.mcs.anl.gov/petsc/index.html"
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
version('3.5.1', 'a557e029711ebf425544e117ffa44d8f')
version('3.4.4', '7edbc68aa6d8d6a3295dd5f6c2f6979d')
depends_on("python @2.6:2.9") # requires Python for building
variant('shared', default=True, description='Enables the build of shared libraries')
variant('mpi', default=True, description='Activates MPI support')
variant('double', default=True, description='Switches between single and double precision')
depends_on("boost")
depends_on("blas")
depends_on("lapack")
depends_on("hypre")
depends_on("parmetis")
depends_on("metis")
depends_on("hdf5+mpi")
depends_on("mpi")
variant('metis', default=True, description='Activates support for metis and parmetis')
variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)')
variant('boost', default=True, description='Activates support for Boost')
variant('hypre', default=True, description='Activates support for Hypre')
# Virtual dependencies
depends_on('blas')
depends_on('lapack')
depends_on('mpi', when='+mpi')
# Build dependencies
depends_on('python @2.6:2.7')
# Other dependencies
depends_on('boost', when='+boost')
depends_on('metis', when='+metis')
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('parmetis', when='+metis+mpi')
depends_on('hypre', when='+hypre+mpi')
def mpi_dependent_options(self):
if '~mpi' in self.spec:
compiler_opts = [
'--with-cc=%s' % os.environ['CC'],
'--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'),
'--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'),
'--with-mpi=0'
]
error_message_fmt = '\t{library} support requires "+mpi" to be activated'
# If mpi is disabled (~mpi), it's an error to have any of these enabled.
# This generates a list of any such errors.
errors = [error_message_fmt.format(library=x)
for x in ('hdf5', 'hypre', 'parmetis')
if ('+'+x) in self.spec]
if errors:
errors = ['incompatible variants given'] + errors
raise RuntimeError('\n'.join(errors))
else:
if self.compiler.name == "clang":
compiler_opts = [
'--with-mpi=1',
'--with-cc=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # Avoid confusing PETSc config by clang: warning: argument unused during compilation
'--with-cxx=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'),
'--with-fc=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
'--with-f77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'),
]
else:
compiler_opts = [
'--with-mpi=1',
'--with-mpi-dir=%s' % self.spec['mpi'].prefix,
]
return compiler_opts
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--with-blas-lib=%s/libblas.a" % spec['blas'].prefix.lib,
"--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib,
"--with-boost-dir=%s" % spec['boost'].prefix,
"--with-hypre-dir=%s" % spec['hypre'].prefix,
"--with-parmetis-dir=%s" % spec['parmetis'].prefix,
"--with-metis-dir=%s" % spec['metis'].prefix,
"--with-hdf5-dir=%s" % spec['hdf5'].prefix,
"--with-mpi-dir=%s" % spec['mpi'].prefix,
"--with-shared-libraries=0")
options = ['--with-debugging=0',
'--with-ssl=0']
options.extend(self.mpi_dependent_options())
options.extend([
'--with-precision=%s' % ('double' if '+double' in spec else 'single'),
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
'--with-blas-lapack-dir=%s' % spec['lapack'].prefix
])
# Activates library support if needed
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis'):
options.append(
'--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0'))
)
if library in spec:
options.append(
'--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix)
)
configure('--prefix=%s' % prefix, *options)
# PETSc has its own way of doing parallel make.
make('MAKE_NP=%s' % make_jobs, parallel=False)
make("install")
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up PETSC_DIR for everyone using PETSc package
spack_env.set('PETSC_DIR', self.prefix)

View File

@@ -0,0 +1,20 @@
from spack import *
class Proj(Package):
"""Cartographic Projections"""
homepage = "https://github.com/OSGeo/proj.4/wiki"
url = "http://download.osgeo.org/proj/proj-4.9.2.tar.gz"
version('4.9.2', '9843131676e31bbd903d60ae7dc76cf9')
version('4.9.1', '3cbb2a964fd19a496f5f4265a717d31c')
version('4.8.0', 'd815838c92a29179298c126effbb1537')
version('4.7.0', '927d34623b52e0209ba2bfcca18fe8cd')
version('4.6.1', '7dbaab8431ad50c25669fd3fb28dc493')
# No dependencies
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

View File

@@ -1,11 +1,12 @@
from spack import *
class PyNose(Package):
"""nose extends the test loading and running features of unittest,
making it easier to write, find and run tests."""
homepage = "https://pypi.python.org/pypi/nose"
url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz"
url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz"
version('1.3.4', '6ed7169887580ddc9a8e16048d38274d')
version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16')

View File

@@ -1,11 +1,14 @@
import functools
import glob
import inspect
import os
import re
from contextlib import closing
from llnl.util.lang import match_predicate
from spack.util.environment import *
from spack import *
import spack
from llnl.util.lang import match_predicate
from spack import *
from spack.util.environment import *
class Python(Package):
@@ -34,8 +37,9 @@ def install(self, spec, prefix):
env['PYTHONHOME'] = prefix
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
# 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
# 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",
@@ -89,35 +93,43 @@ def site_packages_dir(self):
return os.path.join(self.python_lib_dir, 'site-packages')
def setup_dependent_environment(self, module, spec, ext_spec):
"""Called before python modules' install() methods.
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.
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))
pythonpath = ':'.join(python_paths)
spack_env.set('PYTHONPATH', pythonpath)
run_env.set('PYTHONPATH', pythonpath)
def setup_dependent_package(self, module, ext_spec):
"""
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=%s' % 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(spec.prefix.bin, 'python3'))
module.python = Executable(join_path(self.spec.prefix.bin, 'python3'))
else:
module.python = Executable(join_path(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 if it does not exist already.
mkdirp(module.site_packages_dir)
# Set PYTHONPATH to include site-packages dir for the
# extension and any other python extensions it depends on.
python_paths = []
for d in ext_spec.traverse():
if d.package.extends(self.spec):
python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
os.environ['PYTHONPATH'] = ':'.join(python_paths)
# Make the site packages directory for extensions, if it does not exist already.
if ext_spec.package.is_extension:
mkdirp(module.site_packages_dir)
# ========================================================================
# Handle specifics of activating and deactivating python modules.

View File

@@ -0,0 +1,18 @@
from spack import *
class Qrupdate(Package):
"""qrupdate is a Fortran library for fast updates of QR and
Cholesky decompositions."""
homepage = "http://sourceforge.net/projects/qrupdate/"
url = "https://downloads.sourceforge.net/qrupdate/qrupdate-1.1.2.tar.gz"
version('1.1.2', '6d073887c6e858c24aeda5b54c57a8c4')
depends_on("blas")
depends_on("lapack")
def install(self, spec, prefix):
# Build static and dynamic libraries
make("lib", "solib")
make("install", "PREFIX=%s" % prefix)

View File

@@ -8,6 +8,9 @@ class Qt(Package):
list_url = 'http://download.qt-project.org/official_releases/qt/'
list_depth = 2
version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5',
url='http://download.qt-project.org/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz')
version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6',
url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz')
@@ -53,9 +56,12 @@ class Qt(Package):
depends_on("libxcb")
def setup_dependent_environment(self, module, spec, dep_spec):
"""Dependencies of Qt find it using the QTDIR environment variable."""
os.environ['QTDIR'] = self.prefix
def setup_environment(self, spack_env, env):
env.set('QTDIR', self.prefix)
def setup_dependent_environment(self, spack_env, run_env, dspec):
spack_env.set('QTDIR', self.prefix)
def patch(self):

View File

@@ -1,9 +1,8 @@
from spack import *
import spack
import os
class Ruby(Package):
"""A dynamic, open source programming language with a focus on
"""A dynamic, open source programming language with a focus on
simplicity and productivity."""
homepage = "https://www.ruby-lang.org/"
@@ -15,11 +14,23 @@ class Ruby(Package):
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")
def setup_dependent_environment(self, module, spec, ext_spec):
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
# TODO: do this only for actual extensions.
# Set GEM_PATH to include dependent gem directories
ruby_paths = []
for d in extension_spec.traverse():
if d.package.extends(self.spec):
ruby_paths.append(d.prefix)
spack_env.set_path('GEM_PATH', ruby_paths)
# The actual installation path for this gem
spack_env.set('GEM_HOME', extension_spec.prefix)
def setup_dependent_package(self, module, ext_spec):
"""Called before ruby modules' install() methods. Sets GEM_HOME
and GEM_PATH to values appropriate for the package being built.
@@ -28,14 +39,5 @@ def setup_dependent_environment(self, module, spec, ext_spec):
gem('install', '<gem-name>.gem')
"""
# Ruby extension builds have global ruby and gem functions
module.ruby = Executable(join_path(spec.prefix.bin, 'ruby'))
module.gem = Executable(join_path(spec.prefix.bin, 'gem'))
# Set GEM_PATH to include dependent gem directories
ruby_paths = []
for d in ext_spec.traverse():
if d.package.extends(self.spec):
ruby_paths.append(d.prefix)
os.environ['GEM_PATH'] = ':'.join(ruby_paths)
# The actual installation path for this gem
os.environ['GEM_HOME'] = ext_spec.prefix
module.ruby = Executable(join_path(self.spec.prefix.bin, 'ruby'))
module.gem = Executable(join_path(self.spec.prefix.bin, 'gem'))

View File

@@ -5,24 +5,35 @@ class Silo(Package):
data to binary, disk files."""
homepage = "http://wci.llnl.gov/simulation/computer-codes/silo"
url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.8/silo-4.8.tar.gz"
base_url = "https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo"
version('4.10.2', '9ceac777a2f2469ac8cef40f4fab49c8')
version('4.9', 'a83eda4f06761a86726e918fc55e782a')
version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9')
variant('fortran', default=True, description='Enable Fortran support')
variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files')
depends_on("hdf5")
depends_on('hdf5')
depends_on('qt', when='+silex')
def install(self, spec, prefix):
config_args = [
'--enable-fortran' if '+fortran' in spec else '--disable-fortran',
'--enable-silex' if '+silex' in spec else '--disable-silex',
]
if '+silex' in spec:
config_args.append('--with-Qt-dir=%s' % spec['qt'].prefix)
configure(
"--prefix=%s" % prefix,
"--with-hdf5=%s,%s" % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib),
"--with-zlib=%s,%s" % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib),
'--prefix=%s' % prefix,
'--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib),
'--with-zlib=%s,%s' % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib),
*config_args)
make()
make("install")
make('install')
def url_for_version(self, version):
return '%s/silo-%s/silo-%s.tar.gz' % (Silo.base_url, version, version)

View File

@@ -0,0 +1,49 @@
import os
from spack import *
class Slepc(Package):
"""
Scalable Library for Eigenvalue Computations.
"""
homepage = "http://www.grycap.upv.es/slepc"
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df')
variant('arpack', default=False, description='Enables Arpack wrappers')
depends_on('petsc')
depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi')
depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi')
def install(self, spec, prefix):
# set SLEPC_DIR for installation
os.environ['SLEPC_DIR'] = self.stage.source_path
options = []
if '+arpack' in spec:
options.extend([
'--with-arpack-dir=%s' % spec['arpack-ng'].prefix.lib,
])
if 'arpack-ng~mpi' in spec:
options.extend([
'--with-arpack-flags=-larpack'
])
else:
options.extend([
'--with-arpack-flags=-lparpack,-larpack'
])
configure('--prefix=%s' % prefix, *options)
make('MAKE_NP=%s' % make_jobs, parallel=False)
#FIXME:
# make('test')
make('install')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up SLEPC_DIR for everyone using SLEPc package
spack_env.set('SLEPC_DIR', self.prefix)

View File

@@ -1,7 +1,7 @@
from spack import *
class Suitesparse(Package):
class SuiteSparse(Package):
"""
SuiteSparse is a suite of sparse matrix algorithms
"""
@@ -24,4 +24,3 @@ def install(self, spec, prefix):
# FIXME : this actually uses the current workaround
# FIXME : (blas / lapack always provide libblas and liblapack as aliases)
make('install', 'INSTALL=%s' % prefix, 'BLAS=-lblas', 'LAPACK=-llapack')

View File

@@ -0,0 +1,63 @@
from spack import *
class SuperluDist(Package):
"""A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines."""
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae')
version('4.2', 'ae9fafae161f775fbac6eba11e530a65')
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
depends_on ('mpi')
depends_on ('blas')
depends_on ('lapack')
depends_on ('parmetis')
depends_on ('metis')
def install(self, spec, prefix):
makefile_inc = []
makefile_inc.extend([
'PLAT = _mac_x',
'DSuperLUroot = %s' % self.stage.source_path, #self.stage.path, prefix
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
'BLASDEF = -DUSE_VENDOR_BLAS',
'BLASLIB = -L%s -llapack %s -lblas' % (spec['lapack'].prefix.lib, spec['blas'].prefix.lib), # FIXME: avoid hardcoding blas/lapack lib names
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
'FLIBS =',
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)',
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = true',
'CC = mpicc', # FIXME avoid hardcoding MPI compiler names
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include),
'NOOPTS = -fPIC -std=c99',
'FORTRAN = mpif77',
'F90FLAGS = -O2',
'LOADER = mpif77',
'LOADOPTS =',
'CDEFS = -DAdd_'
])
#with working_dir('src'):
with open('make.inc', 'w') as fh:
fh.write('\n'.join(makefile_inc))
make("lib", parallel=False)
# FIXME:
# cd "EXAMPLE" do
# system "make"
# need to install by hand
headers_location = join_path(self.prefix.include,'superlu_dist')
mkdirp(headers_location)
# FIXME: fetch all headers in the folder automatically
for header in ['Cnames.h','cublas_utils.h','dcomplex.h','html_mainpage.h','machines.h','old_colamd.h','psymbfact.h','superlu_ddefs.h','superlu_defs.h','superlu_enum_consts.h','superlu_zdefs.h','supermatrix.h','util_dist.h']:
superludist_header = join_path(self.stage.source_path, 'SRC/',header)
install(superludist_header, headers_location)
superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a')
install(superludist_lib,self.prefix.lib)

View File

@@ -0,0 +1,79 @@
from spack import *
import os
import glob
class Tbb(Package):
"""Widely used C++ template library for task parallelism.
Intel Threading Building Blocks (Intel TBB) lets you easily write parallel
C++ programs that take full advantage of multicore performance, that are
portable and composable, and that have future-proof scalability.
"""
homepage = "http://www.threadingbuildingblocks.org/"
# Only version-specific URL's work for TBB
version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz')
def coerce_to_spack(self,tbb_build_subdir):
for compiler in ["icc","gcc","clang"]:
fs = glob.glob(join_path(tbb_build_subdir,"*.%s.inc" % compiler ))
for f in fs:
lines = open(f).readlines()
of = open(f,"w")
for l in lines:
if l.strip().startswith("CPLUS ="):
of.write("# coerced to spack\n")
of.write("CPLUS = $(CXX)\n")
elif l.strip().startswith("CPLUS ="):
of.write("# coerced to spack\n")
of.write("CONLY = $(CC)\n")
else:
of.write(l);
def install(self, spec, prefix):
#
# we need to follow TBB's compiler selection logic to get the proper build + link flags
# but we still need to use spack's compiler wrappers
# to accomplish this, we do two things:
#
# * Look at the spack spec to determine which compiler we should pass to tbb's Makefile
#
# * patch tbb's build system to use the compiler wrappers (CC, CXX) for
# icc, gcc, clang
# (see coerce_to_spack())
#
self.coerce_to_spack("build")
if spec.satisfies('%clang'):
tbb_compiler = "clang"
elif spec.satisfies('%intel'):
tbb_compiler = "icc"
else:
tbb_compiler = "gcc"
mkdirp(prefix)
mkdirp(prefix.lib)
#
# tbb does not have a configure script or make install target
# we simply call make, and try to put the pieces together
#
make("compiler=%s" %(tbb_compiler))
# install headers to {prefix}/include
install_tree('include',prefix.include)
# install libs to {prefix}/lib
tbb_lib_names = ["libtbb",
"libtbbmalloc",
"libtbbmalloc_proxy"]
for lib_name in tbb_lib_names:
# install release libs
fs = glob.glob(join_path("build","*release",lib_name + ".*"))
for f in fs:
install(f, prefix.lib)
# install debug libs if they exist
fs = glob.glob(join_path("build","*debug",lib_name + "_debug.*"))
for f in fs:
install(f, prefix.lib)

View File

@@ -12,33 +12,44 @@ class Thrift(Package):
version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678')
extends("python")
# Currently only support for c-family and python
variant('c', default=True, description="Build support for C-family languages")
variant('python', default=True, description="Build support for python")
depends_on("autoconf")
depends_on("automake")
depends_on("bison")
depends_on("boost")
depends_on("flex")
depends_on("jdk")
depends_on("libtool")
depends_on("openssl")
depends_on("python")
depends_on('jdk')
depends_on('autoconf')
depends_on('automake')
depends_on('libtool')
depends_on('boost@1.53:')
depends_on('bison')
depends_on('flex')
depends_on('openssl')
# Variant dependencies
extends('python', when='+python')
depends_on('zlib', when='+c')
depends_on('libevent', when='+c')
# Compilation fails for most languages, fortunately cpp installs fine
# All other languages (yes, including C) are omitted until someone needs them
def install(self, spec, prefix):
env["PY_PREFIX"] = prefix
env["JAVA_PREFIX"] = prefix
env['PY_PREFIX'] = prefix
env['JAVA_HOME'] = spec['jdk'].prefix
configure("--prefix=%s" % prefix,
"--with-boost=%s" % spec['boost'].prefix,
"--with-c=no",
"--with-go=no",
"--with-python=yes",
"--with-lua=no",
"--with-php=no",
"--with-qt4=no",
"--enable-tests=no")
# configure options
options = ['--prefix=%s' % prefix]
options.append('--with-boost=%s' % spec['boost'].prefix)
options.append('--enable-tests=no')
options.append('--with-c=%s' % ('yes' if '+c' in spec else 'no'))
options.append('--with-python=%s' % ('yes' if '+python' in spec else 'no'))
options.append('--with-java=%s' % ('yes' if '+java' in spec else 'no'))
options.append('--with-go=%s' % ('yes' if '+go' in spec else 'no'))
options.append('--with-lua=%s' % ('yes' if '+lua' in spec else 'no'))
options.append('--with-php=%s' % ('yes' if '+php' in spec else 'no'))
options.append('--with-qt4=%s' % ('yes' if '+qt4' in spec else 'no'))
configure(*options)
make()
make("install")

View File

@@ -7,10 +7,11 @@ class Tmux(Package):
do a lot more.
"""
homepage = "http://tmux.sourceforge.net"
url = "http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz"
homepage = "http://tmux.github.io"
url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
version('1.9a', 'b07601711f96f1d260b390513b509a2d')
version('2.1', '74a2855695bccb51b6e301383ad4818c')
depends_on('libevent')
depends_on('ncurses')

View File

@@ -0,0 +1,16 @@
from spack import *
class Udunits2(Package):
"""Automated units conversion"""
homepage = "http://www.unidata.ucar.edu/software/udunits"
url = "ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.20.tar.gz"
version('2.2.20', '1586b70a49dfe05da5fcc29ef239dce0')
depends_on('expat')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")

View File

@@ -0,0 +1,26 @@
from spack import *
class Zfp(Package):
"""zfp is an open source C library for compressed floating-point arrays that supports
very high throughput read and write random acces, target error bounds or bit rates.
Although bit-for-bit lossless compression is not always possible, zfp is usually
accurate to within machine epsilon in near-lossless mode, and is often orders of
magnitude more accurate than other lossy compressors.
"""
homepage = "http://computation.llnl.gov/projects/floating-point-compression"
url = "http://computation.llnl.gov/projects/floating-point-compression/download/zfp-0.5.0.tar.gz"
version('0.5.0', '2ab29a852e65ad85aae38925c5003654')
def install(self, spec, prefix):
make("shared")
# No install provided
mkdirp(prefix.lib)
mkdirp(prefix.include)
install('lib/libzfp.so', prefix.lib)
install('inc/zfp.h', prefix.include)
install('inc/types.h', prefix.include)
install('inc/bitstream.h', prefix.include)
install('inc/system.h', prefix.include)