Merge branch 'develop' into features/external-packages

Conflicts:
	lib/spack/spack/package.py
This commit is contained in:
Matthew LeGendre
2016-03-09 11:09:37 -08:00
148 changed files with 3136 additions and 1241 deletions

View File

@@ -0,0 +1,27 @@
from spack import *
class Suitesparse(Package):
"""
SuiteSparse is a suite of sparse matrix algorithms
"""
homepage = 'http://faculty.cse.tamu.edu/davis/suitesparse.html'
url = 'http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.1.tar.gz'
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
depends_on('blas')
depends_on('lapack')
depends_on('metis@5.1.0', when='@4.5.1')
def install(self, spec, prefix):
# The build system of SuiteSparse is quite old-fashioned
# It's basically a plain Makefile which include an header (SuiteSparse_config/SuiteSparse_config.mk)
# with a lot of convoluted logic in it.
# Any kind of customization will need to go through filtering of that file
# 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,57 @@
from spack import *
class ArpackNg(Package):
"""
ARPACK-NG is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.
Important Features:
* Reverse Communication Interface.
* Single and Double Precision Real Arithmetic Versions for Symmetric,
Non-symmetric, Standard or Generalized Problems.
* Single and Double Precision Complex Arithmetic Versions for Standard or
Generalized Problems.
* Routines for Banded Matrices - Standard or Generalized Problems.
* Routines for The Singular Value Decomposition.
* Example driver routines that may be used as templates to implement numerous
Shift-Invert strategies for all problem types, data types and precision.
This project is a joint project between Debian, Octave and Scilab in order to
provide a common and maintained version of arpack.
Indeed, no single release has been published by Rice university for the last
few years and since many software (Octave, Scilab, R, Matlab...) forked it and
implemented their own modifications, arpack-ng aims to tackle this by providing
a common repository and maintained versions.
arpack-ng is replacing arpack almost everywhere.
"""
homepage = 'https://github.com/opencollab/arpack-ng'
url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz'
version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('mpi', default=False, description='Activates MPI support')
depends_on('blas')
depends_on('lapack')
depends_on('mpi', when='+mpi')
def install(self, spec, prefix):
# Apparently autotools are not bootstrapped
bootstrap = Executable('./bootstrap')
options = ['--prefix=%s' % prefix]
if '+mpi' in spec:
options.append('--enable-mpi')
if '~shared' in spec:
options.append('--enable-shared=no')
bootstrap()
configure(*options)
make()
make('install')

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

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

