summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py63
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py176
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py1
-rw-r--r--var/spack/repos/builtin/packages/py-ply/package.py38
-rw-r--r--var/spack/repos/builtin/packages/tetgen/package.py11
5 files changed, 258 insertions, 31 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 9c09b205a8..54b6426d36 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -244,38 +244,47 @@ class Dealii(Package):
print('========= Step-40 Trilinos ==========')
print('=====================================')
# change Linear Algebra to Trilinos
- filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
- ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
+ # The below filter_file should be different for versions
+ # before and after 8.4.0
+ if spec.satisfies('@8.4.0:'):
+ filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
+ ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
+ else:
+ filter_file(r'(#define USE_PETSC_LA.*)',
+ ('// #define USE_PETSC_LA'), 'step-40.cc')
if '^trilinos+hypre' in spec:
make('release')
make('run', parallel=False)
- print('=====================================')
- print('=== Step-40 Trilinos SuperluDist ====')
- print('=====================================')
- # change to direct solvers
- filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
- filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
- (''), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
- (''), 'step-40.cc')
- filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
- (''), 'step-40.cc')
- filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
- filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
- if '^trilinos+superlu-dist' in spec:
- make('release')
- make('run', paralle=False)
+ # the rest of the tests on step 40 only works for
+ # dealii version 8.4.0 and after
+ if spec.satisfies('@8.4.0:'):
+ print('=====================================')
+ print('=== Step-40 Trilinos SuperluDist ====')
+ print('=====================================')
+ # change to direct solvers
+ filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
+ (''), 'step-40.cc')
+ filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
+ (''), 'step-40.cc')
+ filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
+ (''), 'step-40.cc')
+ filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
+ if '^trilinos+superlu-dist' in spec:
+ make('release')
+ make('run', paralle=False)
- print('=====================================')
- print('====== Step-40 Trilinos MUMPS =======')
- print('=====================================')
- # switch to Mumps
- filter_file(r'(Amesos_Superludist)',
- ('Amesos_Mumps'), 'step-40.cc')
- if '^trilinos+mumps' in spec:
- make('release')
- make('run', parallel=False)
+ print('=====================================')
+ print('====== Step-40 Trilinos MUMPS =======')
+ print('=====================================')
+ # switch to Mumps
+ filter_file(r'(Amesos_Superludist)',
+ ('Amesos_Mumps'), 'step-40.cc')
+ if '^trilinos+mumps' in spec:
+ make('release')
+ make('run', parallel=False)
print('=====================================')
print('============ Step-36 ================')
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
new file mode 100644
index 0000000000..0845237656
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -0,0 +1,176 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fenics(Package):
+ """FEniCS is organized as a collection of interoperable components
+ that together form the FEniCS Project. These components include
+ the problem-solving environment DOLFIN, the form compiler FFC, the
+ finite element tabulator FIAT, the just-in-time compiler Instant,
+ the code generation interface UFC, the form language UFL and a
+ range of additional components."""
+
+ homepage = "http://fenicsproject.org/"
+ url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz"
+
+ base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" # NOQA: ignore E501
+
+ variant('hdf5', default=True, description='Compile with HDF5')
+ variant('parmetis', default=True, description='Compile with ParMETIS')
+ variant('scotch', default=True, description='Compile with Scotch')
+ variant('petsc', default=True, description='Compile with PETSc')
+ variant('slepc', default=True, description='Compile with SLEPc')
+ variant('trilinos', default=True, description='Compile with Trilinos')
+ variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers')
+ variant('vtk', default=False, description='Compile with VTK')
+ variant('qt', default=False, description='Compile with QT')
+ variant('mpi', default=True, description='Enables the distributed memory support')
+ variant('openmp', default=True, description='Enables the shared memory support')
+ variant('shared', default=True, description='Enables the build of shared libraries')
+ variant('debug', default=False, description='Builds a debug version of the libraries')
+
+ # not part of spack list for now
+ # variant('petsc4py', default=True, description='Uses PETSc4py')
+ # variant('slepc4py', default=True, description='Uses SLEPc4py')
+ # variant('pastix', default=True, description='Compile with Pastix')
+
+ extends('python')
+
+ depends_on('py-numpy')
+ depends_on('py-ply')
+ depends_on('py-six')
+ depends_on('py-sphinx@1.0.1:', when='+doc')
+ depends_on('eigen@3.2.0:')
+ depends_on('boost')
+ depends_on('mpi', when='+mpi')
+ depends_on('hdf5', when='+hdf5')
+ depends_on('parmetis@4.0.2:^metis+real64', when='+parmetis')
+ depends_on('scotch~metis', when='+scotch~mpi')
+ depends_on('scotch+mpi~metis', when='+scotch+mpi')
+ depends_on('petsc@3.4:', when='+petsc')
+ depends_on('slepc@3.4:', when='+slepc')
+ depends_on('trilinos', when='+trilinos')
+ depends_on('vtk', when='+vtk')
+ depends_on('suite-sparse', when='+suite-sparse')
+ depends_on('qt', when='+qt')
+
+ # This are the build dependencies
+ depends_on('py-setuptools')
+ depends_on('cmake@2.8.12:')
+ depends_on('swig@3.0.3:')
+
+ releases = [
+ {
+ 'version': '1.6.0',
+ 'md5': '35cb4baf7ab4152a40fb7310b34d5800',
+ 'resources': {
+ 'ffc': '358faa3e9da62a1b1a717070217b793e',
+ 'fiat': 'f4509d05c911fd93cea8d288a78a6c6f',
+ 'instant': '5f2522eb032a5bebbad6597b6fe0732a',
+ 'ufl': 'c40c5f04eaa847377ab2323122284016',
+ }
+ },
+ {
+ 'version': '1.5.0',
+ 'md5': '9b589a3534299a5e6d22c13c5eb30bb8',
+ 'resources': {
+ 'ffc': '343f6d30e7e77d329a400fd8e73e0b63',
+ 'fiat': 'da3fa4dd8177bb251e7f68ec9c7cf6c5',
+ 'instant': 'b744023ded27ee9df4a8d8c6698c0d58',
+ 'ufl': '130d7829cf5a4bd5b52bf6d0955116fd',
+ }
+ },
+ ]
+
+ for release in releases:
+ version(release['version'], release['md5'], url=base_url.format(pkg='dolfin', version=release['version']))
+ for name, md5 in release['resources'].items():
+ resource(name=name,
+ url=base_url.format(pkg=name, **release),
+ md5=md5,
+ destination='depends',
+ when='@{version}'.format(**release),
+ placement=name)
+
+ def cmake_is_on(self, option):
+ return 'ON' if option in self.spec else 'OFF'
+
+ def install(self, spec, prefix):
+ for package in ['ufl', 'ffc', 'fiat', 'instant']:
+ with working_dir(join_path('depends', package)):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
+
+ cmake_args = [
+ '-DCMAKE_BUILD_TYPE:STRING={0}'.format(
+ 'Debug' if '+debug' in spec else 'RelWithDebInfo'),
+ '-DBUILD_SHARED_LIBS:BOOL={0}'.format(
+ self.cmake_is_on('+shared')),
+ '-DDOLFIN_SKIP_BUILD_TESTS:BOOL=ON',
+ '-DDOLFIN_ENABLE_OPENMP:BOOL={0}'.format(
+ self.cmake_is_on('+openmp')),
+ '-DDOLFIN_ENABLE_CHOLMOD:BOOL={0}'.format(
+ self.cmake_is_on('suite-sparse')),
+ '-DDOLFIN_ENABLE_HDF5:BOOL={0}'.format(
+ self.cmake_is_on('hdf5')),
+ '-DDOLFIN_ENABLE_MPI:BOOL={0}'.format(
+ self.cmake_is_on('mpi')),
+ '-DDOLFIN_ENABLE_PARMETIS:BOOL={0}'.format(
+ self.cmake_is_on('parmetis')),
+ '-DDOLFIN_ENABLE_PASTIX:BOOL={0}'.format(
+ self.cmake_is_on('pastix')),
+ '-DDOLFIN_ENABLE_PETSC:BOOL={0}'.format(
+ self.cmake_is_on('petsc')),
+ '-DDOLFIN_ENABLE_PETSC4PY:BOOL={0}'.format(
+ self.cmake_is_on('py-petsc4py')),
+ '-DDOLFIN_ENABLE_PYTHON:BOOL={0}'.format(
+ self.cmake_is_on('python')),
+ '-DDOLFIN_ENABLE_QT:BOOL={0}'.format(
+ self.cmake_is_on('qt')),
+ '-DDOLFIN_ENABLE_SCOTCH:BOOL={0}'.format(
+ self.cmake_is_on('scotch')),
+ '-DDOLFIN_ENABLE_SLEPC:BOOL={0}'.format(
+ self.cmake_is_on('slepc')),
+ '-DDOLFIN_ENABLE_SLEPC4PY:BOOL={0}'.format(
+ self.cmake_is_on('py-slepc4py')),
+ '-DDOLFIN_ENABLE_SPHINX:BOOL={0}'.format(
+ self.cmake_is_on('py-sphinx')),
+ '-DDOLFIN_ENABLE_TRILINOS:BOOL={0}'.format(
+ self.cmake_is_on('trilinos')),
+ '-DDOLFIN_ENABLE_UMFPACK:BOOL={0}'.format(
+ self.cmake_is_on('suite-sparse')),
+ '-DDOLFIN_ENABLE_VTK:BOOL={0}'.format(
+ self.cmake_is_on('vtk')),
+ '-DDOLFIN_ENABLE_ZLIB:BOOL={0}'.format(
+ self.cmake_is_on('zlib')),
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 21137ef356..e46f432be5 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -38,6 +38,7 @@ class Hdf5(Package):
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
+ version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295')
version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199')
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True)
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
diff --git a/var/spack/repos/builtin/packages/py-ply/package.py b/var/spack/repos/builtin/packages/py-ply/package.py
new file mode 100644
index 0000000000..47cd3b5dc8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-ply/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPly(Package):
+ """PLY is nothing more than a straightforward lex/yacc implementation."""
+ homepage = "http://www.dabeaz.com/ply"
+ url = "http://www.dabeaz.com/ply/ply-3.8.tar.gz"
+
+ version('3.8', '94726411496c52c87c2b9429b12d5c50')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py
index 5e87ed7fba..c301a5b4e5 100644
--- a/var/spack/repos/builtin/packages/tetgen/package.py
+++ b/var/spack/repos/builtin/packages/tetgen/package.py
@@ -24,16 +24,19 @@
##############################################################################
from spack import *
+
class Tetgen(Package):
- """TetGen is a program and library that can be used to generate tetrahedral
- meshes for given 3D polyhedral domains. TetGen generates exact constrained
- Delaunay tetrahedralizations, boundary conforming Delaunay meshes, and
- Voronoi paritions."""
+ """TetGen is a program and library that can be used to generate
+ tetrahedral meshes for given 3D polyhedral domains. TetGen
+ generates exact constrained Delaunay tetrahedralizations,
+ boundary conforming Delaunay meshes, and Voronoi paritions.
+ """
homepage = "http://www.tetgen.org"
url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz"
version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18')
+ version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz')
# TODO: Make this a build dependency once build dependencies are supported
# (see: https://github.com/LLNL/spack/pull/378).