diff options
72 files changed, 438 insertions, 173 deletions
@@ -38,6 +38,23 @@ SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE)) # Allow spack libs to be imported in our scripts SPACK_LIB_PATH = os.path.join(SPACK_PREFIX, "lib", "spack") sys.path.insert(0, SPACK_LIB_PATH) +SPACK_EXTERNAL_LIBS = os.path.join(SPACK_LIB_PATH, "external") +sys.path.insert(0, SPACK_EXTERNAL_LIBS) + +# Quick and dirty check to clean orphaned .pyc files left over from +# previous revisions. These files were present in earlier versions of +# Spack, were removed, but shadow system modules that Spack still +# imports. If we leave them, Spack will fail in mysterious ways. +# TODO: more elegant solution for orphaned pyc files. +orphaned_pyc_files = [os.path.join(SPACK_EXTERNAL_LIBS, n) + for n in ('functools.pyc', 'ordereddict.pyc')] +for pyc_file in orphaned_pyc_files: + if not os.path.exists(pyc_file): + continue + try: + os.remove(pyc_file) + except OSError as e: + print "WARNING: Spack may fail mysteriously. Couldn't remove orphaned .pyc file: %s" % pyc # If there is no working directory, use the spack prefix. try: diff --git a/lib/spack/external/functools.py b/lib/spack/external/functools_backport.py index 19f0903c82..19f0903c82 100644 --- a/lib/spack/external/functools.py +++ b/lib/spack/external/functools_backport.py diff --git a/lib/spack/external/ordereddict.py b/lib/spack/external/ordereddict_backport.py index 8ddad1477e..8ddad1477e 100644 --- a/lib/spack/external/ordereddict.py +++ b/lib/spack/external/ordereddict_backport.py diff --git a/lib/spack/spack/cmd/activate.py b/lib/spack/spack/cmd/activate.py index 1004f1f8e6..1e44948d24 100644 --- a/lib/spack/spack/cmd/activate.py +++ b/lib/spack/spack/cmd/activate.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty import spack import spack.cmd diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index 8a448450c2..c940d57781 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -24,7 +24,7 @@ ############################################################################## import os import re -from external import argparse +import argparse import hashlib from pprint import pprint from subprocess import CalledProcessError diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index c20136ebe5..e303b3d634 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 2a64dc914e..3173d11070 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.tty.color import colorize diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index 8c18f88b64..78972a8be0 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 46e6bcec14..05cf170e39 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -27,7 +27,7 @@ import os import hashlib import re -from external.ordereddict import OrderedDict +from ordereddict_backport import OrderedDict import llnl.util.tty as tty from llnl.util.filesystem import mkdirp diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py index 1f0e303cdf..5a2b353fa2 100644 --- a/lib/spack/spack/cmd/deactivate.py +++ b/lib/spack/spack/cmd/deactivate.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty import spack diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py index 652f243b98..129a4eeb23 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py index 9f8a6d39db..d6bd1fbb79 100644 --- a/lib/spack/spack/cmd/diy.py +++ b/lib/spack/spack/cmd/diy.py @@ -24,7 +24,7 @@ ############################################################################## import sys import os -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index bde76b5daf..ae8e95491e 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -from external import argparse +import argparse import llnl.util.tty as tty import spack.cmd import spack.build_environment as build_env diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py index 7cadc424b0..a3db2da394 100644 --- a/lib/spack/spack/cmd/extensions.py +++ b/lib/spack/spack/cmd/extensions.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.tty.colify import colify @@ -37,7 +37,7 @@ description = "List extensions for package." def setup_parser(subparser): format_group = subparser.add_mutually_exclusive_group() format_group.add_argument( - '-l', '--long', action='store_const', dest='mode', const='long', + '-l', '--long', action='store_true', dest='long', help='Show dependency hashes as well as versions.') format_group.add_argument( '-p', '--paths', action='store_const', dest='mode', const='paths', @@ -95,4 +95,4 @@ def extensions(parser, args): tty.msg("None activated.") return tty.msg("%d currently activated:" % len(activated)) - spack.cmd.find.display_specs(activated.values(), mode=args.mode) + spack.cmd.find.display_specs(activated.values(), mode=args.mode, long=args.long) diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 0ccebd9486..1dd8703daf 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack import spack.cmd diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 0b0dd6ef6f..05fa620c59 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -25,7 +25,7 @@ import sys import collections import itertools -from external import argparse +import argparse from StringIO import StringIO import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py index cb93a1b543..586a02c53b 100644 --- a/lib/spack/spack/cmd/graph.py +++ b/lib/spack/spack/cmd/graph.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack import spack.cmd diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index 836a6260c8..e4338e222f 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 1f0978a18e..0b55d9fb7b 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -24,7 +24,7 @@ ############################################################################## import sys import llnl.util.tty as tty -from external import argparse +import argparse from llnl.util.tty.colify import colify import spack diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 06574d9725..5bc6b15784 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.modules description ="Add package to environment using modules." diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index e8e9c3f277..6fbab9782f 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -24,7 +24,7 @@ ############################################################################## import os import sys -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.filesystem import join_path diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py index dfa1be412b..8be0a7ad4c 100644 --- a/lib/spack/spack/cmd/md5.py +++ b/lib/spack/spack/cmd/md5.py @@ -24,7 +24,7 @@ ############################################################################## import os import hashlib -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.filesystem import * diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 2356170a9a..4599944f1c 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -26,7 +26,7 @@ import os import sys from datetime import datetime -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index 654b0cb2fa..c3daed6402 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -25,7 +25,7 @@ import sys import os import shutil -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.lang import partition_list diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py index a6556c4828..2356583b07 100644 --- a/lib/spack/spack/cmd/patch.py +++ b/lib/spack/spack/cmd/patch.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.cmd import spack diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index 055b7c2062..ae5efd9d9c 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -24,7 +24,7 @@ ############################################################################## import os -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/cmd/providers.py b/lib/spack/spack/cmd/providers.py index 2bcdc9fba2..1a652c82d1 100644 --- a/lib/spack/spack/cmd/providers.py +++ b/lib/spack/spack/cmd/providers.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -from external import argparse +import argparse from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index 7bd2e45ce0..15c45654c2 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -25,7 +25,7 @@ import os import sys import code -from external import argparse +import argparse import platform import spack diff --git a/lib/spack/spack/cmd/reindex.py b/lib/spack/spack/cmd/reindex.py index b584729ea4..c0008930c4 100644 --- a/lib/spack/spack/cmd/reindex.py +++ b/lib/spack/spack/cmd/reindex.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack description = "Rebuild Spack's package database." diff --git a/lib/spack/spack/cmd/restage.py b/lib/spack/spack/cmd/restage.py index e735a12c32..9230cf5a1a 100644 --- a/lib/spack/spack/cmd/restage.py +++ b/lib/spack/spack/cmd/restage.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index 407519313c..af7ec1b36c 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.cmd import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index f3dc97be17..09cf0e1a1c 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -from external import argparse +import argparse import llnl.util.tty as tty import spack diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index 68b761d5dc..ba0cb39baf 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import xml.etree.ElementTree as ET import itertools import re diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index e80f2d2636..93575e005d 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index 6442c48cb1..24e49b3f24 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.modules description ="Remove package from environment using module." diff --git a/lib/spack/spack/cmd/unuse.py b/lib/spack/spack/cmd/unuse.py index 2a7229a3a0..7f0b384ea0 100644 --- a/lib/spack/spack/cmd/unuse.py +++ b/lib/spack/spack/cmd/unuse.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.modules description ="Remove package from environment using dotkit." diff --git a/lib/spack/spack/cmd/use.py b/lib/spack/spack/cmd/use.py index e34c194739..4990fea2f8 100644 --- a/lib/spack/spack/cmd/use.py +++ b/lib/spack/spack/cmd/use.py @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from external import argparse +import argparse import spack.modules description ="Add package to environment using dotkit." diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3e91958c2c..41afe8b232 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -90,12 +90,12 @@ import os import exceptions import sys -from external.ordereddict import OrderedDict +from ordereddict_backport import OrderedDict from llnl.util.lang import memoized import spack.error -from external import yaml -from external.yaml.error import MarkedYAMLError +import yaml +from yaml.error import MarkedYAMLError import llnl.util.tty as tty from llnl.util.filesystem import mkdirp diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index e0c14a0455..908ffc7fa4 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -43,8 +43,8 @@ import os import time import socket -from external import yaml -from external.yaml.error import MarkedYAMLError, YAMLError +import yaml +from yaml.error import MarkedYAMLError, YAMLError import llnl.util.tty as tty from llnl.util.filesystem import * diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index da8f4187cc..918405cab6 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -29,7 +29,7 @@ import hashlib import shutil import glob import tempfile -from external import yaml +import yaml import llnl.util.tty as tty from llnl.util.filesystem import join_path, mkdirp diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index b810023c5a..5e6850d14b 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -190,7 +190,7 @@ class URLFetchStrategy(FetchStrategy): if content_types and 'text/html' in content_types[-1]: tty.warn("The contents of " + self.archive_file + " look like HTML.", "The checksum will likely be bad. If it is, you can use", - "'spack clean --dist' to remove the bad archive, then fix", + "'spack clean <package>' to remove the bad archive, then fix", "your internet gateway issue and install again.") if not self.archive_file: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7b79feb311..92880e9cbf 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -96,8 +96,8 @@ import hashlib import base64 from StringIO import StringIO from operator import attrgetter -from external import yaml -from external.yaml.error import MarkedYAMLError +import yaml +from yaml.error import MarkedYAMLError import llnl.util.tty as tty from llnl.util.lang import * diff --git a/lib/spack/spack/test/python_version.py b/lib/spack/spack/test/python_version.py index 5779d31ed2..ba7bab6f4b 100644 --- a/lib/spack/spack/test/python_version.py +++ b/lib/spack/spack/test/python_version.py @@ -34,7 +34,7 @@ import re import llnl.util.tty as tty -from external import pyqver2 +import pyqver2 import spack spack_max_version = (2,6) diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index 35db05e018..ffce2d1ff8 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -48,7 +48,7 @@ import sys import re from bisect import bisect_left from functools import wraps -from external.functools import total_ordering +from functools_backport import total_ordering # Valid version characters VALID_VERSION = r'[A-Za-z0-9_.-]' diff --git a/var/spack/packages/SAMRAI/package.py b/var/spack/packages/SAMRAI/package.py index eef041f0d5..5ee90cf400 100644 --- a/var/spack/packages/SAMRAI/package.py +++ b/var/spack/packages/SAMRAI/package.py @@ -12,6 +12,7 @@ class Samrai(Package): list_url = homepage version('3.9.1', '232d04d0c995f5abf20d94350befd0b2') + version('3.8.0', 'c18fcffa706346bfa5828b36787ce5fe') version('3.7.3', '12d574eacadf8c9a70f1bb4cd1a69df6') version('3.7.2', 'f6a716f171c9fdbf3cb12f71fa6e2737') version('3.6.3-beta', 'ef0510bf2893042daedaca434e5ec6ce') @@ -37,8 +38,6 @@ class Samrai(Package): configure( "--prefix=%s" % prefix, - "--with-CXX=%s" % spec[mpi].prefix.bin + "/mpic++", - "--with-CC=%s" % spec[mpi].prefix.bin + "/mpicc", "--with-hdf5=%s" % spec['hdf5'].prefix, "--with-boost=%s" % spec['boost'].prefix, "--with-zlib=%s" % spec['zlib'].prefix, diff --git a/var/spack/packages/apex/package.py b/var/spack/packages/apex/package.py index 6404d5208a..8769d97056 100644 --- a/var/spack/packages/apex/package.py +++ b/var/spack/packages/apex/package.py @@ -3,12 +3,9 @@ from spack.util.environment import * class Apex(Package): homepage = "http://github.com/khuck/xpress-apex" - #url = "http://github.com/khuck/xpress-apex/archive/v0.1-release-candidate.tar.gz" - url = "http://github.com/khuck/xpress-apex" + url = "http://github.com/khuck/xpress-apex/archive/v0.1.tar.gz" - #version('0.1', '6e039c224387348296739f6bf360d081') - #version('master', branch='master', git='https://github.com/khuck/xpress-apex.git') - version('2015-10-21', git='https://github.com/khuck/xpress-apex.git', commit='d2e66ddde689120472fc57fc546d8cd80aab745c') + version('0.1', '8b95f0c0313da1575960d3ad69f18e75') depends_on("binutils+libiberty") depends_on("boost@1.54:") diff --git a/var/spack/packages/cityhash/package.py b/var/spack/packages/cityhash/package.py new file mode 100644 index 0000000000..1643cc3b42 --- /dev/null +++ b/var/spack/packages/cityhash/package.py @@ -0,0 +1,16 @@ +from spack import * +from spack.util.environment import * + +class Cityhash(Package): + homepage = "https://github.com/google/cityhash" + url = "https://github.com/google/cityhash" + + version('2013-07-31', git='https://github.com/google/cityhash.git', commit='8af9b8c2b889d80c22d6bc26ba0df1afb79a30db') + version('master', branch='master', git='https://github.com/google/cityhash.git') + + def install(self, spec, prefix): + configure('--enable-sse4.2', '--prefix=%s' % prefix) + + make() + make("install") + diff --git a/var/spack/packages/cleverleaf/package.py b/var/spack/packages/cleverleaf/package.py new file mode 100644 index 0000000000..ddbe57f019 --- /dev/null +++ b/var/spack/packages/cleverleaf/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Cleverleaf(Package): + """ + CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with Adaptive + Mesh Refinement using the SAMRAI toolkit from Lawrence Livermore National + Laboratory. The primary goal of CleverLeaf is to evaluate the application of + AMR to the Lagrangian-Eulerian hydrodynamics scheme used by CloverLeaf. + """ + + homepage = "http://uk-mac.github.io/CleverLeaf/" + url = "https://github.com/UK-MAC/CleverLeaf/tarball/master" + + version('develop', git='https://github.com/UK-MAC/CleverLeaf_ref.git', branch='develop') + + depends_on("SAMRAI@3.8.0") + + def install(self, spec, prefix): + cmake(*std_cmake_args) + make() + make("install") diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py index 9efa370c8b..fcfbca0705 100644 --- a/var/spack/packages/cmake/package.py +++ b/var/spack/packages/cmake/package.py @@ -34,6 +34,9 @@ class Cmake(Package): version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f', url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz') + + version('3.4.0', 'cd3034e0a44256a0917e254167217fc8', + url = 'https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz') # version('3.0.1', 'e2e05d84cb44a42f1371d9995631dcf5') # version('3.0.0', '21a1c85e1a3b803c4b48e7ff915a863e') diff --git a/var/spack/packages/damselfly/package.py b/var/spack/packages/damselfly/package.py new file mode 100644 index 0000000000..54df528c4a --- /dev/null +++ b/var/spack/packages/damselfly/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Damselfly(Package): + """Damselfly is a model-based parallel network simulator.""" + homepage = "https://github.com/scalability-llnl/damselfly" + url = "https://github.com/scalability-llnl/damselfly" + + version('1.0', '05cf7e2d8ece4408c0f2abb7ab63fd74c0d62895', git='https://github.com/scalability-llnl/damselfly.git', tag='v1.0') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('-DCMAKE_BUILD_TYPE=release', '..', *std_cmake_args) + make() + make('install') diff --git a/var/spack/packages/dbus/package.py b/var/spack/packages/dbus/package.py index f7c302d611..294b0de54e 100644 --- a/var/spack/packages/dbus/package.py +++ b/var/spack/packages/dbus/package.py @@ -22,7 +22,8 @@ class Dbus(Package): def install(self, spec, prefix): configure( "--prefix=%s" % prefix, - "--disable-systemd") + "--disable-systemd", + "--disable-launchd") make() make("install") diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py index 15e0ef9338..48997425cd 100644 --- a/var/spack/packages/hdf5/package.py +++ b/var/spack/packages/hdf5/package.py @@ -11,6 +11,7 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -25,8 +26,8 @@ class Hdf5(Package): "--with-zlib=%s" % spec['zlib'].prefix, "--enable-parallel", "--enable-shared", - "CC=%s" % spec['mpich'].prefix.bin + "/mpicc", - "CXX=%s" % spec['mpich'].prefix.bin + "/mpic++") + "CC=%s" % spec['mpi'].prefix.bin + "/mpicc", + "CXX=%s" % spec['mpi'].prefix.bin + "/mpic++") make() make("install") diff --git a/var/spack/packages/hwloc/package.py b/var/spack/packages/hwloc/package.py index 31a31f376a..2f46399afd 100644 --- a/var/spack/packages/hwloc/package.py +++ b/var/spack/packages/hwloc/package.py @@ -15,6 +15,8 @@ class Hwloc(Package): homepage = "http://www.open-mpi.org/projects/hwloc/" url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz" + version('1.11.1', '002742efd3a8431f98d6315365a2b543', + url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.1.tar.bz2') version('1.9', '1f9f9155682fe8946a97c08896109508') def install(self, spec, prefix): diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py index 198b3f00dc..0f7f14dd89 100644 --- a/var/spack/packages/hypre/package.py +++ b/var/spack/packages/hypre/package.py @@ -5,8 +5,8 @@ class Hypre(Package): features parallel multigrid methods for both structured and unstructured grid problems.""" - homepage = "https://computation.llnl.gov/project/linear_solvers/software.php" - url = "https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz" + homepage = "http://computation.llnl.gov/project/linear_solvers/software.php" + url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz" version('2.10.0b', '768be38793a35bb5d055905b271f5b8e') diff --git a/var/spack/packages/jdk/package.py b/var/spack/packages/jdk/package.py index 8f8076dd14..f8f5fc21bd 100644 --- a/var/spack/packages/jdk/package.py +++ b/var/spack/packages/jdk/package.py @@ -14,8 +14,8 @@ class Jdk(Package): in the form of a binary product aimed at Java developers.""" homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html" - version('8u25-linux-x64', 'e145c03a7edc845215092786bcfba77e', - url="http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz") + version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf', + url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz") # Oracle requires that you accept their License Agreement in order # to access the Java packages in download.oracle.com. In order to diff --git a/var/spack/packages/jemalloc/package.py b/var/spack/packages/jemalloc/package.py new file mode 100644 index 0000000000..8cec9ea75b --- /dev/null +++ b/var/spack/packages/jemalloc/package.py @@ -0,0 +1,24 @@ +from spack import * + +class Jemalloc(Package): + """jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support.""" + homepage = "http://www.canonware.com/jemalloc/" + url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" + + version('4.0.4', '687c5cc53b9a7ab711ccd680351ff988') + + variant('stats', default=False, description='Enable heap statistics') + variant('prof', default=False, description='Enable heap profiling') + + def install(self, spec, prefix): + configure_args = ['--prefix=%s' % prefix,] + + if '+stats' in spec: + configure_args.append('--enable-stats') + if '+prof' in spec: + configure_args.append('--enable-prof') + + configure(*configure_args) + + make() + make("install") diff --git a/var/spack/packages/judy/package.py b/var/spack/packages/judy/package.py new file mode 100644 index 0000000000..b8d8701383 --- /dev/null +++ b/var/spack/packages/judy/package.py @@ -0,0 +1,15 @@ +from spack import * + +class Judy(Package): + """A general-purpose dynamic array, associative array and hash-trie - Judy""" + homepage = "http://judy.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/judy/judy/Judy-1.0.5/Judy-1.0.5.tar.gz" + + version('1.0.5', '115a0d26302676e962ae2f70ec484a54') + parallel = False + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py index df311bfaba..5d84fad22d 100644 --- a/var/spack/packages/libxml2/package.py +++ b/var/spack/packages/libxml2/package.py @@ -9,13 +9,20 @@ class Libxml2(Package): version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788') - extends('python') + variant('python', default=False, description='Enable Python support') + + extends('python', when='+python') depends_on('zlib') depends_on('xz') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-python=%s" % spec['python'].prefix) + if '+python' in spec: + python_arg = "--with-python=%s" % spec['python'].prefix + else: + python_arg = "--without-python" + + configure("--prefix=%s" % prefix, + python_arg) make() make("install") diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py index 57c443cc2d..fa4b4f9edc 100644 --- a/var/spack/packages/lua/package.py +++ b/var/spack/packages/lua/package.py @@ -22,5 +22,7 @@ class Lua(Package): def install(self, spec, prefix): make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, - 'linux', + 'linux') + make('INSTALL_TOP=%s' % prefix, + 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, 'install') diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py index ca0b1287c1..dc2b2cb23f 100644 --- a/var/spack/packages/mvapich2/package.py +++ b/var/spack/packages/mvapich2/package.py @@ -1,104 +1,156 @@ -import os from spack import * + class Mvapich2(Package): - """mvapich2 is an MPI implmenetation for infiniband networks.""" + """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" - 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.2a', 'b8ceb4fc5f5a97add9b3ff1b9cbe39d2', + url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2a.tar.gz') version('2.0', '9fbb68a4111a8b6338e476dc657388b4', url='http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.0.tar.gz') - 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 + 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') + 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 + + variant('debug', default=False, description='Enables debug information and error messages at run-time') + + ########## + # TODO : Process managers should be grouped into the same variant, as soon as variant capabilities will be extended + # See https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so + SLURM = 'slurm' + HYDRA = 'hydra' + GFORKER = 'gforker' + REMSHELL = 'remshell' + SLURM_INCOMPATIBLE_PMS = (HYDRA, GFORKER, REMSHELL) + variant(SLURM, default=False, description='Sets slurm as the only process manager') + variant(HYDRA, default=False, description='Sets hydra as one of the process managers') + variant(GFORKER, default=False, description='Sets gforker as one of the process managers') + variant(REMSHELL, default=False, description='Sets remshell as one of the process managers') + ########## + + ########## + # TODO : Network types should be grouped into the same variant, as soon as variant capabilities will be extended + PSM = 'psm' + SOCK = 'sock' + NEMESISIBTCP = 'nemesisibtcp' + NEMESISIB = 'nemesisib' + NEMESIS = 'nemesis' + SUPPORTED_NETWORKS = (PSM, SOCK, NEMESIS, NEMESISIB, NEMESISIBTCP) + variant(PSM, default=False, description='Configures a build for QLogic PSM-CH3') + variant(SOCK, default=False, description='Configures a build for TCP/IP-CH3') + variant(NEMESISIBTCP, default=False, description='Configures a build for both OFA-IB-Nemesis and TCP/IP-Nemesis') + variant(NEMESISIB, default=False, description='Configures a build for OFA-IB-Nemesis') + variant(NEMESIS, default=False, description='Configures a build for TCP/IP-Nemesis') + ########## + + # FIXME : CUDA support is missing + + @staticmethod + def enabled(x): + """ + Given a variant name returns the string that means the variant is enabled + + :param x: variant name + :return: + """ + return '+' + x + + def set_build_type(self, spec, configure_args): + """ + Appends to configure_args the flags that depends only on the build type (i.e. release or debug) + + :param spec: spec + :param configure_args: list of current configure arguments + """ 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" - + build_type_options = [ + "--disable-fast", + "--enable-error-checking=runtime", + "--enable-error-messages=all", + "--enable-g=dbg", "--enable-debuginfo" # Permits debugging with TotalView + ] 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") + build_type_options = ["--enable-fast=all"] + + configure_args.extend(build_type_options) + + def set_process_manager(self, spec, configure_args): + """ + Appends to configure_args the flags that will enable the appropriate process managers + + :param spec: spec + :param configure_args: list of current configure arguments + """ + # Check that slurm variant is not activated together with other pm variants + has_slurm_incompatible_variants = any(self.enabled(x) in spec for x in Mvapich2.SLURM_INCOMPATIBLE_PMS) + if self.enabled(Mvapich2.SLURM) in spec and has_slurm_incompatible_variants: + raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name) + + process_manager_options = [] + if self.enabled(Mvapich2.SLURM) in spec: + process_manager_options = [ + "--with-pm=slurm" + ] + elif has_slurm_incompatible_variants: + pms = [] + # The variant name is equal to the process manager name in the configuration options + for x in Mvapich2.SLURM_INCOMPATIBLE_PMS: + if self.enabled(x) in spec: + pms.append(x) + process_manager_options = [ + "--with-pm=%s" % ':'.join(pms) + ] + configure_args.extend(process_manager_options) + + def set_network_type(self, spec, configure_args): + # Check that at most one variant has been activated + count = 0 + for x in Mvapich2.SUPPORTED_NETWORKS: + if self.enabled(x) in spec: + count += 1 + if count > 1: + raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)') + + # From here on I can suppose that ony one variant has been selected + if self.enabled(Mvapich2.PSM) in spec: + network_options = ["--with-device=ch3:psm"] + elif self.enabled(Mvapich2.SOCK) in spec: + network_options = ["--with-device=ch3:sock"] + elif self.enabled(Mvapich2.NEMESISIBTCP) in spec: + network_options = ["--with-device=ch3:nemesis:ib,tcp"] + elif self.enabled(Mvapich2.NEMESISIB) in spec: + network_options = ["--with-device=ch3:nemesis:ib"] + elif self.enabled(Mvapich2.NEMESIS) in spec: + network_options = ["--with-device=ch3:nemesis"] else: - # throw this flag on IB systems - configure_args.append("--with-device=ch3:mrail", "--with-rdma=gen2") - - # TODO: shared-memory build - - # TODO: CUDA + network_options = ["--with-device=ch3:mrail", "--with-rdma=gen2"] - # TODO: other file systems like panasis + configure_args.extend(network_options) - configure( - "--prefix=" + prefix, - "--enable-f77", "--enable-fc", "--enable-cxx", - "--enable-shared", "--enable-sharedlibs=gcc", - "--enable-debuginfo", - "--with-pm=no", "--with-pmi=slurm", - "--enable-romio", "--with-file-system=lustre+nfs+ufs", - "--disable-mpe", "--without-mpe", + def install(self, spec, prefix): + # we'll set different configure flags depending on our environment + configure_args = [ + "--prefix=%s" % prefix, + "--enable-shared", + "--enable-romio", "--disable-silent-rules", - *configure_args) - + ] + if not self.compiler.f77 and not self.compiler.fc: + configure_args.append("--enable-fortran=none") + + # Set the type of the build (debug, release) + self.set_build_type(spec, configure_args) + # Set the process manager + self.set_process_manager(spec, configure_args) + # Determine network type by variant + self.set_network_type(spec, configure_args) + + configure(*configure_args) make() - make("install") diff --git a/var/spack/packages/ompt-openmp/package.py b/var/spack/packages/ompt-openmp/package.py index 5d380ebd77..9c1b4b9570 100644 --- a/var/spack/packages/ompt-openmp/package.py +++ b/var/spack/packages/ompt-openmp/package.py @@ -3,9 +3,9 @@ from spack import * class OmptOpenmp(Package): """LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang.""" homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp" - url = "http://github.com/khuck/LLVM-openmp/archive/v0.1-spack.tar.gz" + url = "http://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz" - version('spack', '35227b2726e377faa433fc841226e036') + version('0.1', '3375b5ce67a48cae107371fcd811f639') # depends_on("foo") diff --git a/var/spack/packages/openblas/package.py b/var/spack/packages/openblas/package.py new file mode 100644 index 0000000000..e01467c05a --- /dev/null +++ b/var/spack/packages/openblas/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Openblas(Package): + """OpenBLAS: An optimized BLAS library""" + homepage = "http://www.openblas.net" + url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + + version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') + + # virtual dependency + provides('blas') + provides('lapack') + + def install(self, spec, prefix): + make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77') + make('install', "PREFIX='%s'" % prefix) + + # Blas virtual package should provide blas.a and libblas.a + with working_dir(prefix.lib): + symlink('libopenblas.a', 'blas.a') + symlink('libopenblas.a', 'libblas.a') diff --git a/var/spack/packages/openmpi/configure.patch b/var/spack/packages/openmpi/configure.patch new file mode 100644 index 0000000000..18fb42c1d1 --- /dev/null +++ b/var/spack/packages/openmpi/configure.patch @@ -0,0 +1,31 @@ +This patch addresses <https://github.com/open-mpi/ompi/issues/576>. +--- a/configure ++++ b/configure +@@ -301130,10 +301130,11 @@ + case ${prev}${p} in + + -L* | -R* | -l*) +- # Some compilers place space between "-{L,R}" and the path. ++ # Some compilers place space between "-{L,R,l}" and the path. + # Remove the space. + if test $p = "-L" || +- test $p = "-R"; then ++ test $p = "-R" || ++ test $p = "-l"; then + prev=$p + continue + fi +@@ -303036,10 +303037,11 @@ + case ${prev}${p} in + + -L* | -R* | -l*) +- # Some compilers place space between "-{L,R}" and the path. ++ # Some compilers place space between "-{L,R,l}" and the path. + # Remove the space. + if test $p = "-L" || +- test $p = "-R"; then ++ test $p = "-R" || ++ test $p = "-l"; then + prev=$p + continue + fi diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py index 5e429dedf5..be2202fbbd 100644 --- a/var/spack/packages/openmpi/package.py +++ b/var/spack/packages/openmpi/package.py @@ -14,6 +14,8 @@ class Openmpi(Package): homepage = "http://www.open-mpi.org" + version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e', + url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.1.tar.bz2") version('1.10.0', '280cf952de68369cebaca886c5ce0304', url = "http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2") version('1.8.8', '0dab8e602372da1425e9242ae37faf8c', @@ -23,10 +25,15 @@ class Openmpi(Package): patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") + patch('configure.patch', when="@1.10.0:") provides('mpi@:2.2', when='@1.6.5') # Open MPI 1.6.5 supports MPI-2.2 provides('mpi@:3.0', when='@1.8.8') # Open MPI 1.8.8 supports MPI-3.0 provides('mpi@:3.0', when='@1.10.0') # Open MPI 1.10.0 supports MPI-3.0 + provides('mpi@:3.0', when='@1.10.1') # Open MPI 1.10.1 supports MPI-3.0 + + + depends_on('hwloc') def setup_dependent_environment(self, module, spec, dep_spec): @@ -40,6 +47,8 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix] + config_args.append("--with-hwloc=%s" % spec['hwloc'].prefix) + # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: # "--with-platform=contrib/platform/llnl/optimized" diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py index c5a8aeb9dc..4bf1f832d4 100644 --- a/var/spack/packages/openssl/package.py +++ b/var/spack/packages/openssl/package.py @@ -10,6 +10,7 @@ class Openssl(Package): url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') + version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') depends_on("zlib") parallel = False diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py index 596f7114d6..097b8c41ec 100644 --- a/var/spack/packages/papi/package.py +++ b/var/spack/packages/papi/package.py @@ -13,6 +13,7 @@ class Papi(Package): homepage = "http://icl.cs.utk.edu/papi/index.html" url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz" + version('5.4.1', '9134a99219c79767a11463a76b0b01a2') version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') def install(self, spec, prefix): @@ -20,13 +21,10 @@ class Papi(Package): configure_args=["--prefix=%s" % prefix] - # need to force consistency in the use of compilers - if spec.satisfies('%gcc'): - configure_args.append('CC=gcc') - configure_args.append('MPICH_CC=gcc') - if spec.satisfies('%intel'): - configure_args.append('CC=icc') - configure_args.append('MPICH_CC=icc') + # PAPI uses MPI if MPI is present; since we don't require an + # MPI package, we ensure that all attempts to use MPI fail, so + # that PAPI does not get confused + configure_args.append('MPICC=:') configure(*configure_args) diff --git a/var/spack/packages/paraview/package.py b/var/spack/packages/paraview/package.py index a0ff812ca2..b0893237e9 100644 --- a/var/spack/packages/paraview/package.py +++ b/var/spack/packages/paraview/package.py @@ -7,8 +7,6 @@ class Paraview(Package): version('4.4.0', 'fa1569857dd680ebb4d7ff89c2227378', url='http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz') variant('python', default=False, description='Enable Python support') - variant('matplotlib', default=False, description='Enable Matplotlib support') - variant('numpy', default=False, description='Enable NumPy support') variant('tcl', default=False, description='Enable TCL support') @@ -18,11 +16,11 @@ class Paraview(Package): variant('qt', default=False, description='Enable Qt support') depends_on('python', when='+python') - depends_on('py-numpy', when='+python+numpy') - depends_on('py-matplotlib', when='+python+matplotlib') + depends_on('py-numpy', when='+python') + depends_on('py-matplotlib', when='+python') depends_on('tcl', when='+tcl') depends_on('mpi', when='+mpi') - depends_on('qt', when='+qt') + depends_on('qt@:4', when='+qt') depends_on('bzip2') depends_on('freetype') @@ -30,7 +28,7 @@ class Paraview(Package): depends_on('jpeg') depends_on('libpng') depends_on('libtiff') - #depends_on('libxml2') # drags in python + depends_on('libxml2') depends_on('netcdf') #depends_on('protobuf') # version mismatches? #depends_on('sqlite') # external version not supported @@ -49,7 +47,11 @@ class Paraview(Package): feature_args = std_cmake_args[:] feature_args.append('-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % feature_to_bool('+qt')) feature_args.append('-DPARAVIEW_ENABLE_PYTHON:BOOL=%s' % feature_to_bool('+python')) + if '+python' in spec: + feature_args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s/bin/python' % spec['python'].prefix) feature_args.append('-DPARAVIEW_USE_MPI:BOOL=%s' % feature_to_bool('+mpi')) + if '+mpi' in spec: + feature_args.append('-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix) feature_args.append('-DVTK_ENABLE_TCL_WRAPPING:BOOL=%s' % feature_to_bool('+tcl')) feature_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % feature_to_bool('+osmesa')) feature_args.append('-DVTK_USE_X:BOOL=%s' % nfeature_to_bool('+osmesa')) @@ -63,7 +65,7 @@ class Paraview(Package): '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', - #'-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py index e7ce3dfd24..a5fee39d42 100644 --- a/var/spack/packages/py-matplotlib/package.py +++ b/var/spack/packages/py-matplotlib/package.py @@ -9,10 +9,13 @@ class PyMatplotlib(Package): version('1.4.2', '7d22efb6cce475025733c50487bd8898') version('1.4.3', '86af2e3e3c61849ac7576a6f5ca44267') + variant('gui', default=False, description='Enable GUI') + variant('ipython', default=False, description='Enable ipython support') + extends('python', ignore=r'bin/nosetests.*$') - depends_on('py-pyside') - depends_on('py-ipython') + depends_on('py-pyside', when='+gui') + depends_on('py-ipython', when='+ipython') depends_on('py-pyparsing') depends_on('py-six') depends_on('py-dateutil') @@ -20,10 +23,10 @@ class PyMatplotlib(Package): depends_on('py-nose') depends_on('py-numpy') - depends_on('qt') + depends_on('qt', when='+gui') depends_on('bzip2') - depends_on('tcl') - depends_on('tk') + depends_on('tcl', when='+gui') + depends_on('tk', when='+gui') depends_on('qhull') def install(self, spec, prefix): diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py index bb5da44d02..ffa433e18e 100644 --- a/var/spack/packages/py-pyside/package.py +++ b/var/spack/packages/py-pyside/package.py @@ -2,7 +2,7 @@ from spack import * import os class PyPyside(Package): - """array processing for numbers, strings, records, and objects.""" + """Python bindings for Qt.""" homepage = "https://pypi.python.org/pypi/pyside" url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz" diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index 000881a846..31fb8b3d5a 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -26,6 +26,7 @@ class Python(Package): def install(self, spec, prefix): # Need this to allow python build to find the Python installation. env['PYTHONHOME'] = prefix + env['MACOSX_DEPLOYMENT_TARGET'] = '10.6' # Rest of install is pretty standard. configure("--prefix=%s" % prefix, diff --git a/var/spack/packages/rsync/package.py b/var/spack/packages/rsync/package.py new file mode 100644 index 0000000000..8ae21b1cb9 --- /dev/null +++ b/var/spack/packages/rsync/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Rsync(Package): + """rsync is an open source utility that provides fast incremental file transfer.""" + homepage = "https://rsync.samba.org" + url = "https://download.samba.org/pub/rsync/rsync-3.1.1.tar.gz" + + version('3.1.1', '43bd6676f0b404326eee2d63be3cdcfe') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/sparsehash/package.py b/var/spack/packages/sparsehash/package.py new file mode 100644 index 0000000000..7decaeb89b --- /dev/null +++ b/var/spack/packages/sparsehash/package.py @@ -0,0 +1,14 @@ +from spack import * + +class Sparsehash(Package): + """Sparse and dense hash-tables for C++ by Google""" + homepage = "https://github.com/sparsehash/sparsehash" + url = "https://github.com/sparsehash/sparsehash/archive/sparsehash-2.0.3.tar.gz" + + version('2.0.3', 'd8d5e2538c1c25577b3f066d7a55e99e') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") |