Merge branch 'features/spackathon' of github.com:NERSC/spack into crayport

Conflicts:
	lib/spack/spack/compiler.py
This commit is contained in:
Gregory Becker 2015-11-11 10:35:59 -08:00
commit 7e6fc79eb2
290 changed files with 813 additions and 737 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/etc/spackconfig /etc/spackconfig
/share/spack/dotkit /share/spack/dotkit
/share/spack/modules /share/spack/modules
*.ropeproject

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lib/spack/spack/util/python_recipe_parser"]
path = lib/spack/spack/util/python_recipe_parser
url = git@github.com:karenyyng/spack_python_package_parser.git

View File

@ -37,6 +37,7 @@
lib_path = join_path(prefix, "lib", "spack") lib_path = join_path(prefix, "lib", "spack")
build_env_path = join_path(lib_path, "env") build_env_path = join_path(lib_path, "env")
module_path = join_path(lib_path, "spack") module_path = join_path(lib_path, "spack")
arch_path = join_path(module_path, 'architectures')
compilers_path = join_path(module_path, "compilers") compilers_path = join_path(module_path, "compilers")
test_path = join_path(module_path, "test") test_path = join_path(module_path, "test")
hooks_path = join_path(module_path, "hooks") hooks_path = join_path(module_path, "hooks")

View File