@@ -0,0 +1,34 @@
--- a/libs/container/src/pool_resource.cpp 2015-11-06 12:49:55.000000000 -0800
+++ b/libs/container/src/pool_resource.cpp 2015-12-22 07:54:36.202131121 -0800
@@ -32,11 +32,11 @@
class pool_data_t
: public block_slist_base<>
{
- typedef block_slist_base<> block_slist_base;
+ typedef block_slist_base<> block_slist_base_t;
public:
explicit pool_data_t(std::size_t initial_blocks_per_chunk)
- : block_slist_base(), next_blocks_per_chunk(initial_blocks_per_chunk)
+ : block_slist_base_t(), next_blocks_per_chunk(initial_blocks_per_chunk)
{ slist_algo::init_header(&free_slist); }
void *allocate_block() BOOST_NOEXCEPT
@@ -59,7 +59,7 @@
void release(memory_resource &upstream)
{
slist_algo::init_header(&free_slist);
- this->block_slist_base::release(upstream);
+ this->block_slist_base_t::release(upstream);
next_blocks_per_chunk = pool_options_minimum_max_blocks_per_chunk;
}
@@ -72,7 +72,7 @@
//Minimum block size is at least max_align, so all pools allocate sizes that are multiple of max_align,
//meaning that all blocks are max_align-aligned.
- char *p = static_cast<char *>(block_slist_base::allocate(blocks_per_chunk*pool_block, mr));
+ char *p = static_cast<char *>(block_slist_base_t::allocate(blocks_per_chunk*pool_block, mr));
//Create header types. This is no-throw
for(std::size_t i = 0, max = blocks_per_chunk; i != max; ++i){

View File

@@ -1,4 +1,5 @@
from spack import *
import spack
class Boost(Package):
"""Boost provides free peer-reviewed portable C++ source
@@ -44,15 +45,50 @@ class Boost(Package):
version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5')
version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0')
variant('debug', default=False, description='Switch to the debug version of Boost')
variant('python', default=False, description='Activate the component Boost.Python')
variant('mpi', default=False, description='Activate the component Boost.MPI')
variant('compression', default=True, description='Activate the compression Boost.iostreams')
default_install_libs = set(['atomic',
'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
# possible (and it would be difficult to choose sensible defaults)
default_noinstall_libs = set(['mpi', 'python'])
all_libs = default_install_libs | default_noinstall_libs
for lib in all_libs:
variant(lib, default=(lib not in default_noinstall_libs),
description="Compile with {0} library".format(lib))
variant('debug', default=False, description='Switch to the debug version of Boost')
variant('shared', default=True, description="Additionally build shared libraries")
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)")
depends_on('icu', when='+icu_support')
depends_on('python', when='+python')
depends_on('mpi', when='+mpi')
depends_on('bzip2', when='+compression')
depends_on('zlib', when='+compression')
depends_on('bzip2', when='+iostreams')
depends_on('zlib', when='+iostreams')
# Patch fix from https://svn.boost.org/trac/boost/ticket/11856
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."""
@@ -77,22 +113,20 @@ def determine_toolset(self, spec):
# fallback to gcc if no toolset found
return 'gcc'
def determine_bootstrap_options(self, spec, options):
options.append('--with-toolset=%s' % self.determine_toolset(spec))
def determine_bootstrap_options(self, spec, withLibs, options):
boostToolsetId = self.determine_toolset(spec)
options.append('--with-toolset=%s' % boostToolsetId)
options.append("--with-libraries=%s" % ','.join(withLibs))
without_libs = []
if '~mpi' in spec:
without_libs.append('mpi')
if '~python' in spec:
without_libs.append('python')
else:
if '+python' in spec:
options.append('--with-python=%s' %
join_path(spec['python'].prefix.bin, 'python'))
if without_libs:
options.append('--without-libraries=%s' % ','.join(without_libs))
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))
if '+mpi' in spec:
f.write('using mpi : %s ;\n' %
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
@@ -107,12 +141,10 @@ def determine_b2_options(self, spec, options):
else:
options.append('variant=release')
if '~compression' in spec:
options.extend([
'-s', 'NO_BZIP2=1',
'-s', 'NO_ZLIB=1'])
if '+icu_support' in spec:
options.extend(['-s', 'ICU_PATH=%s' % spec['icu'].prefix])
if '+compression' in spec:
if '+iostreams' in spec:
options.extend([
'-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include,
'-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib,
@@ -120,20 +152,46 @@ def determine_b2_options(self, spec, options):
'-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib,
])
linkTypes = ['static']
if '+shared' in spec:
linkTypes.append('shared')
threadingOpts = []
if '+multithreaded' in spec:
threadingOpts.append('multi')
if '+singlethreaded' in spec:
threadingOpts.append('single')
if not threadingOpts:
raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled")
options.extend([
'toolset=%s' % self.determine_toolset(spec),
'link=static,shared',
'threading=single,multi',
'link=%s' % ','.join(linkTypes),
'--layout=tagged'])
return threadingOpts
def install(self, spec, prefix):
withLibs = list()
for lib in Boost.all_libs:
if "+{0}".format(lib) in spec:
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.
src = join_path(self.stage.source_path, 'boost')
mkdirp(join_path(prefix, 'include'))
dst = join_path(prefix, 'include', 'boost')
install_tree(src, dst)
return
# to make Boost find the user-config.jam
env['BOOST_BUILD_PATH'] = './'
bootstrap = Executable('./bootstrap.sh')
bootstrap_options = ['--prefix=%s' % prefix]
self.determine_bootstrap_options(spec, bootstrap_options)
self.determine_bootstrap_options(spec, withLibs, bootstrap_options)
bootstrap(*bootstrap_options)
@@ -143,6 +201,10 @@ def install(self, spec, prefix):
b2 = Executable(b2name)
b2_options = ['-j', '%s' % make_jobs]
self.determine_b2_options(spec, b2_options)
threadingOpts = self.determine_b2_options(spec, b2_options)
b2('install', *b2_options)
# In theory it could be done on one call but it fails on
# Boost.MPI if the threading options are not separated.
for threadingOpt in threadingOpts:
b2('install', 'threading=%s' % threadingOpt, *b2_options)

View File

@@ -0,0 +1,25 @@
from spack import *
class Caliper(Package):
"""
Caliper is a generic context annotation system. It gives programmers the
ability to provide arbitrary program context information to (performance)
tools at runtime.
"""
homepage = "https://github.com/LLNL/Caliper"
url = ""
version('master', git='ssh://git@github.com:LLNL/Caliper.git')
variant('mpi', default=False, description='Enable MPI function wrappers.')
depends_on('libunwind')
depends_on('papi')
depends_on('mpi', when='+mpi')
def install(self, spec, prefix):
with working_dir('build', create=True):
cmake('..', *std_cmake_args)
make()
make("install")

View File

@@ -46,6 +46,7 @@ class Cgal(Package):
depends_on('mpfr')
depends_on('gmp')
depends_on('zlib')
depends_on('cmake')
# FIXME : Qt5 dependency missing (needs Qt5 and OpenGL)
# FIXME : Optional third party libraries missing

View File

@@ -28,20 +28,22 @@ class Cmake(Package):
"""A cross-platform, open-source build system. CMake is a family of
tools designed to build, test and package software."""
homepage = 'https://www.cmake.org'
url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
version('2.8.10.2', '097278785da7182ec0aea8769d06860c',
url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz')
version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f',
url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8',
url = 'http://cmake.org/files/v3.4/cmake-3.4.0.tar.gz')
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8')
version('3.3.1', '52638576f4e1e621fed6c3410d3a1b12')
version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f')
version('2.8.10.2', '097278785da7182ec0aea8769d06860c')
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
depends_on('ncurses', when='+ncurses')
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 install(self, spec, prefix):
configure('--prefix=' + prefix,
'--parallel=' + str(make_jobs),

View File

@@ -0,0 +1,16 @@
from spack import *
class Cmocka(Package):
"""Unit-testing framework in pure C"""
homepage = "https://cmocka.org/"
url = "https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz"
version('1.0.1', 'ed861e501a21a92b2af63e466df2015e')
parallel = False
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
cmake('..', *std_cmake_args)
make()
make("install")

View File

@@ -0,0 +1,31 @@
import glob
from spack import *
class Cryptopp(Package):
"""Crypto++ is an open-source C++ library of cryptographic schemes. The
library supports a number of different cryptography algorithms, including
authenticated encryption schemes (GCM, CCM), hash functions (SHA-1, SHA2),
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"
version('5.6.3', '3c5b70e2ec98b7a24988734446242d07')
version('5.6.2', '7ed022585698df48e65ce9218f6c6a67')
def install(self, spec, prefix):
make()
mkdirp(prefix.include)
for hfile in glob.glob('*.h*'):
install(hfile, prefix.include)
mkdirp(prefix.lib)
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)

View File

@@ -0,0 +1,55 @@
from spack import *
class Dakota(Package):
"""
The Dakota toolkit provides a flexible, extensible interface between analysis codes and iterative systems
analysis methods. Dakota contains algorithms for:
- optimization with gradient and non gradient-based methods;
- uncertainty quantification with sampling, reliability, stochastic expansion, and epistemic methods;
- parameter estimation with nonlinear least squares methods;
- sensitivity/variance analysis with design of experiments and parameter study methods.
These capabilities may be used on their own or as components within advanced strategies such as hybrid optimization,
surrogate-based optimization, mixed integer nonlinear programming, or optimization under uncertainty.
"""
homepage = 'https://dakota.sandia.gov/'
url = 'https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.3-public.src.tar.gz'
_url_str = 'https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-{version}-public.src.tar.gz'
version('6.3', '05a58d209fae604af234c894c3f73f6d')
variant('debug', default=False, description='Builds a debug version of the libraries')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('mpi', default=True, description='Activates MPI support')
depends_on('blas')
depends_on('lapack')
depends_on('mpi', when='+mpi')
depends_on('python')
depends_on('boost')
def url_for_version(self, version):
return Dakota._url_str.format(version=version)
def install(self, spec, prefix):
options = []
options.extend(std_cmake_args)
options.extend(['-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF')])
if '+mpi' in spec:
options.extend(['-DDAKOTA_HAVE_MPI:BOOL=ON',
'-DMPI_CXX_COMPILER:STRING=%s' % join_path(spec['mpi'].prefix.bin, 'mpicxx')])
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make("install")

View File

@@ -41,13 +41,14 @@ class Eigen(Package):
variant('metis', default=True, description='Enables metis backend')
variant('scotch', default=True, description='Enables scotch backend')
variant('fftw', default=True, description='Enables FFTW backend')
variant('suitesparse', default=True, description='Enables SuiteSparse support')
# TODO : dependency on SuiteSparse, googlehash, superlu, adolc missing
# TODO : dependency on googlehash, superlu, adolc missing
depends_on('metis', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
depends_on('SuiteSparse', 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,65 @@
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.
"""
homepage = 'http://quantum-espresso.org'
url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz'
version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3')
variant('mpi', default=True, description='Build Quantum-ESPRESSO 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')
depends_on('blas')
depends_on('lapack')
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
def check_variants(self, spec):
error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
if '+scalapack' in spec and '~mpi' in spec:
raise RuntimeError(error.format(variant='scalapack'))
if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec):
raise RuntimeError(error.format(variant='elpa'))
def install(self, spec, prefix):
self.check_variants(spec)
options = ['-prefix=%s' % prefix]
if '+mpi' in spec:
options.append('--enable-parallel')
if '+openmp' in spec:
options.append('--enable-openmp')
if '+scalapack' in spec:
options.append('--with-scalapack=yes')
if '+elpa' in spec:
options.append('--with-elpa=yes')
# Add a list of directories to search
search_list = []
for name, dependency_spec in spec.dependencies.iteritems():
search_list.extend([dependency_spec.prefix.lib,
dependency_spec.prefix.lib64])
search_list = " ".join(search_list)
options.append('LIBDIRS=%s' % search_list)
options.append('F90=%s' % os.environ['FC'])
configure(*options)
make('all')
make('install')

View File

@@ -0,0 +1,12 @@
diff --git a/cmake-exodus b/cmake-exodus
index 787fd9d..ed073a2 100755
--- a/cmake-exodus
+++ b/cmake-exodus
@@ -1,4 +1,6 @@
-EXTRA_ARGS=$@
+#!/bin/bash
+
+EXTRA_ARGS=-DSEACASProj_ENABLE_CXX11=OFF
### Change this to point to the compilers you want to use
CC=gcc

View File

@@ -0,0 +1,49 @@
from spack import *
# TODO: Add support for a C++11 enabled installation that filters out the
# TODO: "C++11-Disabled" flag (but only if the spec compiler supports C++11).
# TODO: Add support for parallel installation that uses MPI.
# TODO: Create installation options for NetCDF that support larger page size
# TODO: suggested by Exodus (see the repository "README" file).
class Exodusii(Package):
"""Exodus II is a C++/Fortran library developed to store and retrieve data for
finite element analyses. It's used for preprocessing (problem definition),
postprocessing (results visualization), and data transfer between codes.
An Exodus II data file is a random access, machine independent, binary
file that is written and read via C, C++, or Fortran API routines."""
homepage = "https://github.com/gsjaardema/seacas"
url = "https://github.com/gsjaardema/seacas/archive/master.zip"
version('2016-02-08', git='https://github.com/gsjaardema/seacas.git', commit='dcf3529')
# TODO: Make this a build dependency once build dependencies are supported
# (see: https://github.com/LLNL/spack/pull/378).
depends_on('cmake@2.8.7:')
depends_on('hdf5~shared~mpi')
depends_on('netcdf~mpi')
patch('exodus-cmake.patch')
def patch(self):
ff = FileFilter('cmake-exodus')
ff.filter('CMAKE_INSTALL_PREFIX:PATH=${ACCESS}',
'CMAKE_INSTALL_PREFIX:PATH=%s' % self.spec.prefix, string=True)
ff.filter('NetCDF_DIR:PATH=${TPL}',
'NetCDF_DIR:PATH=%s' % self.spec['netcdf'].prefix, string=True)
ff.filter('HDF5_ROOT:PATH=${TPL}',
'HDF5_ROOT:PATH=%s' % self.spec['hdf5'].prefix, string=True)
def install(self, spec, prefix):
mkdirp('build')
cd('build')
cmake_exodus = Executable('../cmake-exodus')
cmake_exodus()
make()
make('install')

View File

@@ -7,6 +7,7 @@ class Expat(Package):
version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd')
depends_on('cmake')
def install(self, spec, prefix):

View File

@@ -47,6 +47,8 @@ class Fftw(Package):
depends_on('mpi', when='+mpi')
# TODO : add support for architecture specific optimizations as soon as targets are supported
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix,
'--enable-shared',

View File

@@ -7,7 +7,8 @@ class Fish(Package):
homepage = "http://fishshell.com/"
url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz"
list_url = homepage
list_url = "http://fishshell.com/files/"
list_depth = 2
version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a')

View File

@@ -36,8 +36,6 @@ class Gcc(Package):
list_url = 'http://open-source-box.org/gcc/'
list_depth = 2
DEPENDS_ON_ISL_PREDICATE = '@5.0:'
version('5.3.0', 'c9616fd448f980259c31de613e575719')
version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467')
version('4.9.3', '6f831b4d251872736e8e9cc09746f327')
@@ -53,12 +51,11 @@ class Gcc(Package):
depends_on("mpfr")
depends_on("gmp")
depends_on("mpc") # when @4.5:
depends_on("mpc", when='@4.5:')
depends_on("isl", when='@5.0:')
depends_on("binutils~libiberty", when='~gold')
depends_on("binutils~libiberty+gold", when='+gold')
# Save these until we can do optional deps.
depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE)
#depends_on("ppl")
#depends_on("cloog")
@@ -91,7 +88,7 @@ def install(self, spec, prefix):
"--with-as=%s/bin/as" % spec['binutils'].prefix]
options.extend(binutils_options)
# Isl
if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE):
if 'isl' in spec:
isl_options = ["--with-isl=%s" % spec['isl'].prefix]
options.extend(isl_options)

