summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-31 15:16:37 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-31 15:16:37 -0700
commitf5a77d39580d215f8d4948b2cbe6c8d47d4fd514 (patch)
treebff0b2549d508cc302d76ca01423f108ecf94dc9
parentd0c8245a58bf184f7921c853ef31734ea2c83e0a (diff)
parent09d657e98e50fd0194e35cfea39105ea31bd5e55 (diff)
downloadspack-f5a77d39580d215f8d4948b2cbe6c8d47d4fd514.tar.gz
spack-f5a77d39580d215f8d4948b2cbe6c8d47d4fd514.tar.bz2
spack-f5a77d39580d215f8d4948b2cbe6c8d47d4fd514.tar.xz
spack-f5a77d39580d215f8d4948b2cbe6c8d47d4fd514.zip
Merge pull request #709 from xjrc/packages/zoltan
Add Package : Zoltan
-rw-r--r--var/spack/repos/builtin/packages/zoltan/package.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
new file mode 100644
index 0000000000..e20ae81adb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -0,0 +1,54 @@
+from spack import *
+
+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 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."""
+
+ homepage = "http://www.cs.sandia.gov/zoltan"
+ base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions"
+
+ version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f')
+ version('3.3', '5eb8f00bda634b25ceefa0122bd18d65')
+
+ variant('fortran', default=True, description='Enable Fortran support')
+ variant('mpi', default=False, description='Enable MPI support')
+
+ depends_on('mpi', when='+mpi')
+
+ def install(self, spec, prefix):
+ config_args = [
+ '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface',
+ '--enable-mpi' if '+mpi' in spec else '--disable-mpi',
+ ]
+
+ if '+mpi' in spec:
+ config_args.append('--with-mpi=%s' % spec['mpi'].prefix)
+ config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin)
+ config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin)
+ config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin)
+
+ # NOTE: Early versions of Zoltan come packaged with a few embedded
+ # library packages (e.g. ParMETIS, Scotch), which messes with Spack's
+ # ability to descend directly into the package's source directory.
+ if spec.satisfies('@:3.3'):
+ cd('Zoltan_v%s' % self.version)
+
+ mkdirp('build')
+ cd('build')
+
+ config_zoltan = Executable('../configure')
+ config_zoltan('--prefix=%s' % pwd(), *config_args)
+
+ make()
+ make('install')
+
+ mkdirp(prefix)
+ move('include', prefix)
+ move('lib', prefix)
+
+ def url_for_version(self, version):
+ return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version)