@ -23,70 +23,190 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os import os
import imp
import platform as py_platform import platform as py_platform
import inspect
from llnl.util.lang import memoized from llnl.util.lang import memoized, list_modules
from llnl.util.filesystem import join_path
import llnl.util.tty as tty
import spack import spack
from spack.util.naming import mod_to_class
import spack.error as serr import spack.error as serr
from spack.version import Version from spack.version import Version
from external import yaml
class InvalidSysTypeError(serr.SpackError): class InvalidSysTypeError(serr.SpackError):
def __init__(self, sys_type): def __init__(self, sys_type):
super(InvalidSysTypeError, self).__init__( super(InvalidSysTypeError, self).__init__("Invalid sys_type value for Spack: " + sys_type)
"Invalid sys_type value for Spack: " + sys_type)
class NoSysTypeError(serr.SpackError): class NoSysTypeError(serr.SpackError):
def __init__(self): def __init__(self):
super(NoSysTypeError, self).__init__( super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.")
"Could not determine sys_type for this machine.")
class Target(object):
""" Target is the processor of the host machine. The host machine may have different front-end
and back-end targets, especially if it is a Cray machine. The target will have a name and
also the module_name (e.g craype-compiler). Targets will also recognize which architecture
they came from using the set_architecture method. Targets will have compiler finding strategies
"""
default_strategy = None # Can probably add a compiler path here
def __init__(self,name, module_name=None):
self.name = name # case of cray "ivybridge" but if it's x86_64
self.module_name = module_name # craype-ivybridge
def set_architecture(self, architecture): # Target should get the architecture class.
self.architecture = architecture
@property
def compiler_strategy(self):
if default_strategy:
return default_strategy
elif self.module_name: # If there is a module_name given then use MODULES
return "MODULES"
else:
return "PATH"
class Architecture(object):
""" Abstract class that each type of Architecture will subclass. Will return a instance of it once it
is returned
"""
priority = None # Subclass needs to set this number. This controls order in which arch is detected.
front_end = None
back_end = None
default = None # The default back end target. On cray ivybridge
def __init__(self, name):
self.targets = {}
self.name = name
def add_target(self, name, target):
"""Used by the architecture specific subclass to list available targets. Raises an error
if the architecture specifies a name that is reserved by spack as an alias.
"""
if name in ['front_end', 'fe', 'back_end', 'be', 'default']:
raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name)
target.set_architecture(self)
self.targets[name] = target
def target(self, name):
"""This is a getter method for the target dictionary that handles defaulting based
on the values provided by default, front-end, and back-end. This can be overwritten
by a subclass for which we want to provide further aliasing options.
"""
if name == 'default':
name = self.default
elif name == 'front_end' or name == 'fe':
name = self.front_end
elif name == 'back_end' or name == 'be':
name = self.back_end
return self.targets[name]
@classmethod
def detect(self):
""" Subclass is responsible for implementing this method.
Returns True if the architecture detects if it is the current architecture
and False if it's not.
"""
raise NotImplementedError()
def __str__(self):
return self.name
def get_sys_type_from_spack_globals(): def get_sys_type_from_spack_globals():
"""Return the SYS_TYPE from spack globals, or None if it isn't set.""" """Return the SYS_TYPE from spack globals, or None if it isn't set."""
if not hasattr(spack, "sys_type"): if not hasattr(spack, "sys_type"):
return None return None
elif hasattr(spack.sys_type, "__call__"): elif hasattr(spack.sys_type, "__call__"):
return spack.sys_type() return spack.sys_type() #If in __init__.py there is a sys_type() then call that
else: else:
return spack.sys_type return spack.sys_type # Else use the attributed which defaults to None
def get_sys_type_from_environment(): # This is livermore dependent. Hard coded for livermore
"""Return $SYS_TYPE or None if it's not defined.""" #def get_sys_type_from_environment():
return os.environ.get('SYS_TYPE') # """Return $SYS_TYPE or None if it's not defined."""
# return os.environ.get('SYS_TYPE')
def get_mac_sys_type(): def get_mac_sys_type():
"""Return a Mac OS SYS_TYPE or None if this isn't a mac.""" """Return a Mac OS SYS_TYPE or None if this isn't a mac.
Front-end config
"""
mac_ver = py_platform.mac_ver()[0] mac_ver = py_platform.mac_ver()[0]
if not mac_ver: if not mac_ver:
return None return None
return "macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine())
return "macosx_%s_%s" % (
Version(mac_ver).up_to(2), py_platform.machine()) def get_sys_type_from_uname():
""" Returns a sys_type from the uname argument
Front-end config
"""
try:
arch_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE)
arch, _ = arch_proc.communicate()
return arch.strip()
except:
return None
def get_sys_type_from_config_file():
spack_home_dir = os.environ["HOME"] + "/.spack"
yaml_file = os.path.join(spack_home_dir, 'architecture.yaml')
try:
config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load()
arch = config_dict['architecture']
front = arch['front']
back = arch['back']
return Architecture(front,back)
except:
print "No architecture.yaml config file found"
return None
@memoized
def all_architectures():
modules = []
for name in list_modules(spack.arch_path):
mod_name = 'spack.architectures' + name
path = join_path(spack.arch_path, name) + ".py"
mod = imp.load_source(mod_name, path)
class_name = mod_to_class(name)
if not hasattr(mod, class_name):
tty.die('No class %s defined in %s' % (class_name, mod_name))
cls = getattr(mod, class_name)
if not inspect.isclass(cls):
tty.die('%s.%s is not a class' % (mod_name, class_name))
modules.append(cls)
return modules
@memoized @memoized
def sys_type(): def sys_type():
"""Returns a SysType for the current machine.""" """Priority of gathering sys-type.
methods = [get_sys_type_from_spack_globals, 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30
get_sys_type_from_environment, 2. UNAME
get_mac_sys_type] 3. GLOBALS
4. MAC OSX
Yaml should be a priority here because we want the user to be able to specify the type of architecture to use.
If there is no yaml present then it should move on to the next function and stop immediately once it gets a
arch name
"""
# Try to create an architecture object using the config file FIRST
architecture_list = all_architectures()
architecture_list.sort(key = lambda a: a.priority)
for arch in architecture_list:
if arch.detect():
return arch()
# search for a method that doesn't return None
sys_type = None
for method in methods:
sys_type = method()
if sys_type: break
# Couldn't determine the sys_type for this machine.
if sys_type is None:
return "unknown_arch"
if not isinstance(sys_type, basestring):
raise InvalidSysTypeError(sys_type)
return sys_type

View File

@ -0,0 +1,19 @@
import os
from spack.architecture import Architecture, Target
class Bgq(Architecture):
priority = 30
front_end = 'power7'
back_end = 'powerpc'
default = 'powerpc'
def __init__(self):
super(Bgq, self).__init__('cray')
self.add_target('power7', Target('power7'))
self.add_target('powerpc', Target('powerpc'))
@classmethod
def detect(self):
return os.path.exists('/bgsys')

View File

@ -0,0 +1,22 @@
import os
from spack.architecture import Architecture, Target
class Cray(Architecture):
priority = 20
front_end = 'sandybridge'
back_end = 'ivybridge'
default = 'ivybridge'
def __init__(self):
super(Cray, self).__init__('cray')
# Back End compiler needs the proper target module loaded.
self.add_target('ivybridge', Target('ivybridge','craype-ivybridge'))
# Could switch to use modules and fe targets for front end
# Currently using compilers by path for front end.
self.add_target('sandybridge', Target('sandybridge'))
@classmethod
def detect(self):
return os.path.exists('/opt/cray/craype')

View File