View File

@@ -6,7 +6,7 @@
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://llnl.github.io/spack
# For details, see https://software.llnl.gov/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

View File

@@ -0,0 +1,56 @@
from spack import *
class Gromacs(Package):
"""
GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primarily designed for
simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry
department of University of Groningen, and is now maintained by contributors in universities and research centers
across the world.
GROMACS is one of the fastest and most popular software packages available and can run on CPUs as well as GPUs.
It is free, open source released under the GNU General Public License. Starting from version 4.6, GROMACS is
released under the GNU Lesser General Public License.
"""
homepage = 'http://www.gromacs.org'
url = 'ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.1.2.tar.gz'
version('5.1.2', '614d0be372f1a6f1f36382b7a6fcab98')
variant('mpi', default=True, description='Activate MPI support')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Enables debug mode')
variant('double', default=False, description='Produces a double precision version of the executables')
depends_on('mpi', when='+mpi')
depends_on('fftw')
# TODO : add GPU support
def install(self, spec, prefix):
options = []
if '+mpi' in spec:
options.append('-DGMX_MPI:BOOL=ON')
if '+double' in spec:
options.append('-DGMX_DOUBLE:BOOL=ON')
if '~shared' in spec:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
if '+debug' in spec:
options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
else:
options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
options.extend(std_cmake_args)
with working_dir('spack-build', create=True):
cmake('..', *options)
make()
make('install')

