diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/elemental/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/elemental/package.py | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py index 14e376628c..43a34fcc40 100644 --- a/var/spack/repos/builtin/packages/elemental/package.py +++ b/var/spack/repos/builtin/packages/elemental/package.py @@ -1,27 +1,8 @@ -############################################################################## -# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. +# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. # -# 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/spack/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 -############################################################################## +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + import os from spack import * from spack.spec import UnsupportedCompilerError @@ -32,9 +13,10 @@ class Elemental(CMakePackage): and optimization library.""" homepage = "http://libelemental.org" - url = "https://github.com/elemental/Elemental/archive/v0.87.6.tar.gz" + url = "https://github.com/elemental/Elemental/archive/v0.87.7.tar.gz" + git = "https://github.com/elemental/Elemental.git" - version('develop', git='https://github.com/elemental/Elemental.git', branch='master') + version('develop', branch='master') version('0.87.7', '6c1e7442021c59a36049e37ea69b8075') version('0.87.6', '9fd29783d45b0a0e27c0df85f548abe9') @@ -66,8 +48,8 @@ class Elemental(CMakePackage): variant('build_type', default='Release', description='The build type to build', values=('Debug', 'Release')) - variant('blas', default='openblas', values=('openblas', 'mkl'), - description='Enable the use of OpenBlas/MKL') + variant('blas', default='openblas', values=('openblas', 'mkl', 'accelerate', 'essl'), + description='Enable the use of OpenBlas/MKL/Accelerate/ESSL') variant('mpfr', default=False, description='Support GNU MPFR\'s' 'arbitrary-precision floating-point arithmetic') @@ -75,6 +57,7 @@ class Elemental(CMakePackage): # Note that #1712 forces us to enumerate the different blas variants depends_on('blas', when='~openmp_blas ~int64_blas') # Hack to forward variant to openblas package + depends_on('openblas', when='blas=openblas ~openmp_blas ~int64_blas') # Allow Elemental to build internally when using 8-byte ints depends_on('openblas threads=openmp', when='blas=openblas +openmp_blas ~int64_blas') @@ -82,8 +65,15 @@ class Elemental(CMakePackage): depends_on('intel-mkl threads=openmp', when='blas=mkl +openmp_blas ~int64_blas') depends_on('intel-mkl@2017.1 +openmp +ilp64', when='blas=mkl +openmp_blas +int64_blas') + depends_on('veclibfort', when='blas=accelerate') + + depends_on('essl ~cuda', when='blas=essl ~openmp_blas ~int64_blas') + depends_on('essl threads=openmp', when='blas=essl +openmp_blas ~int64_blas') + # Note that this forces us to use OpenBLAS until #1712 is fixed depends_on('lapack', when='blas=openblas ~openmp_blas') + depends_on('netlib-lapack +external-blas', when='blas=essl') + depends_on('metis') depends_on('metis +int64', when='+int64') depends_on('mpi') @@ -102,7 +92,7 @@ class Elemental(CMakePackage): def libs(self): shared = True if '+shared' in self.spec else False return find_libraries( - 'libEl', root=self.prefix, shared=shared, recurse=True + 'libEl', root=self.prefix, shared=shared, recursive=True ) def cmake_args(self): @@ -134,14 +124,23 @@ class Elemental(CMakePackage): ifort = env['SPACK_F77'] intel_bin = os.path.dirname(ifort) intel_root = os.path.dirname(intel_bin) - libfortran = LibraryList('{0}/lib/intel64/libifcoremt.{1}' - .format(intel_root, dso_suffix)) + libfortran = find_libraries('libifcoremt', + root=intel_root, recursive=True) elif self.spec.satisfies('%gcc'): # see <stage_folder>/debian/rules as an example: mpif77 = Executable(spec['mpi'].mpif77) libfortran = LibraryList(mpif77('--print-file-name', 'libgfortran.%s' % dso_suffix, - output=str)) + output=str).strip()) + elif self.spec.satisfies('%xl') or self.spec.satisfies('%xl_r'): + xl_fort = env['SPACK_F77'] + xl_bin = os.path.dirname(xl_fort) + xl_root = os.path.dirname(xl_bin) + libfortran = find_libraries('libxlf90_r', + root=xl_root, recursive=True) + else: + libfortran = None + if libfortran: args.append('-DGFORTRAN_LIB=%s' % libfortran.libraries[0]) |