summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorRobert Pavel <rspavel@gmail.com>2017-10-03 16:04:49 -0600
committerChristoph Junghans <christoph.junghans@gmail.com>2017-10-03 16:04:49 -0600
commit9871a2eb91bf81e54404195a81772c9397153d8b (patch)
treec1a0bcb2d2a2b3d8e6f7bb27766b7425a85d2b41 /var
parenta05964959db91306ed5204ffec3384706ae92258 (diff)
downloadspack-9871a2eb91bf81e54404195a81772c9397153d8b.tar.gz
spack-9871a2eb91bf81e54404195a81772c9397153d8b.tar.bz2
spack-9871a2eb91bf81e54404195a81772c9397153d8b.tar.xz
spack-9871a2eb91bf81e54404195a81772c9397153d8b.zip
ExaSP2 Spackage (#5570)
* Added exasp2 spackage Added spackage for exasp2 proxy app * Fixed MPI in ExaSP2 Explicitly disabled MPI when not enabled. Set MPI variant to default as per Spack standards * Generalized BML Passing for ExaSP2 * Modified to follow spack rules on blas Fortunately was able to modify exasp2 build system to support spack model for blas and lapack requirements. No guarantee is made for support of anything other than originally supported libraries * Fixed flake8 error
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/exasp2/package.py94
1 files changed, 94 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/exasp2/package.py b/var/spack/repos/builtin/packages/exasp2/package.py
new file mode 100644
index 0000000000..cae46bb055
--- /dev/null
+++ b/var/spack/repos/builtin/packages/exasp2/package.py
@@ -0,0 +1,94 @@
+##############################################################################
+# Copyright (c) 2017, Los Alamos National Security, LLC
+# Produced at the Los Alamos 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 NOTICE and LICENSE files 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 Exasp2(MakefilePackage):
+ """ExaSP2 is a reference implementation of typical linear algebra algorithms
+ and workloads for a quantum molecular dynamics (QMD) electronic structure
+ code. The algorithm is based on a recursive second-order Fermi-Operator
+ expansion method (SP2) and is tailored for density functional based
+ tight-binding calculations of material systems. The SP2 algorithm variants
+ are part of the Los Alamos Transferable Tight-binding for Energetics
+ (LATTE) code, based on a matrix expansion of the Fermi operator in a
+ recursive series of generalized matrix-matrix multiplications. It is
+ created and maintained by Co-Design Center for Particle Applications
+ (CoPA). The code is intended to serve as a vehicle for co-design by
+ allowing others to extend and/or reimplement as needed to test performance
+ of new architectures, programming models, etc."""
+
+ tags = ['proxy-app']
+
+ homepage = "https://github.com/ECP-copa/ExaSP2"
+
+ version('develop', git='https://github.com/ECP-copa/ExaSP2',
+ branch='master')
+
+ variant('mpi', default=True, description='Build With MPI Support')
+
+ depends_on('bml')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('mpi', when='+mpi')
+ depends_on('bml@1.2.3:+mpi', when='+mpi')
+
+ build_directory = 'src'
+
+ @property
+ def build_targets(self):
+ targets = []
+ spec = self.spec
+ if '+mpi' in spec:
+ targets.append('PARALLEL=MPI')
+ targets.append('MPICC={0}'.format(spec['mpi'].mpicc))
+ targets.append('MPI_LIB=-L' + spec['mpi'].prefix.lib + ' -lmpi')
+ targets.append('MPI_INCLUDE=-I' + spec['mpi'].prefix.include)
+ else:
+ targets.append('PARALLEL=NONE')
+ # NOTE: no blas except for mkl has been properly tested. OpenBlas was
+ # briefly but not rigoruously tested. Using generic blas approach to
+ # meet Spack requirements
+ targets.append('BLAS=GENERIC_SPACKBLAS')
+ math_libs = str(spec['lapack'].libs)
+ math_libs += ' ' + str(spec['lapack'].libs)
+ targets.append('SPACKBLASLIBFLAGS=' + math_libs)
+ math_includes = spec['lapack'].prefix.include
+ math_includes += " -I" + spec['blas'].prefix.include
+ targets.append('SPACKBLASINCLUDES=' + math_includes)
+ # And BML
+ bmlLibDirs = spec['bml'].libs.directories[0]
+ targets.append('BML_PATH=' + bmlLibDirs)
+ targets.append('--file=Makefile.vanilla')
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ mkdir(prefix.doc)
+ if '+mpi' in self.spec:
+ install('bin/ExaSP2-parallel', prefix.bin)
+ else:
+ install('bin/ExaSP2-serial', prefix.bin)
+ install('LICENSE.md', prefix.doc)
+ install('README.md', prefix.doc)