View File

@@ -0,0 +1,45 @@
from spack import *
class Hdf(Package):
"""HDF4 (also known as HDF) is a library and multi-object
file format for storing and managing data between machines."""
homepage = "https://www.hdfgroup.org/products/hdf4/"
url = "https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.11/src/hdf-4.2.11.tar.gz"
list_url = "https://www.hdfgroup.org/ftp/HDF/releases/"
list_depth = 3
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
variant('szip', default=False, description="Enable szip support")
depends_on("jpeg")
depends_on("szip", when='+szip')
depends_on("zlib")
def url_for_version(self, version):
return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str(version) + "/src/hdf-" + str(version) + ".tar.gz"
def install(self, spec, prefix):
config_args = [
'CFLAGS=-fPIC',
'--prefix=%s' % prefix,
'--with-jpeg=%s' % spec['jpeg'].prefix,
'--with-zlib=%s' % spec['zlib'].prefix,
'--disable-netcdf', # must be disabled to build NetCDF with HDF4 support
'--enable-fortran',
'--disable-shared', # fortran and shared libraries are not compatible
'--enable-static',
'--enable-production'
]
# SZip support
if '+szip' in spec:
config_args.append('--with-szlib=%s' % spec['szip'].prefix)
configure(*config_args)
make()
make("install")

View File

