summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/arpack/package.py41
-rw-r--r--var/spack/packages/blas/package.py17
-rw-r--r--var/spack/packages/boxlib/package.py25
-rw-r--r--var/spack/packages/cblas/package.py32
-rw-r--r--var/spack/packages/cgm/package.py30
-rw-r--r--var/spack/packages/hypre/package.py32
-rw-r--r--var/spack/packages/lapack/package.py3
-rw-r--r--var/spack/packages/metis/package.py29
-rw-r--r--var/spack/packages/parpack/package.py43
-rw-r--r--var/spack/packages/petsc/package.py40
10 files changed, 272 insertions, 20 deletions
diff --git a/var/spack/packages/arpack/package.py b/var/spack/packages/arpack/package.py
new file mode 100644
index 0000000000..8c67c536f3
--- /dev/null
+++ b/var/spack/packages/arpack/package.py
@@ -0,0 +1,41 @@
+from spack import *
+import os
+import shutil
+
+class Arpack(Package):
+ """A collection of Fortran77 subroutines designed to solve large scale
+ eigenvalue problems.
+ """
+ homepage = "http://www.caam.rice.edu/software/ARPACK/"
+ url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz"
+
+ version('96', 'fffaa970198b285676f4156cebc8626e')
+
+ depends_on('blas')
+ depends_on('lapack')
+
+ def patch(self):
+ # Filter the cray makefile to make a spack one.
+ shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc')
+ makefile = FileFilter('ARmake.inc')
+
+ # Be sure to use Spack F77 wrapper
+ makefile.filter('^FC.*', 'FC = f77')
+ makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
+
+ # Set up some variables.
+ makefile.filter('^PLAT.*', 'PLAT = ')
+ makefile.filter('^home.*', 'home = %s' % os.getcwd())
+ makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
+ makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+
+ # build the library in our own prefix.
+ makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd())
+
+
+ def install(self, spec, prefix):
+ with working_dir('SRC'):
+ make('all')
+
+ mkdirp(prefix.lib)
+ install('libarpack.a', prefix.lib)
diff --git a/var/spack/packages/blas/package.py b/var/spack/packages/blas/package.py
new file mode 100644
index 0000000000..0cf495d0c1
--- /dev/null
+++ b/var/spack/packages/blas/package.py
@@ -0,0 +1,17 @@
+from spack import *
+import os
+
+class Blas(Package):
+ """The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard
+ building blocks for performing basic vector and matrix operations."""
+
+ homepage = "http://www.netlib.org/blas/"
+
+ version('unversioned', '5e99e975f7a1e3ea6abcad7c6e7e42e6',
+ url='http://www.netlib.org/blas/blas.tgz')
+
+ def install(self, spec, prefix):
+ make()
+ mkdirp('%s' % prefix.lib) # Create the lib dir inside the install dir.
+ move('./blas_LINUX.a', '%s/libblas.a' % prefix.lib) # Rename the generated lib file to libblas.a
+
diff --git a/var/spack/packages/boxlib/package.py b/var/spack/packages/boxlib/package.py
new file mode 100644
index 0000000000..4f1b71132f
--- /dev/null
+++ b/var/spack/packages/boxlib/package.py
@@ -0,0 +1,25 @@
+from spack import *
+
+class Boxlib(Package):
+ """BoxLib, a software framework for massively parallel
+ block-structured adaptive mesh refinement (AMR) codes."""
+
+ homepage = "https://ccse.lbl.gov/BoxLib/"
+ url = "https://ccse.lbl.gov/pub/Downloads/BoxLib.git";
+
+ # TODO: figure out how best to version this. No tags in the repo!
+ version('master', git='https://ccse.lbl.gov/pub/Downloads/BoxLib.git')
+
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+ args = std_cmake_args
+ args += ['-DCCSE_ENABLE_MPI=1',
+ '-DCMAKE_C_COMPILER=%s' % which('mpicc'),
+ '-DCMAKE_CXX_COMPILER=%s' % which('mpicxx'),
+ '-DCMAKE_Fortran_COMPILER=%s' % which('mpif90')]
+
+ cmake('.', *args)
+ make()
+ make("install")
+
diff --git a/var/spack/packages/cblas/package.py b/var/spack/packages/cblas/package.py
new file mode 100644
index 0000000000..93cf5fb7b8
--- /dev/null
+++ b/var/spack/packages/cblas/package.py
@@ -0,0 +1,32 @@
+from spack import *
+import os
+
+class Cblas(Package):
+ """The BLAS (Basic Linear Algebra Subprograms) are routines that
+ provide standard building blocks for performing basic vector and
+ matrix operations."""
+
+ homepage = "http://www.netlib.org/blas/_cblas/"
+
+ # tarball has no version, but on the date below, this MD5 was correct.
+ version('2015-06-06', '1e8830f622d2112239a4a8a83b84209a',
+ url='http://www.netlib.org/blas/blast-forum/cblas.tgz')
+
+ depends_on('blas')
+ parallel = False
+
+ def patch(self):
+ mf = FileFilter('Makefile.in')
+
+ mf.filter('^BLLIB =.*', 'BLLIB = %s/libblas.a' % self.spec['blas'].prefix.lib)
+ mf.filter('^CC =.*', 'CC = cc')
+ mf.filter('^FC =.*', 'FC = f90')
+
+
+ def install(self, spec, prefix):
+ make('all')
+ mkdirp(prefix.lib)
+
+ # Rename the generated lib file to libcblas.a
+ install('./lib/cblas_LINUX.a', '%s/libcblas.a' % prefix.lib)
+
diff --git a/var/spack/packages/cgm/package.py b/var/spack/packages/cgm/package.py
new file mode 100644
index 0000000000..05d6395c5a
--- /dev/null
+++ b/var/spack/packages/cgm/package.py
@@ -0,0 +1,30 @@
+from spack import *
+
+class Cgm(Package):
+ """The Common Geometry Module, Argonne (CGMA) is a code library
+ which provides geometry functionality used for mesh generation and
+ other applications."""
+ homepage = "http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM"
+ url = "http://ftp.mcs.anl.gov/pub/fathom/cgm13.1.1.tar.gz"
+
+ version('13.1.1', '4e8dbc4ba8f65767b29f985f7a23b01f')
+ version('13.1.0', 'a6c7b22660f164ce893fb974f9cb2028')
+ version('13.1' , '95f724bda04919fc76818a5b7bc0b4ed')
+
+ depends_on("mpi")
+
+ def patch(self):
+ filter_file('^(#include "CGMParallelConventions.h")',
+ '//\1',
+ 'geom/parallel/CGMReadParallel.cpp')
+
+
+ def install(self, spec, prefix):
+ configure("--with-mpi",
+ "--prefix=%s" % prefix,
+ "CFLAGS=-static",
+ "CXXFLAGS=-static",
+ "FCFLAGS=-static")
+
+ make()
+ make("install")
diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py
new file mode 100644
index 0000000000..198b3f00dc
--- /dev/null
+++ b/var/spack/packages/hypre/package.py
@@ -0,0 +1,32 @@
+from spack import *
+
+class Hypre(Package):
+ """Hypre is a library of high performance preconditioners that
+ features parallel multigrid methods for both structured and
+ unstructured grid problems."""
+
+ homepage = "https://computation.llnl.gov/project/linear_solvers/software.php"
+ url = "https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
+
+ version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
+
+ depends_on("mpi")
+ depends_on("blas")
+ depends_on("lapack")
+
+ def install(self, spec, prefix):
+ blas_dir = spec['blas'].prefix
+ lapack_dir = spec['lapack'].prefix
+
+ # 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")
+ make()
+ make("install")
diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py
index 7013ba37b4..d174c5281f 100644
--- a/var/spack/packages/lapack/package.py
+++ b/var/spack/packages/lapack/package.py
@@ -1,6 +1,4 @@
from spack import *
-import sys
-import glob
class Lapack(Package):
"""
@@ -45,4 +43,3 @@ class Lapack(Package):
make()
make("install")
-
diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py
index fa13d52127..7ce5ae1925 100644
--- a/var/spack/packages/metis/package.py
+++ b/var/spack/packages/metis/package.py
@@ -5,28 +5,23 @@ class Metis(Package):
partitioning finite element meshes, and producing fill reducing
orderings for sparse matrices. The algorithms implemented in
METIS are based on the multilevel recursive-bisection,
- multilevel k-way, and multi-constraint partitioning schemes
- developed in our lab."""
+ multilevel k-way, and multi-constraint partitioning schemes."""
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview"
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
version('5.1.0', '5465e67079419a69e0116de24fce58fe')
- # FIXME: Add dependencies if this package requires them.
- # depends_on("foo")
-
- def patch(self):
- filter_file(r'#define IDXTYPEWIDTH 32', '#define IDXTYPEWIDTH 64', 'include/metis.h',
- string=True)
-
+ depends_on('mpi')
def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..',
- '-DGKLIB_PATH=../GKlib',
- '-DBUILD_SHARED_LIBS=TRUE',
- *std_cmake_args)
- make()
- make("install")
-
+ cmake(".",
+ '-DGKLIB_PATH=%s/GKlib' % pwd(),
+ '-DSHARED=1',
+ '-DCMAKE_C_COMPILER=mpicc',
+ '-DCMAKE_CXX_COMPILER=mpicxx',
+ '-DSHARED=1',
+ *std_cmake_args)
+
+ make()
+ make("install")
diff --git a/var/spack/packages/parpack/package.py b/var/spack/packages/parpack/package.py
new file mode 100644
index 0000000000..622aceca04
--- /dev/null
+++ b/var/spack/packages/parpack/package.py
@@ -0,0 +1,43 @@
+from spack import *
+import os
+import shutil
+
+class Parpack(Package):
+ """ARPACK is a collection of Fortran77 subroutines designed to solve large
+ scale eigenvalue problems."""
+
+ homepage = "http://www.caam.rice.edu/software/ARPACK/download.html"
+ url = "http://www.caam.rice.edu/software/ARPACK/SRC/parpack96.tar.Z"
+
+ version('96', 'a175f70ff71837a33ff7e4b0b6054f43')
+
+ depends_on('mpi')
+ depends_on('blas')
+ depends_on('lapack')
+
+ def patch(self):
+ # Filter the CJ makefile to make a spack one.
+ shutil.move('ARMAKES/ARmake.CJ', 'ARmake.inc')
+ mf = FileFilter('ARmake.inc')
+
+ # Be sure to use Spack F77 wrapper
+ mf.filter('^FC.*', 'FC = f77')
+ mf.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
+
+ # Set up some variables.
+ mf.filter('^PLAT.*', 'PLAT = ')
+ mf.filter('^home.*', 'home = %s' % os.getcwd())
+ mf.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
+ mf.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+ mf.filter('^MAKE.*', 'MAKE = make')
+
+ # build the library in our own prefix.
+ mf.filter('^ARPACKLIB.*', 'PARPACKLIB = %s/libparpack.a' % os.getcwd())
+
+
+ def install(self, spec, prefix):
+ with working_dir('PARPACK/SRC/MPI'):
+ make('all')
+
+ mkdirp(prefix.lib)
+ install('libparpack.a', prefix.lib)
diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py
new file mode 100644
index 0000000000..4864e39bf1
--- /dev/null
+++ b/var/spack/packages/petsc/package.py
@@ -0,0 +1,40 @@
+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."""
+
+ 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"
+
+ version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
+ version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
+ version('3.5.1', 'a557e029711ebf425544e117ffa44d8f')
+
+ depends_on("boost")
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("hypre")
+ depends_on("parmetis")
+ depends_on("metis")
+ depends_on("hdf5")
+ depends_on("mpi")
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix,
+ "CC=cc",
+ "CXX=c++",
+ "FC=f90",
+ "--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-shared-libraries=0")
+
+ # PETSc has its own way of doing parallel make.
+ make('MAKE_NP=%s' % make_jobs, parallel=False)
+ make("install")