spack/var/spack/repos/builtin/packages/petsc/package.py

41 lines
1.7 KiB
Python
Raw Normal View History

2015-05-28 08:39:17 +08:00
from spack import *
class Petsc(Package):
2015-06-07 08:41:15 +08:00
"""PETSc is a suite of data structures and routines for the
scalable (parallel) solution of scientific applications modeled by
partial differential equations."""
2015-05-28 08:39:17 +08:00
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("python @2.6:2.9") # requires Python for building
2015-06-07 08:41:15 +08:00
depends_on("boost")
2015-05-28 08:39:17 +08:00
depends_on("blas")
depends_on("lapack")
depends_on("hypre")
depends_on("parmetis")
depends_on("metis")
depends_on("hdf5+mpi")
2015-06-07 08:41:15 +08:00
depends_on("mpi")
2015-05-28 08:39:17 +08:00
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
2015-06-07 08:41:15 +08:00
"--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,
2016-01-08 02:54:47 +08:00
"--with-mpi-dir=%s" % spec['mpi'].prefix,
2015-05-28 08:39:17 +08:00
"--with-shared-libraries=0")
2015-06-07 08:41:15 +08:00
# PETSc has its own way of doing parallel make.
make('MAKE_NP=%s' % make_jobs, parallel=False)
2015-05-28 08:39:17 +08:00
make("install")