@@ -42,15 +42,18 @@ class Hdf5(Package):
version('1.8.13', 'c03426e9e77d7766944654280b467289')
variant('debug', default=False, description='Builds a debug version of the library')
variant('shared', default=True, description='Builds a shared version of the library')
variant('cxx', default=True, description='Enable C++ support')
variant('fortran', default=True, description='Enable Fortran support')
variant('unsupported', default=False, description='Enables unsupported configuration options')
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')
variant('threadsafe', default=False, description='Enable thread-safe capabilities')
depends_on("mpi", when='+mpi')
depends_on("szip", when='+szip')
depends_on("zlib")
def validate(self, spec):
@@ -76,6 +79,11 @@ def install(self, spec, prefix):
else:
extra_args.append('--enable-production')
if '+shared' in spec:
extra_args.append('--enable-shared')
else:
extra_args.append('--enable-static-exec')
if '+unsupported' in spec:
extra_args.append("--enable-unsupported")
@@ -105,6 +113,9 @@ def install(self, spec, prefix):
if '+fortran' in spec:
extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort")
if '+szip' in spec:
extra_args.append("--with-szlib=%s" % spec['szip'].prefix)
if '+threadsafe' in spec:
extra_args.extend([
'--enable-threadsafe',
@@ -114,7 +125,6 @@ def install(self, spec, prefix):
configure(
"--prefix=%s" % prefix,
"--with-zlib=%s" % spec['zlib'].prefix,
"--enable-shared", # TODO : this should be enabled by default, remove it?
*extra_args)
make()
make("install")

View File

@@ -0,0 +1,52 @@
from spack import *
import os
class Hpx5(Package):
"""The HPX-5 Runtime System. HPX-5 (High Performance ParalleX) is an
open source, portable, performance-oriented runtime developed at
CREST (Indiana University). HPX-5 provides a distributed
programming model allowing programs to run unmodified on systems
from a single SMP to large clusters and supercomputers with
thousands of nodes. HPX-5 supports a wide variety of Intel and ARM
platforms. It is being used by a broad range of scientific
applications enabling scientists to write code that performs and
scales better than contemporary runtimes."""
homepage = "http://hpx.crest.iu.edu"
url = "http://hpx.crest.iu.edu/release/hpx-2.0.0.tar.gz"
version('2.0.0', '3d2ff3aab6c46481f9ec65c5b2bfe7a6')
version('1.3.0', '2260ecc7f850e71a4d365a43017d8cee')
version('1.2.0', '4972005f85566af4afe8b71afbf1480f')
version('1.1.0', '646afb460ecb7e0eea713a634933ce4f')
version('1.0.0', '8020822adf6090bd59ed7fe465f6c6cb')
variant('debug', default=False, description='Build a debug version of HPX-5')
variant('photon', default=False, description='Enable Photon support')
variant('mpi', default=False, description='Enable MPI support')
depends_on("mpi", when='+mpi')
depends_on("mpi", when='+photon')
def install(self, spec, prefix):
extra_args = []
if '+debug' in spec:
extra_args.extend([
'--enable-debug',
'CFLAGS=-g -O0'
])
else:
extra_args.append('CFLAGS=-O3')
if '+mpi' in spec:
extra_args.append('--enable-mpi')
if '+photon' in spec:
extra_args.extend([
'--enable-mpi',
'--enable-photon'
])
os.chdir("./hpx/")
configure('--prefix=%s' % prefix, *extra_args)
make()
make("install")

View File

@@ -14,15 +14,18 @@ class Hwloc(Package):
efficiently."""
homepage = "http://www.open-mpi.org/projects/hwloc/"
url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz"
list_url = "http://www.open-mpi.org/software/hwloc/"
list_depth = 3
version('1.11.2', '486169cbe111cdea57be12638828ebbf',
url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.2.tar.bz2')
version('1.11.1', '002742efd3a8431f98d6315365a2b543',
url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.1.tar.bz2')
version('1.9', '1f9f9155682fe8946a97c08896109508')
version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23')
version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc')
version('1.9', '1f9f9155682fe8946a97c08896109508')
depends_on('libpciaccess')
def url_for_version(self, version):
return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)

View File

@@ -1,4 +1,5 @@
from spack import *
import os
class Hypre(Package):
"""Hypre is a library of high performance preconditioners that
@@ -8,8 +9,11 @@ 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')
variant('shared', default=True, description="Build shared library version (disables static library)")
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
@@ -17,16 +21,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

@@ -7,6 +7,8 @@ class Libedit(Package):
version('3.1', '43cdb5df3061d78b5e9d59109871b4f6', url="http://thrysoee.dk/editline/libedit-20150325-3.1.tar.gz")
depends_on('ncurses')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)

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

@@ -9,6 +9,7 @@ class LibgpgError(Package):
homepage = "https://www.gnupg.org/related_software/libgpg-error"
url = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.18.tar.bz2"
version('1.21', 'ab0b5aba6d0a185b41d07bda804fd8b2')
version('1.18', '12312802d2065774b787cbfc22cc04e9')
def install(self, spec, prefix):

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
@@ -117,6 +117,36 @@ class Llvm(Package):
},
}
releases = [
{
'version' : 'trunk',
'repo' : 'http://llvm.org/svn/llvm-project/llvm/trunk',
'resources' : {
'compiler-rt' : 'http://llvm.org/svn/llvm-project/compiler-rt/trunk',
'openmp' : 'http://llvm.org/svn/llvm-project/openmp/trunk',
'polly' : 'http://llvm.org/svn/llvm-project/polly/trunk',
'libcxx' : 'http://llvm.org/svn/llvm-project/libcxx/trunk',
'libcxxabi' : 'http://llvm.org/svn/llvm-project/libcxxabi/trunk',
'clang' : 'http://llvm.org/svn/llvm-project/cfe/trunk',
'clang-tools-extra' : 'http://llvm.org/svn/llvm-project/clang-tools-extra/trunk',
'lldb' : 'http://llvm.org/svn/llvm-project/lldb/trunk',
'llvm-libunwind' : 'http://llvm.org/svn/llvm-project/libunwind/trunk',
}
},
{
'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',
@@ -161,15 +191,25 @@ class Llvm(Package):
]
for release in releases:
version(release['version'], release['md5'], url=llvm_url % release)
if release['version'] == 'trunk' :
version(release['version'], svn=release['repo'])
for name, md5 in release['resources'].items():
resource(name=name,
url=resources[name]['url'] % release,
md5=md5,
destination=resources[name]['destination'],
when='@%(version)s' % release,
placement=resources[name].get('placement', None))
for name, repo in release['resources'].items():
resource(name=name,
svn=repo,
destination=resources[name]['destination'],
when='@%(version)s' % release,
placement=resources[name].get('placement', None))
else:
version(release['version'], release['md5'], url=llvm_url % release)
for name, md5 in release['resources'].items():
resource(name=name,
url=resources[name]['url'] % release,
md5=md5,
destination=resources[name]['destination'],
when='@%(version)s' % release,
placement=resources[name].get('placement', None))
def install(self, spec, prefix):
env['CXXFLAGS'] = self.compiler.cxx11_flag

View File

@@ -0,0 +1,25 @@
from spack import *
class M4(Package):
"""GNU M4 is an implementation of the traditional Unix macro processor."""
homepage = "https://www.gnu.org/software/m4/m4.html"
url = "ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz"
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_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

@@ -48,10 +48,11 @@ class Mpich(Package):
def setup_dependent_environment(self, module, spec, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
os.environ['MPICH_CC'] = 'cc'
os.environ['MPICH_CXX'] = 'c++'
os.environ['MPICH_F77'] = 'f77'
os.environ['MPICH_F90'] = 'f90'
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']
module.mpicc = join_path(self.prefix.bin, 'mpicc')

View File

@@ -0,0 +1,21 @@
from spack import *
class Ndiff(Package):
"""The ndiff tool is a binary utility that compares putatively similar files
while ignoring small numeric differernces. This utility is most often used
to compare files containing a lot of floating-point numeric data that
may be slightly different due to numeric error."""
homepage = "http://ftp.math.utah.edu/pub/ndiff/"
url = "http://ftp.math.utah.edu/pub/ndiff/ndiff-2.00.tar.gz"
version('2.00', '885548b4dc26e72c5455bebb5ba6c16d')
version('1.00', 'f41ffe5d12f36cd36b6311acf46eccdc')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
mkdirp(prefix.bin)
mkdirp('%s/lib' % prefix.share)
make('install-exe', 'install-shrlib')

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

@@ -1,25 +0,0 @@
diff -Nur netcdf-4.3.3/CMakeLists.txt netcdf-4.3.3.mpi/CMakeLists.txt
--- netcdf-4.3.3/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500
+++ netcdf-4.3.3.mpi/CMakeLists.txt 2015-10-14 16:44:41.176300658 -0400
@@ -753,6 +753,7 @@
SET(USE_PARALLEL OFF CACHE BOOL "")
MESSAGE(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.")
ELSE()
+ FIND_PACKAGE(MPI REQUIRED)
SET(USE_PARALLEL ON CACHE BOOL "")
SET(STATUS_PARALLEL "ON")
ENDIF()
diff -Nur netcdf-4.3.3/liblib/CMakeLists.txt netcdf-4.3.3.mpi/liblib/CMakeLists.txt
--- netcdf-4.3.3/liblib/CMakeLists.txt 2015-02-12 16:44:35.000000000 -0500
+++ netcdf-4.3.3.mpi/liblib/CMakeLists.txt 2015-10-14 16:44:57.757793634 -0400
@@ -71,6 +71,10 @@
SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY})
ENDIF()
+IF(USE_PARALLEL)
+ SET(TLL_LIBS ${TLL_LIBS} ${MPI_C_LIBRARIES})
+ENDIF()
+
IF(USE_HDF4)
SET(TLL_LIBS ${TLL_LIBS} ${HDF4_LIBRARIES})
ENDIF()

View File

@@ -1,28 +1,76 @@
from spack import *
class Netcdf(Package):
"""NetCDF is a set of software libraries and self-describing, machine-independent
data formats that support the creation, access, and sharing of array-oriented
scientific data."""
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')
patch('netcdf-4.3.3-mpi.patch')
variant('mpi', default=True, description='Enables MPI parallelism')
variant('hdf4', default=False, description="Enable HDF4 support")
# Dependencies:
depends_on("cmake @2.8.12:")
# >HDF5
depends_on("hdf5")
depends_on("curl") # required for DAP support
depends_on("hdf", when='+hdf4')
depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support
depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support
depends_on("zlib") # required for NetCDF-4 support
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
cmake('..',
"-DCMAKE_INSTALL_PREFIX:PATH=%s" % prefix,
"-DENABLE_DAP:BOOL=OFF", # Disable DAP.
"-DBUILD_SHARED_LIBS:BOOL=OFF") # Don't build shared libraries (use static libs).
# Environment variables
CPPFLAGS = []
LDFLAGS = []
LIBS = []
make()
make("install")
config_args = [
"--prefix=%s" % prefix,
"--enable-fsync",
"--enable-v2",
"--enable-utilities",
"--enable-shared",
"--enable-static",
"--enable-largefile",
# necessary for HDF5 support
"--enable-netcdf-4",
"--enable-dynamic-loading",
# necessary for DAP support
"--enable-dap"
]
if '+mpi' in spec:
config_args.append('--enable-parallel4')
CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix)
LDFLAGS.append( "-L%s/lib" % spec['hdf5'].prefix)
# HDF4 support
# As of NetCDF 4.1.3, "--with-hdf4=..." is no longer a valid option
# You must use the environment variables CPPFLAGS and LDFLAGS
if '+hdf4' in spec:
config_args.append("--enable-hdf4")
CPPFLAGS.append("-I%s/include" % spec['hdf'].prefix)
LDFLAGS.append( "-L%s/lib" % spec['hdf'].prefix)
LIBS.append( "-l%s" % "jpeg")
if 'szip' in spec:
CPPFLAGS.append("-I%s/include" % spec['szip'].prefix)
LDFLAGS.append( "-L%s/lib" % spec['szip'].prefix)
LIBS.append( "-l%s" % "sz")
# Fortran support
# In version 4.2+, NetCDF-C and NetCDF-Fortran have split.
# Use the netcdf-fortran package to install Fortran support.
config_args.append('CPPFLAGS=%s' % ' '.join(CPPFLAGS))
config_args.append('LDFLAGS=%s' % ' '.join(LDFLAGS))
config_args.append('LIBS=%s' % ' '.join(LIBS))
configure(*config_args)
make()
make("install")

