summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/spack/modules.yaml4
-rwxr-xr-xlib/spack/env/cc4
-rw-r--r--lib/spack/llnl/util/filesystem.py76
-rw-r--r--lib/spack/spack/build_environment.py114
-rw-r--r--lib/spack/spack/cmd/compiler.py15
-rw-r--r--lib/spack/spack/compilers/__init__.py43
-rw-r--r--lib/spack/spack/hooks/sbang.py8
-rw-r--r--lib/spack/spack/test/__init__.py2
-rw-r--r--lib/spack/spack/test/cmd/test_compiler_cmd.py81
-rwxr-xr-xshare/spack/qa/run-flake82
-rw-r--r--var/spack/repos/builtin/packages/R/package.py63
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py67
-rw-r--r--var/spack/repos/builtin/packages/arpack/package.py40
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py35
-rw-r--r--var/spack/repos/builtin/packages/ferret/package.py103
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py45
-rw-r--r--var/spack/repos/builtin/packages/mumps/mumps-shared.patch119
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py168
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py42
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py7
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py127
-rw-r--r--var/spack/repos/builtin/packages/pcre/package.py11
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py50
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py115
-rw-r--r--var/spack/repos/builtin/packages/r-BiocGenerics/package.py28
-rw-r--r--var/spack/repos/builtin/packages/r-R6/package.py46
-rw-r--r--var/spack/repos/builtin/packages/r-abind/package.py8
-rw-r--r--var/spack/repos/builtin/packages/r-curl/package.py51
-rw-r--r--var/spack/repos/builtin/packages/r-devtools/package.py50
-rw-r--r--var/spack/repos/builtin/packages/r-digest/package.py56
-rw-r--r--var/spack/repos/builtin/packages/r-filehash/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-git2r/package.py46
-rw-r--r--var/spack/repos/builtin/packages/r-httr/package.py49
-rw-r--r--var/spack/repos/builtin/packages/r-jsonlite/package.py50
-rw-r--r--var/spack/repos/builtin/packages/r-magic/package.py7
-rw-r--r--var/spack/repos/builtin/packages/r-memoise/package.py44
-rw-r--r--var/spack/repos/builtin/packages/r-mime/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-openssl/package.py52
-rw-r--r--var/spack/repos/builtin/packages/r-packrat/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-rstudioapi/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-whisker/package.py42
-rw-r--r--var/spack/repos/builtin/packages/r-withr/package.py44
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py13
-rw-r--r--var/spack/repos/builtin/packages/superlu-dist/package.py47
-rw-r--r--var/spack/repos/builtin/packages/superlu/package.py54
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py17
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py5
48 files changed, 1762 insertions, 423 deletions
diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml
index 99be5e7b6d..5f31cdd5c0 100644
--- a/etc/spack/modules.yaml
+++ b/etc/spack/modules.yaml
@@ -22,8 +22,8 @@ modules:
include:
- CPATH
lib/pkgconfig:
- - PKGCONFIG
+ - PKG_CONFIG_PATH
lib64/pkgconfig:
- - PKGCONFIG
+ - PKG_CONFIG_PATH
'':
- CMAKE_PREFIX_PATH
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 1e405ae6e9..bf98b4c354 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -324,8 +324,8 @@ fi
if [[ $SPACK_DEBUG == TRUE ]]; then
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log"
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log"
- echo "[$mode] $command $input_command" >> $input_log
- echo "[$mode] ${full_command[@]}" >> $output_log
+ echo "[$mode] $command $input_command" >> "$input_log"
+ echo "[$mode] ${full_command[@]}" >> "$output_log"
fi
exec "${full_command[@]}"
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 6661a80f27..d72e8bae92 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -22,28 +22,28 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-__all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree',
- 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp',
- 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file',
- 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink',
- 'set_executable', 'copy_mode', 'unset_executable_mode',
- 'remove_dead_links', 'remove_linked_tree', 'find_library_path',
- 'fix_darwin_install_name']
-
import os
import glob
-import sys
import re
import shutil
import stat
import errno
import getpass
from contextlib import contextmanager, closing
-from tempfile import NamedTemporaryFile
import subprocess
import llnl.util.tty as tty
-from spack.util.compression import ALLOWED_ARCHIVE_TYPES
+
+__all__ = ['set_install_permissions', 'install', 'install_tree',
+ 'traverse_tree',
+ 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp',
+ 'force_remove', 'join_path', 'ancestor', 'can_access',
+ 'filter_file',
+ 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink',
+ 'set_executable', 'copy_mode', 'unset_executable_mode',
+ 'remove_dead_links', 'remove_linked_tree', 'find_library_path',
+ 'fix_darwin_install_name', 'to_link_flags']
+
def filter_file(regex, repl, *filenames, **kwargs):
"""Like sed, but uses python regular expressions.
@@ -69,6 +69,7 @@ def filter_file(regex, repl, *filenames, **kwargs):
# Allow strings to use \1, \2, etc. for replacement, like sed
if not callable(repl):
unescaped = repl.replace(r'\\', '\\')
+
def replace_groups_with_groupid(m):
def groupid_to_group(x):
return m.group(int(x.group(1)))
@@ -157,9 +158,12 @@ def set_install_permissions(path):
def copy_mode(src, dest):
src_mode = os.stat(src).st_mode
dest_mode = os.stat(dest).st_mode
- if src_mode & stat.S_IXUSR: dest_mode |= stat.S_IXUSR
- if src_mode & stat.S_IXGRP: dest_mode |= stat.S_IXGRP
- if src_mode & stat.S_IXOTH: dest_mode |= stat.S_IXOTH
+ if src_mode & stat.S_IXUSR:
+ dest_mode |= stat.S_IXUSR
+ if src_mode & stat.S_IXGRP:
+ dest_mode |= stat.S_IXGRP
+ if src_mode & stat.S_IXOTH:
+ dest_mode |= stat.S_IXOTH
os.chmod(dest, dest_mode)
@@ -224,9 +228,10 @@ def force_remove(*paths):
for path in paths:
try:
os.remove(path)
- except OSError, e:
+ except OSError:
pass
+
@contextmanager
def working_dir(dirname, **kwargs):
if kwargs.get('create', False):
@@ -240,7 +245,7 @@ def working_dir(dirname, **kwargs):
def touch(path):
"""Creates an empty file at the specified path."""
- with open(path, 'a') as file:
+ with open(path, 'a'):
os.utime(path, None)
@@ -253,7 +258,7 @@ def touchp(path):
def force_symlink(src, dest):
try:
os.symlink(src, dest)
- except OSError as e:
+ except OSError:
os.remove(dest)
os.symlink(src, dest)
@@ -275,7 +280,7 @@ def ancestor(dir, n=1):
def can_access(file_name):
"""True if we have read/write access to the file."""
- return os.access(file_name, os.R_OK|os.W_OK)
+ return os.access(file_name, os.R_OK | os.W_OK)
def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
@@ -343,13 +348,14 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs):
# Treat as a directory
if os.path.isdir(source_child) and (
- follow_links or not os.path.islink(source_child)):
+ follow_links or not os.path.islink(source_child)):
# When follow_nonexisting isn't set, don't descend into dirs
# in source that do not exist in dest
if follow_nonexisting or os.path.exists(dest_child):
- tuples = traverse_tree(source_root, dest_root, rel_child, **kwargs)
- for t in tuples: yield t
+ tuples = traverse_tree(source_root, dest_root, rel_child, **kwargs) # NOQA: ignore=E501
+ for t in tuples:
+ yield t
# Treat as a file.
elif not ignore(os.path.join(rel_path, f)):
@@ -379,6 +385,7 @@ def remove_dead_links(root):
if not os.path.exists(real_path):
os.unlink(path)
+
def remove_linked_tree(path):
"""
Removes a directory and its contents. If the directory is a
@@ -402,28 +409,41 @@ def fix_darwin_install_name(path):
Fix install name of dynamic libraries on Darwin to have full path.
There are two parts of this task:
(i) use install_name('-id',...) to change install name of a single lib;
- (ii) use install_name('-change',...) to change the cross linking between libs.
- The function assumes that all libraries are in one folder and currently won't
- follow subfolders.
+ (ii) use install_name('-change',...) to change the cross linking between
+ libs. The function assumes that all libraries are in one folder and
+ currently won't follow subfolders.
Args:
path: directory in which .dylib files are alocated
"""
- libs = glob.glob(join_path(path,"*.dylib"))
+ libs = glob.glob(join_path(path, "*.dylib"))
for lib in libs:
# fix install name first:
- subprocess.Popen(["install_name_tool", "-id",lib,lib], stdout=subprocess.PIPE).communicate()[0]
- long_deps = subprocess.Popen(["otool", "-L",lib], stdout=subprocess.PIPE).communicate()[0].split('\n')
+ subprocess.Popen(["install_name_tool", "-id", lib, lib], stdout=subprocess.PIPE).communicate()[0] # NOQA: ignore=E501
+ long_deps = subprocess.Popen(["otool", "-L", lib], stdout=subprocess.PIPE).communicate()[0].split('\n') # NOQA: ignore=E501
deps = [dep.partition(' ')[0][1::] for dep in long_deps[2:-1]]
# fix all dependencies:
for dep in deps:
for loc in libs:
if dep == os.path.basename(loc):
- subprocess.Popen(["install_name_tool", "-change",dep,loc,lib], stdout=subprocess.PIPE).communicate()[0]
+ subprocess.Popen(["install_name_tool", "-change", dep, loc, lib], stdout=subprocess.PIPE).communicate()[0] # NOQA: ignore=E501
break
+def to_link_flags(library):
+ """Transforms a path to a <library> into linking flags -L<dir> -l<name>.
+
+ Return:
+ A string of linking flags.
+ """
+ dir = os.path.dirname(library)
+ # Asume libXYZ.suffix
+ name = os.path.basename(library)[3:].split(".")[0]
+ res = '-L%s -l%s' % (dir, name)
+ return res
+
+
def find_library_path(libname, *paths):
"""Searches for a file called <libname> in each path.
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 7c65091d49..3fcfb151b8 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -75,20 +75,19 @@ SPACK_NO_PARALLEL_MAKE = 'SPACK_NO_PARALLEL_MAKE'
# set_build_environment_variables and used to pass parameters to
# Spack's compiler wrappers.
#
-SPACK_ENV_PATH = 'SPACK_ENV_PATH'
-SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES'
-SPACK_PREFIX = 'SPACK_PREFIX'
-SPACK_INSTALL = 'SPACK_INSTALL'
-SPACK_DEBUG = 'SPACK_DEBUG'
-SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC'
-SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR'
+SPACK_ENV_PATH = 'SPACK_ENV_PATH'
+SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES'
+SPACK_PREFIX = 'SPACK_PREFIX'
+SPACK_INSTALL = 'SPACK_INSTALL'
+SPACK_DEBUG = 'SPACK_DEBUG'
+SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC'
+SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR'
# Platform-specific library suffix.
dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so'
-
class MakeExecutable(Executable):
"""Special callable executable object for make so the user can
specify parallel or not on a per-invocation basis. Using
@@ -99,6 +98,7 @@ class MakeExecutable(Executable):
Note that if the SPACK_NO_PARALLEL_MAKE env var is set it overrides
everything.
"""
+
def __init__(self, name, jobs):
super(MakeExecutable, self).__init__(name)
self.jobs = jobs
@@ -113,12 +113,13 @@ class MakeExecutable(Executable):
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
+ # Create an executable of the module command that will output python code
modulecmd = which('modulecmd')
modulecmd.add_default_arg('python')
@@ -129,11 +130,13 @@ def load_module(mod):
text = modulecmd('show', mod, output=str, error=str).split()
for i, word in enumerate(text):
if word == 'conflict':
- exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '<string>', 'exec'))
+ exec(compile(modulecmd('unload', text[
+ i + 1], output=str, error=str), '<string>', 'exec'))
# Load the module now that there are no conflicts
load = modulecmd('load', mod, output=str, error=str)
exec(compile(load, '<string>', 'exec'))
+
def get_path_from_module(mod):
"""Inspects a TCL module for entries that indicate the absolute path
at which the library supported by said module can be found.
@@ -146,7 +149,7 @@ def get_path_from_module(mod):
text = modulecmd('show', mod, output=str, error=str).split('\n')
# If it lists its package directory, return that
for line in text:
- if line.find(mod.upper()+'_DIR') >= 0:
+ if line.find(mod.upper() + '_DIR') >= 0:
words = line.split()
return words[2]
@@ -154,49 +157,52 @@ def get_path_from_module(mod):
for line in text:
rpath = line.find('-rpath/')
if rpath >= 0:
- return line[rpath+6:line.find('/lib')]
+ return line[rpath + 6:line.find('/lib')]
# If it lists a -L instruction, use that
for line in text:
L = line.find('-L/')
if L >= 0:
- return line[L+2:line.find('/lib')]
+ return line[L + 2:line.find('/lib')]
# If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that
for line in text:
- if line.find('LD_LIBRARY_PATH') >= 0:
+ if line.find('LD_LIBRARY_PATH') >= 0:
words = line.split()
path = words[2]
return path[:path.find('/lib')]
# Unable to find module path
return None
+
def set_compiler_environment_variables(pkg, env):
assert(pkg.spec.concrete)
compiler = pkg.compiler
flags = pkg.spec.compiler_flags
# Set compiler variables used by CMake and autotools
- assert all(key in compiler.link_paths for key in ('cc', 'cxx', 'f77', 'fc'))
+ assert all(key in compiler.link_paths for key in (
+ 'cc', 'cxx', 'f77', 'fc'))
# Populate an object with the list of environment modifications
# and return it
- # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc.
+ # TODO : add additional kwargs for better diagnostics, like requestor,
+ # ttyout, ttyerr, etc.
link_dir = spack.build_env_path
- env.set('CC', join_path(link_dir, compiler.link_paths['cc']))
- env.set('CXX', join_path(link_dir, compiler.link_paths['cxx']))
- env.set('F77', join_path(link_dir, compiler.link_paths['f77']))
- env.set('FC', join_path(link_dir, compiler.link_paths['fc']))
# Set SPACK compiler variables so that our wrapper knows what to call
if compiler.cc:
env.set('SPACK_CC', compiler.cc)
+ env.set('CC', join_path(link_dir, compiler.link_paths['cc']))
if compiler.cxx:
env.set('SPACK_CXX', compiler.cxx)
+ env.set('CXX', join_path(link_dir, compiler.link_paths['cxx']))
if compiler.f77:
env.set('SPACK_F77', compiler.f77)
+ env.set('F77', join_path(link_dir, compiler.link_paths['f77']))
if compiler.fc:
env.set('SPACK_FC', compiler.fc)
+ env.set('FC', join_path(link_dir, compiler.link_paths['fc']))
# Set SPACK compiler rpath flags so that our wrapper knows what to use
env.set('SPACK_CC_RPATH_ARG', compiler.cc_rpath_arg)
@@ -233,7 +239,8 @@ def set_build_environment_variables(pkg, env):
# handled by putting one in the <build_env_path>/case-insensitive
# directory. Add that to the path too.
env_paths = []
- for item in [spack.build_env_path, join_path(spack.build_env_path, pkg.compiler.name)]:
+ compiler_specific = join_path(spack.build_env_path, pkg.compiler.name)
+ for item in [spack.build_env_path, compiler_specific]:
env_paths.append(item)
ci = join_path(item, 'case-insensitive')
if os.path.isdir(ci):
@@ -246,7 +253,8 @@ def set_build_environment_variables(pkg, env):
# Prefixes of all of the package's dependencies go in SPACK_DEPENDENCIES
dep_prefixes = [d.prefix for d in pkg.spec.traverse(root=False)]
env.set_path(SPACK_DEPENDENCIES, dep_prefixes)
- env.set_path('CMAKE_PREFIX_PATH', dep_prefixes) # Add dependencies to CMAKE_PREFIX_PATH
+ # Add dependencies to CMAKE_PREFIX_PATH
+ env.set_path('CMAKE_PREFIX_PATH', dep_prefixes)
# Install prefix
env.set(SPACK_PREFIX, pkg.prefix)
@@ -262,7 +270,8 @@ def set_build_environment_variables(pkg, env):
env.unset('DYLD_LIBRARY_PATH')
# Add bin directories from dependencies to the PATH for the build.
- bin_dirs = reversed(filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes]))
+ bin_dirs = reversed(
+ filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes]))
for item in bin_dirs:
env.prepend_path('PATH', item)
@@ -277,8 +286,8 @@ def set_build_environment_variables(pkg, env):
for directory in ('lib', 'lib64', 'share'):
pcdir = join_path(pre, directory, 'pkgconfig')
if os.path.isdir(pcdir):
- #pkg_config_dirs.append(pcdir)
- env.prepend_path('PKG_CONFIG_PATH',pcdir)
+ # pkg_config_dirs.append(pcdir)
+ env.prepend_path('PKG_CONFIG_PATH', pcdir)
if pkg.spec.architecture.target.module_name:
load_module(pkg.spec.architecture.target.module_name)
@@ -301,7 +310,7 @@ def set_module_variables_for_package(pkg, module):
m.make_jobs = jobs
# TODO: make these build deps that can be installed if not found.
- m.make = MakeExecutable('make', jobs)
+ m.make = MakeExecutable('make', jobs)
m.gmake = MakeExecutable('gmake', jobs)
# easy shortcut to os.environ
@@ -325,33 +334,34 @@ def set_module_variables_for_package(pkg, module):
# Set up CMake rpath
m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE')
- m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg)))
+ m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' %
+ ":".join(get_rpaths(pkg)))
# Put spack compiler paths in module scope.
link_dir = spack.build_env_path
- m.spack_cc = join_path(link_dir, pkg.compiler.link_paths['cc'])
+ m.spack_cc = join_path(link_dir, pkg.compiler.link_paths['cc'])
m.spack_cxx = join_path(link_dir, pkg.compiler.link_paths['cxx'])
m.spack_f77 = join_path(link_dir, pkg.compiler.link_paths['f77'])
- m.spack_fc = join_path(link_dir, pkg.compiler.link_paths['fc'])
+ m.spack_fc = join_path(link_dir, pkg.compiler.link_paths['fc'])
# Emulate some shell commands for convenience
- m.pwd = os.getcwd
- m.cd = os.chdir
- m.mkdir = os.mkdir
- m.makedirs = os.makedirs
- m.remove = os.remove
- m.removedirs = os.removedirs
- m.symlink = os.symlink
-
- m.mkdirp = mkdirp
- m.install = install
+ m.pwd = os.getcwd
+ m.cd = os.chdir
+ m.mkdir = os.mkdir
+ m.makedirs = os.makedirs
+ m.remove = os.remove
+ m.removedirs = os.removedirs
+ m.symlink = os.symlink
+
+ m.mkdirp = mkdirp
+ m.install = install
m.install_tree = install_tree
- m.rmtree = shutil.rmtree
- m.move = shutil.move
+ m.rmtree = shutil.rmtree
+ m.move = shutil.move
# Useful directories within the prefix are encapsulated in
# a Prefix object.
- m.prefix = pkg.prefix
+ m.prefix = pkg.prefix
# Platform-specific library suffix.
m.dso_suffix = dso_suffix
@@ -365,20 +375,22 @@ def get_rpaths(pkg):
rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values()
if os.path.isdir(d.prefix.lib64))
# Second module is our compiler mod name. We use that to get rpaths from
- # module show output.
+ # module show output.
if pkg.compiler.modules and len(pkg.compiler.modules) > 1:
rpaths.append(get_path_from_module(pkg.compiler.modules[1]))
return rpaths
def parent_class_modules(cls):
- """Get list of super class modules that are all descend from spack.Package"""
+ """
+ Get list of super class modules that are all descend from spack.Package
+ """
if not issubclass(cls, spack.Package) or issubclass(spack.Package, cls):
return []
result = []
module = sys.modules.get(cls.__module__)
if module:
- result = [ module ]
+ result = [module]
for c in cls.__bases__:
result.extend(parent_class_modules(c))
return result
@@ -390,11 +402,12 @@ def load_external_modules(pkg):
for dep in list(pkg.spec.traverse()):
if dep.external_module:
load_module(dep.external_module)
-
+
+
def setup_package(pkg):
"""Execute all environment setup routines."""
spack_env = EnvironmentModifications()
- run_env = EnvironmentModifications()
+ run_env = EnvironmentModifications()
# Before proceeding, ensure that specs and packages are consistent
#
@@ -410,7 +423,8 @@ def setup_package(pkg):
# throwaway environment, but it is kind of dirty.
#
# TODO: Think about how to avoid this fix and do something cleaner.
- for s in pkg.spec.traverse(): s.package.spec = s
+ for s in pkg.spec.traverse():
+ s.package.spec = s
set_compiler_environment_variables(pkg, spack_env)
set_build_environment_variables(pkg, spack_env)
@@ -498,7 +512,9 @@ def fork(pkg, function):
# message. Just make the parent exit with an error code.
pid, returncode = os.waitpid(pid, 0)
if returncode != 0:
- raise InstallError("Installation process had nonzero exit code.".format(str(returncode)))
+ message = "Installation process had nonzero exit code : {code}"
+ strcode = str(returncode)
+ raise InstallError(message.format(code=strcode))
class InstallError(spack.error.SpackError):
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index 030aa77c30..c95045ef85 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -69,7 +69,7 @@ def setup_parser(subparser):
help="Configuration scope to read from.")
-def compiler_add(args):
+def compiler_find(args):
"""Search either $PATH or a list of paths OR MODULES for compilers and add them
to Spack's configuration."""
paths = args.add_paths
@@ -78,7 +78,6 @@ def compiler_add(args):
compilers = [c for c in spack.compilers.find_compilers(*args.add_paths)
if c.spec not in spack.compilers.all_compilers(scope=args.scope)]
-
if compilers:
spack.compilers.add_compilers_to_config(compilers, scope=args.scope)
n = len(compilers)
@@ -93,7 +92,6 @@ def compiler_add(args):
def compiler_remove(args):
cspec = CompilerSpec(args.compiler_spec)
compilers = spack.compilers.compilers_for_spec(cspec, scope=args.scope)
-
if not compilers:
tty.die("No compilers match spec %s" % cspec)
elif not args.all and len(compilers) > 1:
@@ -137,9 +135,10 @@ def compiler_list(args):
def compiler(parser, args):
- action = { 'add' : compiler_add,
- 'remove' : compiler_remove,
- 'rm' : compiler_remove,
- 'info' : compiler_info,
- 'list' : compiler_list }
+ action = {'add' : compiler_find,
+ 'find' : compiler_find,
+ 'remove' : compiler_remove,
+ 'rm' : compiler_remove,
+ 'info' : compiler_info,
+ 'list' : compiler_list }
action[args.compiler_command](args)
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index 4b546c2cbf..ae72b743b2 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -52,6 +52,7 @@ from spack.util.environment import get_path
_imported_compilers_module = 'spack.compilers'
_path_instance_vars = ['cc', 'cxx', 'f77', 'fc']
_other_instance_vars = ['modules', 'operating_system']
+_cache_config_file = []
# TODO: customize order in config file
if platform.system() == 'Darwin':
@@ -79,9 +80,7 @@ def _to_dict(compiler):
if compiler.alias:
d['alias'] = compiler.alias
- return {
- 'compiler': d
- }
+ return {'compiler': d}
def get_compiler_config(scope=None):
@@ -99,7 +98,6 @@ def get_compiler_config(scope=None):
# Update the configuration if there are currently no compilers
# configured. Avoid updating automatically if there ARE site
# compilers configured but no user ones.
-# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config:
if not config:
if scope is None:
# We know no compilers were configured in any scope.
@@ -112,8 +110,11 @@ def get_compiler_config(scope=None):
if not site_config:
init_compiler_config()
config = spack.config.get_config('compilers', scope=scope)
-
- return config
+ return config
+ elif config:
+ return config
+ else:
+ return [] # Return empty list which we will later append to.
def add_compilers_to_config(compilers, scope=None):
@@ -126,7 +127,8 @@ def add_compilers_to_config(compilers, scope=None):
compiler_config = get_compiler_config(scope)
for compiler in compilers:
compiler_config.append(_to_dict(compiler))
-
+ global _cache_config_file
+ _cache_config_file = compiler_config
spack.config.update_config('compilers', compiler_config, scope)
@@ -139,15 +141,17 @@ def remove_compiler_from_config(compiler_spec, scope=None):
- scope: configuration scope to modify.
"""
compiler_config = get_compiler_config(scope)
- matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec]
- if len(matches) == 1:
- del compiler_config[matches[0][0]]
- else:
+ config_length = len(compiler_config)
+
+ filtered_compiler_config = [comp for comp in compiler_config
+ if spack.spec.CompilerSpec(comp['compiler']['spec']) != compiler_spec]
+ # Need a better way for this
+ global _cache_config_file
+ _cache_config_file = filtered_compiler_config # Update the cache for changes
+ if len(filtered_compiler_config) == config_length: # No items removed
CompilerSpecInsufficientlySpecificError(compiler_spec)
+ spack.config.update_config('compilers', filtered_compiler_config, scope)
- spack.config.update_config('compilers', compiler_config, scope)
-
-_cache_config_file = {}
def all_compilers_config(scope=None):
"""Return a set of specs for all the compiler versions currently
@@ -155,14 +159,13 @@ def all_compilers_config(scope=None):
"""
# Get compilers for this architecture.
global _cache_config_file #Create a cache of the config file so we don't load all the time.
-
if not _cache_config_file:
_cache_config_file = get_compiler_config(scope)
return _cache_config_file
-
else:
return _cache_config_file
+
def all_compilers(scope=None):
# Return compiler specs from the merged config.
return [spack.spec.CompilerSpec(s['compiler']['spec'])
@@ -181,7 +184,7 @@ def default_compiler():
return sorted(versions)[-1]
-def find_compilers():
+def find_compilers(*paths):
"""Return a list of compilers found in the suppied paths.
This invokes the find_compilers() method for each operating
system associated with the host platform, and appends
@@ -190,11 +193,11 @@ def find_compilers():
# Find compilers for each operating system class
oss = all_os_classes()
compiler_lists = []
- for os in oss:
- compiler_lists.extend(os.find_compilers())
-
+ for o in oss:
+ compiler_lists.extend(o.find_compilers(*paths))
return compiler_lists
+
def supported_compilers():
"""Return a set of names of compilers supported by Spack.
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py
index 83d67ea225..cb0ad42b14 100644
--- a/lib/spack/spack/hooks/sbang.py
+++ b/lib/spack/spack/hooks/sbang.py
@@ -24,7 +24,6 @@
##############################################################################
import os
-from llnl.util.filesystem import *
import llnl.util.tty as tty
import spack
@@ -34,6 +33,7 @@ import spack.modules
# here, as it is the shortest I could find on a modern OS.
shebang_limit = 127
+
def shebang_too_long(path):
"""Detects whether a file has a shebang line that is too long."""
with open(path, 'r') as script:
@@ -57,16 +57,10 @@ def filter_shebang(path):
if original.startswith(new_sbang_line):
return
- backup = path + ".shebang.bak"
- os.rename(path, backup)
-
with open(path, 'w') as new_file:
new_file.write(new_sbang_line)
new_file.write(original)
- copy_mode(backup, path)
- unset_executable_mode(backup)
-
tty.warn("Patched overly long shebang in %s" % path)
diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py
index 97f142e746..fb91f24721 100644
--- a/lib/spack/spack/test/__init__.py
+++ b/lib/spack/spack/test/__init__.py
@@ -40,7 +40,7 @@ test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', 'pack
'cc', 'link_tree', 'spec_yaml', 'optional_deps',
'make_executable', 'configure_guess', 'lock', 'database',
'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find',
- 'cmd.uninstall', 'cmd.test_install']
+ 'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd']
def list_tests():
diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py
new file mode 100644
index 0000000000..d89814154b
--- /dev/null
+++ b/lib/spack/spack/test/cmd/test_compiler_cmd.py
@@ -0,0 +1,81 @@
+import os
+import shutil
+from tempfile import mkdtemp
+
+from llnl.util.filesystem import set_executable, mkdirp
+
+import spack.spec
+import spack.cmd.compiler
+import spack.compilers
+from spack.version import Version
+from spack.test.mock_packages_test import *
+
+test_version = '4.5-spacktest'
+
+class MockArgs(object):
+ def __init__(self, add_paths=[], scope=None, compiler_spec=None, all=None):
+ self.add_paths = add_paths
+ self.scope = scope
+ self.compiler_spec = compiler_spec
+ self.all = all
+
+
+def make_mock_compiler():
+ """Make a directory containing a fake, but detectable compiler."""
+ mock_compiler_dir = mkdtemp()
+ bin_dir = os.path.join(mock_compiler_dir, 'bin')
+ mkdirp(bin_dir)
+
+ gcc_path = os.path.join(bin_dir, 'gcc')
+ gxx_path = os.path.join(bin_dir, 'g++')
+ gfortran_path = os.path.join(bin_dir, 'gfortran')
+
+ with open(gcc_path, 'w') as f:
+ f.write("""\
+#!/bin/sh
+
+for arg in "$@"; do
+ if [ "$arg" = -dumpversion ]; then
+ echo '%s'
+ fi
+done
+""" % test_version)
+
+ # Create some mock compilers in the temporary directory
+ set_executable(gcc_path)
+ shutil.copy(gcc_path, gxx_path)
+ shutil.copy(gcc_path, gfortran_path)
+
+ return mock_compiler_dir
+
+
+class CompilerCmdTest(MockPackagesTest):
+ """ Test compiler commands for add and remove """
+
+
+ def test_compiler_remove(self):
+ args = MockArgs(all=True, compiler_spec='gcc@4.5.0')
+ spack.cmd.compiler.compiler_remove(args)
+ compilers = spack.compilers.all_compilers()
+ self.assertTrue(spack.spec.CompilerSpec("gcc@4.5.0") not in compilers)
+
+
+ def test_compiler_add(self):
+ # compilers available by default.
+ old_compilers = set(spack.compilers.all_compilers())
+
+ # add our new compiler and find again.
+ compiler_dir = make_mock_compiler()
+
+ try:
+ args = MockArgs(add_paths=[compiler_dir])
+ spack.cmd.compiler.compiler_find(args)
+
+ # ensure new compiler is in there
+ new_compilers = set(spack.compilers.all_compilers())
+ new_compiler = new_compilers - old_compilers
+ self.assertTrue(new_compiler)
+ self.assertTrue(new_compiler.pop().version == Version(test_version))
+
+ finally:
+ shutil.rmtree(compiler_dir, ignore_errors=True)
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8
index 44eb0167fb..57534eb6e2 100755
--- a/share/spack/qa/run-flake8
+++ b/share/spack/qa/run-flake8
@@ -29,6 +29,8 @@ for file in $changed; do
perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
+ perl -i -pe 's/^(\s*depends_on\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
+ perl -i -pe 's/^(\s*extends\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
# Exempt '@when' decorated functions from redefinition errors.
perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index 0177fe1a2b..001dde5329 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -22,30 +22,25 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import functools
-import glob
-import inspect
import os
-import re
-from contextlib import closing
-import spack
-from llnl.util.lang import match_predicate
from spack import *
from spack.util.environment import *
class R(Package):
- """
- R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a
- wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series
- analysis, classification, clustering, etc. Please consult the R project homepage for further information.
- """
+ """R is 'GNU S', a freely available language and environment for
+ statistical computing and graphics which provides a wide variety of
+ statistical and graphical techniques: linear and nonlinear modelling,
+ statistical tests, time series analysis, classification, clustering, etc.
+ Please consult the R project homepage for further information."""
+
homepage = "https://www.r-project.org"
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
-
+
extendable = True
+ version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3')
@@ -53,7 +48,8 @@ class R(Package):
version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4')
version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74')
- variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK')
+ variant('external-lapack', default=False,
+ description='Links to externally installed BLAS/LAPACK')
# Virtual dependencies
depends_on('blas', when='+external-lapack')
@@ -65,6 +61,7 @@ class R(Package):
depends_on('icu')
depends_on('glib')
depends_on('zlib')
+ depends_on('bzip2')
depends_on('libtiff')
depends_on('jpeg')
depends_on('cairo')
@@ -72,18 +69,21 @@ class R(Package):
depends_on('freetype')
depends_on('tcl')
depends_on('tk')
+ depends_on('curl')
+ depends_on('pcre')
+ depends_on('jdk')
def install(self, spec, prefix):
rlibdir = join_path(prefix, 'rlib')
- options = ['--prefix=%s' % prefix,
- '--libdir=%s' % rlibdir,
- '--enable-R-shlib',
- '--enable-BLAS-shlib',
- '--enable-R-framework=no']
+ configure_args = ['--prefix=%s' % prefix,
+ '--libdir=%s' % rlibdir,
+ '--enable-R-shlib',
+ '--enable-BLAS-shlib',
+ '--enable-R-framework=no']
if '+external-lapack' in spec:
- options.extend(['--with-blas', '--with-lapack'])
+ configure_args.extend(['--with-blas', '--with-lapack'])
- configure(*options)
+ configure(*configure_args)
make()
make('install')
@@ -106,25 +106,24 @@ class R(Package):
r_libs_path = ':'.join(r_libs_path)
spack_env.set('R_LIBS', r_libs_path)
- # For run time environment set only the path for extension_spec and prepend it to R_LIBS
+ # For run time environment set only the path for extension_spec and
+ # prepend it to R_LIBS
if extension_spec.package.extends(self.spec):
- run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir))
-
+ run_env.prepend_path('R_LIBS', os.path.join(
+ extension_spec.prefix, self.r_lib_dir))
def setup_dependent_package(self, module, ext_spec):
- """
- Called before R modules' install() methods.
-
- In most cases, extensions will only need to have one line::
-
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
- """
+ """Called before R modules' install() methods. In most cases,
+ extensions will only need to have one line:
+ R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' %
+ self.stage.source_path)"""
# R extension builds can have a global R executable function
module.R = Executable(join_path(self.spec.prefix.bin, 'R'))
# Add variable for library directry
module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir)
- # Make the site packages directory for extensions, if it does not exist already.
+ # Make the site packages directory for extensions, if it does not exist
+ # already.
if ext_spec.package.is_extension:
mkdirp(module.r_lib_dir)
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
new file mode 100644
index 0000000000..b3e5994e30
--- /dev/null
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Armadillo(Package):
+ """Armadillo is a high quality linear algebra library (matrix maths)
+ for the C++ language, aiming towards a good balance between speed and
+ ease of use."""
+
+ homepage = "http://arma.sourceforge.net/"
+ url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz"
+
+ version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e')
+
+ variant('hdf5', default=False, description='Include HDF5 support')
+
+ depends_on('arpack')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('superlu@5.2:')
+ depends_on('hdf5', when='+hdf5')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ # ARPACK support
+ '-DARPACK_LIBRARY={0}/libarpack.a'.format(
+ spec['arpack'].prefix.lib),
+ # BLAS support
+ '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib),
+ # LAPACK support
+ '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib),
+ # SuperLU support
+ '-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include),
+ '-DSuperLU_LIBRARY={0}/libsuperlu.a'.format(
+ spec['superlu'].prefix.lib64),
+ # HDF5 support
+ '-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
+ ]
+
+ cmake_args.extend(std_cmake_args)
+ cmake('.', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py
index 75158776fe..91b5f06a4a 100644
--- a/var/spack/repos/builtin/packages/arpack/package.py
+++ b/var/spack/repos/builtin/packages/arpack/package.py
@@ -24,12 +24,12 @@
##############################################################################
from spack import *
import os
-import shutil
+
class Arpack(Package):
"""A collection of Fortran77 subroutines designed to solve large scale
- eigenvalue problems.
- """
+ eigenvalue problems."""
+
homepage = "http://www.caam.rice.edu/software/ARPACK/"
url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz"
@@ -39,27 +39,35 @@ class Arpack(Package):
depends_on('lapack')
def patch(self):
- # Filter the cray makefile to make a spack one.
- shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc')
makefile = FileFilter('ARmake.inc')
- # Be sure to use Spack F77 wrapper
- makefile.filter('^FC.*', 'FC = f77')
- makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
+ # Section 1: Paths and Libraries
+
+ # Change the build directory
+ makefile.filter('^home.*', 'home = %s' % os.getcwd())
+
+ # Use external BLAS/LAPACK
+ makefile.filter('^BLASdir.*',
+ 'BLASdir = %s' % self.spec['blas'].prefix)
+ makefile.filter('^LAPACKdir.*',
+ 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+
+ # Do not include the platform in the library name
+ makefile.filter('^PLAT.*', 'PLAT = ')
+ makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = $(home)/libarpack.a')
- # Set up some variables.
- makefile.filter('^PLAT.*', 'PLAT = ')
- makefile.filter('^home.*', 'home = %s' % os.getcwd())
- makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
- makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
+ # Section 2: Compilers
- # build the library in our own prefix.
- makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd())
+ # Be sure to use the Spack compiler wrapper
+ makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77']))
+ makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC')
+ if not which('ranlib'):
+ makefile.filter('^RANLIB.*', 'RANLIB = touch')
def install(self, spec, prefix):
with working_dir('SRC'):
make('all')
- mkdirp(prefix.lib)
+ mkdir(prefix.lib)
install('libarpack.a', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index cde76c590a..67294fb9a1 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -25,7 +25,6 @@
from spack import *
import spack
import sys
-
import os
@@ -91,6 +90,7 @@ class Boost(Package):
'system',
'test',
'thread',
+ 'timer',
'wave'])
# mpi/python are not installed by default because they pull in many
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 54b6426d36..23ec74abed 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -80,8 +80,8 @@ class Dealii(Package):
depends_on("netcdf-cxx", when='+netcdf+mpi')
depends_on("oce", when='+oce')
depends_on("p4est", when='+p4est+mpi')
- depends_on("petsc+mpi", when='+petsc+mpi')
- depends_on("slepc", when='+slepc+petsc+mpi')
+ depends_on("petsc@:3.6.4+mpi", when='+petsc+mpi') # FIXME: update after 3.7 is supported upstream. # NOQA: ignore=E501
+ depends_on("slepc@:3.6.3", when='+slepc+petsc+mpi')
depends_on("trilinos", when='+trilinos+mpi')
# developer dependnecies
@@ -108,12 +108,11 @@ class Dealii(Package):
# of Spack's. Be more specific to avoid this.
# Note that both lapack and blas are provided in -DLAPACK_XYZ.
'-DLAPACK_FOUND=true',
- '-DLAPACK_INCLUDE_DIRS=%s;%s' %
- (spec['lapack'].prefix.include,
- spec['blas'].prefix.include),
- '-DLAPACK_LIBRARIES=%s;%s' %
- (spec['lapack'].lapack_shared_lib,
- spec['blas'].blas_shared_lib),
+ '-DLAPACK_INCLUDE_DIRS=%s;%s' % (
+ spec['lapack'].prefix.include, spec['blas'].prefix.include),
+ '-DLAPACK_LIBRARIES=%s;%s' % (
+ spec['lapack'].lapack_shared_lib,
+ spec['blas'].blas_shared_lib),
'-DMUPARSER_DIR=%s' % spec['muparser'].prefix,
'-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix,
'-DTBB_DIR=%s' % spec['tbb'].prefix,
@@ -168,14 +167,14 @@ class Dealii(Package):
if '+netcdf' in spec:
options.extend([
'-DNETCDF_FOUND=true',
- '-DNETCDF_LIBRARIES=%s;%s' %
- (join_path(spec['netcdf-cxx'].prefix.lib,
- 'libnetcdf_c++.%s' % dsuf),
- join_path(spec['netcdf'].prefix.lib,
- 'libnetcdf.%s' % dsuf)),
- '-DNETCDF_INCLUDE_DIRS=%s;%s' %
- (spec['netcdf-cxx'].prefix.include,
- spec['netcdf'].prefix.include),
+ '-DNETCDF_LIBRARIES=%s;%s' % (
+ join_path(spec['netcdf-cxx'].prefix.lib,
+ 'libnetcdf_c++.%s' % dsuf),
+ join_path(spec['netcdf'].prefix.lib,
+ 'libnetcdf.%s' % dsuf)),
+ '-DNETCDF_INCLUDE_DIRS=%s;%s' % (
+ spec['netcdf-cxx'].prefix.include,
+ spec['netcdf'].prefix.include),
])
else:
options.extend([
@@ -266,9 +265,9 @@ class Dealii(Package):
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
(''), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
+ filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501
(''), 'step-40.cc')
- filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
+ filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', # NOQA: ignore=E501
(''), 'step-40.cc')
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py
new file mode 100644
index 0000000000..15ddfcee16
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ferret/package.py
@@ -0,0 +1,103 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+import os
+
+
+class Ferret(Package):
+ """Ferret is an interactive computer visualization and analysis environment
+ designed to meet the needs of oceanographers and meteorologists
+ analyzing large and complex gridded data sets."""
+ homepage = "http://ferret.noaa.gov/Ferret/"
+ url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz"
+
+ version('6.96', '51722027c864369f41bab5751dfff8cc',
+ url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz")
+
+ depends_on("hdf5~mpi~fortran")
+ depends_on("netcdf~mpi")
+ depends_on("netcdf-fortran")
+ depends_on("readline")
+ depends_on("zlib")
+
+ def patch(self):
+ hdf5_prefix = self.spec['hdf5'].prefix
+ netcdff_prefix = self.spec['netcdf-fortran'].prefix
+ readline_prefix = self.spec['readline'].prefix
+ libz_prefix = self.spec['zlib'].prefix
+
+ filter_file(r'^BUILDTYPE.+',
+ 'BUILDTYPE = x86_64-linux',
+ 'FERRET/site_specific.mk')
+ filter_file(r'^INSTALL_FER_DIR.+',
+ 'INSTALL_FER_DIR = %s' % self.spec.prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^HDF5_DIR.+',
+ 'HDF5_DIR = %s' % hdf5_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^NETCDF4_DIR.+',
+ 'NETCDF4_DIR = %s' % netcdff_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^READLINE_DIR.+',
+ 'READLINE_DIR = %s' % readline_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^LIBZ_DIR.+',
+ 'LIBZ_DIR = %s' % libz_prefix,
+ 'FERRET/site_specific.mk')
+ filter_file(r'^JAVA_HOME.+',
+ ' ',
+ 'FERRET/site_specific.mk')
+ filter_file(r'-lm',
+ '-lgfortran -lm',
+ 'FERRET/platform_specific.mk.x86_64-linux')
+
+ def install(self, spec, prefix):
+ hdf5_prefix = spec['hdf5'].prefix
+ netcdff_prefix = spec['netcdf-fortran'].prefix
+ netcdf_prefix = spec['netcdf'].prefix
+ libz_prefix = spec['zlib'].prefix
+ ln = which('ln')
+ ln('-sf',
+ hdf5_prefix + '/lib',
+ hdf5_prefix + '/lib64')
+ ln('-sf',
+ netcdff_prefix + '/lib',
+ netcdff_prefix + '/lib64')
+ ln('-sf',
+ netcdf_prefix + '/lib/libnetcdf.a',
+ netcdff_prefix + '/lib/libnetcdf.a')
+ ln('-sf',
+ netcdf_prefix + '/lib/libnetcdf.la',
+ netcdff_prefix + '/lib/libnetcdf.la')
+ ln('-sf',
+ libz_prefix + '/lib',
+ libz_prefix + '/lib64')
+ os.environ['LDFLAGS'] = '-lquadmath'
+ with working_dir('FERRET', create=False):
+ os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11'
+ os.environ['HOSTTYPE'] = 'x86_64-linux'
+ make(parallel=False)
+ make("install")
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 164d9db541..ea1844aea0 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -23,15 +23,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Mpich(Package):
"""MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard."""
homepage = "http://www.mpich.org"
- url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
- list_url = "http://www.mpich.org/static/downloads/"
+ url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
+ list_url = "http://www.mpich.org/static/downloads/"
list_depth = 2
version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a')
@@ -42,7 +41,8 @@ class Mpich(Package):
version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
- variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+ variant('verbs', default=False,
+ description='Build support for OpenFabrics verbs.')
variant('pmi', default=True, description='Build with PMI support')
variant('hydra', default=True, description='Build the hydra process manager')
@@ -57,9 +57,9 @@ class Mpich(Package):
spack_env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
- self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
+ self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
- self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
+ self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
def install(self, spec, prefix):
@@ -92,7 +92,6 @@ class Mpich(Package):
self.filter_compilers()
-
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
compilers that Spack built the package with.
@@ -102,18 +101,20 @@ class Mpich(Package):
be bound to whatever compiler they were built with.
"""
bin = self.prefix.bin
- mpicc = os.path.join(bin, 'mpicc')
- mpicxx = os.path.join(bin, 'mpicxx')
- mpif77 = os.path.join(bin, 'mpif77')
- mpif90 = os.path.join(bin, 'mpif90')
-
- spack_cc = os.environ['CC']
- spack_cxx = os.environ['CXX']
- spack_f77 = os.environ['F77']
- spack_fc = os.environ['FC']
-
- kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
- filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
- filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
- filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
- filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+ mpicc = join_path(bin, 'mpicc')
+ mpicxx = join_path(bin, 'mpicxx')
+ mpif77 = join_path(bin, 'mpif77')
+ mpif90 = join_path(bin, 'mpif90')
+
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
+ filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/mumps/mumps-shared.patch b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch
new file mode 100644
index 0000000000..592f48037c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch
@@ -0,0 +1,119 @@
+diff -Naur MUMPS_5.0.1/libseq/Makefile MUMPS_5.0.1.new/libseq/Makefile
+--- MUMPS_5.0.1/libseq/Makefile 2015-07-23 19:08:32.000000000 +0200
++++ MUMPS_5.0.1.new/libseq/Makefile 2016-06-07 10:41:16.585179151 +0200
+@@ -8,11 +8,15 @@
+
+ include ../Makefile.inc
+
+-libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
++libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT)$(SHLIBEXT)
+
+ libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
+ $(AR)$@ mpi.o mpic.o elapse.o
+ $(RANLIB) $@
++
++libmpiseq$(PLAT)$(SHLIBEXT): mpi.o mpic.o elapse.o
++ $(FC) $(LDFLAGS) $^ -o libmpiseq$(PLAT)$(SHLIBEXT)
++
+ .f.o:
+ $(FC) $(OPTF) -c $*.f $(OUTF)$*.o
+ .c.o:
+diff -Naur MUMPS_5.0.1/Makefile MUMPS_5.0.1.new/Makefile
+--- MUMPS_5.0.1/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/Makefile 2016-06-07 10:50:21.863281217 +0200
+@@ -51,7 +51,7 @@
+ dexamples: d
+ (cd examples ; $(MAKE) d)
+
+-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
++requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT)$(SHLIBEXT)
+
+ # dummy MPI library (sequential version)
+
+@@ -62,16 +62,25 @@
+ $(libdir)/libpord$(PLAT)$(LIBEXT):
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cd $(LPORDDIR); \
+- $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT); \
+ fi;
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
+ fi;
+
++$(libdir)/libpord$(PLAT)$(SHLIBEXT):
++ if [ "$(LPORDDIR)" != "" ] ; then \
++ cd $(LPORDDIR); \
++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT) libpord$(PLAT)$(SHLIBEXT); \
++ fi;
++ if [ "$(LPORDDIR)" != "" ] ; then \
++ cp $(LPORDDIR)/libpord$(PLAT)$(SHLIBEXT) $@; \
++ fi;
++
+ clean:
+ (cd src; $(MAKE) clean)
+ (cd examples; $(MAKE) clean)
+- (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
++ (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT) *$(PLAT)$(SHLIBEXT))
+ (cd libseq; $(MAKE) clean)
+ if [ "$(LPORDDIR)" != "" ] ; then \
+ cd $(LPORDDIR); $(MAKE) realclean; \
+diff -Naur MUMPS_5.0.1/PORD/lib/Makefile MUMPS_5.0.1.new/PORD/lib/Makefile
+--- MUMPS_5.0.1/PORD/lib/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/PORD/lib/Makefile 2016-06-07 10:49:48.889000958 +0200
+@@ -13,7 +13,7 @@
+
+ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
+ multisector.o gelim.o bucket.o tree.o \
+- symbfac.o interface.o sort.o minpriority.o
++ symbfac.o interface.o sort.o minpriority.o
+
+ # Note: numfac.c read.c mapping.c triangular.c matrix.c kernel.c
+ # were not direcly used by MUMPS and have been removed from the
+@@ -24,12 +24,15 @@
+ .c.o:
+ $(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
+
+-libpord$(LIBEXT):$(OBJS)
++libpord$(PLAT)$(LIBEXT):$(OBJS)
+ $(AR)$@ $(OBJS)
+ $(RANLIB) $@
+
++libpord$(PLAT)$(SHLIBEXT): $(OBJS)
++ $(CC) $(LDFLAGS) $(OBJS) -o libpord$(PLAT)$(SHLIBEXT)
++
+ clean:
+ rm -f *.o
+
+ realclean:
+- rm -f *.o libpord.a
++ rm -f *.o libpord$(PLAT)$(SHLIBEXT) libpord$(PLAT)$(LIBEXT)
+diff -Naur MUMPS_5.0.1/src/Makefile MUMPS_5.0.1.new/src/Makefile
+--- MUMPS_5.0.1/src/Makefile 2015-07-23 19:08:29.000000000 +0200
++++ MUMPS_5.0.1.new/src/Makefile 2016-06-07 10:40:52.534703722 +0200
+@@ -24,7 +24,10 @@
+ include $(topdir)/Makefile.inc
+
+ mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
+- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
++ $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT) \
++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
++
+
+ OBJS_COMMON_MOD = \
+ ana_omp_m.o\
+@@ -162,6 +165,13 @@
+ $(AR)$@ $?
+ $(RANLIB) $@
+
++$(libdir)/libmumps_common$(PLAT)$(SHLIBEXT): $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
++ $(FC) $(LDFLAGS) $^ -L$(libdir) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT)
++
++
++$(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT): $(OBJS_MOD) $(OBJS_OTHER)
++ $(FC) $(LDFLAGS) $^ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
++
+ # Dependencies between modules:
+ $(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \
+ $(ARITH)mumps_struc_def.o \
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index 92c45c9b95..8a90ef72d0 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -23,7 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os, sys, glob
+import os
+import sys
+import subprocess
+
class Mumps(Package):
"""MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
@@ -44,7 +47,6 @@ class Mumps(Package):
variant('idx64', default=False, description='Use int64_t/integer*8 as default index type')
variant('shared', default=True, description='Build shared libraries')
-
depends_on('scotch + esmumps', when='~ptscotch+scotch')
depends_on('scotch + esmumps + mpi', when='+ptscotch')
depends_on('metis@5:', when='+metis')
@@ -54,49 +56,64 @@ class Mumps(Package):
depends_on('scalapack', when='+mpi')
depends_on('mpi', when='+mpi')
+ patch('mumps-shared.patch', when='+shared')
+
# this function is not a patch function because in case scalapack
# is needed it uses self.spec['scalapack'].fc_link set by the
# setup_dependent_environment in scalapck. This happen after patch
# end before install
# def patch(self):
def write_makefile_inc(self):
- if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec:
- raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi')
+ if (('+parmetis' in self.spec or
+ '+ptscotch' in self.spec)) and '+mpi' not in self.spec:
+ raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') # NOQA: E501
- makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib]
+ makefile_conf = [
+ "LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib
+ ]
orderings = ['-Dpord']
if '+ptscotch' in self.spec or '+scotch' in self.spec:
join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '')
- makefile_conf.extend(
- ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
- "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
- join_lib,
- join_lib.join(['esmumps', 'scotch', 'scotcherr']))])
+ makefile_conf.extend([
+ "ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
+ "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
+ join_lib,
+ join_lib.join(['esmumps',
+ 'scotch',
+ 'scotcherr']))
+ ])
orderings.append('-Dscotch')
if '+ptscotch' in self.spec:
orderings.append('-Dptscotch')
if '+parmetis' in self.spec and '+metis' in self.spec:
- libname = 'parmetis' if '+parmetis' in self.spec else 'metis'
- makefile_conf.extend(
- ["IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
- "LMETIS = -L%s -l%s -L%s -l%s" % (self.spec['parmetis'].prefix.lib, 'parmetis',self.spec['metis'].prefix.lib, 'metis')])
+ makefile_conf.extend([
+ "IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
+ "LMETIS = -L%s -l%s -L%s -l%s" % (
+ self.spec['parmetis'].prefix.lib, 'parmetis',
+ self.spec['metis'].prefix.lib, 'metis')
+ ])
orderings.append('-Dparmetis')
elif '+metis' in self.spec:
- makefile_conf.extend(
- ["IMETIS = -I%s" % self.spec['metis'].prefix.include,
- "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, 'metis')])
+ makefile_conf.extend([
+ "IMETIS = -I%s" % self.spec['metis'].prefix.include,
+ "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib,
+ 'metis')
+ ])
orderings.append('-Dmetis')
makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
- # when building shared libs need -fPIC, otherwise
- # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
+ # when building shared libs need -fPIC, otherwise /usr/bin/ld:
+ # graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can
+ # not be used when making a shared object; recompile with
+ # -fPIC
fpic = '-fPIC' if '+shared' in self.spec else ''
+
# TODO: test this part, it needs a full blas, scalapack and
# partitionning environment with 64bit integers
if '+idx64' in self.spec:
@@ -104,7 +121,7 @@ class Mumps(Package):
# the fortran compilation flags most probably are
# working only for intel and gnu compilers this is
# perhaps something the compiler should provide
- ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'),
+ ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic, '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), # NOQA: E501
'OPTL = %s -O ' % fpic,
'OPTC = %s -O -DINTSIZE64' % fpic])
else:
@@ -113,49 +130,47 @@ class Mumps(Package):
'OPTL = %s -O ' % fpic,
'OPTC = %s -O ' % fpic])
-
if '+mpi' in self.spec:
makefile_conf.extend(
- ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'),
- "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
- "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ ["CC = %s" % self.spec['mpi'].mpicc,
+ "FC = %s" % self.spec['mpi'].mpifc,
"SCALAP = %s" % self.spec['scalapack'].fc_link,
"MUMPS_TYPE = par"])
else:
makefile_conf.extend(
["CC = cc",
"FC = fc",
- "FL = fc",
"MUMPS_TYPE = seq"])
# TODO: change the value to the correct one according to the
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
- makefile_conf.append("CDEFS = -DAdd_")
+ makefile_conf.extend([
+ 'CDEFS = -DAdd_',
+ 'FL = $(FC)',
+ ])
if '+shared' in self.spec:
+ makefile_conf.append('SHLIBEXT = .%s' % dso_suffix)
if sys.platform == 'darwin':
- # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew)
- makefile_conf.extend([
- 'LIBEXT=.dylib',
- 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib),
- 'RANLIB=echo'
- ])
+ makefile_conf.append(
+ 'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) # NOQA: E501
+ )
else:
- makefile_conf.extend([
- 'LIBEXT=.so',
- 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib,
- 'RANLIB=echo'
- ])
- else:
- makefile_conf.extend([
- 'LIBEXT = .a',
- 'AR = ar vr',
- 'RANLIB = ranlib'
- ])
-
-
- makefile_inc_template = join_path(os.path.dirname(self.module.__file__),
- 'Makefile.inc')
+ makefile_conf.append(
+ 'LDFLAGS = -shared {0}{1}'.format(
+ self.compiler.fc_rpath_arg,
+ prefix.lib)
+ )
+
+ makefile_conf.extend([
+ 'LIBEXT = .a',
+ 'AR = ar vr ',
+ 'RANLIB = ranlib'
+ ])
+
+ makefile_inc_template = \
+ join_path(os.path.dirname(self.module.__file__),
+ 'Makefile.inc')
with open(makefile_inc_template, "r") as fh:
makefile_conf.extend(fh.read().split('\n'))
@@ -164,46 +179,53 @@ class Mumps(Package):
makefile_inc = '\n'.join(makefile_conf)
fh.write(makefile_inc)
-
-
def install(self, spec, prefix):
make_libs = []
# the choice to compile ?examples is to have kind of a sanity
# check on the libraries generated.
if '+float' in spec:
- make_libs.append('sexamples')
+ make_libs.append('s')
if '+complex' in spec:
- make_libs.append('cexamples')
+ make_libs.append('c')
if '+double' in spec:
- make_libs.append('dexamples')
+ make_libs.append('d')
if '+complex' in spec:
- make_libs.append('zexamples')
+ make_libs.append('z')
self.write_makefile_inc()
- # Build fails in parallel
- make(*make_libs, parallel=False)
+ make('mumps_lib', parallel=False)
+ make(*make_libs)
install_tree('lib', prefix.lib)
install_tree('include', prefix.include)
- if '~mpi' in spec:
- lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
- lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
- install('libseq/libmpiseq%s' % lib_suffix, prefix.lib)
- for f in glob.glob(join_path('libseq','*.h')):
- install(f, prefix.include)
-
- # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI
- # FIXME: use something like numdiff to compare blessed output with the current
- with working_dir('examples'):
- if '+float' in spec:
- os.system('./ssimpletest < input_simpletest_real')
- if '+complex' in spec:
- os.system('./csimpletest < input_simpletest_real')
- if '+double' in spec:
- os.system('./dsimpletest < input_simpletest_real')
- if '+complex' in spec:
- os.system('./zsimpletest < input_simpletest_cmplx')
+ if '~mpi' in spec:
+ install('libseq/libmpiseq.a', prefix.lib)
+ if '+shared' in spec:
+ install('libseq/libmpiseq.{0}'.format(dso_suffix), prefix.lib)
+ install('libseq/mpi.h', prefix.include)
+ install('libseq/mpif.h', prefix.include)
+
+ # FIXME: extend the tests to mpirun -np 2 (or alike) when
+ # build with MPI
+ # FIXME: use something like numdiff to compare blessed output
+ # with the current
+ # TODO: test the installed mumps and not the one in stage
+ if '~mpi' in spec:
+ for t in make_libs:
+ make('{0}examples'.format(t))
+
+ with working_dir('examples'):
+ for t in make_libs:
+ input_file = 'input_simpletest_{0}'.format(
+ 'real' if t in ['s', 'd'] else 'cmplx')
+ with open(input_file) as input:
+ test = './{0}simpletest'.format(t)
+ ret = subprocess.call(test,
+ stdin=input)
+ if ret is not 0:
+ raise RuntimeError(
+ 'The test {0} did not pass'.format(test))
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index d1944023d1..34bace10d6 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Mvapich2(Package):
@@ -245,27 +244,20 @@ class Mvapich2(Package):
be bound to whatever compiler they were built with.
"""
bin = self.prefix.bin
- mpicc = os.path.join(bin, 'mpicc')
- mpicxx = os.path.join(bin, 'mpicxx')
- mpif77 = os.path.join(bin, 'mpif77')
- mpif90 = os.path.join(bin, 'mpif90')
-
- spack_cc = os.environ['CC']
- spack_cxx = os.environ['CXX']
- spack_f77 = os.environ['F77']
- spack_fc = os.environ['FC']
-
- kwargs = {
- 'ignore_absent': True,
- 'backup': False,
- 'string': True
- }
-
- filter_file('CC="%s"' % spack_cc,
- 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
- filter_file('CXX="%s"' % spack_cxx,
- 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
- filter_file('F77="%s"' % spack_f77,
- 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
- filter_file('FC="%s"' % spack_fc,
- 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
+ mpicc = join_path(bin, 'mpicc')
+ mpicxx = join_path(bin, 'mpicxx')
+ mpif77 = join_path(bin, 'mpif77')
+ mpif90 = join_path(bin, 'mpif90')
+
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+ filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
+ filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 22e49daaa7..d09ebd6739 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -48,6 +48,13 @@ class Openblas(Package):
patch('make.patch')
def install(self, spec, prefix):
+ # As of 06/2016 there is no mechanism to specify that packages which
+ # depends on Blas/Lapack need C or/and Fortran symbols. For now
+ # require both.
+ if self.compiler.f77 is None:
+ raise InstallError('OpenBLAS requires both C and Fortran ',
+ 'compilers!')
+
# Configure fails to pick up fortran from FC=/abs/path/to/f77, but
# works fine with FC=/abs/path/to/gfortran.
# When mixing compilers make sure that
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 0638628a6c..588d862d96 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -24,6 +24,8 @@
##############################################################################
import os
+import llnl.util.tty as tty
+
from spack import *
@@ -61,6 +63,7 @@ class Openmpi(Package):
list_url = "http://www.open-mpi.org/software/ompi/"
list_depth = 3
+ version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
@@ -72,20 +75,27 @@ class Openmpi(Package):
patch('configure.patch', when="@1.10.0:1.10.1")
variant('psm', default=False, description='Build support for the PSM library.')
- variant('psm2', default=False, description='Build support for the Intel PSM2 library.')
- variant('pmi', default=False, description='Build support for PMI-based launchers')
- variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.')
+ variant('psm2', default=False,
+ description='Build support for the Intel PSM2 library.')
+ variant('pmi', default=False,
+ description='Build support for PMI-based launchers')
+ variant('verbs', default=_verbs_dir() is not None,
+ description='Build support for OpenFabrics verbs.')
variant('mxm', default=False, description='Build Mellanox Messaging support')
- variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support')
+ variant('thread_multiple', default=False,
+ description='Enable MPI_THREAD_MULTIPLE support')
# TODO : variant support for alps, loadleveler is missing
- variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
- variant('slurm', default=False, description='Build SLURM scheduler component')
+ variant('tm', default=False,
+ description='Build TM (Torque, PBSPro, and compatible) support')
+ variant('slurm', default=False,
+ description='Build SLURM scheduler component')
variant('sqlite3', default=False, description='Build sqlite3 support')
- variant('vt', default=True, description='Build support for contributed package vt')
+ variant('vt', default=True,
+ description='Build support for contributed package vt')
# TODO : support for CUDA is missing
@@ -96,8 +106,7 @@ class Openmpi(Package):
depends_on('sqlite', when='+sqlite3')
def url_for_version(self, version):
- return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
-
+ return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) # NOQA: ignore=E501
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.set('OMPI_CC', spack_cc)
@@ -106,14 +115,30 @@ class Openmpi(Package):
spack_env.set('OMPI_F77', spack_f77)
def setup_dependent_package(self, module, dep_spec):
- self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
+ self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
- self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
+ self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
+ def setup_environment(self, spack_env, run_env):
+ # As of 06/2016 there is no mechanism to specify that packages which
+ # depends on MPI need C or/and Fortran implementation. For now
+ # require both.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ tty.warn('OpenMPI : FORTRAN compiler not found')
+ tty.warn('OpenMPI : FORTRAN bindings will be disabled')
+ spack_env.unset('FC')
+ spack_env.unset('F77')
+ # Setting an attribute here and using it in the 'install'
+ # method is needed to ensure tty.warn is actually displayed
+ # to user and not redirected to spack-build.out
+ self.config_extra = ['--enable-mpi-fortran=none',
+ '--disable-oshmem-fortran']
+
@property
def verbs(self):
- # Up through version 1.6, this option was previously named --with-openib
+ # Up through version 1.6, this option was previously named
+ # --with-openib
if self.spec.satisfies('@:1.6'):
return 'openib'
# In version 1.7, it was renamed to be --with-verbs
@@ -125,6 +150,10 @@ class Openmpi(Package):
"--with-hwloc=%s" % spec['hwloc'].prefix,
"--enable-shared",
"--enable-static"]
+
+ if getattr(self, 'config_extra', None) is not None:
+ config_args.extend(self.config_extra)
+
# Variant based arguments
config_args.extend([
# Schedulers
@@ -135,7 +164,7 @@ class Openmpi(Package):
'--with-psm2' if '+psm2' in spec else '--without-psm2',
'--with-mxm' if '+mxm' in spec else '--without-mxm',
# Other options
- '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple',
+ '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', # NOQA: ignore=E501
'--with-pmi' if '+pmi' in spec else '--without-pmi',
'--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3',
'--enable-vt' if '+vt' in spec else '--disable-vt'
@@ -153,10 +182,7 @@ class Openmpi(Package):
# use this for LANL builds, but for LLNL builds, we need:
# "--with-platform=contrib/platform/llnl/optimized"
if self.version == ver("1.6.5") and '+lanl' in spec:
- config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
-
- if not self.compiler.f77 and not self.compiler.fc:
- config_args.append("--enable-mpi-fortran=no")
+ config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # NOQA: ignore=E501
configure(*config_args)
make()
@@ -173,40 +199,33 @@ class Openmpi(Package):
be bound to whatever compiler they were built with.
"""
kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
- dir = os.path.join(self.prefix, 'share/openmpi/')
-
- cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
- 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt']
-
- cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt',
- 'ortec++-wrapper-data.txt']
-
- fc_wrappers = ['mpifort-vt-wrapper-data.txt',
- 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt']
-
- for wrapper in cc_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc,
- os.path.join(dir, wrapper), **kwargs)
-
- for wrapper in cxx_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx,
- os.path.join(dir, wrapper), **kwargs)
-
- for wrapper in fc_wrappers:
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
- os.path.join(dir, wrapper), **kwargs)
-
- # These are symlinks in newer versions, so check that here
- f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt']
- f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt']
-
- for wrapper in f77_wrappers:
- path = os.path.join(dir, wrapper)
- if not os.path.islink(path):
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77,
- path, **kwargs)
- for wrapper in f90_wrappers:
- path = os.path.join(dir, wrapper)
- if not os.path.islink(path):
- filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
- path, **kwargs)
+ wrapper_basepath = join_path(self.prefix, 'share', 'openmpi')
+
+ wrappers = [
+ ('mpicc-vt-wrapper-data.txt', self.compiler.cc),
+ ('mpicc-wrapper-data.txt', self.compiler.cc),
+ ('ortecc-wrapper-data.txt', self.compiler.cc),
+ ('shmemcc-wrapper-data.txt', self.compiler.cc),
+ ('mpic++-vt-wrapper-data.txt', self.compiler.cxx),
+ ('mpic++-wrapper-data.txt', self.compiler.cxx),
+ ('ortec++-wrapper-data.txt', self.compiler.cxx),
+ ('mpifort-vt-wrapper-data.txt', self.compiler.fc),
+ ('mpifort-wrapper-data.txt', self.compiler.fc),
+ ('shmemfort-wrapper-data.txt', self.compiler.fc),
+ ('mpif90-vt-wrapper-data.txt', self.compiler.fc),
+ ('mpif90-wrapper-data.txt', self.compiler.fc),
+ ('mpif77-vt-wrapper-data.txt', self.compiler.f77),
+ ('mpif77-wrapper-data.txt', self.compiler.f77)
+ ]
+
+ for wrapper_name, compiler in wrappers:
+ wrapper = join_path(wrapper_basepath, wrapper_name)
+ if not os.path.islink(wrapper):
+ # Substitute Spack compile wrappers for the real
+ # underlying compiler
+ match = 'compiler=.*'
+ substitute = 'compiler={compiler}'.format(compiler=compiler)
+ filter_file(match, substitute, wrapper, **kwargs)
+ # Remove this linking flag if present
+ # (it turns RPATH into RUNPATH)
+ filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py
index 8e0f83110e..a43729a1ac 100644
--- a/var/spack/repos/builtin/packages/pcre/package.py
+++ b/var/spack/repos/builtin/packages/pcre/package.py
@@ -29,6 +29,7 @@ class Pcre(Package):
"""The PCRE package contains Perl Compatible Regular Expression
libraries. These are useful for implementing regular expression
pattern matching using the same syntax and semantics as Perl 5."""
+
homepage = "http://www.pcre.org"""
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2"
@@ -37,7 +38,15 @@ class Pcre(Package):
patch("intel.patch")
+ variant('utf', default=True,
+ description='Enable support for UTF-8/16/32, '
+ 'incompatible with EBCDIC.')
+
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix)
+ configure_args = ['--prefix=%s' % prefix]
+ if '+utf' in spec:
+ configure_args.append('--enable-utf')
+
+ configure(*configure_args)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 6456a1aabf..8dd1d8d2b9 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -28,13 +28,16 @@ from spack import *
class Petsc(Package):
"""
- PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
- modeled by partial differential equations.
+ PETSc is a suite of data structures and routines for the scalable
+ (parallel) solution of scientific applications modeled by partial
+ differential equations.
"""
homepage = "http://www.mcs.anl.gov/petsc/index.html"
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
+ version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
+ version('3.6.4', '7632da2375a3df35b8891c9526dbdde7')
version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
@@ -69,10 +72,12 @@ class Petsc(Package):
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('parmetis', when='+metis+mpi')
# Hypre does not support complex numbers.
- # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers
- # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py
+ # Also PETSc prefer to build it without internal superlu, likely due to
+ # conflict in headers see
+ # https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py # NOQA: ignore=E501
depends_on('hypre~internal-superlu', when='+hypre+mpi~complex')
- depends_on('superlu-dist', when='+superlu-dist+mpi')
+ depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi')
+ depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi')
depends_on('mumps+mpi', when='+mumps+mpi')
depends_on('scalapack', when='+mumps+mpi')
@@ -80,17 +85,17 @@ class Petsc(Package):
if '~mpi' in self.spec:
compiler_opts = [
'--with-cc=%s' % os.environ['CC'],
- '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'),
- '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'),
+ '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'), # NOQA: ignore=E501
+ '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'), # NOQA: ignore=E501
'--with-mpi=0'
]
- error_message_fmt = '\t{library} support requires "+mpi" to be activated'
+ error_message_fmt = '\t{library} support requires "+mpi" to be activated' # NOQA: ignore=E501
- # If mpi is disabled (~mpi), it's an error to have any of these enabled.
- # This generates a list of any such errors.
+ # If mpi is disabled (~mpi), it's an error to have any of these
+ # enabled. This generates a list of any such errors.
errors = [error_message_fmt.format(library=x)
- for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist')
- if ('+'+x) in self.spec]
+ for x in ('hdf5', 'hypre', 'parmetis', 'mumps', 'superlu-dist') # NOQA: ignore=E501
+ if ('+' + x) in self.spec]
if errors:
errors = ['incompatible variants given'] + errors
raise RuntimeError('\n'.join(errors))
@@ -105,26 +110,31 @@ class Petsc(Package):
options = ['--with-ssl=0']
options.extend(self.mpi_dependent_options())
options.extend([
- '--with-precision=%s' % ('double' if '+double' in spec else 'single'),
- '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'),
+ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), # NOQA: ignore=E501
+ '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), # NOQA: ignore=E501
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
'--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
'--with-blas-lapack-dir=%s' % spec['lapack'].prefix
])
# Activates library support if needed
- for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'):
+ for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
+ 'mumps', 'scalapack'):
options.append(
- '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0'))
+ '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) # NOQA: ignore=E501
)
if library in spec:
options.append(
- '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix)
+ '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) # NOQA: ignore=E501
)
- # PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a
+ # PETSc does not pick up SuperluDist from the dir as they look for
+ # superlu_dist_4.1.a
if 'superlu-dist' in spec:
options.extend([
- '--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include,
- '--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'),
+ '--with-superlu_dist-include=%s' %
+ spec['superlu-dist'].prefix.include,
+ '--with-superlu_dist-lib=%s' %
+ join_path(spec['superlu-dist'].prefix.lib,
+ 'libsuperlu_dist.a'),
'--with-superlu_dist=1'
])
else:
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
new file mode 100644
index 0000000000..fc77ba7412
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -0,0 +1,115 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Psi4(Package):
+ """Psi4 is an open-source suite of ab initio quantum chemistry
+ programs designed for efficient, high-accuracy simulations of
+ a variety of molecular properties."""
+
+ homepage = "http://www.psicode.org/"
+ url = "https://github.com/psi4/psi4/archive/0.5.tar.gz"
+
+ version('0.5', '53041b8a9be3958384171d0d22f9fdd0')
+
+ # Required dependencies
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread')
+ depends_on('python')
+ depends_on('cmake')
+ depends_on('py-numpy')
+
+ # Optional dependencies
+ # TODO: add packages for these
+ # depends_on('perl')
+ # depends_on('erd')
+ # depends_on('pcm-solver')
+ # depends_on('chemps2')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ '-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()),
+ '-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_shared_lib),
+ '-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()),
+ '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib),
+ '-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include),
+ '-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib),
+ '-DENABLE_CHEMPS2=OFF'
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
+
+ self.filter_compilers(spec, prefix)
+
+ def filter_compilers(self, spec, prefix):
+ """Run after install to tell the configuration files to
+ use the compilers that Spack built the package with.
+
+ If this isn't done, they'll have PLUGIN_CXX set to
+ Spack's generic cxx. We want it to be bound to
+ whatever compiler it was built with."""
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+
+ cc_files = ['bin/psi4-config']
+ cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h']
+ template = 'share/psi4/plugin/Makefile.template'
+
+ for filename in cc_files:
+ filter_file(os.environ['CC'], self.compiler.cc,
+ os.path.join(prefix, filename), **kwargs)
+
+ for filename in cxx_files:
+ filter_file(os.environ['CXX'], self.compiler.cxx,
+ os.path.join(prefix, filename), **kwargs)
+
+ # The binary still keeps track of the compiler used to install Psi4
+ # and uses it when creating a plugin template
+ filter_file('@PLUGIN_CXX@', self.compiler.cxx,
+ os.path.join(prefix, template), **kwargs)
+
+ # The binary links to the build include directory instead of the
+ # installation include directory:
+ # https://github.com/psi4/psi4/issues/410
+ filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format(
+ ' -I'.join([
+ os.path.join(spec['psi4'].prefix.include, 'psi4'),
+ os.path.join(spec['boost'].prefix.include, 'boost'),
+ os.path.join(spec['python'].prefix.include, 'python{0}'.format(
+ spec['python'].version.up_to(2))),
+ spec['lapack'].prefix.include,
+ spec['blas'].prefix.include,
+ '/usr/include'
+ ])
+ ), os.path.join(prefix, template), **kwargs)
diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
index 0d3b6a3e57..5a6ce72a4b 100644
--- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
+++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py
@@ -24,15 +24,33 @@
##############################################################################
from spack import *
+
class RBiocgenerics(Package):
"""S4 generic functions needed by many Bioconductor packages."""
- homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html'
- url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz"
-
- version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False)
+ homepage = 'https://bioconductor.org/packages/BiocGenerics/'
+ version('bioc-3.3',
+ git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
+ branch='release-3.3')
+ version('bioc-3.2',
+ git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
+ branch='release-3.2')
extends('R')
+ def validate(self, spec):
+ """
+ Checks that the version of R is appropriate for the Bioconductor
+ version.
+ """
+ if spec.satisfies('@bioc-3.3'):
+ if not spec.satisfies('^R@3.3.0:3.3.9'):
+ raise InstallError('Must use R-3.3 for Bioconductor-3.3')
+ elif spec.satisfies('@bioc-3.2'):
+ if not spec.satisfies('^R@3.2.0:3.2.9'):
+ raise InstallError('Must use R-3.2 for Bioconductor-3.2')
+
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ self.validate(spec)
+ R('CMD', 'INSTALL', '--library=%s' %
+ self.module.r_lib_dir, '%s' % self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-R6/package.py b/var/spack/repos/builtin/packages/r-R6/package.py
new file mode 100644
index 0000000000..0b75888e79
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-R6/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RR6(Package):
+ """The R6 package allows the creation of classes with reference semantics,
+ similar to R's built-in reference classes. Compared to reference classes,
+ R6 classes are simpler and lighter-weight, and they are not built on S4
+ classes so they do not require the methods package. These classes allow
+ public and private members, and they support inheritance, even when the
+ classes are defined in different packages."""
+
+ homepage = "https://github.com/wch/R6/"
+ url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/R6"
+
+ version('2.1.2', 'b6afb9430e48707be87638675390e457')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py
index 34a1eee79f..96f623a096 100644
--- a/var/spack/repos/builtin/packages/r-abind/package.py
+++ b/var/spack/repos/builtin/packages/r-abind/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RAbind(Package):
"""Combine multidimensional arrays into a single array. This is a
generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and
@@ -32,11 +33,12 @@ class RAbind(Package):
homepage = "https://cran.r-project.org/"
url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/abind"
- version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False)
+ version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5')
extends('R')
def install(self, spec, prefix):
-
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py
new file mode 100644
index 0000000000..c6e8f22a94
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-curl/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RCurl(Package):
+ """The curl() and curl_download() functions provide highly configurable
+ drop-in replacements for base url() and download.file() with better
+ performance, support for encryption (https, ftps), gzip compression,
+ authentication, and other libcurl goodies. The core of the package
+ implements a framework for performing fully customized requests where data
+ can be processed either in memory, on disk, or streaming via the callback
+ or connection interfaces. Some knowledge of libcurl is recommended; for a
+ more-user-friendly web client see the 'httr' package which builds on this
+ package with http specific tools and logic."""
+
+ homepage = "https://github.com/jeroenooms/curl"
+ url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/RCurl"
+
+ version('0.9.7', 'a101f7de948cb828fef571c730f39217')
+
+ extends('R')
+
+ depends_on('curl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py
new file mode 100644
index 0000000000..5f0b7b8779
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-devtools/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RDevtools(Package):
+ """Collection of package development tools."""
+
+ homepage = "https://github.com/hadley/devtools"
+ url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/devtools"
+
+ version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2')
+
+ extends('R')
+
+ depends_on('r-httr')
+ depends_on('r-memoise')
+ depends_on('r-whisker')
+ depends_on('r-digest')
+ depends_on('r-rstudioapi')
+ depends_on('r-jsonlite')
+ depends_on('r-git2r')
+ depends_on('r-withr')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py
new file mode 100644
index 0000000000..1d11afb139
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-digest/package.py
@@ -0,0 +1,56 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RDigest(Package):
+ """Implementation of a function 'digest()' for the creation of hash digests
+ of arbitrary R objects (using the md5, sha-1, sha-256, crc32, xxhash and
+ murmurhash algorithms) permitting easy comparison of R language objects, as
+ well as a function 'hmac()' to create hash-based message authentication
+ code. The md5 algorithm by Ron Rivest is specified in RFC 1321, the sha-1
+ and sha-256 algorithms are specified in FIPS-180-1 and FIPS-180-2, and the
+ crc32 algorithm is described in
+ ftp://ftp.rocksoft.com/cliens/rocksoft/papers/crc_v3.txt. For md5, sha-1,
+ sha-256 and aes, this package uses small standalone implementations that
+ were provided by Christophe Devine. For crc32, code from the zlib library
+ is used. For sha-512, an implementation by Aaron D. Gifford is used. For
+ xxhash, the implementation by Yann Collet is used. For murmurhash, an
+ implementation by Shane Day is used. Please note that this package is not
+ meant to be deployed for cryptographic purposes for which more
+ comprehensive (and widely tested) libraries such as OpenSSL should be
+ used."""
+
+ homepage = "http://dirk.eddelbuettel.com/code/digest.html"
+ url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/digest"
+
+ version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py
index fffae68019..a09b458eaf 100644
--- a/var/spack/repos/builtin/packages/r-filehash/package.py
+++ b/var/spack/repos/builtin/packages/r-filehash/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RFilehash(Package):
"""Implements a simple key-value style database where character string keys
are associated with data values that are stored on the disk. A simple
@@ -37,10 +38,12 @@ class RFilehash(Package):
homepage = 'https://cran.r-project.org/'
url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/filehash"
- version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False)
+ version('2.3', '01fffafe09b148ccadc9814c103bdc2f')
extends('R')
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py
new file mode 100644
index 0000000000..1f08379d6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-git2r/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RGit2r(Package):
+ """Interface to the 'libgit2' library, which is a pure C implementation of
+ the 'Git' core methods. Provides access to 'Git' repositories to extract
+ data and running some basic 'Git' commands."""
+
+ homepage = "https://github.com/ropensci/git2r"
+ url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/git2r"
+
+ version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1')
+
+ extends('R')
+
+ depends_on('zlib')
+ depends_on('openssl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py
new file mode 100644
index 0000000000..77ec34ab03
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-httr/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RHttr(Package):
+ """Useful tools for working with HTTP organised by HTTP verbs (GET(),
+ POST(), etc). Configuration functions make it easy to control additional
+ request components (authenticate(), add_headers() and so on)."""
+
+ homepage = "https://github.com/hadley/httr"
+ url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/httr"
+
+ version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600')
+
+ extends('R')
+
+ depends_on('r-jsonlite')
+ depends_on('r-mime')
+ depends_on('r-curl')
+ depends_on('r-openssl')
+ depends_on('r-R6')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py
new file mode 100644
index 0000000000..6e231ed345
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RJsonlite(Package):
+ """A fast JSON parser and generator optimized for statistical data and the
+ web. Started out as a fork of 'RJSONIO', but has been completely rewritten
+ in recent versions. The package offers flexible, robust, high performance
+ tools for working with JSON in R and is particularly powerful for building
+ pipelines and interacting with a web API. The implementation is based on
+ the mapping described in the vignette (Ooms, 2014). In addition to
+ converting JSON data from/to R objects, 'jsonlite' contains functions to
+ stream, validate, and prettify JSON data. The unit tests included with the
+ package verify that all edge cases are encoded and decoded consistently for
+ use with dynamic data in systems and applications."""
+
+ homepage = "https://github.com/jeroenooms/jsonlite"
+ url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite"
+
+ version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py
index f86917ec0c..f6ba97740b 100644
--- a/var/spack/repos/builtin/packages/r-magic/package.py
+++ b/var/spack/repos/builtin/packages/r-magic/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class RMagic(Package):
"""A collection of efficient, vectorized algorithms for the creation and
investigation of magic squares and hypercubes, including a variety of
@@ -32,12 +33,14 @@ class RMagic(Package):
homepage = "https://cran.r-project.org/"
url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/magic"
- version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False)
+ version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029')
extends('R')
depends_on('r-abind')
def install(self, spec, prefix):
- R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py
new file mode 100644
index 0000000000..6a0fb78650
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-memoise/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RMemoise(Package):
+ """Cache the results of a function so that when you call it again with the
+ same arguments it returns the pre-computed value."""
+
+ homepage = "https://github.com/hadley/memoise"
+ url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/memoise"
+
+ version('1.0.0', 'd31145292e2a88ae9a504cab1602e4ac')
+
+ extends('R')
+
+ depends_on('r-digest')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py
new file mode 100644
index 0000000000..fb079f44c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-mime/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RMime(Package):
+ """Guesses the MIME type from a filename extension using the data derived
+ from /etc/mime.types in UNIX-type systems."""
+
+ homepage = "https://github.com/yihui/mime"
+ url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/mime"
+
+ version('0.4', '789cb33e41db2206c6fc7c3e9fbc2c02')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py
new file mode 100644
index 0000000000..3e77923d76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-openssl/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class ROpenssl(Package):
+ """Bindings to OpenSSL libssl and libcrypto, plus custom SSH pubkey
+ parsers. Supports RSA, DSA and EC curves P-256, P-384 and P-521.
+ Cryptographic signatures can either be created and verified manually or via
+ x509 certificates. AES can be used in cbc, ctr or gcm mode for symmetric
+ encryption; RSA for asymmetric (public key) encryption or EC for Diffie
+ Hellman. High-level envelope functions combine RSA and AES for encrypting
+ arbitrary sized data. Other utilities include key generators, hash
+ functions (md5, sha1, sha256, etc), base64 encoder, a secure random number
+ generator, and 'bignum' math methods for manually performing crypto
+ calculations on large multibyte integers."""
+
+ homepage = "https://github.com/jeroenooms/openssl#readme"
+ url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/openssl"
+
+ version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb')
+
+ extends('R')
+
+ depends_on('openssl')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py
new file mode 100644
index 0000000000..9520952bd7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-packrat/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RPackrat(Package):
+ """Manage the R packages your project depends on in an isolated, portable,
+ and reproducible way."""
+
+ homepage = "https://github.com/rstudio/packrat/"
+ url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/packrat"
+
+ version('0.4.7-1', '80c2413269b292ade163a70ba5053e84')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
new file mode 100644
index 0000000000..0ef2d9b987
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rstudioapi/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RRstudioapi(Package):
+ """Access the RStudio API (if available) and provide informative error
+ messages when it's not."""
+
+ homepage = "https://cran.r-project.org/web/packages/rstudioapi/index.html"
+ url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/rstudioapi"
+
+ version('0.5', '6ce1191da74e7bcbf06b61339486b3ba')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-whisker/package.py b/var/spack/repos/builtin/packages/r-whisker/package.py
new file mode 100644
index 0000000000..f338d150f1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-whisker/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RWhisker(Package):
+ """logicless templating, reuse templates in many programming languages
+ including R"""
+
+ homepage = "http://github.com/edwindj/whisker"
+ url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/whisker"
+
+ version('0.3-2', 'c4b9bf9a22e69ce003fe68663ab5e8e6')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py
new file mode 100644
index 0000000000..5ce7437c84
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-withr/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RWithr(Package):
+ """A set of functions to run code 'with' safely and temporarily modified
+ global state. Many of these functions were originally a part of the
+ 'devtools' package, this provides a simple package with limited
+ dependencies to provide access to these functions."""
+
+ homepage = "http://github.com/jimhester/withr"
+ url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/withr"
+
+ version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index c148a579ec..d3739bf6a6 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -34,13 +34,16 @@ class Slepc(Package):
homepage = "http://www.grycap.upv.es/slepc"
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
+ version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
+ version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df')
- variant('arpack', default=False, description='Enables Arpack wrappers')
+ variant('arpack', default=True, description='Enables Arpack wrappers')
- depends_on('petsc')
- depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi')
- depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi')
+ depends_on('petsc@3.7:', when='@3.7.1:')
+ depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3')
+ depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi')
+ depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi')
def install(self, spec, prefix):
# set SLEPC_DIR for installation
@@ -64,7 +67,7 @@ class Slepc(Package):
configure('--prefix=%s' % prefix, *options)
make('MAKE_NP=%s' % make_jobs, parallel=False)
- #FIXME:
+ # FIXME:
# make('test')
make('install')
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py
index 6c06b5497c..e51d7224d9 100644
--- a/var/spack/repos/builtin/packages/superlu-dist/package.py
+++ b/var/spack/repos/builtin/packages/superlu-dist/package.py
@@ -25,50 +25,54 @@
from spack import *
import glob
+
class SuperluDist(Package):
- """A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines."""
+ """A general purpose library for the direct solution of large, sparse,
+ nonsymmetric systems of linear equations on high performance machines."""
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670')
- # default to version 4.3 since petsc and trilinos are not tested with 5.0.
- version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True)
+ version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae')
version('4.2', 'ae9fafae161f775fbac6eba11e530a65')
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
- depends_on ('mpi')
- depends_on ('blas')
- depends_on ('lapack')
- depends_on ('parmetis')
- depends_on ('metis@5:')
+ depends_on('mpi')
+ depends_on('blas')
+ depends_on('lapack')
+ depends_on('parmetis')
+ depends_on('metis@5:')
def install(self, spec, prefix):
makefile_inc = []
makefile_inc.extend([
'PLAT = _mac_x',
- 'DSuperLUroot = %s' % self.stage.source_path, #self.stage.path, prefix
+ 'DSuperLUroot = %s' % self.stage.source_path,
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
'BLASDEF = -DUSE_VENDOR_BLAS',
- 'BLASLIB = -L%s -llapack %s -lblas' % (spec['lapack'].prefix.lib, spec['blas'].prefix.lib), # FIXME: avoid hardcoding blas/lapack lib names
+ 'BLASLIB = %s %s' %
+ (to_link_flags(spec['lapack'].lapack_shared_lib),
+ to_link_flags(spec['blas'].blas_shared_lib)),
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
'FLIBS =',
- 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)',
+ 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # NOQA: ignore=E501
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = true',
- 'CC = mpicc', # FIXME avoid hardcoding MPI compiler names
- 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include),
+ 'CC = %s' % spec['mpi'].mpicc,
+ 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %
+ (spec['parmetis'].prefix.include,
+ spec['metis'].prefix.include),
'NOOPTS = -fPIC -std=c99',
- 'FORTRAN = mpif77',
+ 'FORTRAN = %s' % spec['mpi'].mpif77,
'F90FLAGS = -O2',
- 'LOADER = mpif77',
+ 'LOADER = %s' % spec['mpi'].mpif77,
'LOADOPTS =',
'CDEFS = -DAdd_'
- ])
+ ])
- #with working_dir('src'):
with open('make.inc', 'w') as fh:
fh.write('\n'.join(makefile_inc))
@@ -83,9 +87,10 @@ class SuperluDist(Package):
mkdirp(headers_location)
mkdirp(prefix.lib)
- headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h'))
+ headers = glob.glob(join_path(self.stage.source_path, 'SRC', '*.h'))
for h in headers:
- install(h,headers_location)
+ install(h, headers_location)
- superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a')
- install(superludist_lib,self.prefix.lib)
+ superludist_lib = join_path(self.stage.source_path,
+ 'lib/libsuperlu_dist.a')
+ install(superludist_lib, self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py
new file mode 100644
index 0000000000..c634c1d1ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/superlu/package.py
@@ -0,0 +1,54 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Superlu(Package):
+ """SuperLU is a general purpose library for the direct solution of large,
+ sparse, nonsymmetric systems of linear equations on high performance
+ machines. SuperLU is designed for sequential machines."""
+
+ homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu"
+ url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz"
+
+ version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447')
+
+ depends_on('blas')
+
+ def install(self, spec, prefix):
+ cmake_args = [
+ '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
+ # BLAS support
+ '-Denable_blaslib=OFF',
+ '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib)
+ ]
+
+ cmake_args.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+ cmake('..', *cmake_args)
+
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index c46425c0d3..573ee38a79 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -24,26 +24,33 @@
##############################################################################
from spack import *
+
class Tmux(Package):
"""tmux is a terminal multiplexer. What is a terminal multiplexer? It lets
- you switch easily between several programs in one terminal, detach them (they
- keep running in the background) and reattach them to a different terminal. And
- do a lot more.
+ you switch easily between several programs in one terminal, detach them
+ (they keep running in the background) and reattach them to a different
+ terminal. And do a lot more.
"""
homepage = "http://tmux.github.io"
- url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz"
+ url = "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz"
version('1.9a', 'b07601711f96f1d260b390513b509a2d')
version('2.1', '74a2855695bccb51b6e301383ad4818c')
+ version('2.2', 'bd95ee7205e489c62c616bb7af040099')
depends_on('libevent')
depends_on('ncurses')
def install(self, spec, prefix):
+ pkg_config_path = ':'.join([
+ spec['libevent'].prefix,
+ spec['ncurses'].prefix
+ ])
+
configure(
"--prefix=%s" % prefix,
- "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix))
+ "PKG_CONFIG_PATH=%s" % pkg_config_path)
make()
make("install")
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 6913d79dcc..3a53ac5c01 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -45,6 +45,8 @@ class Trilinos(Package):
homepage = "https://trilinos.org/"
url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"
+ version('12.6.3', '960f5f4d3f7c3da818e5a5fb4684559eff7e0c25f959ef576561b8a52f0e4d1e')
+ version('12.6.2', '0c076090508170ddee5efeed317745027f9418319720dc40a072e478775279f9')
version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4')
version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
version('12.2.1', '6161926ea247863c690e927687f83be9')
@@ -89,7 +91,8 @@ class Trilinos(Package):
# work at the end. But let's avoid all this by simply using shared libs
depends_on('mumps@5.0:+mpi+shared', when='+mumps')
depends_on('scalapack', when='+mumps')
- depends_on('superlu-dist', when='+superlu-dist')
+ depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist')
+ depends_on('superlu-dist', when='@12.6.2:+superlu-dist')
depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hdf5+mpi', when='+hdf5')
depends_on('python', when='+python')