summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuyangzhuan <liuyangzhuan@gmail.com>2019-08-02 16:58:30 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-08-02 18:58:30 -0500
commit474bf188532da7bb99fb99be4d1e4c3f43b1d29d (patch)
tree6382f9cf56409526cd8120c73329785382803780
parent45d852b87d895e49ac513a03dadb6b797d00d684 (diff)
downloadspack-474bf188532da7bb99fb99be4d1e4c3f43b1d29d.tar.gz
spack-474bf188532da7bb99fb99be4d1e4c3f43b1d29d.tar.bz2
spack-474bf188532da7bb99fb99be4d1e4c3f43b1d29d.tar.xz
spack-474bf188532da7bb99fb99be4d1e4c3f43b1d29d.zip
added a package butterflypack (#12222)
* added a package butterflypack * remove one line in the python script
-rw-r--r--var/spack/repos/builtin/packages/butterflypack/package.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py
new file mode 100644
index 0000000000..c894b0c910
--- /dev/null
+++ b/var/spack/repos/builtin/packages/butterflypack/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Butterflypack(CMakePackage):
+ """ButterflyPACK is a mathematical software for rapidly solving
+ large-scale dense linear systems that exhibit off-diagonal rank-deficiency.
+ These systems arise frequently from boundary element methods, or
+ factorization phases in finite-difference/finite-element methods.
+ ButterflyPACK relies on low-rank or butterfly formats under Hierarchical
+ matrix, HODLR or other hierarchically nested frameworks to compress,
+ factor and solve the linear system in quasi-linear time. The
+ computationally most intensive phase, factorization, is accelerated via
+ randomized linear algebras. The butterfly format, originally inspired by
+ the butterfly data flow in fast Fourier Transform, is a linear algebra tool
+ well-suited for compressing matrices arising from high-frequency wave
+ equations or highly oscillatory integral operators."""
+
+ homepage = "https://github.com/liuyangzhuan/ButterflyPACK"
+ git = "https://github.com/liuyangzhuan/ButterflyPACK.git"
+
+ maintainers = ['liuyangzhuan']
+
+ version('master', branch='master')
+
+ variant('shared', default=True, description='Build shared libraries')
+
+ depends_on('mpi')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('scalapack')
+ depends_on('arpack-ng')
+
+ def cmake_args(self):
+ spec = self.spec
+
+ def on_off(varstr):
+ return 'ON' if varstr in spec else 'OFF'
+
+ args = [
+ '-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
+ '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
+ '-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
+ '-DTPL_BLAS_LIBRARIES=%s' % spec['blas'].libs.joined(";"),
+ '-DTPL_LAPACK_LIBRARIES=%s' % spec['lapack'].libs.joined(";"),
+ '-DTPL_SCALAPACK_LIBRARIES=%s' % spec['scalapack'].
+ libs.joined(";"),
+ '-DTPL_ARPACK_LIBRARIES=%s' % spec['arpack-ng'].libs.joined(";"),
+ ]
+
+ args.extend([
+ '-DBUILD_SHARED_LIBS=%s' % on_off('+shared')
+ ])
+
+ return args