summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/zoltan/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/zoltan/package.py')
-rw-r--r--var/spack/repos/builtin/packages/zoltan/package.py52
1 files changed, 26 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index eb393d3990..3fd29e17c3 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/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)
+
from spack import *
import re
@@ -33,7 +14,7 @@ class Zoltan(Package):
"""The Zoltan library is a toolkit of parallel combinatorial algorithms
for parallel, unstructured, and/or adaptive scientific
applications. Zoltan's largest component is a suite of dynamic
- load-balancing and paritioning algorithms that increase
+ load-balancing and partitioning algorithms that increase
applications' parallel performance by reducing idle time. Zoltan
also has graph coloring and graph ordering algorithms, which are
useful in task schedulers and parallel preconditioners.
@@ -53,9 +34,15 @@ class Zoltan(Package):
variant('fortran', default=True, description='Enable Fortran support.')
variant('mpi', default=True, description='Enable MPI support.')
+ variant('parmetis', default=False, description='Enable ParMETIS support.')
depends_on('mpi', when='+mpi')
+ depends_on('parmetis@4:', when='+parmetis')
+ depends_on('metis', when='+parmetis')
+
+ conflicts('+parmetis', when='~mpi')
+
def install(self, spec, prefix):
# FIXME: The older Zoltan versions fail to compile the F90 MPI wrappers
# because of some complicated generic type problem.
@@ -70,7 +57,7 @@ class Zoltan(Package):
]
config_cflags = [
'-O0' if '+debug' in spec else '-O3',
- '-g' if '+debug' in spec else '-g0',
+ '-g' if '+debug' in spec else '',
]
if '+shared' in spec:
@@ -78,7 +65,20 @@ class Zoltan(Package):
config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o')
config_cflags.append(self.compiler.pic_flag)
if spec.satisfies('%gcc'):
- config_args.append('--with-libs={0}'.format('-lgfortran'))
+ config_args.append('--with-libs=-lgfortran')
+ if spec.satisfies('%intel'):
+ config_args.append('--with-libs=-lifcore')
+
+ if '+parmetis' in spec:
+ config_args.append('--with-parmetis')
+ config_args.append('--with-parmetis-libdir={0}'
+ .format(spec['parmetis'].prefix.lib))
+ config_args.append('--with-parmetis-incdir={0}'
+ .format(spec['parmetis'].prefix.include))
+ config_args.append('--with-incdirs=-I{0}'
+ .format(spec['metis'].prefix.include))
+ config_args.append('--with-ldflags=-L{0}'
+ .format(spec['metis'].prefix.lib))
if '+mpi' in spec:
config_args.append('CC={0}'.format(spec['mpi'].mpicc))