View File

@@ -22,8 +22,8 @@ class NetlibScalapack(Package):
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',
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'),
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else 'ON'),
"-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK)
]

View File

@@ -19,7 +19,9 @@ def install(self, spec, prefix):
with working_dir(prefix.lib):
symlink('libopenblas.a', 'blas.a')
symlink('libopenblas.a', 'libblas.a')
symlink('libopenblas.so', 'libblas.so')
# Lapack virtual package should provide liblapack.a
with working_dir(prefix.lib):
symlink('libopenblas.a', 'liblapack.a')
symlink('libopenblas.so', 'liblapack.so')

View File

@@ -0,0 +1,50 @@
from spack import *
class Opencv(Package):
"""
OpenCV is released under a BSD license and hence it's free for both academic and commercial use. It has C++, C,
Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for
computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library
can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware
acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than
47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from
interactive art, to mines inspection, stitching maps on the web or through advanced robotics.
"""
homepage = 'http://opencv.org/'
url = 'https://github.com/Itseez/opencv/archive/3.1.0.tar.gz'
version('3.1.0', '70e1dd07f0aa06606f1bc0e3fa15abd3')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds a debug version of the libraries')
variant('eigen', default=True, description='Activates support for eigen')
variant('ipp', default=True, description='Activates support for IPP')
depends_on('zlib')
depends_on('libpng')
depends_on('libjpeg-turbo')
depends_on('libtiff')
depends_on('python')
depends_on('py-numpy')
depends_on('eigen', when='+eigen')
# FIXME : GUI extensions missing
# FIXME : CUDA extensions still missing
def install(self, spec, prefix):
cmake_options = []
cmake_options.extend(std_cmake_args)
cmake_options.extend(['-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'),
'-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF',
'-DWITH_IPP:BOOL=%s' % ('ON' if '+ipp' in spec else 'OFF')])
with working_dir('spack_build', create=True):
cmake('..', *cmake_options)
make('VERBOSE=1')
make("install")

