2021-01-02 15:10:28 +08:00
|
|
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2017-06-12 06:21:51 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2017-06-12 06:21:51 +08:00
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
class Bml(CMakePackage):
|
|
|
|
"""The basic matrix library (bml) is a collection of various matrix data
|
|
|
|
formats (in dense and sparse) and their associated algorithms for basic
|
|
|
|
matrix operations."""
|
|
|
|
|
2017-07-28 05:07:47 +08:00
|
|
|
homepage = "http://lanl.github.io/bml/"
|
2017-09-28 11:46:14 +08:00
|
|
|
url = "https://github.com/lanl/bml/tarball/v1.2.2"
|
2018-07-23 15:00:15 +08:00
|
|
|
git = "https://github.com/lanl/bml.git"
|
2017-06-12 06:21:51 +08:00
|
|
|
|
2018-07-23 15:00:15 +08:00
|
|
|
version('develop', branch='master')
|
2019-06-28 00:57:09 +08:00
|
|
|
version('1.3.1', sha256='17145eda96aa5e550dcbff1ee7ce62b45723af8210b1ab70c5975ec792fa3d13')
|
2019-10-11 13:44:41 +08:00
|
|
|
version('1.3.0', sha256='d9465079fe77210eb2af2dcf8ed96802edf5bb76bfbfdbcc97e206c8cd460b07')
|
|
|
|
version('1.2.3', sha256='9a2ee6c47d2445bfdb34495497ea338a047e9e4767802af47614d9ff94b0c523')
|
|
|
|
version('1.2.2', sha256='89ab78f9fe8395fe019cc0495a1d7b69875b5708069faeb831ddb9a6a9280a8a')
|
|
|
|
version('1.1.0', sha256='29162f1f7355ad28b44d3358206ccd3c7ac7794ee13788483abcbd2f8063e7fc')
|
2017-06-12 06:21:51 +08:00
|
|
|
|
2017-09-19 06:32:20 +08:00
|
|
|
variant('shared', default=True, description='Build shared libs')
|
2018-02-23 00:04:49 +08:00
|
|
|
variant('mpi', default=True, description='Build with MPI Support')
|
2017-10-03 02:51:06 +08:00
|
|
|
|
|
|
|
conflicts('+mpi', when='@:1.2.2')
|
2017-09-19 06:32:20 +08:00
|
|
|
|
2017-06-12 06:21:51 +08:00
|
|
|
depends_on("blas")
|
|
|
|
depends_on("lapack")
|
2017-10-03 02:51:06 +08:00
|
|
|
depends_on('mpi', when='+mpi')
|
2020-09-05 05:12:53 +08:00
|
|
|
depends_on('python', type='build')
|
2017-09-19 06:32:20 +08:00
|
|
|
|
|
|
|
def cmake_args(self):
|
2017-10-03 02:51:06 +08:00
|
|
|
args = [
|
2021-05-19 18:59:06 +08:00
|
|
|
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
|
2017-09-19 06:32:20 +08:00
|
|
|
]
|
2017-10-03 02:51:06 +08:00
|
|
|
spec = self.spec
|
|
|
|
if '+mpi' in spec:
|
|
|
|
args.append('-DBML_MPI=True')
|
|
|
|
args.append('-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc)
|
|
|
|
args.append('-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx)
|
|
|
|
args.append('-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc)
|
|
|
|
else:
|
|
|
|
args.append('-DBML_MPI=False')
|
|
|
|
return args
|