@ -0,0 +1,17 @@
import subprocess
from spack.architecture import Architecture
class Linux(Architecture):
priority = 60
front_end = "x86_64"
back_end = "x86_64"
default = "x86_64"
def __init__(self):
super(Linux, self).__init__('linux')
@classmethod
def detect(self):
arch = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE)
arch, _ = arch.communicate()
return 'x86_64' in arch.strip()

View File

@ -86,6 +86,28 @@ def __call__(self, *args, **kwargs):
return super(MakeExecutable, self).__call__(*args, **kwargs) return super(MakeExecutable, self).__call__(*args, **kwargs)
def load_module(mod):
"""Takes a module name and removes modules until it is possible to
load that module. It then loads the provided module. Depends on the
modulecmd implementation of modules used in cray and lmod.
"""
#Create an executable of the module command that will output python code
modulecmd = which('modulecmd')
modulecmd.add_default_arg('python')
# Read the module and remove any conflicting modules
# We do this without checking that they are already installed
# for ease of programming because unloading a module that is not
# loaded does nothing.
text = modulecmd('show', mod, return_oe=True).split()
for i, word in enumerate(text):
if word == 'conflict':
exec(compile(modulecmd('unload', text[i+1], return_oe=True), '<string>', 'exec'))
# Load the module now that there are no conflicts
load = modulecmd('load', mod, return_oe=True)
exec(compile(load, '<string>', 'exec'))
def set_compiler_environment_variables(pkg): def set_compiler_environment_variables(pkg):
assert(pkg.spec.concrete) assert(pkg.spec.concrete)
compiler = pkg.compiler compiler = pkg.compiler
@ -108,11 +130,9 @@ def set_compiler_environment_variables(pkg):
os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler)
if compiler.PrgEnv: if compiler.modules:
os.environ['SPACK_CRAYPE'] = compiler.PrgEnv for mod in compiler.modules:
os.environ['SPACK_COMP_MODULE'] = compiler.module load_module(mod)
def set_build_environment_variables(pkg): def set_build_environment_variables(pkg):
@ -163,8 +183,10 @@ def set_build_environment_variables(pkg):
pcdir = join_path(p, libdir, 'pkgconfig') pcdir = join_path(p, libdir, 'pkgconfig')
if os.path.isdir(pcdir): if os.path.isdir(pcdir):
pkg_config_dirs.append(pcdir) pkg_config_dirs.append(pcdir)
path_set("PKG_CONFIG_PATH", pkg_config_dirs) path_put_first("PKG_CONFIG_PATH", pkg_config_dirs)
if pkg.spec.architecture.compiler_strategy.lower() == 'module':
load_module(pkg.spec.architecture.module_name)
def set_module_variables_for_package(pkg): def set_module_variables_for_package(pkg):
"""Populate the module scope of install() with some useful functions. """Populate the module scope of install() with some useful functions.
@ -239,8 +261,8 @@ def get_rpaths(pkg):
def setup_package(pkg): def setup_package(pkg):
"""Execute all environment setup routines.""" """Execute all environment setup routines."""
set_compiler_environment_variables(pkg)
set_build_environment_variables(pkg) set_build_environment_variables(pkg)
set_compiler_environment_variables(pkg)
set_module_variables_for_package(pkg) set_module_variables_for_package(pkg)
# Allow dependencies to set up environment as well. # Allow dependencies to set up environment as well.

View File