View File

@@ -1,3 +1,6 @@
import urllib
import llnl.util.tty as tty
from spack import *
class Openssl(Package):
@@ -10,12 +13,51 @@ class Openssl(Package):
url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz"
version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf')
version('1.0.1r', '1abd905e079542ccae948af37e393d28')
version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a')
version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5')
version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d')
version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa')
depends_on("zlib")
parallel = False
def url_for_version(self, version):
# This URL is computed pinging the place where the latest version is stored. To avoid slowdown
# due to repeated pinging, we store the URL in a private class attribute to do the job only once per version
openssl_urls = getattr(Openssl, '_openssl_url', {})
openssl_url = openssl_urls.get(version, None)
# Same idea, but just to avoid issuing the same message multiple times
warnings_given_to_user = getattr(Openssl, '_warnings_given', {})
if openssl_url is None:
latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz'
older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz'
# Try to use the url where the latest tarballs are stored. If the url does not exist (404), then
# return the url for older format
version_number = '.'.join([str(x) for x in version[:-1]])
older_url = older.format(version_number=version_number, version_full=version)
latest_url = latest.format(version=version)
response = urllib.urlopen(latest.format(version=version))
if response.getcode() == 404:
openssl_url = older_url
# Checks if we already warned the user for this particular version of OpenSSL.
# If not we display a warning message and mark this version
if not warnings_given_to_user.get(version, False):
tty.warn('This installation depends on an old version of OpenSSL, which may have known security issues. ')
tty.warn('Consider updating to the latest version of this package.')
tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage))
warnings_given_to_user[version] = True
else:
openssl_url = latest_url
# Store the computed URL
openssl_urls[version] = openssl_url
# Store the updated dictionary of URLS
Openssl._openssl_url = openssl_urls
# Store the updated dictionary of warnings
Openssl._warnings_given = warnings_given_to_user
return openssl_url
def install(self, spec, prefix):
# OpenSSL uses a variable APPS in its Makefile. If it happens to be set
# in the environment, then this will override what is set in the

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

@@ -0,0 +1,20 @@
from spack import *
class ParallelNetcdf(Package):
"""Parallel netCDF (PnetCDF) is a library providing high-performance
parallel I/O while still maintaining file-format compatibility with
Unidata's NetCDF."""
homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf"
url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz"
version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34')
depends_on("m4")
depends_on("mpi")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--with-mpi=%s" % spec['mpi'].prefix)
make()
make("install")

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,6 +16,7 @@ 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')
depends_on('python', when='+python')
depends_on('py-numpy', when='+python')
@@ -24,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')
@@ -34,6 +37,11 @@ class Paraview(Package):
#depends_on('protobuf') # version mismatches?
#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):

View File

@@ -1,40 +1,86 @@
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')
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')
# Build dependencies
depends_on('python @2.6:2.9') # requires Python for building
# Virtual dependencies
depends_on('blas')
depends_on('lapack')
depends_on('mpi', when='+mpi')
# Other dependencies
depends_on('boost', when='+boost')
depends_on('metis', when='+metis')
depends_on('hdf5~cxx~unsupported+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'
errors = [error_message_fmt.format(library=x) for x in ('hdf5', 'hypre') if ('+'+x) in self.spec]
if errors:
errors = ['incompatible variants given'] + errors
raise RuntimeError('\n'.join(errors))
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 = []
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', 'hfd5', '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")

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

@@ -5,7 +5,9 @@ class PyMpi4py(Package):
homepage = "https://pypi.python.org/pypi/mpi4py"
url = "https://pypi.python.org/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz"
version('2.0.0', '4f7d8126d7367c239fd67615680990e3')
version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c')
extends('python')
depends_on('py-setuptools')
depends_on('mpi')

View File

@@ -0,0 +1,18 @@
from spack import *
class PyPhonopy(Package):
"""Phonopy is an open source package for phonon
calculations at harmonic and quasi-harmonic levels."""
homepage = "http://atztogo.github.io/phonopy/index.html"
url = "http://sourceforge.net/projects/phonopy/files/phonopy/phonopy-1.10/phonopy-1.10.0.tar.gz"
version('1.10.0', '973ed1bcea46e21b9bf747aab9061ff6')
extends('python')
depends_on('py-numpy')
depends_on('py-scipy')
depends_on('py-matplotlib')
depends_on('py-pyyaml')
def install(self, spec, prefix):
python('setup.py', 'install', '--home=%s' % prefix)

View File

@@ -0,0 +1,13 @@
from spack import *
class PyPyyaml(Package):
"""PyYAML is a YAML parser and emitter for Python."""
homepage = "http://pyyaml.org/wiki/PyYAML"
url = "http://pyyaml.org/download/pyyaml/PyYAML-3.11.tar.gz"
version('3.11', 'f50e08ef0fe55178479d3a618efe21db')
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@@ -0,0 +1,15 @@
from spack import *
class PyWheel(Package):
"""A built-package format for Python."""
homepage = "https://pypi.python.org/pypi/wheel"
url = "https://pypi.python.org/packages/source/w/wheel/wheel-0.26.0.tar.gz"
version('0.26.0', '4cfc6e7e3dc7377d0164914623922a10')
extends('python')
depends_on('py-setuptools')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@@ -55,6 +55,20 @@ def install(self, spec, prefix):
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'))
python3_version = ''
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)
# ========================================================================
# Set up environment to make install easy for python extensions.

