From 741084faf4194424a582bf9dd15580601f20fe9a Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Thu, 10 Jul 2014 16:55:38 -0700 Subject: add mvapich2 package to handle different compilers and variants --- var/spack/packages/mvapich2/package.py | 86 ++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py index 0f0f849c51..ca0b1287c1 100644 --- a/var/spack/packages/mvapich2/package.py +++ b/var/spack/packages/mvapich2/package.py @@ -1,3 +1,4 @@ +import os from spack import * class Mvapich2(Package): @@ -6,21 +7,98 @@ class Mvapich2(Package): version('1.9', '5dc58ed08fd3142c260b70fe297e127c', url="http://mvapich.cse.ohio-state.edu/download/mvapich2/mv2/mvapich2-1.9.tgz") + patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') + version('2.0', '9fbb68a4111a8b6338e476dc657388b4', url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz') - provides('mpi@:1', when='@1.9:') + provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 + provides('mpi@:3.0', when='@2.0') # MVAPICH2-2.0 supports MPI 3.0 + def install(self, spec, prefix): + # we'll set different configure flags depending on our environment + configure_args = [] + + # TODO: The MPICH*_FLAGS have a different name for 1.9 + + if '+debug' in spec: + # set configure flags for debug build + configure_args.append("--disable-fast") + configure_args.append("--enable-g=dbg") + configure_args.append("--enable-error-checking=runtime") + configure_args.append("--enable-error-messages=all") + configure_args.append("--enable-nmpi-as-mpi") + + if "%gnu" in spec: + # set variables for GNU compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fno-second-underscore" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fno-second-underscore" + elif "%intel" in spec: + # set variables for Inel compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0" + elif "%pgi" in spec: + # set variables for PGI compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_FFLAGS'] = "-g -O0 -fPIC" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O0 -fPIC" + + else: + # set configure flags for normal optimizations + configure_args.append("--enable-fast=all") + configure_args.append("--enable-g=dbg") + configure_args.append("--enable-nmpi-as-mpi") + + if "%gnu" in spec: + # set variables for what compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fno-second-underscore" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fno-second-underscore" + elif "%intel" in spec: + # set variables for Inel compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2" + elif "%pgi" in spec: + # set variables for PGI compilers + os.environ['MPICHLIB_CFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_CXXFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_FFLAGS'] = "-g -O2 -fPIC" + os.environ['MPICHLIB_F90FLAGS'] = "-g -O2 -fPIC" + + # determine network type by variant + if "+psm" in spec: + # throw this flag on QLogic systems to use PSM + configure_args.append("--with-device=ch3:psm") + else: + # throw this flag on IB systems + configure_args.append("--with-device=ch3:mrail", "--with-rdma=gen2") + + # TODO: shared-memory build + + # TODO: CUDA + + # TODO: other file systems like panasis + configure( "--prefix=" + prefix, "--enable-f77", "--enable-fc", "--enable-cxx", - "--enable-fast=all", "--enable-g=dbg", "--enable-nmpi-as-mpi", "--enable-shared", "--enable-sharedlibs=gcc", "--enable-debuginfo", "--with-pm=no", "--with-pmi=slurm", - "--with-device=ch3:psm", "--enable-romio", "--with-file-system=lustre+nfs+ufs", - "--disable-mpe", "--without-mpe") + "--disable-mpe", "--without-mpe", + "--disable-silent-rules", + *configure_args) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 3dd8e561b90159de9ee57a7449298a4df09b3186 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Thu, 31 Jul 2014 16:59:23 -0700 Subject: add lwgrp package --- var/spack/packages/lwgrp/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/packages/lwgrp/package.py diff --git a/var/spack/packages/lwgrp/package.py b/var/spack/packages/lwgrp/package.py new file mode 100644 index 0000000000..d4054e195f --- /dev/null +++ b/var/spack/packages/lwgrp/package.py @@ -0,0 +1,17 @@ +import os +from spack import * + +class Lwgrp(Package): + """Thie light-weight group library provides process group representations using O(log N) space and time.""" + + homepage = "https://github.com/hpc/lwgrp" + url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" + + versions = { '1.0.2' : 'ab7ba3bdd8534a651da5076f47f27d8a' } + + depends_on('mpi') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 6e7a7d127daa5bb2aafad6411f6c3cf4dbc2c640 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Thu, 31 Jul 2014 18:56:38 -0700 Subject: adding dtcmp package --- var/spack/packages/dtcmp/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/packages/dtcmp/package.py diff --git a/var/spack/packages/dtcmp/package.py b/var/spack/packages/dtcmp/package.py new file mode 100644 index 0000000000..400028bd6f --- /dev/null +++ b/var/spack/packages/dtcmp/package.py @@ -0,0 +1,20 @@ +import os +from spack import * + +class Dtcmp(Package): + """The Datatype Comparison Library provides comparison operations and parallel sort algorithms for MPI applications.""" + + homepage = "https://github.com/hpc/dtcmp" + url = "https://github.com/hpc/dtcmp/releases/download/v1.0.3/dtcmp-1.0.3.tar.gz" + + versions = { '1.0.3' : 'cdd8ccf71e8ff67de2558594a7fcd317' } + #version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317') + + depends_on('mpi') + depends_on('lwgrp') + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--with-lwgrp=" + spec['lwgrp'].prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From a32816c644450a8c419a2bbc19b020674dae547e Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Thu, 31 Jul 2014 21:31:20 -0700 Subject: cannot uninstall dtcmp because depends on dtcmp --- lib/spack/spack/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8df658e660..48074aaebb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -494,7 +494,7 @@ class Package(object): on this one.""" dependents = [] for spec in spack.db.installed_package_specs(): - if self.spec != spec and self.spec in spec: + if self.name != spec.name and self.spec in spec: dependents.append(spec) return dependents -- cgit v1.2.3-60-g2f50 From 712a2c374284420c7c6d0a53e43b32577ae9471f Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Fri, 1 Aug 2014 17:24:56 -0700 Subject: fileutils package --- var/spack/packages/fileutils/package.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/packages/fileutils/package.py diff --git a/var/spack/packages/fileutils/package.py b/var/spack/packages/fileutils/package.py new file mode 100644 index 0000000000..8ddd3d060b --- /dev/null +++ b/var/spack/packages/fileutils/package.py @@ -0,0 +1,23 @@ +import os +from spack import * + +class Fileutils(Package): + """FileUtils provides a suite of MPI-based tools to manage large files and datasets on parallel file systems.""" + + homepage = "https://github.com/hpc/fileutils" + url = "https://github.com/hpc/fileutils/releases/download/v0.0.1-alpha.4/fileutils-0.0.1-alpha.4.tar.gz" + + versions = { '0.0.1-alpha.4' : 'a01dbe5a2e03f3c70c7a98ec0a2554e1' } + + force_url = True + + depends_on('mpi') + depends_on('libcircle') + depends_on('libarchive') + depends_on('dtcmp') + + def install(self, spec, prefix): + configure("--prefix=" + prefix, + "--with-libdtcmp=" + spec['dtcmp'].prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From a27e178ac27edf78c9c306a25091d6d1c36316e1 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Fri, 1 Aug 2014 10:37:14 -0700 Subject: add libcircle package --- var/spack/packages/libcircle/package.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/packages/libcircle/package.py diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py new file mode 100644 index 0000000000..ae539969e7 --- /dev/null +++ b/var/spack/packages/libcircle/package.py @@ -0,0 +1,22 @@ +import os +from spack import * + +class Libcircle(Package): + """libcircle provides an efficient distributed queue on a cluster, using self-stabilizing work stealing.""" + + homepage = "https://github.com/hpc/libcircle" + #url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" + url = "https://github.com/adammoody/libcircle/releases/download/v0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz" + + versions = { '0.2.1-rc.1' : 'a10a14e76ac2ad7357a4b21b794e8e4e' } + + # need this hack because the URL plus version string below confuses URL expansion + # at url_for_version() in lib/spack/package.py + force_url = True + + depends_on('mpi') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From 3779c78c009fb7465bac25b4e59b5f710e3bd0da Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Thu, 31 Jul 2014 21:40:48 -0700 Subject: adding libarchive --- var/spack/packages/libarchive/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/packages/libarchive/package.py diff --git a/var/spack/packages/libarchive/package.py b/var/spack/packages/libarchive/package.py new file mode 100644 index 0000000000..88c6ce45ab --- /dev/null +++ b/var/spack/packages/libarchive/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Libarchive(Package): + """libarchive: C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats.""" + homepage = "http://www.libarchive.org" + url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz" + + version('3.1.2', 'efad5a503f66329bb9d2f4308b5de98a') + version('3.1.1', '1f3d883daf7161a0065e42a15bbf168f') + version('3.1.0', '095a287bb1fd687ab50c85955692bf3a') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") -- cgit v1.2.3-60-g2f50 From cabfc374eb0fe546ea8377eb64f4415bbd11e3f8 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 3 Aug 2014 12:16:00 -0700 Subject: More descriptive error when package constructor fails. - helps package_sanity test identify which package failed. - encountered while upgrading versions in Adam's packages to the new format. --- lib/spack/spack/packages.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 00834c95d5..4f9f606c89 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -69,7 +69,10 @@ class PackageDB(object): if not spec in self.instances: package_class = self.get_class_for_package_name(spec.name) - self.instances[spec.name] = package_class(spec) + try: + self.instances[spec.name] = package_class(spec) + except Exception, e: + raise FailedConstructorError(spec.name, e) return self.instances[spec.name] @@ -227,3 +230,12 @@ class UnknownPackageError(spack.error.SpackError): def __init__(self, name): super(UnknownPackageError, self).__init__("Package %s not found." % name) self.name = name + + +class FailedConstructorError(spack.error.SpackError): + """Raised when a package's class constructor fails.""" + def __init__(self, name, reason): + super(FailedConstructorError, self).__init__( + "Class constructor failed for package '%s'." % name, + str(reason)) + self.name = name -- cgit v1.2.3-60-g2f50 From 782e45e5b1247f636f519c23de4cc54fe0cc21d1 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 3 Aug 2014 12:30:08 -0700 Subject: Fix up versions to match new version format, minor formatting. --- var/spack/packages/dtcmp/package.py | 6 +++--- var/spack/packages/fileutils/package.py | 7 +++---- var/spack/packages/libarchive/package.py | 3 ++- var/spack/packages/libcircle/package.py | 10 +++------- var/spack/packages/lwgrp/package.py | 5 +++-- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/var/spack/packages/dtcmp/package.py b/var/spack/packages/dtcmp/package.py index 400028bd6f..9d940583c1 100644 --- a/var/spack/packages/dtcmp/package.py +++ b/var/spack/packages/dtcmp/package.py @@ -2,13 +2,13 @@ import os from spack import * class Dtcmp(Package): - """The Datatype Comparison Library provides comparison operations and parallel sort algorithms for MPI applications.""" + """The Datatype Comparison Library provides comparison operations and + parallel sort algorithms for MPI applications.""" homepage = "https://github.com/hpc/dtcmp" url = "https://github.com/hpc/dtcmp/releases/download/v1.0.3/dtcmp-1.0.3.tar.gz" - versions = { '1.0.3' : 'cdd8ccf71e8ff67de2558594a7fcd317' } - #version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317') + version('1.0.3', 'cdd8ccf71e8ff67de2558594a7fcd317') depends_on('mpi') depends_on('lwgrp') diff --git a/var/spack/packages/fileutils/package.py b/var/spack/packages/fileutils/package.py index 8ddd3d060b..449ed0c72e 100644 --- a/var/spack/packages/fileutils/package.py +++ b/var/spack/packages/fileutils/package.py @@ -2,14 +2,13 @@ import os from spack import * class Fileutils(Package): - """FileUtils provides a suite of MPI-based tools to manage large files and datasets on parallel file systems.""" + """FileUtils provides a suite of MPI-based tools to manage large files + and datasets on parallel file systems.""" homepage = "https://github.com/hpc/fileutils" url = "https://github.com/hpc/fileutils/releases/download/v0.0.1-alpha.4/fileutils-0.0.1-alpha.4.tar.gz" - versions = { '0.0.1-alpha.4' : 'a01dbe5a2e03f3c70c7a98ec0a2554e1' } - - force_url = True + version('0.0.1-alpha.4', 'a01dbe5a2e03f3c70c7a98ec0a2554e1') depends_on('mpi') depends_on('libcircle') diff --git a/var/spack/packages/libarchive/package.py b/var/spack/packages/libarchive/package.py index 88c6ce45ab..cbd4b89cd0 100644 --- a/var/spack/packages/libarchive/package.py +++ b/var/spack/packages/libarchive/package.py @@ -1,7 +1,8 @@ from spack import * class Libarchive(Package): - """libarchive: C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats.""" + """libarchive: C library and command-line tools for reading and + writing tar, cpio, zip, ISO, and other archive formats.""" homepage = "http://www.libarchive.org" url = "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz" diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py index ae539969e7..e398125328 100644 --- a/var/spack/packages/libcircle/package.py +++ b/var/spack/packages/libcircle/package.py @@ -2,17 +2,13 @@ import os from spack import * class Libcircle(Package): - """libcircle provides an efficient distributed queue on a cluster, using self-stabilizing work stealing.""" + """libcircle provides an efficient distributed queue on a cluster, + using self-stabilizing work stealing.""" homepage = "https://github.com/hpc/libcircle" - #url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" url = "https://github.com/adammoody/libcircle/releases/download/v0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz" - versions = { '0.2.1-rc.1' : 'a10a14e76ac2ad7357a4b21b794e8e4e' } - - # need this hack because the URL plus version string below confuses URL expansion - # at url_for_version() in lib/spack/package.py - force_url = True + version('0.2.1-rc.1', 'a10a14e76ac2ad7357a4b21b794e8e4e') depends_on('mpi') diff --git a/var/spack/packages/lwgrp/package.py b/var/spack/packages/lwgrp/package.py index d4054e195f..5963382b92 100644 --- a/var/spack/packages/lwgrp/package.py +++ b/var/spack/packages/lwgrp/package.py @@ -2,12 +2,13 @@ import os from spack import * class Lwgrp(Package): - """Thie light-weight group library provides process group representations using O(log N) space and time.""" + """Thie light-weight group library provides process group + representations using O(log N) space and time.""" homepage = "https://github.com/hpc/lwgrp" url = "https://github.com/hpc/lwgrp/releases/download/v1.0.2/lwgrp-1.0.2.tar.gz" - versions = { '1.0.2' : 'ab7ba3bdd8534a651da5076f47f27d8a' } + version('1.0.2', 'ab7ba3bdd8534a651da5076f47f27d8a') depends_on('mpi') -- cgit v1.2.3-60-g2f50 From 68274ee657ce6c430a3c9da45a2986c1ba673a08 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 17 Sep 2014 15:48:13 -0700 Subject: Add command to show packages added in particular git revisions. spack pkg list [rev] list packages for revision. spack pkg diff [rev1] [rev2] diff bt/w packages in rev1 and rev2 spack pkg added [rev1] [rev2] pkgs added since rev1 spack pkg removed [rev1] [rev2] pkgs removed since rev2 --- lib/spack/spack/cmd/pkg.py | 124 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 lib/spack/spack/cmd/pkg.py diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py new file mode 100644 index 0000000000..82ebd13ff9 --- /dev/null +++ b/lib/spack/spack/cmd/pkg.py @@ -0,0 +1,124 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file 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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 +############################################################################## +import os + +from external import argparse +import llnl.util.tty as tty +from llnl.util.tty.colify import colify + +import spack +from spack.util.executable import * + +description = "Query packages associated with particular git revisions in spack." + +def setup_parser(subparser): + sp = subparser.add_subparsers( + metavar='SUBCOMMAND', dest='pkg_command') + + list_parser = sp.add_parser('list', help=pkg_list.__doc__) + list_parser.add_argument('rev', default='HEAD', nargs='?', + help="Revision to list packages for.") + + diff_parser = sp.add_parser('diff', help=pkg_diff.__doc__) + diff_parser.add_argument('rev1', nargs='?', default='HEAD^', + help="Revision to compare against.") + diff_parser.add_argument('rev2', nargs='?', default='HEAD', + help="Revision to compare to rev1 (default is HEAD).") + + add_parser = sp.add_parser('added', help=pkg_added.__doc__) + add_parser.add_argument('rev1', nargs='?', default='HEAD^', + help="Revision to compare against.") + add_parser.add_argument('rev2', nargs='?', default='HEAD', + help="Revision to compare to rev1 (default is HEAD).") + + rm_parser = sp.add_parser('removed', help=pkg_removed.__doc__) + rm_parser.add_argument('rev1', nargs='?', default='HEAD^', + help="Revision to compare against.") + rm_parser.add_argument('rev2', nargs='?', default='HEAD', + help="Revision to compare to rev1 (default is HEAD).") + + +def get_git(): + # cd to spack prefix to do git operations + os.chdir(spack.prefix) + + # If this is a non-git version of spack, give up. + if not os.path.isdir('.git'): + tty.die("No git repo in %s. Can't use 'spack pkg'" % spack.prefix) + + return which("git", required=True) + + +def list_packages(rev): + git = get_git() + relpath = spack.packages_path[len(spack.prefix + os.path.sep):] + os.path.sep + output = git('ls-tree', '--full-tree', '--name-only', rev, relpath, + return_output=True) + return sorted(line[len(relpath):] for line in output.split('\n') if line) + + +def pkg_list(args): + """List packages associated with a particular spack git revision.""" + colify(list_packages(args.rev)) + + +def diff_packages(rev1, rev2): + p1 = set(list_packages(rev1)) + p2 = set(list_packages(rev2)) + return p1.difference(p2), p2.difference(p1) + + +def pkg_diff(args): + """Compare packages available in two different git revisions.""" + u1, u2 = diff_packages(args.rev1, args.rev2) + + if u1: + print "%s:" % args.rev1 + colify(sorted(u1), indent=4) + if u1: print + + if u2: + print "%s:" % args.rev2 + colify(sorted(u2), indent=4) + + +def pkg_removed(args): + """Show packages removed since a commit.""" + u1, u2 = diff_packages(args.rev1, args.rev2) + if u1: colify(sorted(u1)) + + +def pkg_added(args): + """Show packages added since a commit.""" + u1, u2 = diff_packages(args.rev1, args.rev2) + if u2: colify(sorted(u2)) + + +def pkg(parser, args): + action = { 'diff' : pkg_diff, + 'list' : pkg_list, + 'removed' : pkg_removed, + 'added' : pkg_added } + action[args.pkg_command](args) -- cgit v1.2.3-60-g2f50 From 250ffc28a3f94d039829cb96078a8242086e7dd5 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Wed, 17 Sep 2014 23:40:16 -0700 Subject: update libcircle to download tarball from github/hpc --- var/spack/packages/libcircle/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py index e398125328..3f7c996fb0 100644 --- a/var/spack/packages/libcircle/package.py +++ b/var/spack/packages/libcircle/package.py @@ -6,9 +6,9 @@ class Libcircle(Package): using self-stabilizing work stealing.""" homepage = "https://github.com/hpc/libcircle" - url = "https://github.com/adammoody/libcircle/releases/download/v0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz" - version('0.2.1-rc.1', 'a10a14e76ac2ad7357a4b21b794e8e4e') + version('0.2.1-rc.1', '2b1369a5736457239f908abf88143ec2', + url='https://github.com/hpc/libcircle/releases/download/0.2.1-rc.1/libcircle-0.2.1-rc.1.tar.gz') depends_on('mpi') -- cgit v1.2.3-60-g2f50 From 4a19fa793edb524e0b77717c4eb25b4e958020bc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 18 Sep 2014 01:42:01 -0700 Subject: Support for pkg-config. --- lib/spack/spack/build_environment.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 182a5629fa..94d5b7a3be 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -144,9 +144,17 @@ def set_build_environment_variables(pkg): os.environ[SPACK_DEBUG_LOG_DIR] = spack.spack_working_dir # Add dependencies to CMAKE_PREFIX_PATH - dep_prefixes = [d.package.prefix for d in pkg.spec.dependencies.values()] path_set("CMAKE_PREFIX_PATH", dep_prefixes) + # Add any pkgconfig directories to PKG_CONFIG_PATH + pkg_config_dirs = [] + for p in dep_prefixes: + for libdir in ('lib', 'lib64'): + pcdir = join_path(p, libdir, 'pkgconfig') + if os.path.isdir(pcdir): + pkg_config_dirs.append(pcdir) + path_set("PKG_CONFIG_PATH", pkg_config_dirs) + def set_module_variables_for_package(pkg): """Populate the module scope of install() with some useful functions. -- cgit v1.2.3-60-g2f50 From e85830e3133b793d6da32c8d546a2f8d15d220d9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 18 Sep 2014 01:49:30 -0700 Subject: Fileutils successfully finds libarchive; can't find dtcmp despite config arg. --- var/spack/packages/fileutils/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/packages/fileutils/package.py b/var/spack/packages/fileutils/package.py index 449ed0c72e..73398a826c 100644 --- a/var/spack/packages/fileutils/package.py +++ b/var/spack/packages/fileutils/package.py @@ -8,7 +8,7 @@ class Fileutils(Package): homepage = "https://github.com/hpc/fileutils" url = "https://github.com/hpc/fileutils/releases/download/v0.0.1-alpha.4/fileutils-0.0.1-alpha.4.tar.gz" - version('0.0.1-alpha.4', 'a01dbe5a2e03f3c70c7a98ec0a2554e1') + version('0.0.1-alpha.4', 'e37b48ea43c95f5a1ede0ee01019ae58') depends_on('mpi') depends_on('libcircle') @@ -17,6 +17,6 @@ class Fileutils(Package): def install(self, spec, prefix): configure("--prefix=" + prefix, - "--with-libdtcmp=" + spec['dtcmp'].prefix) + "--with-dtcmp=" + spec['dtcmp'].prefix) make() make("install") -- cgit v1.2.3-60-g2f50 From 4d2ccfa02842eb152cf7a9bfd3e91cde6e8c6816 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 18 Sep 2014 21:33:09 -0700 Subject: Take fileutils out and just merge the deps into develop. --- var/spack/packages/fileutils/package.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 var/spack/packages/fileutils/package.py diff --git a/var/spack/packages/fileutils/package.py b/var/spack/packages/fileutils/package.py deleted file mode 100644 index 73398a826c..0000000000 --- a/var/spack/packages/fileutils/package.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -from spack import * - -class Fileutils(Package): - """FileUtils provides a suite of MPI-based tools to manage large files - and datasets on parallel file systems.""" - - homepage = "https://github.com/hpc/fileutils" - url = "https://github.com/hpc/fileutils/releases/download/v0.0.1-alpha.4/fileutils-0.0.1-alpha.4.tar.gz" - - version('0.0.1-alpha.4', 'e37b48ea43c95f5a1ede0ee01019ae58') - - depends_on('mpi') - depends_on('libcircle') - depends_on('libarchive') - depends_on('dtcmp') - - def install(self, spec, prefix): - configure("--prefix=" + prefix, - "--with-dtcmp=" + spec['dtcmp'].prefix) - make() - make("install") -- cgit v1.2.3-60-g2f50