@ -29,6 +29,8 @@
from llnl.util.tty.colify import colify from llnl.util.tty.colify import colify
from llnl.util.lang import index_by from llnl.util.lang import index_by
import spack.architecture
import spack.compiler
import spack.compilers import spack.compilers
import spack.spec import spack.spec
import spack.config import spack.config
@ -38,11 +40,9 @@
description = "Manage compilers" description = "Manage compilers"
def setup_parser(subparser): def setup_parser(subparser):
sp = subparser.add_subparsers( sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command')
metavar='SUBCOMMAND', dest='compiler_command')
update_parser = sp.add_parser( update_parser = sp.add_parser('add', help='Add compilers to the Spack configuration.')
'add', help='Add compilers to the Spack configuration.')
update_parser.add_argument('add_paths', nargs=argparse.REMAINDER) update_parser.add_argument('add_paths', nargs=argparse.REMAINDER)
remove_parser = sp.add_parser('remove', help='remove compiler') remove_parser = sp.add_parser('remove', help='remove compiler')
@ -55,14 +55,17 @@ def setup_parser(subparser):
def compiler_add(args): def compiler_add(args):
"""Search either $PATH or a list of paths for compilers and add them """Search either $PATH or a list of paths OR MODULES for compilers and add them
to Spack's configuration.""" to Spack's configuration."""
paths = args.add_paths
paths = args.add_paths # This might be a parser method. Parsing method to add_paths
if not paths: if not paths:
paths = get_path('PATH') paths = get_path('PATH')
compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
if c.spec not in spack.compilers.all_compilers()] if c.spec not in spack.compilers.all_compilers()]
if compilers: if compilers:
spack.compilers.add_compilers_to_config('user', *compilers) spack.compilers.add_compilers_to_config('user', *compilers)

View File

@ -282,6 +282,11 @@ def find_in_modules(cls):
modulecmd modulecmd
matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output)
loaded_modules = os.environ["LOADEDMODULES"].split(":")
#output = _shell('module avail %s' % cls.PrgEnv_compiler)
for module in loaded_modules:
match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module)
for name, version in matches: for name, version in matches:
v = version + '-craype' v = version + '-craype'
comp = cls(spack.spec.CompilerSpec(name + '@' + v), comp = cls(spack.spec.CompilerSpec(name + '@' + v),

View File

@ -122,6 +122,34 @@ def concretize_architecture(self, spec):
return True # changed return True # changed
def new_concretize_architecture(self, spec):
"""If the spec already has an architecture and it is a an architecture type,
return. Otherwise, if it has an architecture that is a string type, generate an
architecture based on that type. If it has no architecture and the root of the
DAG has an architecture, then use that. Otherwise, take the system's default
architecture.
"""
if spec.architecture is not None:
if isinstance(spec.architecture,spack.architecture.Target):
return False
else:
arch = spack.architecture.sys_type()
spec.architecture = arch.target(spec.architecture)
return True #changed
if spec.root.architecture:
if isinstance(spec.root.architecture,spack.architecture.Target):
spec.architecture = spec.root.architecture
else:
arch = spack.architecture.sys_type()
spec.architecture = arch.target(spec.root.architecture)
else:
arch = spack.architecture.sys_type()
spec.architecture = arch.target('default')
return True #changed
def concretize_variants(self, spec): def concretize_variants(self, spec):
"""If the spec already has variants filled in, return. Otherwise, add """If the spec already has variants filled in, return. Otherwise, add
the default variants from the package specification. the default variants from the package specification.

View File

@ -31,7 +31,8 @@
import spack import spack
"""Names of tests to be included in Spack's test suite""" """Names of tests to be included in Spack's test suite"""
test_names = ['versions', """test_names = ['architecture',
'versions',
'url_parse', 'url_parse',
'url_substitution', 'url_substitution',
'packages', 'packages',
@ -57,7 +58,8 @@
'optional_deps', 'optional_deps',
'make_executable', 'make_executable',
'configure_guess'] 'configure_guess']
"""
test_names = ['architecture']
def list_tests(): def list_tests():
"""Return names of all tests that can be run for Spack.""" """Return names of all tests that can be run for Spack."""

View File

@ -0,0 +1,19 @@
""" Test checks if the architecture class is created correctly and also that
the functions are looking for the correct architecture name
"""
import unittest
import spack
from spack.architecture import *
class ArchitectureTest(unittest.TestCase):
def test_Architecture_class(self):
a = Architecture('Cray-XC40')
a.add_arch_strategy()
self.assertEquals(a.get_arch_dict(), {'Cray-XC40': 'MODULES'})
def test_get_sys_type_from_config_file(self):
output_arch_class = get_sys_type_from_config_file()
my_arch_class = Architecture('Linux x86_64','Cray-xc40')
self.assertEqual(output_arch_class, my_arch_class)

View File

@ -56,7 +56,11 @@ def command(self):
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
"""Run the executable with subprocess.check_output, return output.""" """Run the executable with subprocess.check_output, return output."""
return_output = kwargs.get("return_output", False) # Return oe returns a combined stream, setting both output and error
# without setting return oe returns them concatenated by a double line break
return_oe = kwargs.get("return_oe", False)
return_output = True if return_oe else kwargs.get("return_output", False)
return_error = True if return_oe else kwargs.get("return_error", False)
fail_on_error = kwargs.get("fail_on_error", True) fail_on_error = kwargs.get("fail_on_error", True)
ignore_errors = kwargs.get("ignore_errors", ()) ignore_errors = kwargs.get("ignore_errors", ())
@ -95,8 +99,8 @@ def streamify(arg, mode):
proc = subprocess.Popen( proc = subprocess.Popen(
cmd, cmd,
stdin=input, stdin=input,
stderr=error, stdout=subprocess.PIPE if return_output else output,
stdout=subprocess.PIPE if return_output else output) stderr=subprocess.STDOUT if return_oe else (subprocess.PIPE if return_error else error))
out, err = proc.communicate() out, err = proc.communicate()
self.returncode = proc.returncode self.returncode = proc.returncode
@ -104,8 +108,15 @@ def streamify(arg, mode):
if fail_on_error and rc != 0 and (rc not in ignore_errors): if fail_on_error and rc != 0 and (rc not in ignore_errors):
raise ProcessError("Command exited with status %d:" raise ProcessError("Command exited with status %d:"
% proc.returncode, cmd_line) % proc.returncode, cmd_line)
if return_output: # Return out or error if specified. Return combined stream if requested,
return out # otherwise return them concatenated by double line break if both requested.
if return_output or return_error:
if return_oe or not return_error:
return out
elif return_output:
return out+'\n\n'+err
else:
return err
except OSError, e: except OSError, e:
raise ProcessError( raise ProcessError(

@ -0,0 +1 @@
Subproject commit 437a62abb3df7212e3ee20269c0089a0a9766fe0

0
var/spack/packages/ImageMagick/package.py Normal file → Executable file
View File

0
var/spack/packages/Mitos/package.py Normal file → Executable file
View File

0
var/spack/packages/R/package.py Normal file → Executable file
View File

0
var/spack/packages/SAMRAI/no-tool-build.patch Normal file → Executable file
View File

0
var/spack/packages/SAMRAI/package.py Normal file → Executable file
View File

0
var/spack/packages/adept-utils/package.py Normal file → Executable file
View File

View File

@ -0,0 +1,28 @@
from spack import *
class Adios(Package):
"""The Adaptable IO System (ADIOS) provides a simple,
flexible way for scientists to describe the data in their code that may need to be written,
read, or processed outside of the running simulation
"""
homepage = "http://www.olcf.ornl.gov/center-projects/adios/"
url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz"
version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76')
# Lots of setting up here for this package
# module swap PrgEnv-intel PrgEnv-$COMP
# module load cray-netcdf/4.3.3.1
# module load cray-hdf5/1.8.14
# module load python/2.7.10
depends_on('mxml')
def install(self, spec, prefix):
configure_args = ["--prefix=%s" % prefix, "--with-mxml=%s" % spec['mxml'].prefix,
"--with-hdf5=%s" % spec['hdf5'].prefix, "--with-netcdf=%s" % os.environ['NETCDF_DIR'],
"--with-infiniband=no"]
configure(*configure_args)
make()
make("install")

0
var/spack/packages/arpack/package.py Normal file → Executable file
View File

View File

@ -1,18 +0,0 @@
from spack import *
class Asciidoc(Package):
""" A presentable text document format for writing articles, UNIX man
pages and other small to medium sized documents."""
homepage = "http://asciidoc.org"
url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz"
version('8.6.9', 'c59018f105be8d022714b826b0be130a')
depends_on('libxml2')
depends_on('libxslt')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

0
var/spack/packages/atk/package.py Normal file → Executable file
View File

0
var/spack/packages/atlas/package.py Normal file → Executable file
View File

0
var/spack/packages/autoconf/package.py Normal file → Executable file
View File

0
var/spack/packages/automaded/package.py Normal file → Executable file
View File

0
var/spack/packages/automake/package.py Normal file → Executable file
View File

0
var/spack/packages/bear/package.py Normal file → Executable file
View File

0
var/spack/packages/bib2xhtml/package.py Normal file → Executable file
View File

0
var/spack/packages/binutils/package.py Normal file → Executable file
View File

0
var/spack/packages/bison/package.py Normal file → Executable file
View File

4
var/spack/packages/boost/package.py Normal file → Executable file
View File

@ -14,10 +14,6 @@ class Boost(Package):
list_url = "http://sourceforge.net/projects/boost/files/boost/" list_url = "http://sourceforge.net/projects/boost/files/boost/"
list_depth = 2 list_depth = 2
version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87')
version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546')
version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76')
version('1.56.0', 'a744cf167b05d72335f27c88115f211d')
version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354') version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354')
version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279') version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279')
version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2') version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2')

View File

@ -1,16 +0,0 @@
--- Makefile 2015-02-26 10:50:00.000000000 -0800
+++ Makefile.new 2015-07-29 18:03:59.891357399 -0700
@@ -22,10 +22,10 @@
#
INC =
-GCC_PREFIX = $(shell dirname `which gcc`)
+GCC_PREFIX =
GCC_SUFFIX =
-CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
-CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX)
+CC = cc
+CPP = c++
CXX = $(CPP)
HEADERS = $(wildcard *.h)
BOWTIE_MM = 1

View File

@ -1,24 +0,0 @@
from spack import *
from glob import glob
class Bowtie2(Package):
"""Description"""
homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml"
version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip")
patch('bowtie2-2.5.patch',when='@2.2.5', level=0)
def install(self, spec, prefix):
make()
mkdirp(prefix.bin)
for bow in glob("bowtie2*"):
install(bow, prefix.bin)
# install('bowtie2',prefix.bin)
# install('bowtie2-align-l',prefix.bin)
# install('bowtie2-align-s',prefix.bin)
# install('bowtie2-build',prefix.bin)
# install('bowtie2-build-l',prefix.bin)
# install('bowtie2-build-s',prefix.bin)
# install('bowtie2-inspect',prefix.bin)
# install('bowtie2-inspect-l',prefix.bin)
# install('bowtie2-inspect-s',prefix.bin)

0
var/spack/packages/boxlib/package.py Normal file → Executable file
View File

0
var/spack/packages/bzip2/package.py Normal file → Executable file
View File

0
var/spack/packages/cairo/package.py Normal file → Executable file
View File

0
var/spack/packages/callpath/package.py Normal file → Executable file
View File

0
var/spack/packages/cblas/package.py Normal file → Executable file
View File

0
var/spack/packages/cgm/package.py Normal file → Executable file
View File

0
var/spack/packages/clang/package.py Normal file → Executable file
View File

0
var/spack/packages/cloog/package.py Normal file → Executable file
View File

0
var/spack/packages/cmake/package.py Normal file → Executable file
View File

0
var/spack/packages/coreutils/package.py Normal file → Executable file
View File

0
var/spack/packages/cppcheck/package.py Normal file → Executable file
View File

0
var/spack/packages/cram/package.py Normal file → Executable file
View File

View File

@ -1,17 +0,0 @@
from spack import *
class Cscope(Package):
"""Cscope is a developer's tool for browsing source code."""
homepage = "http://http://cscope.sourceforge.net/"
url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz"
version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176')
# Can be configured to use flex (not necessary)
# ./configure --with-flex
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