View File

@@ -8,20 +8,20 @@ class Qhull(Package):
implements the Quickhull algorithm for computing the convex
hull. It handles roundoff errors from floating point
arithmetic. It computes volumes, surface areas, and
approximations to the convex hull.
Qhull does not support triangulation of non-convex surfaces,
mesh generation of non-convex objects, medium-sized inputs in
9-D and higher, alpha shapes, weighted Voronoi diagrams,
Voronoi volumes, or constrained Delaunay triangulations."""
approximations to the convex hull."""
homepage = "http://www.qhull.org"
version('7.2.0', 'e6270733a826a6a7c32b796e005ec3dc',
url="http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz")
version('1.0', 'd0f978c0d8dfb2e919caefa56ea2953c',
url="http://www.qhull.org/download/qhull-2012.1-src.tgz")
# https://github.com/qhull/qhull/pull/5
patch('qhull-iterator.patch')
patch('qhull-iterator.patch', when='@1.0')
depends_on('cmake')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):

View File

@@ -23,6 +23,7 @@ class Qt(Package):
version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009',
url="http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz")
variant('mesa', default=False, description='depend on mesa')
# Add patch for compile issues with qt3 found with use in the OpenSpeedShop project
variant('krellpatch', default=False, description="build with openspeedshop based patch.")
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
@@ -48,7 +49,7 @@ class Qt(Package):
# depends_on("icu4c")
# OpenGL hardware acceleration
depends_on("mesa", when='@4:')
depends_on("mesa", when='@4:+mesa')
depends_on("libxcb")

View File

@@ -1,19 +1,28 @@
from spack import *
class Silo(Package):
"""Silo is a library for reading and writing a wide variety of scientific data to binary, disk files."""
"""Silo is a library for reading and writing a wide variety of scientific
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"
#version('4.9', 'a83eda4f06761a86726e918fc55e782a')
version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9')
depends_on("hdf5@:1.8.12")
variant('fortran', default=True, description='Enable Fortran support')
depends_on("hdf5")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--with-hdf5=%s" %spec['hdf5'].prefix)
config_args = [
'--enable-fortran' if '+fortran' in spec else '--disable-fortran',
]
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),
*config_args)
make()
make("install")

View File

@@ -0,0 +1,28 @@
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."""
homepage = "http://www.tetgen.org"
url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz"
version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18')
# TODO: Make this a build dependency once build dependencies are supported
# (see: https://github.com/LLNL/spack/pull/378).
depends_on('cmake@2.8.7:', when='@1.5.0:')
def install(self, spec, prefix):
make('tetgen', 'tetlib')
mkdirp(prefix.bin)
install('tetgen', prefix.bin)
mkdirp(prefix.include)
install('tetgen.h', prefix.include)
mkdirp(prefix.lib)
install('libtet.a', prefix.lib)

View File

@@ -6,7 +6,7 @@
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://llnl.github.io/spack
# For details, see https://software.llnl.gov/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

View File

@@ -0,0 +1,20 @@
from spack import *
class Triangle(Package):
"""Triangle is a two-dimensional mesh generator and Delaunay
triangulator. Triangle generates exact Delaunay triangulations,
constrained Delaunay triangulations, conforming Delaunay
triangulations, Voronoi diagrams, and high-quality triangular
meshes."""
homepage = "http://www.cs.cmu.edu/~quake/triangle.html"
url = "http://www.netlib.org/voronoi/triangle.zip"
version('1.6', '10aff8d7950f5e0e2fb6dd2e340be2c9')
def install(self, spec, prefix):
make()
mkdirp(prefix.bin)
install('triangle', prefix.bin)
install('showme', prefix.bin)

View File

@@ -10,40 +10,44 @@ class Trilinos(Package):
homepage = "https://trilinos.org/"
url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"
version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
version('12.2.1', '6161926ea247863c690e927687f83be9')
version('12.0.1', 'bd99741d047471e127b8296b2ec08017')
version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426')
version('11.14.2', 'a43590cf896c677890d75bfe75bc6254')
version('11.14.1', '40febc57f76668be8b6a77b7607bb67f')
variant('mpi', default=True, description='Add a dependency on MPI and enables MPI dependent packages')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds a debug version of the libraries')
# Everything should be compiled with -fpic
depends_on('blas')
depends_on('lapack')
depends_on('boost')
depends_on('netcdf')
depends_on('matio')
depends_on('glm')
depends_on('swig')
depends_on('mpi', when='+mpi')
# MPI related dependencies
depends_on('mpi')
depends_on('netcdf+mpi')
depends_on('python') # Needs py-numpy activated
def install(self, spec, prefix):
options = [
'-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
'-DTrilinos_ENABLE_TESTS:BOOL=OFF',
'-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
'-DBUILD_SHARED_LIBS:BOOL=ON',
'-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix,
'-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix
]
if '+mpi' in spec:
mpi_options = ['-DTPL_ENABLE_MPI:BOOL=ON']
options.extend(mpi_options)
# -DCMAKE_INSTALL_PREFIX and all the likes...
options = []
options.extend(std_cmake_args)
options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON',
'-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:STRING=ON',
'-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix,
'-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix
])
with working_dir('spack-build', create=True):
cmake('..', *options)
make()

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

@@ -8,11 +8,9 @@ class Xz(Package):
homepage = "http://tukaani.org/xz/"
url = "http://tukaani.org/xz/xz-5.2.0.tar.bz2"
version('5.2.0', '867cc8611760240ebf3440bd6e170bb9',
url = 'http://tukaani.org/xz/xz-5.2.0.tar.bz2')
version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af',
url = 'http://tukaani.org/xz/xz-5.2.2.tar.bz2')
version('5.2.0', '867cc8611760240ebf3440bd6e170bb9')
version('5.2.2', 'f90c9a0c8b259aee2234c4e0d7fd70af')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()

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)