0
var/spack/packages/cube/package.py Normal file → Executable file
View File

View File

@ -1,19 +0,0 @@
from spack import *
class Czmq(Package):
""" A C interface to the ZMQ library """
homepage = "http://czmq.zeromq.org"
url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz"
version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz')
depends_on('zeromq')
def install(self, spec, prefix):
bash = which("bash")
bash("./autogen.sh")
configure("--prefix=%s" % prefix)
make()
make("install")

0
var/spack/packages/dbus/package.py Normal file → Executable file
View File

View File

@ -1,19 +0,0 @@
import os
import glob
from spack import *
class DocbookXml(Package):
"""Docbook DTD XML files."""
homepage = "http://www.oasis-open.org/docbook"
url = "http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip"
version('4.5', '03083e288e87a7e829e437358da7ef9e')
def install(self, spec, prefix):
cp = which('cp')
install_args = ['-a', '-t', prefix]
install_args.extend(glob.glob('*'))
cp(*install_args)

View File

@ -1,25 +0,0 @@
#------------------------------------------------------------------------------
# Author: Justin Too <justin@doubleotoo.com>
# Date: September 11, 2015
#------------------------------------------------------------------------------
from spack import *
class Doxygen(Package):
"""Doxygen is the de facto standard tool for generating documentation
from annotated C++ sources, but it also supports other popular programming
languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba,
Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D..
"""
homepage = "http://www.stack.nl/~dimitri/doxygen/"
url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz"
version('1.8.10', '79767ccd986f12a0f949015efb5f058f')
depends_on("cmake@2.8.12:")
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
make()
make("install")

0
var/spack/packages/dri2proto/package.py Normal file → Executable file
View File

0
var/spack/packages/dtcmp/package.py Normal file → Executable file
View File

0
var/spack/packages/dyninst/package.py Normal file → Executable file
View File

View File

@ -0,0 +1,17 @@
from spack import *
class Eigen(Package):
"""Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.."""
homepage = "http://eigen.tuxfamily.org/"
url = "http://bitbucket.org/eigen/eigen/get/3.2.5.tar.gz"
version('3.2.5', '8cc513ac6ec687117acadddfcacf551b')
def install(self, spec, prefix):
import os
os.system("mkdir ./build_dir && cd ./build_dir")
cmake('../', *std_cmake_args)
make()
make("install")

View File

@ -1,26 +0,0 @@
from spack import *
class Elfutils(Package):
"""elfutils is a collection of various binary tools such as
eu-objdump, eu-readelf, and other utilities that allow you to
inspect and manipulate ELF files. Refer to Table 5.Tools Included
in elfutils for Red Hat Developer for a complete list of binary
tools that are distributed with the Red Hat Developer Toolset
version of elfutils."""
homepage = "https://fedorahosted.org/elfutils/"
version('0.163',
git='git://git.fedorahosted.org/git/elfutils.git',
tag='elfutils-0.163')
provides('elf')
def install(self, spec, prefix):
autoreconf = which('autoreconf')
autoreconf('-if')
configure('--prefix=%s' % prefix, '--enable-maintainer-mode')
make()
make("install")

0
var/spack/packages/extrae/package.py Normal file → Executable file
View File

0
var/spack/packages/exuberant-ctags/package.py Normal file → Executable file
View File

View File

@ -1,18 +0,0 @@
from spack import *
class Fish(Package):
"""fish is a smart and user-friendly command line shell for OS X, Linux, and
the rest of the family.
"""
homepage = "http://fishshell.com/"
url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz"
list_url = homepage
version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")

0
var/spack/packages/flex/package.py Normal file → Executable file
View File

View File

@ -1,36 +0,0 @@
from spack import *
import os
class Flux(Package):
""" A next-generation resource manager (pre-alpha) """
homepage = "https://github.com/flux-framework/flux-core"
url = "https://github.com/flux-framework/flux-core"
version('master', branch='master', git='https://github.com/flux-framework/flux-core')
# Also needs autotools, but should use the system version if available
depends_on("zeromq@4.0.4:")
depends_on("czmq@2.2:")
depends_on("lua@5.1:5.1.99")
depends_on("munge")
depends_on("libjson-c")
depends_on("libxslt")
# TODO: This provides a catalog, hacked with environment below for now
depends_on("docbook-xml")
depends_on("asciidoc")
depends_on("python")
depends_on("py-cffi")
def install(self, spec, prefix):
# Bootstrap with autotools
bash = which('bash')
bash('./autogen.sh')
# Fix asciidoc dependency on xml style sheets and whatnot
os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix,
'catalog.xml')
# Configure, compile & install
configure("--prefix=" + prefix)
make("install", "V=1")

0
var/spack/packages/fontconfig/package.py Normal file → Executable file
View File

0
var/spack/packages/freetype/package.py Normal file → Executable file
View File

0
var/spack/packages/gasnet/package.py Normal file → Executable file
View File

0
var/spack/packages/gcc/package.py Normal file → Executable file
View File

0
var/spack/packages/gdk-pixbuf/package.py Normal file → Executable file
View File

0
var/spack/packages/geos/package.py Normal file → Executable file
View File

View File

@ -1,21 +0,0 @@
import os
from spack import *
class Gflags(Package):
"""The gflags package contains a C++ library that implements
commandline flags processing. It includes built-in support for
standard types such as string and the ability to define flags
in the source file in which they are used. Online documentation
available at: https://gflags.github.io/gflags/"""
homepage = "https://gflags.github.io/gflags"
url = "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz"
version('2.1.2', 'ac432de923f9de1e9780b5254884599f')
def install(self, spec, prefix):
cmake("-DCMAKE_INSTALL_PREFIX=" + prefix,
"-DBUILD_SHARED_LIBS=ON")
make()
make("test")
make("install")

View File

@ -1,17 +0,0 @@
from spack import *
class Ghostscript(Package):
"""an interpreter for the PostScript language and for PDF. """
homepage = "http://ghostscript.com/"
url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz"
version('9.16', '829319325bbdb83f5c81379a8f86f38f')
parallel = False
def install(self, spec, prefix):
configure("--prefix=%s" %prefix, "--enable-shared")
make()
make("install")

0
var/spack/packages/git/package.py Normal file → Executable file
View File

0
var/spack/packages/glib/package.py Normal file → Executable file
View File

0
var/spack/packages/global/package.py Normal file → Executable file
View File

View File

@ -1,15 +0,0 @@
import os
from spack import *
class Glog(Package):
"""C++ implementation of the Google logging module."""
homepage = "https://github.com/google/glog"
url = "https://github.com/google/glog/archive/v0.3.3.tar.gz"
version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0')
def install(self, spec, prefix):
configure("--prefix=" + prefix)
make()
make("install")

0
var/spack/packages/gmp/package.py Normal file → Executable file
View File

0
var/spack/packages/gnutls/package.py Normal file → Executable file
View File

0
var/spack/packages/gperf/package.py Normal file → Executable file
View File

0
var/spack/packages/gperftools/package.py Normal file → Executable file
View File

0
var/spack/packages/graphlib/package.py Normal file → Executable file
View File

View File

@ -1,21 +1,24 @@
from spack import * from spack import *
class Graphviz(Package): class Graphviz(Package):
"""Graph Visualization Software""" """graph visualization software."""
homepage = "http://www.graphviz.org" homepage = "http://www.graphviz.org"
url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz" url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz"
version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae')
version('2.36.0', '1f41664dba0c93109ac8b71216bf2b57')
parallel = False depends_on("cairo@1.1.10")
depends_on("freetype@2.1.10")
depends_on("swig") depends_on("fontconfig")
depends_on("python") depends_on("zlib@1.2.3")
depends_on("ghostscript") # depends_on("libpng@1.2.10")
# depends_on("expat@2.0.0")
# depends_on("gd@2.0.34")
def install(self, spec, prefix): def install(self, spec, prefix):
configure("--prefix=%s" %prefix) configure('--prefix=%s' % prefix)
# FIXME: Add logic to build and install here
make() make()
make("install") make("install")

0
var/spack/packages/gtkplus/package.py Normal file → Executable file
View File

0
var/spack/packages/harfbuzz/package.py Normal file → Executable file
View File

0
var/spack/packages/hdf5/package.py Normal file → Executable file
View File

0
var/spack/packages/hwloc/package.py Normal file → Executable file
View File

0
var/spack/packages/hypre/package.py Normal file → Executable file
View File

0
var/spack/packages/icu/package.py Normal file → Executable file
View File

0
var/spack/packages/icu4c/package.py Normal file → Executable file
View File

0
var/spack/packages/isl/package.py Normal file → Executable file
View File

0
var/spack/packages/jdk/package.py Normal file → Executable file
View File

0
var/spack/packages/jpeg/package.py Normal file → Executable file
View File

View File

@ -1,6 +1,6 @@
from spack import * from spack import *
class NetlibLapack(Package): class Lapack(Package):
""" """
LAPACK version 3.X is a comprehensive FORTRAN library that does LAPACK version 3.X is a comprehensive FORTRAN library that does
linear algebra operations including matrix inversions, least linear algebra operations including matrix inversions, least
@ -18,16 +18,9 @@ class NetlibLapack(Package):
version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70')
version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4')
variant('shared', default=False, description="Build shared library version")
# virtual dependency
provides('lapack')
# blas is a virtual dependency. # blas is a virtual dependency.
depends_on('blas') depends_on('blas')
depends_on('cmake')
# Doesn't always build correctly in parallel # Doesn't always build correctly in parallel
parallel = False parallel = False
@ -46,14 +39,7 @@ def get_blas_libs(self):
def install(self, spec, prefix): def install(self, spec, prefix):
blas_libs = ";".join(self.get_blas_libs()) blas_libs = ";".join(self.get_blas_libs())
cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] cmake(".", '-DBLAS_LIBRARIES=' + blas_libs, *std_cmake_args)
if '+shared' in spec:
cmake_args.append('-DBUILD_SHARED_LIBS=ON')
cmake_args += std_cmake_args
cmake(*cmake_args)
make() make()
make("install") make("install")

0
var/spack/packages/launchmon/package.py Normal file → Executable file
View File

0
var/spack/packages/launchmon/patch.lmon_install_dir Normal file → Executable file
View File

0
var/spack/packages/lcms/package.py Normal file → Executable file
View File

View File

@ -1,29 +0,0 @@
import os
import glob
from spack import *
class Leveldb(Package):
"""LevelDB is a fast key-value storage library written at Google
that provides an ordered mapping from string keys to string values."""
homepage = "https://github.com/google/leveldb"
url = "https://github.com/google/leveldb/archive/v1.18.tar.gz"
version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0')
depends_on("snappy")
def install(self, spec, prefix):
make()
mkdirp(prefix.include)
mkdirp(prefix.lib)
cp = which('cp')
# cp --preserve=links libleveldb.* prefix/lib
args = glob.glob('libleveldb.*')
args.append(prefix + '/lib')
cp('--preserve=links', *args)
cp('-r', 'include/leveldb', prefix + '/include')

0
var/spack/packages/libNBC/package.py Normal file → Executable file
View File

0
var/spack/packages/libarchive/package.py Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More