Spack Documentation Release 0.9

Todd Gamblin

August 31, 2016

Contents

1 Table of Contents 3 1.1 Feature overview...... 3 1.2 Getting Started...... 5 1.3 Basic usage...... 6 1.4 Packaging Guide...... 40 1.5 Mirrors...... 80 1.6 Configuration...... 83 1.7 Developer Guide...... 86 1.8 Using Spack for CMake-based Development...... 90 1.9 Command index...... 92 1.10 Package List...... 93 1.11 spack package...... 335

2 Indices and 453

Python Module Index 455

i ii Spack Documentation, Release 0.9

Spack is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms and environments. It was designed for large supercomputing centers, where many users and application teams share common installations of software on clusters with exotic architectures, using libraries that do not have a standard ABI. Spack is non-destructive: installing a new version does not break existing installations, so many configurations can coexist on the same system. Most importantly, Spack is simple. It offers a simple spec syntax so that users can specify versions and configuration options concisely. Spack is also simple for package authors: package files are written in pure Python, and specs allow package authors to maintain a single file for many different builds of the same package. See the Feature overview for examples and highlights. Get spack from the github repository and install your first package: $ git clone https://github.com/llnl/spack.git $ cd spack/bin $ ./spack install libelf

If you’re new to spack and want to start using it, see Getting Started, or refer to the full manual below.

Contents 1 Spack Documentation, Release 0.9

2 Contents CHAPTER 1

Table of Contents

1.1 Feature overview

This is a high-level overview of features that make Spack different from other package managers and port systems.

1.1.1 Simple package installation

Installing the default version of a package is simple. This will install the latest version of the mpileaks package and all of its dependencies: $ spack install mpileaks

1.1.2 Custom versions & configurations

Spack allows installation to be customized. Users can specify the version, build compiler, compile-time options, and cross-compile platform, all on the command line. # Install a particular version by appending @ $ spack install [email protected]

# Specify a compiler(and its version), with % $ spack install [email protected] %[email protected]

# Add special compile-time options by name $ spack install [email protected] %[email protected] debug=True

# Add special boolean compile-time options with + $ spack install [email protected] %[email protected] +debug

# Add compiler flags using the conventional names $ spack install [email protected] %[email protected] cppflags=\"-O3 -floop-block\"

# Cross-compile for a different architecture with arch= $ spack install [email protected] arch=bgqos_0

Users can specify as many or few options as they care about. Spack will fill in the unspecified values with sensible defaults. The two listed syntaxes for variants are identical when the value is boolean.

3 Spack Documentation, Release 0.9

1.1.3 Customize dependencies

Spack allows dependencies of a particular installation to be customized extensively. Suppose that mpileaks depends indirectly on libelf and libdwarf. Using ^, users can add custom configurations for the dependencies: # Install mpileaks and link it with specific versions of libelf and libdwarf $ spack install [email protected] %[email protected] +debug ^[email protected] ^libdwarf@20130729+debug

1.1.4 Non-destructive installs

Spack installs every unique package/dependency configuration into its own prefix, so new installs will not break existing ones.

1.1.5 Packages can peacefully coexist

Spack avoids misconfiguration by using RPATH to link dependencies. When a user links a library or runs a program, it is tied to the dependencies it was built with, so there is no need to manipulate LD_LIBRARY_PATH at runtime.

1.1.6 Creating packages is easy

To create a new packages, all Spack needs is a URL for the source archive. The spack create command will create a boilerplate package file, and the package authors can fill in specific build steps in pure Python. For example, this command: $ spack create http://www.mr511.de/software/libelf-0.8.13.tar.gz creates a simple python file: from spack import * class Libelf(Package): """FIXME: Put a proper description of your package here."""

# FIXME: Add a proper url for your package's homepage here. homepage="http://www.example.com" url="http://www.mr511.de/software/libelf-0.8.13.tar.gz"

version('0.8.13','4136d7b4c04df68b686570afa26988ac')

# FIXME: Add dependencies if required. # depends_on('foo')

def install(self, spec, prefix): # FIXME: Modify the configure line to suit your build system here. configure('--prefix={0}'.format(prefix))

# FIXME: Add logic to build and install here. make() make('install')

It doesn’t take much python coding to get from there to a working package:

4 Chapter 1. Table of Contents Spack Documentation, Release 0.9

from spack import * class Libelf(Package): """libelf lets you read, modify or create ELF object in an architecture-independent way. The library takes care of size and endian issues, e.g. you can process a file for SPARC processors on an Intel-based system."""

homepage="http://www.mr511.de/software/english.html" url="http://www.mr511.de/software/libelf-0.8.13.tar.gz"

version('0.8.13','4136d7b4c04df68b686570afa26988ac') version('0.8.12','e21f8273d9f5f6d43a59878dc274fec7')

provides('elf')

def install(self, spec, prefix): configure("--prefix="+ prefix, "--enable-shared", "--disable-dependency-tracking", "--disable-debug") make()

# The mkdir commands in libelf's install can fail in parallel make("install", parallel=False)

Spack also provides wrapper functions around common commands like configure, make, and cmake to make writing packages simple.

1.2 Getting Started

1.2.1 Download

Getting spack is easy. You can clone it from the github repository using this command: $ git clone https://github.com/llnl/spack.git

This will create a directory called spack. We’ll assume that the full path to this directory is in the SPACK_ROOT environment variable. Add $SPACK_ROOT/bin to your path and you’re ready to go: $ export PATH=$SPACK_ROOT/bin:$PATH $ spack install libelf

For a richer experience, use Spack’s support: # For users $ export SPACK_ROOT=/path/to/spack $ . $SPACK_ROOT/share/spack/setup-env.sh

# For tcsh or csh users(note you must set SPACK_ROOT) $ setenv SPACK_ROOT /path/to/spack $ source $SPACK_ROOT/share/spack/setup-env.csh

This automatically adds Spack to your PATH.

1.2. Getting Started 5 Spack Documentation, Release 0.9

1.2.2 Installation

You don’t need to install Spack; it’s ready to run as soon as you clone it from git. You may want to run it out of a prefix other than the git repository you cloned. The spack bootstrap command provides this functionality. To install spack in a new directory, simply type: $ spack bootstrap /my/favorite/prefix

This will install a new spack script in /my/favorite/prefix/bin, which you can use just like you would the regular spack script. Each copy of spack installs packages into its own $PREFIX/opt directory.

1.3 Basic usage

The spack command has many subcommands. You’ll only need a small subset of them for typical usage. Note that Spack colorizes output. less - should be used with Spack to maintain this colorization. E.g.:

$ spack find | less -R

It is recommend that the following be put in your .bashrc file: alias less='less -R'

1.3.1 Listing available packages

To install software with Spack, you need to know what software is available. You can see a list of available package names at the Package List webpage, or using the spack list command.

spack list

The spack list command prints out a list of all of the packages Spack can install: $ spack list ack qrupdate activeharmony llvm-lld adept-utils lmdb qt-creator adios lmod qthreads adol- lrslib R allinea-forge lrzip r-abind allinea-reports lua r-assertthat antlr lua-luafilesystem r-base64enc ape lua-luaposix r-bh apex LuaJIT r-BiocGenerics apr lwgrp r-boot apr-util lwm2 r-brew armadillo lz4 r-car arpack lzma r-caret arpack-ng lzo r-chron asciidoc m4 r-class astyle mafft r-cluster atk mariadb r-codetools atlas matio r-colorspace atop mbedtls r-crayon autoconf meep r-cubature

6 Chapter 1. Table of Contents Spack Documentation, Release 0.9

automaded memaxes r-curl automake mercurial r-datatable bash mesa r-dbi bbcp metis r-devtools bcftools mfem r-diagrammer bdw-gc Mitos r-dichromat bear mkl r-digest bertini moab r-doparallel bib2xhtml mpc r-dplyr binutils mpe2 r-dt bison mpfr r-dygraphs bliss mpibash r-e1071 blitz mpich r-filehash boost mpileaks r-foreach bowtie2 mrnet r-foreign boxlib msgpack-c r- bpp-core mumps r-geosphere bpp-phyl munge r-ggmap bpp-seq muparser r-ggplot2 bpp-suite muster r-ggvis bwa mvapich2 r-git2r bzip2 r-glmnet c-blosc nag r-googlevis cairo nano r-gridbase caliper nasm r-gridextra callpath nauty r-gtable cantera nccmp r-gtools cask ncdu r-htmltools cblas nco r-htmlwidgets cbtf r-httpuv cbtf-argonavis ncview r-httr cbtf-krell ndiff r-igraph cbtf-lanl netcdf r-influencer cdd netcdf-cxx r-inline cddlib netcdf-cxx4 r-irlba cdo netcdf-fortran r-iterators cereal netgauge r-jpeg cfitsio netlib-lapack r-jsonlite cgal netlib-scalapack r-labeling cgm nettle r-lattice cgns nextflow r-lazyeval cityhash ninja r-leaflet cleverleaf numdiff r-lme4 cloog nwchem r-lmtest cmake ocaml r-lubridate cmocka oce r-magic cnmem octave r-magrittr coreutils octave-splines r-mapproj cp2k octopus r-maps cppcheck ompss r-maptools cram ompt-openmp r-markdown cryptopp opari2 r-mass cscope openblas r-matrix cube opencoarrays r-matrixmodels cuda r-memoise curl openexr r-mgcv czmq openjpeg r-mime daal openmpi r-minqa

1.3. Basic usage 7 Spack Documentation, Release 0.9

dakota openspeedshop r-multcomp damselfly openssl r-munsell datamash opium r-mvtnorm dbus osu-micro-benchmarks r-ncdf4 dealii otf r-networkd3 dia otf2 r-nlme docbook- p4est r-nloptr doxygen panda r-nmf dri2proto pango r-nnet dtcmp papi r-np dyninst paradiseo r-openssl eigen parallel r-packrat elfutils parallel-netcdf r-pbkrtest elk paraver r-pkgmaker elpa r-plotrix emacs parmetis r-plyr environment-modules parmgridgen r-png espresso parpack r-praise exodusii patchelf r-proto exonerate pcre r-quantmod expat pcre2 r-quantreg extrae pdt r-R6 exuberant-ctags r-randomforest fastx_toolkit petsc r-raster fenics pgi r-rcolorbrewer ferret pidx r-rcpp fftw pixman r-rcppeigen fish pkg-config r-registry flex plumed r-reshape2 pmgr_collective r-rgooglemaps flux pngwriter r-rjava foam-extend polymake r-rjson fontconfig porta r-rjsonio freetype postgresql r-rmysql gasnet ppl r-rngtools gcc prank r-rodbc gdal proj r-roxygen2 gdb protobuf r-rpostgresql -pixbuf psi4 r-rsqlite geos py-3to2 r-rstan gettext py-alabaster r-rstudioapi gflags py-argcomplete r-sandwich ghostscript py-astroid r-scales giflib py-astropy r-shiny git py-autopep8 r-sp gl2ps py-babel r-sparsem glib py-basemap r-stanheaders glm py-beautifulsoup4 r-stringi global py-biopython r-stringr glog py-blessings r-survey glpk py-bottleneck r-survival gmp py-cclib r-tarifx py-cffi r-testthat -prolog py-coverage r-thdata gnuplot py-csvkit r-threejs gnutls py-cycler r-tibble go py-cython r-tidyr go-bootstrap py-dask r-ttr

8 Chapter 1. Table of Contents Spack Documentation, Release 0.9

gobject-introspection py-dateutil r-vcd googletest py-dbf r-visnetwork gperf py-decorator r-whisker gperftools py-docutils r-withr graphlib py-emcee r-xlconnect graphviz py-epydoc r-xlconnectjars gromacs py-flake8 r-xlsx gsl py-funcsigs r-xlsxjars gtkplus py-genders r-xml gts py-genshi r-xtable guile py-gnuplot r-xts py-h5py r-yaml harminv py-imagesize r-zoo hdf py-iminuit raja hdf5 py- ravel hdf5-blosc py-jdcal readline hmmer py-jinja2 rose hoomd-blue py-lockfile rsync hpl py-logilab-common ruby hpx5 py-mako rust htslib py-markupsafe rust-bindgen hub py- SAMRAI hwloc py-meep samtools hydra py-mistune scalasca py-mock scons ibmisc py-mpi4py scorep icu py-mpmath scotch icu4c py-mx scr ilmbase py-mysqldb1 screen ImageMagick py-nestle sed intel py-netcdf seqtk intel-parallel-studio py-networkx serf intltool py-nose silo ior py-numexpr slepc ipopt py-numpy snappy ipp py-openpyxl sparsehash isl py-pandas spindle jasper py-pbr spot jdk py-pep8 sqlite jemalloc py-periodictable stat jpeg py-pexpect stream jsoncpp py-phonopy subversion judy py-pil suite-sparse julia py-pillow sundials kdiff3 py-ply superlu kealib py-pmw superlu-dist kripke py-prettytable superlu-mt launchmon py-protobuf swiftsim lcms py-py2cairo swig leveldb py-py2neo sympol libaio py-pychecker szip libarchive py-pycparser tar libatomic-ops py-pydatalog task libcerf py-pyelftools taskd libcircle py-pygments tau libctl py-pygobject tbb libdrm py- tcl libdwarf py-pylint

1.3. Basic usage 9 Spack Documentation, Release 0.9

libedit py-pypar texinfo libelf py-pyparsing texlive libepoxy py- the_platinum_searcher libevent py- the_silver_searcher libffi py-pytables thrift libgcrypt py-python-daemon libgd py-pytz tmux libgpg-error py-pyyaml tmuxinator libgtextutils py-restview tree libhio py-rpy2 triangle libiconv py-scientificpython trilinos -turbo py-scikit-image turbomole libjson-c py-scikit-learn udunits2 libmng py-scipy uncrustify libmonitor py-setuptools unibilium libNBC py-shiboken unison libpciaccess py-sip unixodbc libpng py-six util- libpthread-stubs py-sncosmo valgrind libsigsegv py-snowballstemmer vim libsodium py-sphinx libsplash py-sphinx-rtd- vtk libtermkey py-SQLAlchemy wget libtiff py-storm wx libtool py-sympy wxpropgrid libunistring py-tappy -proto libunwind py-tuiview xerces-c libuuid py-twisted xorg-util-macros libuv py-unittest2 xproto libvterm py-unittest2py3k xz libxau py-urwid yasm libxc py-virtualenv zeromq libxcb py-wcsaxes zfp libxml2 py-wheel zlib libxpm py-xlrd zoltan libxshmfence py-yapf zsh libxslt python libxsmm qhull

The packages are listed by name in alphabetical order. If you specify a pattern to match, it will follow this set of rules. A pattern with no wildcards, * or ?, will be treated as though it started and ended with *, so util is equivalent to *util*. A pattern with no capital letters will be treated as case-insensitive. You can also add the -i flag to specify a case insensitive search, or - to search the description of the package in addition to the name. Some examples: All packages whose names contain “sql” case insensitive: $ spack list sql postgresql py-mysqldb1 r-rmysql r-rpostgresql r-rsqlite sqlite

All packages whose names start with a capital M:

$ spack list 'M*' Mitos

All packages whose names or descriptions contain Documentation: $ spack list -d Documentation py-sphinx r-rcpp

All packages whose names contain documentation case insensitive:

10 Chapter 1. Table of Contents Spack Documentation, Release 0.9

$ spack list -d documentation doxygen py-alabaster py-epydoc r-roxygen2 texinfo gflags py-docutils r-ggplot2 r-stanheaders spack info

To get more information on a particular package from spack list, use spack info. Just supply the name of a package: $ spack info mpich Package: mpich Homepage: http://www.mpich.org

Safe versions: 3.2 http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz 3.1.4 http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz 3.1.3 http://www.mpich.org/static/downloads/3.1.3/mpich-3.1.3.tar.gz 3.1.2 http://www.mpich.org/static/downloads/3.1.2/mpich-3.1.2.tar.gz 3.1.1 http://www.mpich.org/static/downloads/3.1.1/mpich-3.1.1.tar.gz 3.1 http://www.mpich.org/static/downloads/3.1/mpich-3.1.tar.gz 3.0.4 http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz

Variants: Name Default Description

hydra on Build the hydra process manager pmi on Build with PMI support verbs off Build support for OpenFabrics verbs.

Build Dependencies: None

Link Dependencies: None

Run Dependencies: None

Virtual packages: mpich@3: provides mpi@:3.0 mpich@1: provides mpi@:1.3

Description: MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.

Most of the information is self-explanatory. The safe versions are versions that Spack knows the checksum for, and it will use the checksum to verify that these versions download without errors or viruses. Dependencies and virtual dependencies are described in more detail later. spack versions

To see more available versions of a package, run spack versions. For example: $ spack versions libelf ==> Safe versions (already checksummed):

1.3. Basic usage 11 Spack Documentation, Release 0.9

0.8.13 0.8.12 ==> Remote versions (not yet checksummed): 0.8.11 0.8.9 0.8.7 0.8.5 0.8.3 0.8.0 0.6.4 0.8.10 0.8.8 0.8.6 0.8.4 0.8.2 0.7.0 0.5.2

There are two sections in the output. Safe versions are versions for which Spack has a checksum on file. It can verify that these versions are downloaded correctly. In many cases, Spack can also show you what versions are available out on the web—these are remote versions. Spack gets this information by scraping it directly from package web pages. Depending on the package and how its releases are organized, Spack may or may not be able to find remote versions.

1.3.2 Installing and uninstalling

spack install

spack install will install any package shown by spack list. For example, To install the latest version of the mpileaks package, you might type this: $ spack install mpileaks

If mpileaks depends on other packages, Spack will install the dependencies first. It then fetches the mpileaks tarball, expands it, verifies that it was downloaded without errors, builds it, and installs it in its own directory under $SPACK_ROOT/opt. You’ll see a number of messages from spack, a lot of build output, and a message that the packages is installed: $ spack install mpileaks ==> Installing mpileaks ==> mpich is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]. ==> callpath is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]. ==> adept-utils is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]. ==> Trying to fetch from https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz ######################################################################## 100.0% ==> Staging archive: /home/gamblin2/spack/var/spack/stage/[email protected]%[email protected] arch=linux-debian7-x86_64-59f6ad23/mpileaks-1.0.tar.gz ==> Created stage in /home/gamblin2/spack/var/spack/stage/[email protected]%[email protected] arch=linux-debian7-x86_64-59f6ad23. ==> No patches needed for mpileaks. ==> Building mpileaks.

... build output ...

==> Successfully installed mpileaks. Fetch: 2.16s. Build: 9.82s. Total: 11.98s. [+] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]

The last line, with the [+], indicates where the package is installed.

Building a specific version

Spack can also build specific versions of a package. To do this, just add @ after the package name, followed by a version: $ spack install [email protected]

Any number of versions of the same package can be installed at once without interfering with each other. This is good for multi-user sites, as installing a version that one user needs will not disrupt existing installations for other users.

12 Chapter 1. Table of Contents Spack Documentation, Release 0.9

In addition to different versions, Spack can customize the compiler, compile-time options (variants), compiler flags, and platform (for cross compiles) of an installation. Spack is unique in that it can also configure the dependencies a package is built with. For example, two configurations of the same version of a package, one built with boost 1.39.0, and the other version built with version 1.43.0, can coexist. This can all be done on the command line using the spec syntax. Spack calls the descriptor used to refer to a particular package configuration a spec. In the commands above, mpileaks and [email protected] are both valid specs. We’ll talk more about how you can use them to customize an installation in Specs & dependencies. spack uninstall

To uninstall a package, type spack uninstall . This will ask the user for confirmation, and in case will completely remove the directory in which the package was installed. $ spack uninstall mpich

If there are still installed packages that depend on the package to be uninstalled, spack will refuse to uninstall it. To uninstall a package and every package that depends on it, you may give the --dependents option. $ spack uninstall --dependents mpich

will display a list of all the packages that depend on mpich and, upon confirmation, will uninstall them in the right order. A command like $ spack uninstall mpich

may be ambiguous if multiple mpich configurations are installed. For example, if both [email protected] and [email protected] are installed, mpich could refer to either one. Because it cannot determine which one to uninstall, Spack will ask you either to provide a version number to remove the ambiguity or use the --all option to uninstall all of the matching packages. You may force uninstall a package with the --force option $ spack uninstall --force mpich

but you risk breaking other installed packages. In general, it is safer to remove dependent packages before removing their dependencies or use the --dependents option.

1.3.3 Seeing installed packages

We know that spack list shows you the names of available packages, but how do you figure out which are already installed? spack find spack find shows the specs of installed packages. A spec is like a name, but it has a version, compiler, architecture, and build options associated with it. In spack, you can have many installations of the same package with different specs. Running spack find with no arguments lists installed packages:

1.3. Basic usage 13 Spack Documentation, Release 0.9

$ spack find ==> 74 installed packages. -- linux-debian7-x86_64 / [email protected] [email protected] libdwarf@20130729 [email protected] [email protected] libdwarf@20130729 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] tk@src jpeg@9a [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

-- linux-debian7-x86_64 / [email protected] [email protected] [email protected]

Packages are divided into groups according to their architecture and compiler. Within each group, Spack tries to keep the view simple, and only shows the version of installed packages. spack find can filter the package list based on the package name, spec, or a number of properties of their instal- lation status. For example, missing dependencies of a spec can be shown with --missing, packages which were explicitly installed with spack install can be singled out with --explicit and those which have been pulled in only as dependencies with --implicit. In some cases, there may be different configurations of the same version of a package installed. For example, there are two installations of libdwarf@20130729 above. We can look at them in more detail using spack find --deps, and by asking only to show libdwarf packages: $ spack find --deps libdwarf ==> 2 installed packages. -- linux-debian7-x86_64 / [email protected] ------libdwarf@20130729-d9b90962 ^[email protected] libdwarf@20130729-b52fac98 ^[email protected]

Now we see that the two instances of libdwarf depend on different versions of libelf: 0.8.12 and 0.8.13. This view can become complicated for packages with many dependencies. If you just want to know whether two packages’ dependencies differ, you can use spack find --long: $ spack find --long libdwarf ==> 2 installed packages. -- linux-debian7-x86_64 / [email protected] ------libdwarf@20130729-d9b90962 libdwarf@20130729-b52fac98

14 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Now the libdwarf installs have hashes after their names. These are hashes over all of the dependencies of each package. If the hashes are the same, then the packages have the same dependency configuration. If you want to know the path where each package is installed, you can use spack find --paths: $ spack find --paths ==> 74 installed packages. -- linux-debian7-x86_64 / [email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] ...

And, finally, you can restrict your search to a particular package by supplying its name: $ spack find --paths libelf -- linux-debian7-x86_64 / [email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] [email protected] /home/gamblin2/spack/opt/linux-debian7-x86_64/[email protected]/[email protected] spack find actually does a lot more than this. You can use specs to query for specific configurations and builds of each package. If you want to find only libelf versions greater than version 0.8.12, you could say: $ spack find [email protected]: -- linux-debian7-x86_64 / [email protected] [email protected] [email protected]

Finding just the versions of libdwarf built with a particular version of libelf would look like this: $ spack find --long libdwarf ^[email protected] ==> 1 installed packages. -- linux-debian7-x86_64 / [email protected] ------libdwarf@20130729-d9b90962

We can also search for packages that have a certain attribute. For example, spack find libdwarf +debug will show only installations of libdwarf with the ‘debug’ compile-time option enabled. The full spec syntax is discussed in detail in Specs & dependencies.

1.3.4 Compiler configuration

Spack has the ability to build packages with multiple compilers and compiler versions. Spack searches for compilers on your machine automatically the first time it is run. It does this by inspecting your PATH. spack compilers

You can see which compilers spack has found by running spack compilers or spack compiler list: $ spack compilers ==> Available compilers -- gcc [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

1.3. Basic usage 15 Spack Documentation, Release 0.9

-- intel [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] -- clang [email protected] [email protected] [email protected] [email protected] -- pgi [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

Any of these compilers can be used to build Spack packages. More on how this is done is in Specs & dependencies. spack compiler add

An alias for spack compiler find. spack compiler find

If you do not see a compiler in this list, but you want to use it with Spack, you can simply run spack compiler find with the path to where the compiler is installed. For example: $ spack compiler find /usr/local/tools/ic-13.0.079 ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml [email protected]

Or you can run spack compiler find with no arguments to force auto-detection. This is useful if you do not know where compilers are installed, but you know that new compilers have been added to your PATH. For example, using dotkit, you might do this: $ module load gcc-4.9.0 $ spack compiler find ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml [email protected]

This loads the environment module for gcc-4.9.0 to add it to PATH, and then it adds the compiler to Spack.

spack compiler info

If you want to see specifics on a particular compiler, you can run spack compiler info on it: $ spack compiler info intel@15 [email protected]: cc = /usr/local/bin/icc-15.0.090 cxx = /usr/local/bin/icpc-15.0.090 f77 = /usr/local/bin/ifort-15.0.090 fc = /usr/local/bin/ifort-15.0.090 modules = [] = centos6

This shows which C, C++, and Fortran compilers were detected by Spack. Notice also that we didn’t have to be too specific about the version. We just said intel@15, and information about the only matching Intel compiler was displayed.

16 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Manual compiler configuration

If auto-detection fails, you can manually configure a compiler by editing your ~/.spack/compilers.yaml file. You can do this by running spack config edit compilers, which will open the file in your $EDITOR. Each compiler configuration in the file looks like this: compilers: - compiler: modules = [] operating_system: centos6 paths: cc: /usr/local/bin/icc-15.0.024-beta cxx: /usr/local/bin/icpc-15.0.024-beta f77: /usr/local/bin/ifort-15.0.024-beta fc: /usr/local/bin/ifort-15.0.024-beta spec: [email protected]:

For compilers, like clang, that do not support Fortran, put None for f77 and fc: paths: cc: /usr/bin/clang cxx: /usr/bin/clang++ f77: None fc: None spec: [email protected]:

Once you save the file, the configured compilers will show up in the list displayed by spack compilers. You can also add compiler flags to manually configured compilers. The valid flags are cflags, cxxflags, fflags, cppflags, ldflags, and ldlibs. For example: compilers: - compiler: modules = [] operating_system: OS paths: cc: /usr/local/bin/icc-15.0.024-beta cxx: /usr/local/bin/icpc-15.0.024-beta f77: /usr/local/bin/ifort-15.0.024-beta fc: /usr/local/bin/ifort-15.0.024-beta parameters: cppflags: -O3 -fPIC spec: [email protected]:

These flags will be treated by spack as if they were enterred from the command line each time this compiler is used. The compiler wrappers then inject those flags into the compiler command. Compiler flags enterred from the command line will be discussed in more detail in the following section.

1.3.5 Specs & dependencies

We know that spack install, spack uninstall, and other commands take a package name with an optional version specifier. In Spack, that descriptor is called a spec. Spack uses specs to refer to a particular build configuration (or configurations) of a package. Specs are more than a package name and a version; you can use them to specify the compiler, compiler version, architecture, compile options, and dependency options for a build. In this section, we’ll go over the full syntax of specs. Here is an example of a much longer spec than we’ve seen thus far:

1.3. Basic usage 17 Spack Documentation, Release 0.9

mpileaks @1.2:1.4 %[email protected] +debug -qt arch=bgq_os ^callpath @1.1 %[email protected]

If provided to spack install, this will install the mpileaks library at some version between 1.2 and 1.4 (inclusive), built using gcc at version 4.7.5 for the Blue Gene/Q architecture, with debug options enabled, and without Qt support. Additionally, it says to link it with the callpath library (which it depends on), and to build callpath with gcc 4.7.2. Most specs will not be as complicated as this one, but this is a good example of what is possible with specs. More formally, a spec consists of the following pieces: • Package name identifier (mpileaks above) • @ Optional version specifier (@1.2:1.4) • % Optional compiler specifier, with an optional compiler version (gcc or [email protected]) • + or - or ~ Optional variant specifiers (+debug, -qt, or ~qt) for boolean variants • name= Optional variant specifiers that are not restricted to boolean variants • name= Optional compiler flag specifiers. Valid flag names are cflags, cxxflags, fflags, cppflags, ldflags, and ldlibs. • target= os= Optional architecture specifier (target=haswell os=CNL10) • ^ Dependency specs (^[email protected]) There are two to notice here. The first is that specs are recursively defined. That is, each dependency after ^ is a spec itself. The second is that everything is optional except for the initial package name identifier. Users can be as vague or as specific as they want about the details of building packages, and this makes spack good for beginners and experts alike. To really understand what’s going on above, we need to think about how software is structured. An executable or a library (these are generally the artifacts produced by building software) depends on other libraries in order to run. We can represent the relationship between a package and its dependencies as a graph. Here is the full dependency graph for mpileaks:

mpich

mpileaks libdwarf callpath dyninst libelf

Each box above is a package and each arrow represents a dependency on some other package. For example, we say that the package mpileaks depends on callpath and mpich. mpileaks also depends indirectly on dyninst, libdwarf, and libelf, in that these libraries are dependencies of callpath. To install mpileaks, Spack has to build all of these packages. Dependency graphs in Spack have to be acyclic, and the depends on relationship is directional, so this is a directed, acyclic graph or DAG. The package name identifier in the spec is the root of some dependency DAG, and the DAG itself is implicit. Spack knows the precise dependencies among packages, but users do not need to know the full DAG structure. Each ^ in the full spec refers to some dependency of the root package. Spack will raise an error if you supply a name after ^ that the root does not actually depend on (e.g. mpileaks ^[email protected]).

18 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Spack further simplifies things by only allowing one configuration of each package within any single build. Above, both mpileaks and callpath depend on mpich, but mpich appears only once in the DAG. You cannot build an mpileaks version that depends on one version of mpich and on a callpath version that depends on some other version of mpich. In general, such a configuration would likely behave unexpectedly at runtime, and Spack enforces this to ensure a consistent runtime environment. The point of specs is to abstract this full DAG from Spack users. If a user does not care about the DAG at all, she can refer to mpileaks by simply writing mpileaks. If she knows that mpileaks indirectly uses dyninst and she wants a particular version of dyninst, then she can refer to mpileaks ^[email protected]. Spack will fill in the rest when it parses the spec; the user only needs to know package names and minimal details about their relationship. When spack prints out specs, it sorts package names alphabetically to normalize the way they are displayed, but users do not need to worry about this when they write specs. The only restriction on the order of dependencies within a spec is that they appear after the root package. For example, these two specs represent exactly the same configuration: mpileaks ^[email protected] ^[email protected] mpileaks ^[email protected] ^[email protected]

You can put all the same modifiers on dependency specs that you would put on the root spec. That is, you can specify their versions, compilers, variants, and architectures just like any other spec. Specifiers are associated with the nearest package name to their left. For example, above, @1.1 and %[email protected] associates with the callpath package, while @1.2:1.4, %[email protected], +debug, -qt, and target=haswell os=CNL10 all associate with the mpileaks package. In the diagram above, mpileaks depends on mpich with an unspecified version, but packages can depend on other packages with constraints by adding more specifiers. For example, mpileaks could depend on [email protected]: if it can only build with version 1.2 or higher of mpich. Below are more details about the specifiers that you can add to specs.

Version specifier

A version specifier comes somewhere after a package name and starts with @. It can be a single version, e.g. @1.0, @3, or @1.2a7. Or, it can be a range of versions, such as @1.0:1.5 (all versions between 1.0 and 1.5, inclusive). Version ranges can be open, e.g. :3 means any version up to and including 3. This would include 3.4 and 3.4.2. 4.2: means any version above and including 4.2. Finally, a version specifier can be a set of arbitrary versions, such as @1.0,1.5,1.7 (1.0, 1.5, or 1.7). When you supply such a specifier to spack install, it constrains the set of versions that Spack will install. If the version spec is not provided, then Spack will choose one according to policies set for the particular spack installation. If the spec is ambiguous, i.e. it could match multiple versions, Spack will choose a version within the spec’s constraints according to policies set for the particular Spack installation. Details about how versions are compared and how Spack determines if one version is less than another are discussed in the developer guide.

Compiler specifier

A compiler specifier comes somewhere after a package name and starts with %. It tells Spack what compiler(s) a particular package should be built with. After the % should come the name of some registered Spack compiler. This might include gcc, or intel, but the specific compilers available depend on the site. You can run spack compilers to get a list; more on this below. The compiler spec can be followed by an optional compiler version. A compiler version specifier looks exactly like a package version specifier. Version specifiers will associate with the nearest package name or compiler specifier to their left in the spec.

1.3. Basic usage 19 Spack Documentation, Release 0.9

If the compiler spec is omitted, Spack will choose a default compiler based on site policies.

Variants

Variants are named options associated with a particular package. They are optional, as each package must pro- vide default values for each variant it makes available. Variants can be specified using a flexible parameter syntax name=. For example, spack install libelf debug=True will install libelf build with debug flags. The names of particular variants available for a package depend on what was provided by the package author. spack info will provide information on what build variants are available. For compatibility with earlier versions, variants which happen to be boolean in nature can be specified by a syntax that represents turning options on and off. For example, in the previous spec we could have supplied libelf +debug with the same effect of enabling the debug compile time option for the libelf package. Depending on the package a variant may have any default value. For libelf here, debug is False by default, and we turned it on with debug=True or +debug. If a variant is True by default you can turn it off by either adding -name or ~name to the spec. There are two syntaxes here because, depending on context, ~ and - may mean different things. In most shells, the following will result in the shell performing home directory substitution: mpileaks ~debug # shell may try to substitute this! mpileaks~debug # use this instead

If there is a user called debug, the ~ will be incorrectly expanded. In this situation, you would want to write libelf -debug. However, - can be ambiguous when included after a package name without spaces: mpileaks-debug # wrong! mpileaks -debug # right

Spack allows the - character to be part of package names, so the above will be interpreted as a request for the mpileaks-debug package, not a request for mpileaks built without debug options. In this scenario, you should write mpileaks~debug to avoid ambiguity. When spack normalizes specs, it prints them out with no spaces boolean variants using the backwards compatibility syntax and uses only ~ for disabled boolean variants. We allow - and spaces on the command line is provided for convenience and legibility.

Compiler Flags

Compiler flags are specified using the same syntax as non-boolean variants, but fulfill a different purpose. While the function of a variant is set by the package, compiler flags are used by the compiler wrappers to inject flags into the compile line of the build. Additionally, compiler flags are inherited by dependencies. spack install libdwarf cppflags=\"-g\" will install both libdwarf and libelf with the -g flag injected into their compile line. Notice that the value of the compiler flags must be escape quoted on the command line. From within python files, the same spec would be specified libdwarf cppflags="-g". This is necessary because of how the shell handles the quote symbols. The six compiler flags are injected in the order of implicit make commands in GNU Autotools. If all flags are set, the order is $cppflags $cflags|$cxxflags $ldflags $ldlibs for C and C++ and $fflags $cppflags $ldflags $ldlibs for Fortran.

20 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Architecture specifiers

The architecture can be specified by using the reserved words target and/or os (target=x86-64 os=debian7). You can also use the triplet form of platform, operating system and processor. $ spack install libelf arch=cray-CNL10-haswell

Users on non-Cray systems won’t have to worry about specifying the architecture. Spack will autodetect what kind of operating system is on your machine as well as the processor. For more information on how the architecture can be used on Cray machines, see Spack on Cray

1.3.6 Virtual dependencies

The dependence graph for mpileaks we saw above wasn’t quite accurate. mpileaks uses MPI, which is an interface that has many different implementations. Above, we showed mpileaks and callpath depending on mpich, which is one particular implementation of MPI. However, we could build either with another implementation, such as openmpi or mvapich. Spack represents interfaces like this using virtual dependencies. The real dependency DAG for mpileaks looks like this:

mpi

mpileaks libdwarf callpath dyninst libelf

Notice that mpich has now been replaced with mpi. There is no real MPI package, but some packages provide the MPI interface, and these packages can be substituted in for mpi when mpileaks is built. You can see what virtual packages a particular package provides by getting info on it: $ spack info mpich Package: mpich Homepage: http://www.mpich.org

Safe versions: 3.2 http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz 3.1.4 http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz 3.1.3 http://www.mpich.org/static/downloads/3.1.3/mpich-3.1.3.tar.gz 3.1.2 http://www.mpich.org/static/downloads/3.1.2/mpich-3.1.2.tar.gz 3.1.1 http://www.mpich.org/static/downloads/3.1.1/mpich-3.1.1.tar.gz 3.1 http://www.mpich.org/static/downloads/3.1/mpich-3.1.tar.gz 3.0.4 http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz

Variants: Name Default Description

hydra on Build the hydra process manager

1.3. Basic usage 21 Spack Documentation, Release 0.9

pmi on Build with PMI support verbs off Build support for OpenFabrics verbs.

Build Dependencies: None

Link Dependencies: None

Run Dependencies: None

Virtual packages: mpich@3: provides mpi@:3.0 mpich@1: provides mpi@:1.3

Description: MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.

Spack is unique in that its virtual packages can be versioned, just like regular packages. A particular version of a package may provide a particular version of a virtual package, and we can see above that mpich versions 1 and above provide all mpi interface versions up to 1, and mpich versions 3 and above provide mpi versions up to 3. A package can depend on a particular version of a virtual package, e.g. if an application needs MPI-2 functions, it can depend on mpi@2: to indicate that it needs some implementation that provides MPI-2 functions.

Constraining virtual packages

When installing a package that depends on a virtual package, you can opt to specify the particular provider you want to use, or you can let Spack pick. For example, if you just type this: $ spack install mpileaks

Then spack will pick a provider for you according to site policies. If you really want a particular version, say mpich, then you could run this instead: $ spack install mpileaks ^mpich

This forces spack to use some version of mpich for its implementation. As always, you can be even more specific and require a particular mpich version: $ spack install mpileaks ^mpich@3

The mpileaks package in particular only needs MPI-1 commands, so any MPI implementation will do. If another package depends on mpi@2 and you try to give it an insufficient MPI implementation (e.g., one that provides only mpi@:1), then Spack will raise an error. Likewise, if you try to plug in some package that doesn’t provide MPI, Spack will raise an error.

Specifying Specs by Hash

Complicated specs can become cumbersome to enter on the command line, especially when many of the qualifications are necessary to distinguish between similar installs, for example when using the uninstall command. To avoid this, when referencing an existing spec, Spack allows you to reference specs by their hash. We previously discussed the spec hash that Spack computes. In place of a spec in any command, substitute / where is any amount from the beginning of a spec hash. If the given spec hash is sufficient to be unique, Spack will replace the reference with the spec to which it refers. Otherwise, it will prompt for a more qualified hash.

22 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Note that this will not work to reinstall a depencency uninstalled by spack uninstall --force. spack providers

You can see what packages provide a particular virtual package using spack providers. If you wanted to see what packages provide mpi, you would just run: $ spack providers mpi intel-parallel-studio@cluster:+mpi [email protected] [email protected]: mpich@1: [email protected]: [email protected]: mpich@3: [email protected]

And if you only wanted to see packages that provide MPI-2, you would add a version specifier to the spec: $ spack providers mpi@2 intel-parallel-studio@cluster:+mpi [email protected]: [email protected]: mpich@3: [email protected] [email protected] [email protected]:

Notice that the package versions that provide insufficient MPI versions are now filtered out.

1.3.7 Integration with module systems

Note: Environment module support is currently experimental and should not be considered a stable feature of Spack. In particular, the interface and/or generated module names may change in future versions.

Spack provides some integration with Environment Modules and Dotkit to make it easier to use the packages it in- stalled.

Installing Environment Modules

In order to use Spack’s generated environment modules, you must have installed the Environment Modules package. On many Linux distributions, this can be installed from the vendor’s repository: $ install environment-modules # (Fedora/RHEL/CentOS) $ -get install environment-modules # (Ubuntu/Debian)

If your Linux distribution does not have Environment Modules, you can get it with Spack: $ spack install environment-modules

In this case to activate it automatically you need to add the following two lines to your .bashrc profile (or similar): MODULES_HOME=`spack location -i environment-modules` source ${MODULES_HOME}/Modules/init/bash

If you use a shell other than bash, modify the commands above accordingly and source the appropriate file in ${MODULES_HOME}/Modules/init/.

Spack and module systems

You can enable shell support by sourcing some files in the /share/spack directory. For bash or ksh, run:

1.3. Basic usage 23 Spack Documentation, Release 0.9

export SPACK_ROOT=/path/to/spack . $SPACK_ROOT/share/spack/setup-env.sh

For csh and tcsh run: setenv SPACK_ROOT /path/to/spack source $SPACK_ROOT/share/spack/setup-env.csh

You can put the above code in your .bashrc or .cshrc, and Spack’s shell support will be available on the command line. When you install a package with Spack, it automatically generates a module file that lets you add the package to your environment. Currently, Spack supports the generation of Environment Modules and Dotkit. Generated module files for each of these systems can be found in these directories: $SPACK_ROOT/share/spack/modules $SPACK_ROOT/share/spack/dotkit

The directories are automatically added to your MODULEPATH and DK_NODE environment variables when you enable Spack’s shell support.

Using Modules & Dotkits

If you have shell support enabled you should be able to run either module avail or use -l spack to see what modules/dotkits have been installed. Here is sample output of those programs, showing lots of installed packages. $ module avail

------/home/gamblin2/spack/share/spack/modules/linux-debian7-x86_64 [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] [email protected]%[email protected] libdwarf@20130729%[email protected]

$ use -l spack spack [email protected]%[email protected] - adept-utils @1.0 [email protected]%[email protected] - automaded @1.0 [email protected]%[email protected] - boost @1.55.0 [email protected]%[email protected] - callpath @1.0.1 [email protected]%[email protected] - dyninst @8.1.2 [email protected]%[email protected] - gmp @6.0.0a [email protected]%[email protected] - libNBC @1.1.1 libdwarf@20130729%[email protected] - libdwarf @20130729 [email protected]%[email protected] - libelf @0.8.13 [email protected]%[email protected] - libelf @0.8.13 [email protected]%[email protected] - mpc @1.0.2 [email protected]%[email protected] - mpfr @3.1.2

24 Chapter 1. Table of Contents Spack Documentation, Release 0.9

[email protected]%[email protected] - mpich @3.0.4 [email protected]%[email protected] - mpich @3.0.4 [email protected]%[email protected] - netgauge @2.4.6 [email protected]%[email protected] - sundials @2.5.0

The names here should look familiar, they’re the same ones from spack find. You can use the names here directly. For example, you could type either of these commands to load the callpath module: $ use [email protected]%[email protected]

$ module load [email protected]%[email protected]

Neither of these is particularly pretty, easy to remember, or easy to type. Luckily, Spack has its own interface for using modules and dotkits. You can use the same spec syntax you’re used to: Environment Modules Dotkit spack load spack use spack unload spack unuse And you can use the same shortened names you use everywhere else in Spack. For example, this will add the mpich package built with gcc to your path: $ spack install mpich %[email protected]

# ... wait for install ...

$ spack use mpich %[email protected] Prepending: [email protected]%[email protected] (ok) $ which mpicc ~/src/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]/bin/mpicc

Or, similarly with modules, you could type: $ spack load mpich %[email protected]

These commands will add appropriate directories to your PATH, MANPATH, CPATH, and LD_LIBRARY_PATH. When you no longer want to use a package, you can type unload or unuse similarly: $ spack unload mpich %[email protected] # modules $ spack unuse mpich %[email protected] # dotkit

Note: These use, unuse, load, and unload subcommands are only available if you have enabled Spack’s shell support and you have dotkit or modules installed on your machine.

Ambiguous module names

If a spec used with load/unload or use/unuse is ambiguous (i.e. more than one installed package matches it), then Spack will warn you: $ spack load libelf ==> Error: Multiple matches for spec libelf. Choose one: [email protected]%[email protected] arch=linux-debian7-x86_64 [email protected]%[email protected] arch=linux-debian7-x86_64

You can either type the spack load command again with a fully qualified argument, or you can add just enough extra constraints to identify one package. For example, above, the key differentiator is that one libelf is built with the Intel compiler, while the other used gcc. You could therefore just type:

1.3. Basic usage 25 Spack Documentation, Release 0.9

$ spack load libelf %intel

To identify just the one built with the Intel compiler.

Module files generation and customization

Environment Modules and Dotkit files are generated when packages are installed, and are placed in the following directories under the Spack root: $SPACK_ROOT/share/spack/modules $SPACK_ROOT/share/spack/dotkit

The content that gets written in each module file can be customized in two ways: 1. overriding part of the spack.Package API within a package.py 2. writing dedicated configuration files

Override Package API

There are currently two methods in spack.Package that may affect the content of module files: def setup_environment(self, spack_env, run_env): """Set up the compile and runtime environments for a package.""" pass

Recursive Modules

In some cases, it is desirable to load not just a module, but also all the modules it depends on. This is not required for most modules because Spack builds binaries with RPATH support. However, not all packages use RPATH to find their dependencies: this can be true in particular for Python extensions, which are currently not built with RPATH. Modules may be loaded recursively with the load command’s --dependencies or -r argument: $ spack load --dependencies ...

More than one spec may be placed on the command line here.

Module Commands for Shell Scripts

Although Spack is flexible, the module command is much faster. This could become an issue when emitting a series of spack load commands inside a shell script. By adding the --shell flag, spack module find may also be used to generate code that can be cut-and-pasted into a shell script. For example: $ spack module find tcl --dependencies --shell py-numpy git # [email protected]%[email protected]=linux-x86_64 module load bzip2-1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx # [email protected]%[email protected]=linux-x86_64 module load ncurses-6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv # [email protected]%[email protected]=linux-x86_64 module load zlib-1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z # [email protected]%[email protected]=linux-x86_64 module load sqlite-3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr # [email protected]%[email protected]=linux-x86_64 module load readline-6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3

26 Chapter 1. Table of Contents Spack Documentation, Release 0.9

# [email protected]%[email protected]=linux-x86_64 module load python-3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi # [email protected]%[email protected]=linux-x86_64 module load py-setuptools-20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2 # [email protected]%[email protected]=linux-x86_64 module load py-nose-1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli # [email protected]%[email protected]+shared=linux-x86_64 module load openblas-0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y # [email protected]%[email protected]+blas+lapack=linux-x86_64 module load py-numpy-1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r # [email protected]%[email protected]=linux-x86_64 module load curl-7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi # [email protected]%[email protected]=linux-x86_64 module load autoconf-2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4 # [email protected]%[email protected]~doc+ncurses+openssl~qt=linux-x86_64 module load cmake-3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t # [email protected]%[email protected]=linux-x86_64 module load expat-2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd # [email protected]%[email protected]+curl+expat=linux-x86_64 module load git-2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd

The script may be further edited by removing unnecessary modules. This script may be directly executed in bash via: source<(spack module find tcl --dependencies --shell py-numpy git)

Regenerating Module files def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Set up the environment of packages that depend on this one""" pass

As briefly stated in the comments, the first method lets you customize the module file content for the package you are currently writing, the second allows for modifications to your dependees module file. In both cases one needs to fill run_env with the desired list of environment modifications.

Example : builtin/packages/python/package.py

The python package that comes with the builtin Spack repository overrides setup_dependent_environment in the following way: def setup_dependent_environment(self, spack_env, run_env, extension_spec): if extension_spec.package.extends(self.spec): run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) to insert the appropriate PYTHONPATH modifications in the module files of python packages.

Configuration files

Another way of modifying the content of module files is writing a modules.yaml configuration file. Following usual Spack conventions, this file can be placed either at site or user scope. The default site configuration reads:

1.3. Basic usage 27 Spack Documentation, Release 0.9

# ------# This is the default configuration for Spack's module file generation. # # Settings here are versioned with Spack and are intended to provide # sensible defaults out of the box. Spack maintainers should edit this # file to keep it current. # # Users can override these settings by editing the following files. # # Per-spack-instance settings (overrides defaults): # $SPACK_ROOT/etc/spack/modules.yaml # # Per-user settings (overrides default and site settings): # ~/.spack/modules.yaml # ------modules: enable: - tcl - dotkit prefix_inspections: bin: - PATH man: - MANPATH share/man: - MANPATH lib: - LIBRARY_PATH - LD_LIBRARY_PATH lib64: - LIBRARY_PATH - LD_LIBRARY_PATH include: - CPATH lib/pkgconfig: - PKG_CONFIG_PATH lib64/pkgconfig: - PKG_CONFIG_PATH '': - CMAKE_PREFIX_PATH

It basically inspects the installation prefixes for the existence of a few folders and, if they exist, it prepends a path to a given list of environment variables. For each module system that can be enabled a finer configuration is possible: modules: tcl: # contains environment modules specific customizations dotkit: # contains dotkit specific customizations

The structure under the tcl and dotkit keys is almost equal, and will be showcased in the following by some examples.

Select module files by spec constraints

Using spec syntax it’s possible to have different customizations for different groups of module files.

28 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Considering : modules: tcl: all: # Default addition for every package environment: set: BAR:'bar' ^openmpi:: # A double ':' overrides previous rules environment: set: BAR:'baz' zlib: environment: prepend_path: LD_LIBRARY_PATH:'foo' zlib%[email protected]: environment: unset: - FOOBAR what will happen is that: • every module file will set BAR=bar • unless the associated spec satisfies ^openmpi in which case BAR=baz • any spec that satisfies zlib will additionally prepend foo to LD_LIBRARY_PATH • any spec that satisfies zlib%[email protected] will additionally unset FOOBAR

Note: Order does matter The modifications associated with the all keyword are always evaluated first, no matter where they appear in the configuration file. All the other spec constraints are instead evaluated top to bottom.

Filter modifications out of module files

Modifications to certain environment variables in module files are generated by default. Suppose you would like to avoid having CPATH and LIBRARY_PATH modified by your dotkit modules. Then : modules: dotkit: all: filter: # Exclude changes to any of these variables environment_blacklist: ['CPATH','LIBRARY_PATH'] will generate dotkit module files that will not contain modifications to either CPATH or LIBRARY_PATH and envi- ronment module files that instead will contain those modifications.

Autoload dependencies

The following lines in modules.yaml:

1.3. Basic usage 29 Spack Documentation, Release 0.9

modules: tcl: all: autoload:'direct' will produce environment module files that will automatically load their direct dependencies.

Note: Allowed values for autoload statements Allowed values for autoload statements are either none, direct or all. In tcl configuration it is possible to use the option prerequisites that accepts the same values and will add prereq statements instead of automatically loading other modules.

Blacklist or whitelist the generation of specific module files

Sometimes it is desirable not to generate module files, a common use case being not providing the users with software built using the system compiler. A configuration file like: modules: tcl: whitelist: ['gcc','llvm'] # Whitelist will have precedence over blacklist blacklist: ['%[email protected]'] # Assuming [email protected] is the system compiler will skip module file generation for anything that satisfies %[email protected], with the exception of specs that satisfy gcc or llvm.

Customize the naming scheme and insert conflicts

A configuration file like: modules: tcl: naming_scheme:'{name}/{version}-{compiler.name}-{compiler.version}' all: conflict: ['{name}','intel/14.0.1'] will create module files that will conflict with intel/14.0.1 and with the base directory of the same module, effectively preventing the possibility to load two or more versions of the same software at the same time.

Note: Tokens available for the naming scheme currently only the tokens shown in the example are available to construct the naming scheme

Note: The conflict option is tcl specific

30 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Regenerating module files

Sometimes you may need to regenerate the modules files. For example, if newer, fancier module support is added to Spack at some later date, you may want to regenerate all the modules to take advantage of these new features.

spack module refresh

Running spack module refresh will remove the share/spack/modules and share/spack/dotkit directories, then regenerate all module and dotkit files from scratch: $ spack module refresh ==> Regenerating tcl module files. ==> Regenerating dotkit module files.

1.3.8 Filesystem Views

The Spack installation area allows for many package installation trees to coexist and gives the user choices as to what versions and variants of packages to use. To use them, the user must rely on a way to aggregate a subset of those packages. The section on Environment Modules gives one good way to do that which relies on setting various environment variables. An alternative way to aggregate is through filesystem views. A filesystem view is a single directory tree which is the union of the directory hierarchies of the individual package installation trees that have been included. The files of the view’s installed packages are brought into the view by symbolic or hard links back to their location in the original Spack installation area. As the view is formed, any clashes due to a file having the exact same path in its package installation tree are handled in a first-come-first-served basis and a warning is printed. Packages and their dependencies can be both added and removed. During removal, empty directories will be purged. These operations can be limited to pertain to just the packages listed by the user or to exclude specific dependencies and they allow for software installed outside of Spack to coexist inside the filesystem view tree. By its nature, a filesystem view represents a particular choice of one set of packages among all the versions and variants that are available in the Spack installation area. It is thus equivalent to the directory hiearchy that might exist under /usr/local. While this limits a view to including only one version/variant of any package, it provides the benefits of having a simpler and traditional layout which may be used without any particular knowledge that its packages were built by Spack. Views can be used for a variety of purposes including: • A central installation in a traditional layout, eg /usr/local maintained over time by the sysadmin. • A self-contained installation area which may for the basis of a top-level atomic versioning scheme, eg /opt/pro vs /opt/dev. • Providing an atomic and monolithic binary distribution, eg for delivery as a single tarball. • Producing ephemeral testing or developing environments.

Using Filesystem Views

A filesystem view is created and packages are linked in by the spack view command’s symlink and hardlink sub-commands. The spack view remove command can be used to unlink some or all of the filesystem view. The following example creates a filesystem view based on an installed cmake package and then removes from the view the files in the cmake package while retaining its dependencies.

1.3. Basic usage 31 Spack Documentation, Release 0.9

$ spack view --verbose symlink myview [email protected] ==> Linking package: "ncurses" ==> Linking package: "zlib" ==> Linking package: "openssl" ==> Linking package: "cmake"

$ ls myview/ bin doc etc include lib share

$ ls myview/bin/ captoinfo clear cpack ctest infotocap openssl tabs toe tset ccmake cmake c_rehash infocmp ncurses6-config reset tic tput

$ spack view --verbose --dependencies false rm myview [email protected] ==> Removing package: "cmake"

$ ls myview/bin/ captoinfo c_rehash infotocap openssl tabs toe tset clear infocmp ncurses6-config reset tic tput

Limitations of Filesystem Views

This section describes some limitations that should be considered in using filesystems views. Filesystem views are merely organizational. The binary executable programs, shared libraries and other build products found in a view are mere links into the “real” Spack installation area. If a view is built with symbolic links it requires the Spack-installed package to be kept in place. Building a view with hardlinks removes this requirement but any internal paths (eg, rpath or #! interpreter specifications) will still require the Spack-installed package files to be in place. As described above, when a view is built only a single instance of a file may exist in the unified filesystem tree. If more than one package provides a file at the same path (relative to its own root) then it is the first package added to the view that “wins”. A warning is printed and it is up to the user to determine if the conflict matters. It is up to the user to assure a consistent view is produced. In particular if the user excludes packages, limits the following of dependencies or removes packages the view may become inconsistent. In particular, if two packages require the same sub-tree of dependencies, removing one package (recursively) will remove its dependencies and leave the other package broken.

1.3.9 Extensions & Python support

Spack’s installation model assumes that each package will live in its own install prefix. However, certain packages are typically installed within the directory hierarchy of other packages. For example, modules in interpreted languages like Python are typically installed in the $prefix/lib/python-2.7/site-packages directory. Spack has support for this type of installation as well. In Spack, a package that can live inside the prefix of another package is called an extension. Suppose you have Python installed like so: $ spack find python ==> 1 installed packages. -- linux-debian7-x86_64 / [email protected] [email protected]

32 Chapter 1. Table of Contents Spack Documentation, Release 0.9 spack extensions

You can find extensions for your Python installation like this: $ spack extensions python ==> [email protected]%[email protected] arch=linux-debian7-x86_64-703c7a96 ==> 36 extensions: geos py-ipython py-pexpect py-pyside py-sip py-basemap py-libxml2 py-pil py-pytz py-six py-biopython py-mako py-pmw py-rpy2 py-sympy py-cython py-matplotlib py-pychecker py-scientificpython py-virtualenv py-dateutil py-mpi4py py-pygments py-scikit-learn py-epydoc py-mx py-pylint py-scipy py-gnuplot py-nose py-pyparsing py-setuptools py-h5py py-numpy py-pyqt py-shiboken

==> 12 installed: -- linux-debian7-x86_64 / [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

==> None activated.

The extensions are a subset of what’s returned by spack list, and they are packages like any other. They are installed into their own prefixes, and you can see this with spack find --paths: $ spack find --paths py-numpy ==> 1 installed packages. -- linux-debian7-x86_64 / [email protected] [email protected] /g/g21/gamblin2/src/spack/opt/linux-debian7-x86_64/[email protected]/[email protected]

However, even though this package is installed, you cannot use it directly when you run python: $ spack load python $ python Python 2.7.8 (default, Feb 17 2015, 01:35:25) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "", line 1, in ImportError: No module named numpy >>>

Extensions & Environment Modules

There are two ways to get numpy working in Python. The first is to use Integration with module systems. You can simply use or load the module for the extension, and it will be added to the PYTHONPATH in your current shell. For tcl modules: $ spack load python $ spack load py-numpy or, for dotkit:

1.3. Basic usage 33 Spack Documentation, Release 0.9

$ spack use python $ spack use py-numpy

Now import numpy will succeed for as long as you keep your current session open.

Activating Extensions

It is often desirable to have certain packages always available as part of a Python installation. Spack offers a more permanent solution for this case. Instead of requiring users to load particular environment modules, you can activate the package within the Python installation:

spack activate

$ spack activate py-numpy ==> Activated extension [email protected]%[email protected] arch=linux-debian7-x86_64-3c74eb69 for [email protected]%[email protected]. ==> Activated extension [email protected]%[email protected] arch=linux-debian7-x86_64-5f70f816 for [email protected]%[email protected]. ==> Activated extension [email protected]%[email protected] arch=linux-debian7-x86_64-66733244 for [email protected]%[email protected].

Several things have happened here. The user requested that py-numpy be activated in the python installation it was built with. Spack knows that py-numpy depends on py-nose and py-setuptools, so it activated those packages first. Finally, once all dependencies were activated in the python installation, py-numpy was activated as well. If we run spack extensions again, we now see the three new packages listed as activated: $ spack extensions python ==> [email protected]%[email protected] arch=linux-debian7-x86_64-703c7a96 ==> 36 extensions: geos py-ipython py-pexpect py-pyside py-sip py-basemap py-libxml2 py-pil py-pytz py-six py-biopython py-mako py-pmw py-rpy2 py-sympy py-cython py-matplotlib py-pychecker py-scientificpython py-virtualenv py-dateutil py-mpi4py py-pygments py-scikit-learn py-epydoc py-mx py-pylint py-scipy py-gnuplot py-nose py-pyparsing py-setuptools py-h5py py-numpy py-pyqt py-shiboken

==> 12 installed: -- linux-debian7-x86_64 / [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

==> 3 currently activated: -- linux-debian7-x86_64 / [email protected] [email protected] [email protected] [email protected]

Now, when a user runs python, numpy will be available for import without the user having to explicitly loaded. [email protected] now acts like a system Python installation with numpy installed inside of it. Spack accomplishes this by symbolically linking the entire prefix of the py-numpy into the prefix of the python package. To the python interpreter, it looks like numpy is installed in the site-packages directory. The only limitation of activation is that you can only have a single version of an extension activated at a time. This is because multiple versions of the same extension would conflict if symbolically linked into the same prefix. Users who

34 Chapter 1. Table of Contents Spack Documentation, Release 0.9

want a different version of a package can still get it by using environment modules, but they will have to explicitly load their preferred version.

spack activate -f

If, for some reason, you want to activate a package without its dependencies, you can use spack activate -f: $ spack activate -f py-numpy ==> Activated extension [email protected]%[email protected] arch=linux-debian7-x86_64-66733244 for [email protected]%[email protected].

spack deactivate

We’ve seen how activating an extension can be used to set up a default version of a Python module. Obviously, you may want to change that at some point. spack deactivate is the command for this. There are several variants: • spack deactivate will deactivate a single extension. If another activated extension de- pends on this one, Spack will warn you and exit with an error. • spack deactivate --force deactivates an extension regardless of packages that de- pend on it. • spack deactivate --all deactivates an extension and all of its dependencies. Use --force to disregard dependents. • spack deactivate --all deactivates all activated extensions of a package. For exam- ple, to deactivate all python extensions, use: $ spack deactivate --all python

1.3.10 Filesystem requirements

Spack currently needs to be run from a filesystem that supports flock locking semantics. Nearly all local filesystems and recent versions of NFS support this, but parallel filesystems may be mounted without flock support enabled. You can determine how your filesystems are mounted with mount -p. The output for a Lustre filesystem might look like this:

$ mount -l | grep lscratch pilsner-mds1-lnet0@o2ib100:/lsd on /p/lscratchd type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock) porter-mds1-lnet0@o2ib100:/lse on /p/lscratche type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock)

Note the flock option on both Lustre mounts. If you do not see this or a similar option for your filesystem, you may need ot ask your system administrator to enable flock. This issue typically manifests with the error below: $ ./spack find Traceback (most recent call last): File "./spack", line 176, in main() File "./spack", line 154,' in main return_val = command(parser, args) File "./spack/lib/spack/spack/cmd/find.py", line 170, in find specs = set(spack.installed_db.query(\**q_args)) File "./spack/lib/spack/spack/database.py", line 551, in query with self.read_transaction(): File "./spack/lib/spack/spack/database.py", line 598, in __enter__

1.3. Basic usage 35 Spack Documentation, Release 0.9

if self._enter() and self._acquire_fn: File "./spack/lib/spack/spack/database.py", line 608, in _enter return self._db.lock.acquire_read(self._timeout) File "./spack/lib/spack/llnl/util/lock.py", line 103, in acquire_read self._lock(fcntl.LOCK_SH, timeout) # can raise LockError. File "./spack/lib/spack/llnl/util/lock.py", line 64, in _lock fcntl.lockf(self._fd, op | fcntl.LOCK_NB) IOError: [Errno 38] Function not implemented

A nicer error message is TBD in future versions of Spack.

1.3.11 Spack on Cray

Spack differs slightly when used on a Cray system. The architecture spec can differentiate between the front-end and back-end processor and operating system. For example, on Edison at NERSC, the back-end target processor is “Ivy Bridge”, so you can specify to use the back-end this way: $ spack install zlib target=ivybridge

You can also use the operating system to build against the back-end: $ spack install zlib os=CNL10

Notice that the name includes both the operating system name and the major version number concatenated together. Alternatively, if you want to build something for the front-end, you can specify the front-end target processor. The processor for a login node on Edison is “Sandy bridge” so we specify on the command line like so: $ spack install zlib target=sandybridge

And the front-end operating system is: $ spack install zlib os=SuSE11

Cray compiler detection

Spack can detect compilers using two methods. For the front-end, we treat everything the same. The difference lies in back-end compiler detection. Back-end compiler detection is made via the Tcl module avail command. Once it detects the compiler it writes the appropriate PrgEnv and compiler module name to compilers.yaml and sets the paths to each compiler with Cray’s compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load the correct PrgEnv and compiler module and will call appropriate wrapper. The compilers.yaml config file will also differ. There is a modules section that is filled with the compiler’s Program- ming Environment and module name. On other systems, this field is empty []: - compiler: modules: - PrgEnv-intel - intel/15.0.109

As mentioned earlier, the compiler paths will look different on a Cray system. Since most compilers are invoked using cc, CC and ftn, the paths for each compiler are replaced with their respective Cray compiler wrapper names: paths: cc: cc cxx: CC

36 Chapter 1. Table of Contents Spack Documentation, Release 0.9

f77: ftn fc: ftn

As opposed to an explicit path to the compiler executable. This allows Spack to call the Cray compiler wrappers during build time. For more on compiler configuration, check out Compiler configuration. Spack sets the default Cray link type to dynamic, to better match other other platforms. Individual packages can enable static linking (which is the default outside of Spack on cray systems) using the -static flag.

Setting defaults and using Cray modules

If you want to use default compilers for each PrgEnv and also be able to load cray external modules, you will need to set up a packages.yaml. Here’s an example of an external configuration for cray modules: packages: mpi: modules: [email protected]%[email protected] arch=cray_xc-haswell-CNL10: cray-mpich [email protected]%[email protected] arch=cray_xc-haswell-CNL10: cray-mpich

This tells Spack that for whatever package that depends on mpi, load the cray-mpich module into the environment. You can then be able to use whatever environment variables, libraries, etc, that are brought into the environment via module load. You can set the default compiler that Spack can use for each compiler type. If you want to use the Cray defaults, then set them under all: in packages.yaml. In the compiler field, set the compiler specs in your order of preference. Whenever you build with that compiler type, Spack will concretize to that version. Here is an example of a full packages.yaml used at NERSC packages: mpi: modules: [email protected]%[email protected] arch=cray_xc-CNL10-ivybridge: cray-mpich [email protected]%[email protected] arch=cray_xc-SuSE11-ivybridge: cray-mpich buildable: False netcdf: modules: [email protected]%[email protected] arch=cray_xc-CNL10-ivybridge: cray-netcdf [email protected]%[email protected] arch=cray_xc-CNL10-ivybridge: cray-netcdf buildable: False hdf5: modules: [email protected]%[email protected] arch=cray_xc-CNL10-ivybridge: cray-hdf5 [email protected]%[email protected] arch=cray_xc-CNL10-ivybridge: cray-hdf5 buildable: False all: compiler: [[email protected], [email protected]]

Here we tell spack that whenever we want to build with gcc use version 5.2.0 or if we want to build with intel compilers, use version 16.0.0.109. We add a spec for each compiler type for each cray modules. This ensures that for each compiler on our system we can use that external module. For more on external packages check out the section External Packages.

1.3. Basic usage 37 Spack Documentation, Release 0.9

1.3.12 Getting Help spack help

If you don’t find what you need here, the help subcommand will print out out a list of all of spack’s options and subcommands: $ spack help usage: spack [-h] [-d] [-D] [-k] [-m] [-p] [-v] [-V] SUBCOMMAND ...

Spack: the Supercomputing PACKage Manager. spec expressions: PACKAGE [CONSTRAINTS]

CONSTRAINTS: [0;36m@version[0m [0;32m%compiler @compiler_version[0m [0;94m+variant[0m [0;31m-variant[0m or [0;31m~variant[0m [0;35m=architecture[0m [^DEPENDENCY [CONSTRAINTS] ...] positional arguments: SUBCOMMAND activate Activate a package extension. arch Print the architecture for this machine bootstrap Create a new installation of spack in another prefix cd cd to spack directories in the shell. checksum Checksum available versions of a package. clean Remove build stage and source tarball for packages. compiler Manage compilers compilers List available compilers. Same as 'spack compiler list'. config Get and set configuration options. create Create a new package file from an archive URL deactivate Deactivate a package extension. dependents Show installed packages that depend on another. diy Do-It-Yourself: build from an existing source directory. doc Run pydoc from within spack. edit Open package files in $EDITOR env Run a command with the install environment for a spec. extensions List extensions for package. fetch Fetch archives for packages find Find installed spack packages graph Generate graphs of package dependency relationships. help Get help on spack and its commands info Get detailed information on a particular package install Build and install packages list List available spack packages load Add package to environment using modules. location Print out locations of various directories used by Spack Calculate md5 checksums for files/urls. mirror Manage mirrors. module Manipulate module files package-list Print a list of all packages in reStructuredText. patch Patch expanded archive sources in preparation for install pkg Query packages associated with particular git revisions. providers List packages that provide a particular virtual package

38 Chapter 1. Table of Contents Spack Documentation, Release 0.9

purge Remove temporary build files and/or downloaded archives python Launch an interpreter as spack would launch a command reindex Rebuild Spack's package database. repo Manage package source repositories. restage Revert checked out package source code. setup Create a configuration script and module, but don't build. spec print out abstract and concrete versions of a spec. stage Expand downloaded archive in preparation for install test Run unit tests test-install Run package install as a unit test, output formatted results. uninstall Remove an installed package unload Remove package from environment using module. unuse Remove package from environment using dotkit. url-parse Show parsing of a URL, optionally spider web for versions. urls Inspect urls used by packages in spack. use Add package to environment using dotkit. versions List available versions of a package view Produce a single-rooted directory view of a spec. optional arguments: -h, --help show this help message and exit -d, --debug Write out debug logs during compile -D, --pdb Run spack under the pdb debugger -k, --insecure Do not check ssl certificates when downloading. -m, --mock Use mock packages instead of real ones. -p, --profile Profile execution using cProfile. -v, --verbose Print additional output during builds -V, --version show program's version number and exit

Adding an argument, e.g. spack help , will print out usage information for a particular subcom- mand: $ spack help install usage: spack install [-h] [-i] [-j JOBS] [--keep-prefix] [--keep-stage] [-n] [-v] [--fake] [--dirty] [--run-tests] ... positional arguments: packages specs of packages to install optional arguments: -h, --help show this help message and exit -i, --ignore-dependencies Do not try to install dependencies of requested packages. -j JOBS, --jobs JOBS Explicitly set number of make jobs. Default is #cpus. --keep-prefix Don't remove the install prefix if installation fails. --keep-stage Don't remove the build stage if installation succeeds. -n, --no-checksum Do not check packages against checksum -v, --verbose Display verbose build output while installing. --fake Fake install. Just remove prefix and create a fake file. --dirty Install a package *without* cleaning the environment. --run-tests Run tests during installation of a package.

Alternately, you can use spack --help in place of spack help, or spack --help to get help on a particular subcommand.

1.3. Basic usage 39 Spack Documentation, Release 0.9

1.4 Packaging Guide

This guide is intended for developers or administrators who want to package software so that Spack can install it. It assumes that you have at least some familiarity with Python, and that you’ve read the basic usage guide, especially the part about specs. There are two key parts of Spack: 1. Specs: expressions for describing builds of software, and 2. Packages: Python modules that describe how to build software according to a spec. Specs allow a user to describe a particular build in a way that a package author can understand. Packages allow a the packager to encapsulate the build logic for different versions, compilers, options, platforms, and dependency combinations in one place. Essentially, a package translates a spec into build logic. Packages in Spack are written in pure Python, so you can do anything in Spack that you can do in Python. Python was chosen as the implementation language for two reasons. First, Python is becoming ubiquitous in the scientific software community. Second, it’s a modern language and has many powerful features to help make package writing easy.

1.4.1 Creating & editing packages spack create

The spack create command creates a directory with the package name and generates a package.py file with a boilerplate package template from a URL. The URL should point to a tarball or other software archive. In most cases, spack create plus a few modifications is all you need to get a package working. Here’s an example: $ spack create http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz

Spack examines the tarball URL and tries to figure out the name of the package to be created. Once the name is determined a directory in the appropriate repository is created with that name. Spack prefers, but does not require, that names be lower case so the directory name will be lower case when spack create generates it. In cases where it is desired to have mixed case or upper case simply rename the directory. Spack also tries to determine what version strings look like for this package. Using this information, it will try to find additional versions by spidering the package’s webpage. If it finds multiple versions, Spack prompts you to tell it how many versions you want to download and checksum: $ spack create http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz ==> This looks like a URL for cmake version 2.8.12.1. ==> Creating template for package cmake ==> Found 18 versions of cmake. 2.8.12.1 http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz 2.8.12 http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz 2.8.11.2 http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz ... 2.8.0 http://www.cmake.org/files/v2.8/cmake-2.8.0.tar.gz

Include how many checksums in the package file? (default is 5, q to abort)

Spack will automatically download the number of tarballs you specify (starting with the most recent) and checksum each of them. You do not have to download all of the versions up front. You can always choose to download just one tarball initially, and run spack checksum later if you need more.

40 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Note: If spack create fails to detect the package name correctly, you can try supplying it yourself, e.g.: $ spack create --name cmake http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz

If it fails entirely, you can get minimal boilerplate by using spack edit –force, or you can manually create a directory and package.py file for the package in var/spack/repos/builtin/packages.

Note: Spack can fetch packages from source code repositories, but, spack create will not currently create a boilerplate package from a repository URL. You will need to use spack edit –force and manually edit the version() directives to fetch from a repo. See Fetching from VCS repositories for details.

Let’s say you download 3 tarballs: Include how many checksums in the package file? (default is 5, q to abort) 3 ==> Downloading... ==> Fetching http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz ###################################################################### 98.6% ==> Fetching http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz ##################################################################### 96.7% ==> Fetching http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz #################################################################### 95.2%

Now Spack generates boilerplate code and opens a new package.py file in your favorite $EDITOR:

1 #

2 # This is a template package file for Spack. We've put "FIXME"

3 # next to all the things you'll want to change. Once you've handled

4 # them, you can save this file and test your package like this:

5 #

6 # spack install cmake

7 #

8 # You can edit this file again by typing:

9 #

10 # spack edit cmake

11 #

12 # See the Spack documentation for more information on packaging.

13 # If you submit this package back to Spack as a pull request,

14 # please first remove this boilerplate and all FIXME comments.

15 # 16 from spack import * 17

18

19 class Cmake(Package):

20 """FIXME: Put a proper description of your package here."""

21

22 # FIXME: Add a proper url for your package's homepage here.

23 homepage="http://www.example.com"

24 url="http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz"

25

26 version('2.8.12.1','9d38cd4e2c94c3cea97d0e2924814acc')

27 version('2.8.12','105bc6d21cc2e9b6aff901e43c53afea')

28 version('2.8.11.2','6f5d7b8e7534a5d9e1a7664ba63cf882')

29

30 # FIXME: Add dependencies if this package requires them.

31 # depends_on("foo")

32

1.4. Packaging Guide 41 Spack Documentation, Release 0.9

33 def install(self, spec, prefix):

34 # FIXME: Modify the configure line to suit your build system here.

35 configure("--prefix="+ prefix)

36

37 # FIXME: Add logic to build and install here

38 make()

39 make("install")

The tedious stuff (creating the class, checksumming archives) has been done for you. In the generated package, the download url attribute is already set. All the things you still need to change are marked with FIXME labels. You can delete the commented instructions between the license and the first import statement after reading them. The rest of the tasks you need to do are as follows: 1. Add a description. Immediately inside the package class is a docstring in triple-quotes ("""). It’s used to generate the description shown when users run spack info. 2. Change the homepage to a useful URL. The homepage is displayed when users run spack info so that they can learn about packages. 3. Add depends_on() calls for the package’s dependencies. depends_on tells Spack that other packages need to be built and installed before this one. See Dependencies. 4. Get the install() method working. The install() method implements the logic to build a package. The code should look familiar; it is designed to look like a shell script. Specifics will differ depending on the package, and implementing the install method is covered in detail later. Before going into details, we’ll cover a few more basics.

spack edit

One of the easiest ways to learn to write packages is to look at existing ones. You can edit a package file by name with the spack edit command: $ spack edit cmake

So, if you used spack create to create a package, then saved and closed the result- ing file, you can get back to it with spack edit. The cmake package actually lives in $SPACK_ROOT/var/spack/repos/builtin/packages/cmake/package.py, but this provides a much simpler shortcut and saves you the trouble of typing the full path. If you try to edit a package that doesn’t exist, Spack will recommend using spack create or spack edit --force: $ spack edit foo ==> Error: No package 'foo'. Use spack create, or supply -f/--force to edit a new file.

spack edit --force

spack edit --force can be used to create a new, minimal boilerplate package: $ spack edit -f foo

42 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Unlike spack create, which infers names and versions, and which actually downloads the tarball and checksums it for you, spack edit --force has no such fanciness. It will substitute dummy values for you to fill in yourself:

1 from spack import * 2

3 class Foo(Package):

4 """Description"""

5

6 homepage="http://www.example.com"

7 url="http://www.example.com/foo-1.0.tar.gz"

8

9 version('1.0','0123456789abcdef0123456789abcdef')

10

11 def install(self, spec, prefix):

12 configure("--prefix=%s"% prefix)

13 make()

14 make("install")

This is useful when spack create cannot figure out the name and version of your package from the archive URL.

1.4.2 Naming & directory structure

This section describes how packages need to be named, and where they live in Spack’s directory structure. In general, spack create and spack edit handle creating package files for you, so you can skip most of the details here.

var/spack/repos/builtin/packages

A Spack installation directory is structured like a standard UNIX install prefix (bin, lib, include, var, opt, etc.). Most of the code for Spack lives in $SPACK_ROOT/lib/spack. Packages themselves live in $SPACK_ROOT/var/spack/repos/builtin/packages. If you cd to that directory, you will see directories for each package: $ cd $SPACK_ROOT/var/spack/repos/builtin/packages && ls ImageMagick LuaJIT Mitos R SAMRAI ack activeharmony adept-utils adios adol-c ...

Each directory contains a file called package.py, which is where all the python code for the package goes. For example, the libelf package lives in: $SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py

Alongside the package.py file, a package may contain extra directories or files (like patches) that it needs to build.

1.4. Packaging Guide 43 Spack Documentation, Release 0.9

Package Names

Packages are named after the directory containing package.py. It is preferred, but not required, that the directory, and thus the package name, are lower case. So, libelf‘s package.py lives in a directory called libelf. The package.py file defines a class called Libelf, which extends Spack’s Package class. For example, here is $SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py:

1 from spack import * 2

3 class Libelf(Package):

4 """ ... description ... """

5 homepage=...

6 url=...

7 version(...)

8 depends_on(...)

9

10 def install():

11 ...

The directory name (libelf) determines the package name that users should provide on the command line. e.g., if you type any of these: $ spack install libelf $ spack install [email protected]

Spack sees the package name in the spec and looks for libelf/package.py in var/spack/repos/builtin/packages. Likewise, if you say spack install py-numpy, then Spack looks for py-numpy/package.py. Spack uses the directory name as the package name in order to give packagers more freedom in naming their packages. Package names can contain letters, numbers, dashes, and underscores. Using a Python identifier (e.g., a class name or a module name) would make it difficult to support these options. So, you can name a package 3proxy or _foo and Spack won’t care. It just needs to see that name in the package spec.

Package class names

Spack loads package.py files dynamically, and it needs to find a special class name in the file for the load to succeed. The class name (Libelf in our example) is formed by converting words separated by - or _ in the file name to camel case. If the name starts with a number, we prefix the class name with _. Here are some examples: Module Name Class Name foo_bar FooBar docbook-xml DocbookXml FooBar Foobar 3proxy _3proxy In general, you won’t have to remember this naming convention because spack create and spack edit handle the details for you.

1.4.3 Adding new versions

The most straightforward way to add new versions to your package is to add a line like this in the package class:

1 class Foo(Package):

2 url='http://example.com/foo-1.0.tar.gz'

3 version('8.2.1','4136d7b4c04df68b686570afa26988ac')

4 ...

44 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Versions should be listed with the newest version first.

Version URLs

By default, each version’s URL is extrapolated from the url field in the package. For example, Spack is smart enough to download version 8.2.1. of the Foo package above from http://example.com/foo-8.2.1.tar.gz. If spack cannot extrapolate the URL from the url field by default, you can write your own URL generation algorithm in place of the url declaration. For example:

1 class Foo(Package):

2 version('8.2.1','4136d7b4c04df68b686570afa26988ac')

3 ...

4 def url_for_version(self, version):

5 return 'http://example.com/version_%s/foo-%s.tar.gz'\

6 % (version, version)

7 ...

If a URL cannot be derived systematically, you can add an explicit URL for a particular version: version('8.2.1','4136d7b4c04df68b686570afa26988ac', url='http://example.com/foo-8.2.1-special-version.tar.gz')

For the URL above, you might have to add an explicit URL because the version can’t simply be substituted in the original url to construct the new one for 8.2.1. When you supply a custom URL for a version, Spack uses that URL verbatim and does not perform extrapolation.

Skipping the expand step

Spack normally expands archives automatically after downloading them. If you want to skip this step (e.g., for self- extracting executables and other custom archive types), you can add expand=False to a version directive. version('8.2.1','4136d7b4c04df68b686570afa26988ac', url='http://example.com/foo-8.2.1-special-version.tar.gz', expand=False)

When expand is set to False, Spack sets the current working directory to the directory containing the downloaded archive before it calls your install method. Within install, the path to the downloaded archive is available as self.stage.archive_file. Here is an example snippet for packages distributed as self-extracting archives. The example sets permissions on the downloaded file to make it executable, then runs it with some arguments. def install(self, spec, prefix): set_executable(self.stage.archive_file) installer= Executable(self.stage.archive_file) installer('--prefix=%s'% prefix,'arg1','arg2','etc.')

Checksums

Spack uses a checksum to ensure that the downloaded package version is not corrupted or compromised. This is espe- cially important when fetching from insecure sources, like unencrypted http. By default, a package will not be installed if it doesn’t pass a checksum test (though you can override this with spack install --no-checksum). Spack can currently support checksums using the MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algo- rithms. It determines the algorithm to use based on the hash length.

1.4. Packaging Guide 45 Spack Documentation, Release 0.9 spack md5

If you have one or more files to checksum, you can use the spack md5 command to do it: $ spack md5 foo-8.2.1.tar.gz foo-8.2.2.tar.gz ==> 2 MD5 checksums: 4136d7b4c04df68b686570afa26988ac foo-8.2.1.tar.gz 1586b70a49dfe05da5fcc29ef239dce0 foo-8.2.2.tar.gz spack md5 also accepts one or more URLs and automatically downloads the files for you: $ spack md5 http://example.com/foo-8.2.1.tar.gz ==> Trying to fetch from http://example.com/foo-8.2.1.tar.gz ######################################################################## 100.0% ==> 1 MD5 checksum: 4136d7b4c04df68b686570afa26988ac foo-8.2.1.tar.gz

Doing this for lots of files, or whenever a new package version is released, is tedious. See spack checksum below for an automated version of this process. spack checksum

If you want to add new versions to a package you’ve already created, this is automated with the spack checksum command. Here’s an example for libelf: $ spack checksum libelf ==> Found 16 versions of libelf. 0.8.13 http://www.mr511.de/software/libelf-0.8.13.tar.gz 0.8.12 http://www.mr511.de/software/libelf-0.8.12.tar.gz 0.8.11 http://www.mr511.de/software/libelf-0.8.11.tar.gz 0.8.10 http://www.mr511.de/software/libelf-0.8.10.tar.gz 0.8.9 http://www.mr511.de/software/libelf-0.8.9.tar.gz 0.8.8 http://www.mr511.de/software/libelf-0.8.8.tar.gz 0.8.7 http://www.mr511.de/software/libelf-0.8.7.tar.gz 0.8.6 http://www.mr511.de/software/libelf-0.8.6.tar.gz 0.8.5 http://www.mr511.de/software/libelf-0.8.5.tar.gz ... 0.5.2 http://www.mr511.de/software/libelf-0.5.2.tar.gz

How many would you like to checksum? (default is 5, q to abort)

This does the same thing that spack create does, but it allows you to go back and add new versions easily as you need them (e.g., as they’re released). It fetches the tarballs you ask for and prints out a list of version commands ready to copy/paste into your package file: ==> Checksummed new versions of libelf: version('0.8.13', '4136d7b4c04df68b686570afa26988ac') version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') version('0.8.11', 'e931910b6d100f6caa32239849947fbf') version('0.8.10', '9db4d36c283d9790d8fa7df1f4d7b4d9')

By default, Spack will search for new tarball downloads by scraping the parent directory of the tarball you gave it. So, if your tarball is at http://example.com/downloads/foo-1.0.tar.gz, Spack will look in http://example.com/downloads/ for links to additional versions. If you need to search another path for download links, you can supply some extra attributes that control how your package finds new versions. See the documentation on attribute_list_url and attribute_list_depth.

46 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Note: • This command assumes that Spack can extrapolate new URLs from an existing URL in the package, and that Spack can find similar URLs on a webpage. If that’s not possible, e.g. if the package’s developers don’t name their tarballs consistently, you’ll need to manually add version calls yourself. • For spack checksum to work, Spack needs to be able to import your package in Python. That means it can’t have any syntax errors, or the import will fail. Use this once you’ve got your package in working order.

1.4.4 Fetching from VCS repositories

For some packages, source code is provided in a Version Control System (VCS) repository rather than in a tarball. Spack can fetch packages from VCS repositories. Currently, Spack supports fetching with Git, Mercurial (hg), and Subversion (SVN). To fetch a package from a source repository, you add a version() call to your package with parameters indicating the repository URL and any branch, tag, or revision to fetch. See below for the parameters you’ll need for each VCS system.

Repositories and versions

The package author is responsible for coming up with a sensible name for each version to be fetched from a repository. For example, if you’re fetching from a tag like v1.0, you might call that 1.0. If you’re fetching a nameless git commit or an older subversion revision, you might give the commit an intuitive name, like develop for a development version, or some-fancy-new-feature if you want to be more specific. In general, it’s recommended to fetch tags or particular commits/revisions, NOT branches or the repository mainline, as branches move forward over time and you aren’t guaranteed to get the same thing every time you fetch a particular version. Life isn’t always simple, though, so this is not strictly enforced. When fetching from from the branch corresponding to the development version (often called master, trunk, or dev), it is recommended to call this version develop. Spack has special treatment for this version so that @develop will satisfy dependencies like depends_on(abc, when="@x.y.z:"). In other words, @develop is greater than any other version. The rationale is that certain features or options first appear in the development branch. There- fore if a package author wants to keep the package on the bleeding edge and provide support for new features, it is advised to use develop for such a version which will greatly simplify writing dependencies and version-related conditionals. In some future release, Spack may support extrapolating repository versions as it does for tarball URLs, but currently this is not supported.

Git

Git fetching is enabled with the following parameters to version: • git: URL of the git repository. • tag: name of a tag to fetch. • branch: name of a branch to fetch. • commit: SHA hash (or prefix) of a commit to fetch. • submodules: Also fetch submodules when checking out this repository. Only one of tag, branch, or commit can be used at a time.

1.4. Packaging Guide 47 Spack Documentation, Release 0.9

Default branch To fetch a repository’s default branch: class Example(Package): ... version('develop', git='https://github.com/example-project/example.git')

This is not recommended, as the contents of the default branch change over time. Tags To fetch from a particular tag, use the tag parameter along with git: version('1.0.1', git='https://github.com/example-project/example.git', tag='v1.0.1')

Branches To fetch a particular branch, use branch instead: version('experimental', git='https://github.com/example-project/example.git', branch='experimental')

This is not recommended, as the contents of branches change over time. Commits Finally, to fetch a particular commit, use commit: version('2014-10-08', git='https://github.com/example-project/example.git', commit='9d38cd4e2c94c3cea97d0e2924814acc')

This doesn’t have to be a full hash; you can abbreviate it as you’d expect with git: version('2014-10-08', git='https://github.com/example-project/example.git', commit='9d38cd')

It may be useful to provide a saner version for commits like this, e.g. you might use the date as the version, as done above. Or you could just use the abbreviated commit hash. It’s up to the package author to decide what makes the most sense. Submodules You can supply submodules=True to cause Spack to fetch submodules along with the repository at fetch time. version('1.0.1', git='https://github.com/example-project/example.git', tag='v1.0.1', submdoules=True)

Installing

You can fetch and install any of the versions above as you’d expect, by using @ in a spec: $ spack install example@2014-10-08

Git and other VCS versions will show up in the list of versions when a user runs spack info .

Mercurial

Fetching with mercurial works much like git, but you use the hg parameter. Default Add the hg parameter with no revision: version('develop', hg='https://jay.grs.rwth-aachen.de/hg/example')

Note that this is not recommended; try to fetch a particular revision instead.

48 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Revisions Add hg and revision parameters: version('1.0', hg='https://jay.grs.rwth-aachen.de/hg/example', revision='v1.0')

Unlike git, which has special parameters for different types of revisions, you can use revision for branches, tags, and commits when you fetch with Mercurial. As with git, you can fetch these versions using the spack install example@ command-line syn- tax.

Subversion

To fetch with subversion, use the svn and revision parameters: Fetching the head Simply add an svn parameter to version: version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk')

This is not recommended, as the head will move forward over time. Fetching a revision To fetch a particular revision, add a revision to the version call: version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk', revision=128)

Subversion branches are handled as part of the directory structure, so you can check out a branch or tag by changing the url.

1.4.5 Expanding additional resources in the source tree

Some packages (most notably compilers) provide optional features if additional resources are expanded within their source tree before building. In Spack it is possible to describe such a need with the resource directive : resource( name='cargo', git='https://github.com/rust-lang/cargo.git', tag='0.10.0', destination='cargo' )

Based on the keywords present among the arguments the appropriate FetchStrategy will be used for the resource. The keyword destination is relative to the source root of the package and should point to where the resource is to be expanded.

1.4.6 Automatic caching of files fetched during installation

Spack maintains a cache (described here) which saves files retrieved during package installations to avoid re- downloading in the case that a package is installed with a different specification (but the same version) or reinstalled on account of a change in the hashing scheme.

1.4.7 Licensed software

In order to install licensed software, Spack needs to know a few more details about a package. The following class attributes should be defined.

1.4. Packaging Guide 49 Spack Documentation, Release 0.9

license_required

Boolean. If set to True, this software requires a license. If set to False, all of the following attributes will be ignored. Defaults to False. license_comment

String. Contains the symbol used by the license manager to denote a comment. Defaults to #. license_files

List of strings. These are files that the software searches for when looking for a license. All file paths must be relative to the installation directory. More complex packages like Intel may require multiple licenses for individual components. Defaults to the empty list. license_vars

List of strings. Environment variables that can be set to tell the software where to look for a license if it is not in the usual location. Defaults to the empty list. license_url

String. A URL pointing to license setup instructions for the software. Defaults to the empty string. For example, let’s take a look at the package for the PGI compilers. # Licensing license_required= True license_comment='#' license_files=['license.dat'] license_vars=['PGROUPD_LICENSE_FILE','LM_LICENSE_FILE'] license_url='http://www.pgroup.com/doc/pgiinstall.pdf'

As you can see, PGI requires a license. Its license manager, FlexNet, uses the # symbol to denote a comment. It expects the license file to be named license.dat and to be located directly in the installation prefix. If you would like the installation file to be located elsewhere, simply set PGROUPD_LICENSE_FILE or LM_LICENSE_FILE after installation. For further instructions on installation and licensing, see the URL provided. Let’s walk through a sample PGI installation to see exactly what Spack is and isn’t capable of. Since PGI does not provide a download URL, it must be downloaded manually. It can either be added to a mirror or located in the current directory when spack install pgi is run. See Mirrors for instructions on setting up a mirror. After running spack install pgi, the first thing that will happen is Spack will create a global license file located at $SPACK_ROOT/etc/spack/licenses/pgi/license.dat. It will then open up the file using the editor set in $EDITOR, or vi if unset. It will look like this: # A license is required to use pgi. # # The recommended solution is to store your license key in this global # license file. After installation, the following symlink(s) will be # added to point to this file (relative to the installation prefix): # # license.dat #

50 Chapter 1. Table of Contents Spack Documentation, Release 0.9

# Alternatively, use one of the following environment variable(s): # # PGROUPD_LICENSE_FILE # LM_LICENSE_FILE # # If you choose to store your license in a non-standard location, you may # set one of these variable(s) to the full pathname to the license file, or # port@host if you store your license keys on a dedicated license server. # You will likely want to set this variable in a module file so that it # gets loaded every time someone tries to use pgi. # # For further information on how to acquire a license, please refer to: # # http://www.pgroup.com/doc/pgiinstall.pdf # # You may enter your license below.

You can add your license directly to this file, or tell FlexNet to use a license stored on a separate license server. Here is an example that points to a license server called licman1: SERVER licman1.mcs.anl.gov 00163eb7fba5 27200 USE_SERVER

If your package requires the license to install, you can reference the location of this global license using self.global_license_file. After installation, symlinks for all of the files given in license_files will be created, pointing to this global license. If you install a different version or variant of the package, Spack will automatically detect and reuse the already existing global license. If the software you are trying to package doesn’t rely on license files, Spack will print a warning message, letting the user know that they need to set an environment variable or pointing them to installation documentation.

1.4.8 Patches

Depending on the host architecture, package version, known bugs, or other issues, you may need to patch your software to get it to build correctly. Like many other package systems, spack allows you to store patches alongside your package files and apply them to source code after it’s downloaded. patch

You can specify patches in your package file with the patch() directive. patch looks like this: class Mvapich2(Package): ... patch('ad_lustre_rwcontig_open_source.patch', when='@1.9:')

The first argument can be either a URL or a filename. It specifies a patch file that should be applied to your source. If the patch you supply is a filename, then the patch needs to live within the spack source tree. For example, the patch above lives in a directory structure like this: $SPACK_ROOT/var/spack/repos/builtin/packages/ mvapich2/ package.py ad_lustre_rwcontig_open_source.patch

If you supply a URL instead of a filename, the patch will be fetched from the URL and then applied to your source code.

1.4. Packaging Guide 51 Spack Documentation, Release 0.9

Warning: It is generally better to use a filename rather than a URL for your patch. Patches fetched from URLs are not currently checksummed, and adding checksums for them is tedious for the package builder. File patches go into the spack repository, which gives you git’s integrity guarantees. URL patches may be removed in a future spack version.

patch can take two options keyword arguments. They are:

when

If supplied, this is a spec that tells spack when to apply the patch. If the installed package spec matches this spec, the patch will be applied. In our example above, the patch is applied when mvapich is at version 1.9 or higher.

level

This tells spack how to run the patch command. By default, the level is 1 and spack runs patch -p 1. If level is 2, spack will run patch -p 2, and so on. A lot of people are confused by level, so here’s a primer. If you look in your patch file, you may see something like this:

1 --- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800

2 +++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800

3 @@ -8,7 +8,7 @@ 4 * Copyright (C) 2008 , Lustre group 5 \*/ 6

7 -#define _XOPEN_SOURCE 600

8 +//#define _XOPEN_SOURCE 600

9 #include

10 #include

11 #include "ad_lustre.h"

Lines 1-2 show paths with synthetic a/ and b/ prefixes. These are placeholders for the two mvapich2 source directories that diff compared when it created the patch file. This is git’s default behavior when creating patch files, but other programs may behave differently. -p1 strips off the first level of the prefix in both paths, allowing the patch to be applied from the root of an expanded mvapich2 archive. If you set level to 2, it would strip off src, and so on. It’s generally easier to just structure your patch file so that it applies cleanly with -p1, but if you’re using a patch you didn’t create yourself, level can be handy.

Patch functions

In addition to supplying patch files, you can write a custom function to patch a package’s source. For example, the py-pyside package contains some custom code for tweaking the way the PySide build handles RPATH:

1 def patch(self):

2 """Undo PySide RPATH handling and add Spack RPATH."""

3 # Figure out the special RPATH

4 pypkg= self.spec['python'].package

5 rpath= self.rpath

6 rpath.append(os.path.join(

7 self.prefix, pypkg.site_packages_dir,'PySide'))

52 Chapter 1. Table of Contents Spack Documentation, Release 0.9

8

9 # Add Spack's standard CMake args to the sub-builds.

10 # They're called BY setup.py so we have to patch it.

11 filter_file(

12 r'OPTION_CMAKE,',

13 r'OPTION_CMAKE,'+(

14 '"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE",'

15 '"-DCMAKE_INSTALL_RPATH=%s",'%':'.join(rpath)),

16 'setup.py')

17

18 # PySide tries to patch ELF files to remove RPATHs

19 # Disable this and go with the one we set.

20 if self.spec.satisfies('@1.2.4:'):

21 rpath_file='setup.py'

22 else:

23 rpath_file='pyside_postinstall.py'

24 25 filter_file(r'(^\s*)(rpath_cmd\(.*\))', r'\1#\2', rpath_file) 26

27 # TODO: rpath handling for PySide 1.2.4 still doesn't work.

28 # PySide can't find the Shiboken library, even though it comes

29 # bundled with it and is installed in the same directory.

30

31 # PySide does not provide official support for

32 # Python 3.5, but it should work fine

33 filter_file("'Programming Language :: Python :: 3.4'",

34 "'Programming Language :: Python :: 3.4',\r\n "

35 "'Programming Language :: Python :: 3.5'",

36 "setup.py")

A patch function, if present, will be run after patch files are applied and before install() is run. You could put this logic in install(), but putting it in a patch function gives you some benefits. First, spack ensures that the patch() function is run once per code checkout. That means that if you run install, hit ctrl-C, and run install again, the code in the patch function is only run once. Also, you can tell Spack to run only the patching part of the build using the spack patch command.

1.4.9 Handling RPATHs

Spack installs each package in a way that ensures that all of its dependencies are found when it runs. It does this using RPATHs. An RPATH is a search path, stored in a binary (an executable or library), that tells the dynamic loader where to find its dependencies at run- time. You may be familiar with LD_LIBRARY_PATH on Linux or DYLD_LIBRARY_PATH on Mac OS X. RPATH is similar to these paths, in that it tells the loader where to find libraries. Unlike them, it is embedded in the binary and not set in each user’s environment. RPATHs in Spack are handled in one of three ways: 1. For most packages, RPATHs are handled automatically using Spack’s compiler wrappers. These wrappers are set in standard variables like CC, CXX, F77, and FC, so most build systems (autotools and many gmake systems) pick them up and use them. 2. CMake also respects Spack’s compiler wrappers, but many CMake builds have logic to overwrite RPATHs when binaries are installed. Spack provides the std_cmake_args variable, which includes parameters necessary for CMake build use the right installation RPATH. It can be used like this when cmake is invoked:

1.4. Packaging Guide 53 Spack Documentation, Release 0.9

class MyPackage(Package): ... def install(self, spec, prefix): cmake('..', *std_cmake_args) make() make('install')

3. If you need to modify the build to add your own RPATHs, you can use the self.rpath property of your package, which will return a list of all the RPATHs that Spack will use when it links. You can see this how this is used in the PySide example above.

1.4.10 Finding new versions

You’ve already seen the homepage and url package attributes:

1 from spack import * 2

3

4 class Mpich(Package):

5 """MPICH is a high performance and widely portable implementation of

6 the Message Passing Interface (MPI) standard."""

7 homepage="http://www.mpich.org"

8 url="http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"

These are class-level attributes used by Spack to show users information about the package, and to determine where to download its source code. Spack uses the tarball URL to extrapolate where to find other tarballs of the same package (e.g. in spack checksum, but this does not always work. This section covers ways you can tell Spack to find tarballs elsewhere.

list_url

When spack tries to find available versions of packages (e.g. with spack checksum), it spiders the parent directory of the tarball in the url attribute. For example, for libelf, the url is: url="http://www.mr511.de/software/libelf-0.8.13.tar.gz"

Here, Spack spiders http://www.mr511.de/software/ to find similar tarball links and ultimately to make a list of available versions of libelf. For many packages, the tarball’s parent directory may be unlistable, or it may not contain any links to source code archives. In fact, many times additional package downloads aren’t even available in the same directory as the download URL. For these, you can specify a separate list_url indicating the page to search for tarballs. For example, libdwarf has the homepage as the list_url, because that is where links to old versions are:

1 class Libdwarf(Package):

2 homepage="http://www.prevanders.net/dwarf.html"

3 url="http://www.prevanders.net/libdwarf-20130729.tar.gz"

4 list_url= homepage

list_depth

libdwarf and many other packages have a listing of available versions on a single webpage, but not all do. For example, mpich has a tarball URL that looks like this:

54 Chapter 1. Table of Contents Spack Documentation, Release 0.9

url="http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"

But its downloads are in many different subdirectories of http://www.mpich.org/static/downloads/. So, we need to add a list_url and a list_depth attribute:

1 class Mpich(Package):

2 homepage="http://www.mpich.org"

3 url="http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"

4 list_url="http://www.mpich.org/static/downloads/"

5 list_depth=2

By default, Spack only looks at the top-level page available at list_url. list_depth tells it to follow up to 2 levels of links from the top-level page. Note that here, this implies two levels of subdirectories, as the mpich website is structured much like a filesystem. But list_depth really refers to link depth when spidering the page.

1.4.11 Parallel builds

By default, Spack will invoke make() with a -j argument, so that builds run in parallel. It figures out how many jobs to run by determining how many cores are on the host machine. Specifically, it uses the number of CPUs reported by Python’s multiprocessing.cpu_count(). If a package does not build properly in parallel, you can override this setting by adding parallel = False to your package. For example, OpenSSL’s build does not work in parallel, so its package looks like this:

1 class Openssl(Package):

2 homepage="http://www.openssl.org"

3 url="http://www.openssl.org/source/openssl-1.0.1h.tar.gz"

4

5 version('1.0.1h','8d6d684a9430d5cc98a62a5d8fbda8cf')

6 depends_on("zlib")

7

8 parallel= False

Similarly, you can disable parallel builds only for specific make commands, as libdwarf does:

1 class Libelf(Package):

2 ...

3

4 def install(self, spec, prefix):

5 configure("--prefix="+ prefix,

6 "--enable-shared",

7 "--disable-dependency-tracking",

8 "--disable-debug")

9 make()

10

11 # The mkdir commands in libelf's install can fail in parallel

12 make("install", parallel=False)

The first make will run in parallel here, but the second will not. If you set parallel to False at the package level, then each call to make() will be sequential by default, but packagers can call make(parallel=True) to override it.

1.4.12 Dependencies

We’ve covered how to build a simple package, but what if one package relies on another package to build? How do you express that in a package file? And how do you refer to the other package in the build script for your own package?

1.4. Packaging Guide 55 Spack Documentation, Release 0.9

Spack makes this relatively easy. Let’s take a look at the libdwarf package to see how it’s done:

1 class Libdwarf(Package):

2 homepage="http://www.prevanders.net/dwarf.html"

3 url="http://www.prevanders.net/libdwarf-20130729.tar.gz"

4 list_url= homepage

5

6 version('20130729','4cc5e48693f7b93b7aa0261e63c0e21d')

7 ...

8

9 depends_on("libelf")

10

11 def install(self, spec, prefix):

12 ...

depends_on()

The highlighted depends_on(’libelf’) call tells Spack that it needs to build and install the libelf package before it builds libdwarf. This means that in your install() method, you are guaranteed that libelf has been built and installed successfully, so you can rely on it for your libdwarf build.

Dependency specs

depends_on doesn’t just take the name of another package. It takes a full spec. This means that you can restrict the versions or other configuration options of libelf that libdwarf will build with. Here’s an example. Suppose that in the libdwarf package you write: depends_on("[email protected]:")

Now libdwarf will require a version of libelf version 0.8 or higher in order to build. If some versions of libelf are installed but they are all older than this, then Spack will build a new version of libelf that satisfies the spec’s version constraint, and it will build libdwarf with that one. You could just as easily provide a version range: depends_on("[email protected]:0.8.4:")

Or a requirement for a particular variant or compiler flags: depends_on("[email protected]+debug") depends_on('libelf debug=True') depends_on('libelf cppflags="-fPIC"')

Both users and package authors can use the same spec syntax to refer to different package configurations. Users use the spec syntax on the command line to find installed packages or to install packages with particular constraints, and package authors can use specs to describe relationships between packages. Additionally, dependencies may be specified for specific use cases: depends_on("cmake", type="build") depends_on("libelf", type=("build","link")) depends_on("python", type="run")

The dependency types are: • “build”: made available during the project’s build. The package will be added to PATH, the compiler include paths, and PYTHONPATH. Other projects which depend on this one will not have these modified (building project X doesn’t need project Y’s build dependencies). • “link”: the project is linked to by the project. The package will be added to the current package’s rpath.

56 Chapter 1. Table of Contents Spack Documentation, Release 0.9

• “run”: the project is used by the project at runtime. The package will be added to PATH and PYTHONPATH. If not specified, type is assumed to be ("build", "link"). This is the common case for compiled language usage. Also available are the aliases "alldeps" for all dependency types and "nolink" (("build", "run")) for use by dependencies which are not expressed via a linker (e.g., Python or Lua module loading).

setup_dependent_environment()

Spack provides a mechanism for dependencies to provide variables that can be used in their dependents’ build. Any package can declare a setup_dependent_environment() function, and this function will be called before the install() method of any dependent packages. This allows dependencies to set up environment variables and other properties to be used by dependents. The function declaration should look like this: class Qt(Package): ... def setup_dependent_environment(self, module, spec, dep_spec): """Dependencies of Qt find it using the QTDIR environment variable.""" os.environ['QTDIR']= self.prefix

Here, the Qt package sets the QTDIR environment variable so that packages that depend on a particular Qt installation will find it. The arguments to this function are: • module: the module of the dependent package, where global properties can be assigned. • spec: the spec of the dependency package (the one the function is called on). • dep_spec: the spec of the dependent package (i.e. dep_spec depends on spec). A good example of using these is in the Python package:

1 def setup_dependent_environment(self, spack_env, run_env, extension_spec):

2 """Set PYTHONPATH to include site-packages dir for the

3 extension and any other python extensions it depends on."""

4 pythonhome= self.prefix

5 spack_env.set('PYTHONHOME', pythonhome)

6

7 python_paths=[]

8 for d in extension_spec.traverse(deptype=nolink, deptype_query='run'):

9 if d.package.extends(self.spec):

10 python_paths.append(join_path(d.prefix,

11 self.site_packages_dir))

12

13 pythonpath=':'.join(python_paths)

14 spack_env.set('PYTHONPATH', pythonpath)

15

16 # For run time environment set only the path for

17 # extension_spec and prepend it to PYTHONPATH

18 if extension_spec.package.extends(self.spec):

19 run_env.prepend_path('PYTHONPATH', join_path(

20 extension_spec.prefix, self.site_packages_dir))

The first thing that happens here is that the python command is inserted into module scope of the dependent. This allows most python packages to have a very simple install method, like this: def install(self, spec, prefix): python('setup.py','install','--prefix={0}'.format(prefix))

1.4. Packaging Guide 57 Spack Documentation, Release 0.9

Python’s setup_dependent_environment method also sets up some other variables, creates a directory, and sets up the PYTHONPATH so that dependent packages can find their dependencies at build time.

1.4.13 Extensions

Spack’s support for package extensions is documented extensively in Extensions & Python support. This section documents how to make your own extendable packages and extensions. To support extensions, a package needs to set its extendable property to True, e.g.: class Python(Package): ... extendable= True ...

To make a package into an extension, simply add simply add an extends call in the package definition, and pass it the name of an extendable package: class PyNumpy(Package): ... extends('python') ...

Now, the py-numpy package can be used as an argument to spack activate. When it is activated, all the files in its prefix will be symbolically linked into the prefix of the python package. Many packages produce Python extensions for some variants, but not others: they should extend python only if the appropriate variant(s) are selected. This may be accomplished with conditional extends() declarations: class FooLib(Package): variant('python', default=True, description=\ 'Build the Python extension Module') extends('python', when='+python') ...

Sometimes, certain files in one package will conflict with those in another, which means they cannot both be activated (symlinked) at the same time. In this case, you can tell Spack to ignore those files when it does the activation: class PySncosmo(Package): ... # py-sncosmo binaries are duplicates of those from py-astropy extends('python', ignore=r'bin/.*') depends_on('py-astropy') ...

The code above will prevent everything in the $prefix/bin/ directory from being linked in at activation time.

Note: You can call either depends_on or extends on any one package, but not both. For example you cannot both depends_on(’python’) and extends(python) in the same package. extends implies depends_on.

Activation & deactivation

Spack’s Package class has default activate and deactivate implementations that handle symbolically linking extensions’ prefixes into the directory of the parent package. However, extendable packages can override these meth- ods to add custom activate/deactivate logic of their own. For example, the activate and deactivate methods

58 Chapter 1. Table of Contents Spack Documentation, Release 0.9

in the Python class use the symbolic linking, but they also handle details surrounding Python’s .pth files, and other aspects of Python packaging. Spack’s extensions mechanism is designed to be extensible, so that other packages (like Ruby, R, Perl, etc.) can provide their own custom extension management logic, as they may not handle modules the same way that Python does. Let’s look at Python’s activate function:

1 def activate(self, ext_pkg, **args): 2 ignore= self.python_ignore(ext_pkg, args)

3 args.update(ignore=ignore)

4 5 super(Python, self).activate(ext_pkg, **args) 6

7 exts= spack.install_layout.extension_map(self.spec)

8 exts[ext_pkg.name]= ext_pkg.spec

9 self.write_easy_install_pth(exts)

This function is called on the extendee (Python). It first calls activate in the superclass, which handles sym- linking the extension package’s prefix into this package’s prefix. It then does some special handling of the easy-install.pth file, part of Python’s setuptools. Deactivate behaves similarly to activate, but it unlinks files:

1 def deactivate(self, ext_pkg, **args): 2 args.update(ignore=self.python_ignore(ext_pkg, args)) 3 super(Python, self).deactivate(ext_pkg, **args) 4

5 exts= spack.install_layout.extension_map(self.spec)

6 # Make deactivate idempotent

7 if ext_pkg.name in exts:

8 del exts[ext_pkg.name]

9 self.write_easy_install_pth(exts)

Both of these methods call some custom functions in the Python package. See the source for Spack’s Python package for details.

Activation arguments

You may have noticed that the activate function defined above takes keyword arguments. These are the keyword arguments from extends(), and they are passed to both activate and deactivate. This capability allows an extension to customize its own activation by passing arguments to the extendee. Extendees can likewise implement custom activate() and deactivate() functions to suit their needs. The only keyword argument supported by default is the ignore argument, which can take a regex, list of regexes, or a predicate to determine which files not to symlink during activation.

1.4.14 Virtual dependencies

In some cases, more than one package can satisfy another package’s dependency. One way this can happen is if a package depends on a particular interface, but there are multiple implementations of the interface, and the package could be built with any of them. A very common interface in HPC is the Message Passing Interface (MPI), which is used in many large-scale parallel applications. MPI has several different implementations (e.g., MPICH, OpenMPI, and MVAPICH) and scientific applications can be built with any one of them. Complicating matters, MPI does not have a standardized ABI, so a package built with one

1.4. Packaging Guide 59 Spack Documentation, Release 0.9

implementation cannot simply be relinked with another implementation. Many package managers handle interfaces like this by requiring many similar package files, e.g., foo, foo-mvapich, foo-mpich, but Spack avoids this explosion of package files by providing support for virtual dependencies.

provides

In Spack, mpi is handled as a virtual package. A package like mpileaks can depend on it just like any other package, by supplying a depends_on call in the package definition. For example:

1 class Mpileaks(Package):

2 homepage="https://github.com/hpc/mpileaks"

3 url="https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

4

5 version('1.0','8838c574b39202a57d7c2d68692718aa')

6

7 depends_on("mpi")

8 depends_on("adept-utils")

9 depends_on("callpath")

Here, callpath and adept-utils are concrete packages, but there is no actual package file for mpi, so we say it is a virtual package. The syntax of depends_on, is the same for both. If we look inside the package file of an MPI implementation, say MPICH, we’ll see something like this: class Mpich(Package): provides('mpi') ...

The provides("mpi") call tells Spack that the mpich package can be used to satisfy the dependency of any package that depends_on(’mpi’).

Versioned Interfaces

Just as you can pass a spec to depends_on, so can you pass a spec to provides to add constraints. This allows Spack to support the notion of versioned interfaces. The MPI standard has gone through many revisions, each with new functions added, and each revision of the standard has a version number. Some packages may require a recent implementation that supports MPI-3 functions, but some MPI versions may only provide up to MPI-2. Others may need MPI 2.1 or higher. You can indicate this by adding a version constraint to the spec passed to provides: provides("mpi@:2")

Suppose that the above provides call is in the mpich2 package. This says that mpich2 provides MPI support up to version 2, but if a package depends_on("mpi@3"), then Spack will not build that package with mpich2.

provides when

The same package may provide different versions of an interface depending on its version. Above, we simplified the provides call in mpich to make the explanation easier. In reality, this is how mpich calls provides: provides('mpi@:3', when='@3:') provides('mpi@:1', when='@1:')

The when argument to provides allows you to specify optional constraints on the providing package, or the provider. The provider only provides the declared virtual spec when it matches the constraints in the when clause. Here, when mpich is at version 3 or higher, it provides MPI up to version 3. When mpich is at version 1 or higher, it provides the MPI virtual package at version 1.

60 Chapter 1. Table of Contents Spack Documentation, Release 0.9

The when qualifier ensures that Spack selects a suitably high version of mpich to satisfy some other package that depends_on a particular version of MPI. It will also prevent a user from building with too low a version of mpich. For example, suppose the package foo declares this: class Foo(Package): ... depends_on('mpi@2')

Suppose a user invokes spack install like this: $ spack install foo ^[email protected]

Spack will fail with a constraint violation, because the version of MPICH requested is too low for the mpi requirement in foo.

1.4.15 Abstract & concrete specs

Now that we’ve seen how spec constraints can be specified on the command line and within package definitions, we can talk about how Spack puts all of this information together. When you run this: $ spack install mpileaks ^[email protected]+debug ^[email protected]

Spack parses the command line and builds a spec from the description. The spec says that mpileaks should be built with the callpath library at 1.0 and with the debug option enabled, and with libelf version 0.8.11. Spack will also look at the depends_on calls in all of these packages, and it will build a spec from that. The specs from the command line and the specs built from package descriptions are then combined, and the constraints are checked against each other to make sure they’re satisfiable. What we have after this is done is called an abstract spec. An abstract spec is partially specified. In other words, it could describe more than one build of a package. Spack does this to make things easier on the user: they should only have to specify as much of the package spec as they care about. Here’s an example partial spec DAG, based on the constraints above: mpileaks ^[email protected]+debug ^dyninst ^libdwarf ^[email protected] ^mpi

mpi

mpileaks libdwarf [email protected]+debug dyninst [email protected]

This diagram shows a spec DAG output as a tree, where successive levels of indentation represent a depends-on relationship. In the above DAG, we can see some packages annotated with their constraints, and some packages with no annotations at all. When there are no annotations, it means the user doesn’t care what configuration of that package is built, just so long as it works.

1.4. Packaging Guide 61 Spack Documentation, Release 0.9

Concretization

An abstract spec is useful for the user, but you can’t install an abstract spec. Spack has to take the abstract spec and “fill in” the remaining unspecified parts in order to install. This process is called concretization. Concretization happens in between the time the user runs spack install and the time the install() method is called. The concretized version of the spec above might look like this: [email protected]%[email protected] arch=linux-debian7-x86_64 ^[email protected]%[email protected]+debug arch=linux-debian7-x86_64 ^[email protected]%[email protected] arch=linux-debian7-x86_64 ^libdwarf@20130729%[email protected] arch=linux-debian7-x86_64 ^[email protected]%[email protected] arch=linux-debian7-x86_64 ^[email protected]%[email protected] arch=linux-debian7-x86_64

[email protected] %[email protected] [email protected] arch=linux-debian7-x86_64 %[email protected] libdwarf@20130729 arch=linux-debian7-x86_64 [email protected] %[email protected] %[email protected]+debug [email protected] arch=linux-debian7-x86_64 [email protected] arch=linux-debian7-x86_64 %[email protected] %[email protected] arch=linux-debian7-x86_64 arch=linux-debian7-x86_64

Here, all versions, compilers, and platforms are filled in, and there is a single version (no version ranges) for each package. All decisions about configuration have been made, and only after this point will Spack call the install() method for your package. Concretization in Spack is based on certain selection policies that tell Spack how to select, e.g., a version, when one is not specified explicitly. Concretization policies are discussed in more detail in Configuration. Sites using Spack can customize them to match the preferences of their own users. spack spec

For an arbitrary spec, you can see the result of concretization by running spack spec. For example: $ spack spec [email protected] [email protected] ^libdwarf ^libelf [email protected]%[email protected] arch=linux-debian7-x86_64 ^libdwarf@20130729%[email protected] arch=linux-debian7-x86_64 ^[email protected]%[email protected] arch=linux-debian7-x86_64

This is useful when you want to know exactly what Spack will do when you ask for a particular spec.

Concretization Policies

A user may have certain preferences for how packages should be concretized on their system. For example, one user may prefer packages built with OpenMPI and the Intel compiler. Another user may prefer packages be built with MVAPICH and GCC. See the Concretization Preferences section for more details.

62 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.4.16 Implementing the install method

The last element of a package is its install() method. This is where the real work of installation happens, and it’s the main part of the package you’ll need to customize for each piece of software.

1 def install(self, spec, prefix):

2 configure("--prefix="+ prefix,

3 "--enable-shared",

4 "--disable-dependency-tracking",

5 "--disable-debug")

6 make()

7

8 # The mkdir commands in libelf's install can fail in parallel

9 make("install", parallel=False)

install takes a spec: a description of how the package should be built, and a prefix: the path to the directory where the software should be installed. Spack provides wrapper functions for configure and make so that you can call them in a similar way to how you’d call a shell command. In reality, these are Python functions. Spack provides these functions to make writing packages more natural. See the section on shell wrappers. Now that the metadata is out of the way, we can move on to the install() method. When a user runs spack install, Spack fetches an archive for the correct version of the software, expands the archive, and sets the current working directory to the root directory of the expanded archive. It then instantiates a package object and calls the install() method. The install() signature looks like this: class Foo(Package): def install(self, spec, prefix): ...

The parameters are as follows: self For those not used to Python instance methods, this is the package itself. In this case it’s an instance of Foo, which extends Package. For API docs on Package objects, see Package. spec This is the concrete spec object created by Spack from an abstract spec supplied by the user. It describes what should be installed. It will be of type Spec. prefix This is the path that your install method should copy build targets into. It acts like a string, but it’s actually its own special type, Prefix. spec and prefix are passed to install for convenience. spec is also available as an attribute on the package (self.spec), and prefix is actually an attribute of spec (spec.prefix). As mentioned in The install environment, you will usually not need to refer to dependencies explicitly in your package file, as the compiler wrappers take care of most of the heavy lifting here. There will be times, though, when you need to refer to the install locations of dependencies, or when you need to do something different depending on the version, compiler, dependencies, etc. that your package is built with. These parameters give you access to this type of information.

1.4.17 The install environment

In general, you should not have to do much differently in your install method than you would when installing a package on the command line. In fact, you may need to do less than you would on the command line. Spack tries to set environment variables and modify compiler calls so that it appears to the build system that you’re building with a standard system install of everything. Obviously that’s not going to cover all build systems, but it

1.4. Packaging Guide 63 Spack Documentation, Release 0.9

should make it easy to port packages to Spack if they use a standard build system. Usually with autotools or cmake, building and installing is easy. With builds that use custom Makefiles, you may need to add logic to modify the makefiles. The remainder of the section covers the way Spack’s build environment works.

Environment variables

Spack sets a number of standard environment variables that serve two purposes: 1. Make build systems use Spack’s compiler wrappers for their builds. 2. Allow build systems to find dependencies more easily The Compiler environment variables that Spack sets are: Variable Purpose CC C compiler CXX C++ compiler F77 Fortran 77 compiler FC Fortran 90 and above compiler All of these are standard variables respected by most build systems. If your project uses Autotools or CMake, then it should pick them up automatically when you run configure or cmake in the install() function. Many traditional builds using GNU Make and BSD make also respect these variables, so they may work with these systems. If your build system does not automatically pick these variables up from the environment, then you can simply pass them on the command line or use a patch as part of your build process to get the correct compilers into the project’s build system. There are also some file editing commands you can use – these are described later in the section on file manipulation. In addition to the compiler variables, these variables are set before entering install() so that packages can locate dependencies easily: PATH Set to point to /bin directories of dependencies CMAKE_PREFIX_PATH Path to dependency prefixes for CMake PKG_CONFIG_PATH Path to any pkgconfig directories for dependencies PYTHONPATH Path to site-packages dir of any python dependencies PATH is set up to point to dependencies /bin directories so that you can use tools installed by dependency packages at build time. For example, $MPICH_ROOT/bin/mpicc is frequently used by dependencies of mpich. CMAKE_PREFIX_PATH contains a colon-separated list of prefixes where cmake will search for dependency libraries and headers. This causes all standard CMake find commands to look in the paths of your dependencies, so you do not have to manually specify arguments like -DDEPENDENCY_DIR=/path/to/dependency to cmake. More on this is in the CMake documentation. PKG_CONFIG_PATH is for packages that attempt to discover dependencies using the GNU pkg-config tool. It is similar to CMAKE_PREFIX_PATH in that it allows a build to automatically discover its dependencies. If you want to see the environment that a package will build with, or if you want to run commands in that environment to test them out, you can use the spack env command, documented below.

Compiler interceptors

As mentioned, CC, CXX, F77, and FC are set to point to Spack’s compiler wrappers. These are simply called cc, c++, f77, and f90, and they live in $SPACK_ROOT/lib/spack/env.

64 Chapter 1. Table of Contents Spack Documentation, Release 0.9

$SPACK_ROOT/lib/spack/env is added first in the PATH environment variable when install() runs so that system compilers are not picked up instead. All of these compiler wrappers point to a single compiler wrapper script that figures out which real compiler it should be building with. This comes either from spec concretization or from a user explicitly asking for a particular compiler using, e.g., %intel on the command line. In addition to invoking the right compiler, the compiler wrappers add flags to the compile line so that dependencies can be easily found. These flags are added for each dependency, if they exist: Compile-time library search paths * -L$dep_prefix/lib * -L$dep_prefix/lib64 Runtime library search paths (RPATHs) * $rpath_flag$dep_prefix/lib * $rpath_flag$dep_prefix/lib64 Include search paths * -I$dep_prefix/include An example of this would be the libdwarf build, which has one dependency: libelf. Every call to cc in the libdwarf build will have -I$LIBELF_PREFIX/include, -L$LIBELF_PREFIX/lib, and $rpath_flag$LIBELF_PREFIX/lib inserted on the command line. This is done transparently to the project’s build system, which will just think it’s using a system where libelf is readily available. Because of this, you do not have to insert extra -I, -L, etc. on the command line. Another useful consequence of this is that you often do not have to add extra parameters on the configure line to get autotools to find dependencies. The libdwarf install method just calls configure like this: configure("--prefix="+ prefix)

Because of the -L and -I arguments, configure will successfully find libdwarf.h and libdwarf.so, without the packager having to provide --with-libdwarf=/path/to/libdwarf on the command line.

Note: For most compilers, $rpath_flag is -Wl,-rpath,. However, NAG passes its flags to GCC instead of passing them directly to the linker. Therefore, its $rpath_flag is doubly wrapped: -Wl,-Wl„-rpath,. $rpath_flag can be overriden on a compiler specific basis in lib/spack/spack/compilers/$compiler.py.

The compiler wrappers also pass the compiler flags specified by the user from the command line (cflags, cxxflags, fflags, cppflags, ldflags, and/or ldlibs). They do not override the canonical autotools flags with the same names (but in ALL-CAPS) that may be passed into the build by particularly challenging package scripts.

Compiler flags

In rare circumstances such as compiling and running small unit tests, a package developer may need to know what are the appropriate compiler flags to enable features like OpenMP, c++11, c++14 and alike. To that end the compiler classes in spack implement the following properties: openmp_flag, cxx11_flag, cxx14_flag, which can be accessed in a package by self.compiler.cxx11_flag and alike. Note that the implementation is such that if a given compiler version does not support this feature, an error will be produced. Therefore package developers can also use these properties to assert that a compiler supports the requested feature. This is handy when a package supports additional variants like variant('openmp', default=True, description="Enable OpenMP support.")

Message Parsing Interface (MPI)

It is common for high performance computing software/packages to use MPI. As a result of conretization, a given package can be built using different implementations of MPI such as Openmpi, MPICH or IntelMPI.

1.4. Packaging Guide 65 Spack Documentation, Release 0.9

In some scenarios, to configure a package, one has to provide it with appropriate MPI compiler wrappers such as mpicc, mpic++. However different implementations of MPI may have different names for those wrap- pers. In order to make package’s install() method indifferent to the choice MPI implementation, each package which implements MPI sets up self.spec.mpicc, self.spec.mpicxx, self.spec.mpifc and self.spec.mpif77 to point to C, C++, Fortran 90 and Fortran 77 MPI wrappers. Package de- velopers are advised to use these variables, for example self.spec[’mpi’].mpicc instead of hard-coding join_path(self.spec[’mpi’].prefix.bin, ’mpicc’) for the reasons outlined above.

Blas and Lapack libraries

Different packages provide implementation of Blas and Lapack routines. The names of the resulting static and/or shared libraries differ from package to package. In order to make the install() method indifferent to the choice of Blas implementation, each package which provides it sets up self.spec.blas_shared_lib and self.spec.blas_static_lib to point to the shared and static Blas libraries, respectively. The same applies to packages which provide Lapack. Package developers are advised to use these variables, for example spec[’blas’].blas_shared_lib instead of hard-coding join_path(spec[’blas’].prefix.lib, ’libopenblas.so’).

Forking install()

To give packagers free reign over their install environment, Spack forks a new process each time it invokes a package’s install() method. This allows packages to have their own completely sandboxed build environment, without impacting other jobs that the main Spack process runs. Packages are free to change the environment or to modify Spack internals, because each install() call has its own dedicated process.

1.4.18 Failing the build

Sometimes you don’t want a package to successfully install unless some condition is true. You can explicitly cause the build to fail from install() by raising an InstallError, for example: if spec.architecture.startswith('darwin'): raise InstallError('This package does not build on Mac OS X!')

1.4.19 Prefix objects

Spack passes the prefix parameter to the install method so that you can pass it to configure, cmake, or some other installer, e.g.: configure('--prefix='+ prefix)

For the most part, prefix objects behave exactly like strings. For packages that do not have their own install target, or for those that implement it poorly (like libdwarf), you may need to manually copy things into particular directories under the prefix. For this, you can refer to standard subdirectories without having to construct paths yourself, e.g.: def install(self, spec, prefix): mkdirp(prefix.bin) install('foo-tool', prefix.bin)

mkdirp(prefix.include) install('foo.h', prefix.include)

mkdirp(prefix.lib) install('libfoo.a', prefix.lib)

66 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Most of the standard UNIX directory names are attributes on the prefix object. Here is a full list: Prefix Attribute Location prefix.bin $prefix/bin prefix.sbin $prefix/sbin prefix.etc $prefix/etc prefix.include $prefix/include prefix.lib $prefix/lib prefix.lib64 $prefix/lib64 prefix.libexec $prefix/libexec prefix.share $prefix/share prefix.doc $prefix/doc prefix.info $prefix/info prefix.man $prefix/man prefix.man[1-8] $prefix/man/man[1-8] prefix.share_man $prefix/share/man prefix.share_man[1-8] $prefix/share/man[1-8]

1.4.20 Spec objects

When install is called, most parts of the build process are set up for you. The correct version’s tarball has been downloaded and expanded. Environment variables like CC and CXX are set to point to the correct compiler and version. An install prefix has already been selected and passed in as prefix. In most cases this is all you need to get configure, cmake, or another install working correctly. There will be times when you need to know more about the build configuration. For example, some soft- ware requires that you pass special parameters to configure, like --with-libelf=/path/to/libelf or --with-mpich. You might also need to supply special compiler flags depending on the compiler. All of this information is available in the spec.

Testing spec constraints

You can test whether your spec is configured a certain way by using the satisfies method. For example, if you want to check whether the package’s version is in a particular range, you can use specs to do that, e.g.: configure_args=[ '--prefix={0}'.format(prefix) ] if spec.satisfies('@1.2:1.4'): configure_args.append("CXXFLAGS='-DWITH_FEATURE'") configure(*configure_args)

This works for compilers, too: if spec.satisfies('%gcc'): configure_args.append('CXXFLAGS="-g3 -O3"') if spec.satisfies('%intel'): configure_args.append('CXXFLAGS="-xSSE2 -fast"')

Or for combinations of spec constraints: if spec.satisfies('@1.2%intel'): tty.error("Version 1.2 breaks when using Intel compiler!")

1.4. Packaging Guide 67 Spack Documentation, Release 0.9

You can also do similar satisfaction tests for dependencies: if spec.satisfies('^[email protected]'): configure_args.append('CXXFLAGS=-DSPECIAL_DYNINST_FEATURE')

This could allow you to easily work around a bug in a particular dependency version. You can use satisfies() to test for particular dependencies, e.g. foo.satisfies(’^[email protected]’) or foo.satisfies(’^mpich’), or you can use Python’s built-in in operator: if 'libelf' in spec: print "this package depends on libelf"

This is useful for virtual dependencies, as you can easily see what implementation was selected for this build: if 'openmpi' in spec: configure_args.append('--with-openmpi') elif 'mpich' in spec: configure_args.append('--with-mpich') elif 'mvapich' in spec: configure_args.append('--with-mvapich')

It’s also a bit more concise than satisfies. The difference between the two functions is that satisfies() tests whether spec constraints overlap at all, while in tests whether a spec or any of its dependencies satisfy the provided spec.

Accessing Dependencies

You may need to get at some file or binary that’s in the prefix of one of your dependencies. You can do that by sub-scripting the spec: my_mpi= spec['mpi']

The value in the brackets needs to be some package name, and spec needs to depend on that package, or the operation will fail. For example, the above code will fail if the spec doesn’t depend on mpi. The value returned and assigned to my_mpi, is itself just another Spec object, so you can do all the same things you would do with the package’s own spec: mpicc= join_path(my_mpi.prefix.bin,'mpicc')

Multimethods and @when

Spack allows you to make multiple versions of instance functions in packages, based on whether the package’s spec satisfies particular criteria. The @when annotation lets packages declare multiple versions of methods like install() that depend on the package’s spec. For example: class SomePackage(Package): ...

def install(self, prefix): # Do default install

@when('arch=chaos_5_x86_64_ib') def install(self, prefix): # This will be executed instead of the default install if # the package's sys_type() is chaos_5_x86_64_ib.

68 Chapter 1. Table of Contents Spack Documentation, Release 0.9

@when('arch=linux-debian7-x86_64') def install(self, prefix): # This will be executed if the package's sys_type() is # linux-debian7-x86_64.

In the above code there are three versions of install(), two of which are specialized for particular platforms. The version that is called depends on the architecture of the package spec. Note that this works for methods other than install, as well. So, if you only have part of the install that is platform specific, you could do something more like this: class SomePackage(Package): ... # virtual dependence on MPI. # could resolve to mpich, mpich2, OpenMPI depends_on('mpi')

def setup(self): # do nothing in the default case pass

@when('^openmpi') def setup(self): # do something special when this is built with OpenMPI for # its MPI implementations.

def install(self, prefix): # Do common install stuff self.setup() # Do more common install stuff

You can write multiple @when specs that satisfy the package’s spec, for example: class SomePackage(Package): ... depends_on('mpi')

def setup_mpi(self): # the default, called when no @when specs match pass

@when('^mpi@3:') def setup_mpi(self): # this will be called when mpi is version 3 or higher pass

@when('^mpi@2:') def setup_mpi(self): # this will be called when mpi is version 2 or higher pass

@when('^mpi@1:') def setup_mpi(self): # this will be called when mpi is version 1 or higher pass

In situations like this, the first matching spec, in declaration order will be called. As before, if no @when spec matches, the default method (the one without the @when decorator) will be called.

1.4. Packaging Guide 69 Spack Documentation, Release 0.9

Warning: The default version of decorated methods must always come first. Otherwise it will override all of the platform-specific versions. There’s not much we can do to get around this because of the way decorators work.

1.4.21 Shell command functions

Recall the install method from libelf:

1 def install(self, spec, prefix):

2 configure("--prefix="+ prefix,

3 "--enable-shared",

4 "--disable-dependency-tracking",

5 "--disable-debug")

6 make()

7

8 # The mkdir commands in libelf's install can fail in parallel

9 make("install", parallel=False)

Normally in Python, you’d have to write something like this in order to execute shell commands: import subprocess subprocess.check_call('configure','--prefix={0}'.format(prefix))

We’ve tried to make this a bit easier by providing callable wrapper objects for some shell commands. By default, configure, cmake, and make wrappers are are provided, so you can call them more naturally in your package files. If you need other commands, you can use which to get them: sed= which('sed') sed('s/foo/bar/', filename)

The which function will search the PATH for the application. Callable wrappers also allow spack to provide some special features. For example, in Spack, make is parallel by de- fault, and Spack figures out the number of cores on your machine and passes an appropriate value for -j when it calls make (see the parallel package attribute ). In a package file, you can supply a keyword argument, parallel=False, to the make wrapper to disable parallel make. In the libelf package, this allows us to avoid race conditions in the library’s build system.

1.4.22 Sanity checking an installation

By default, Spack assumes that a build has failed if nothing is written to the install prefix, and that it has succeeded if anything (a file, a directory, etc.) is written to the install prefix after install() completes. Consider a simple autotools build like this: def install(self, spec, prefix): configure("--prefix={0}".format(prefix)) make() make("install")

If you are using using standard autotools or CMake, configure and make will not write anything to the install prefix. Only make install writes the files, and only once the build is already complete. Not all builds are like this. Many builds of scientific software modify the install prefix before make install. Builds like this can falsely report that they were successfully installed if an error occurs before the install is complete but after files have been written to the prefix.

70 Chapter 1. Table of Contents Spack Documentation, Release 0.9 sanity_check_is_file and sanity_check_is_dir

You can optionally specify sanity checks to deal with this problem. Add properties like this to your package: class MyPackage(Package): ...

sanity_check_is_file=['include/libelf.h'] sanity_check_is_dir= [lib]

def install(self, spec, prefix): configure("--prefix="+ prefix) make() make("install")

Now, after install() runs, Spack will check whether $prefix/include/libelf.h exists and is a file, and whether $prefix/lib exists and is a directory. If the checks fail, then the build will fail and the install prefix will be removed. If they succeed, Spack considers the build successful and keeps the prefix in place.

1.4.23 File manipulation functions

Many builds are not perfect. If a build lacks an install target, or if it does not use systems like CMake or autotools, which have standard ways of setting compilers and options, you may need to edit files or install some files yourself to get them working with Spack. You can do this with standard Python code, and Python has rich libraries with functions for file manipulation and filtering. Spack also provides a number of convenience functions of its own to make your life even easier. These functions are described in this section. All of the functions in this section can be included by simply running: from spack import *

This is already part of the boilerplate for packages created with spack create or spack edit.

Filtering functions filter_file(regex, repl, *filenames, **kwargs) Works like sed but with Python regular expres- sion syntax. Takes a regular expression, a replacement, and a set of files. repl can be a raw string or a callable function. If it is a raw string, it can contain \1, \2, etc. to refer to capture groups in the regular expression. If it is a callable, it is passed the Python MatchObject and should return a suitable replacement string for the particular match. Examples: 1. Filtering a Makefile to force it to use Spack’s compiler wrappers:

filter_file(r'^CC\s*=.*', spack_cc,'Makefile') filter_file(r'^CXX\s*=.*', spack_cxx,'Makefile') filter_file(r'^F77\s*=.*', spack_f77,'Makefile') filter_file(r'^FC\s*=.*', spack_fc,'Makefile')

2. Replacing #!/usr/bin/perl with #!/usr/bin/env perl in bib2xhtml: filter_file(r'#!/usr/bin/perl', '#!/usr/bin/env perl', join_path(prefix.bin,'bib2xhtml'))

1.4. Packaging Guide 71 Spack Documentation, Release 0.9

3. Switching the compilers used by mpich‘s MPI wrapper scripts from cc, etc. to the compilers used by the Spack build: filter_file('CC="cc"','CC=" %s"'% self.compiler.cc, join_path(prefix.bin,'mpicc'))

filter_file('CXX="c++"','CXX=" %s"'% self.compiler.cxx, join_path(prefix.bin,'mpicxx'))

change_sed_delimiter(old_delim, new_delim, *filenames) Some packages, like TAU, have a build system that can’t install into directories with, e.g. ‘@’ in the name, because they use hard-coded sed commands in their build. change_sed_delimiter finds all sed search/replace commands and change the delimiter. e.g., if the file contains commands that look like s///, you can use this to change them to s@@@. Example of changing s/// to s@@@ in TAU: change_sed_delimiter('@',';','configure') change_sed_delimiter('@',';','utils/FixMakefile') change_sed_delimiter('@',';','utils/FixMakefile.sed.default')

File functions

ancestor(dir, n=1) Get the nth ancestor of the directory dir. can_access(path) True if we can read and write to the file at path. Same as native python os.access(file_name, os.R_OK|os.W_OK). install(src, dest) Install a file to a particular location. For example, install a header into the include directory under the install prefix: install('my-header.h', join_path(prefix.include))

join_path(prefix, *args) Like os.path.join, this joins paths using the OS path separator. However, this version allows an arbitrary number of arguments, so you can string together many path components. mkdirp(*paths) Create each of the directories in paths, creating any parent directories if they do not exist. working_dir(dirname, kwargs) This is a Python Context Manager that makes it easier to work with sub- directories in builds. You use this with the Python with statement to change into a working directory, and when the with block is done, you change back to the original directory. Think of it as a safe pushd / popd combination, where popd is guaranteed to be called at the end, even if exceptions are thrown. Example usage: 1. The libdwarf build first runs configure and make in a subdirectory called libdwarf. It then implements the installation code itself. This is natural with working_dir: with working_dir('libdwarf'): configure("--prefix="+ prefix,"--enable-shared") make() install('libdwarf.a', prefix.lib)

2. Many CMake builds require that you build “out of source”, that is, in a subdirectory. You can handle creating and cd‘ing to the subdirectory like the LLVM package does: with working_dir('spack-build', create=True): cmake('..', '-DLLVM_REQUIRES_RTTI=1',

72 Chapter 1. Table of Contents Spack Documentation, Release 0.9

'-DPYTHON_EXECUTABLE=/usr/bin/python', '-DPYTHON_INCLUDE_DIR=/usr/include/python2.6', '-DPYTHON_LIBRARY=/usr/lib64/libpython2.6.so', *std_cmake_args) make() make("install")

The create=True keyword argument causes the command to create the directory if it does not exist. touch(path) Create an empty file at path.

1.4.24 Coding Style Guidelines

The following guidelines are provided, in the interests of making Spack packages work in a consistent manner:

Variant Names

Spack packages with variants similar to already-existing Spack packages should use the same name for their variants. Standard variant names are: Name Default Description shared True Build shared libraries static True Build static libraries mpi True Use MPI python False Build Python extension If specified in this table, the corresponding default should be used when declaring a variant.

Version Lists

Spack packages should list supported versions with the newest first.

Special Versions

The following special version names may be used when building a package:

@system

Indicates a hook to the OS-installed version of the package. This is useful, for example, to tell Spack to use the OS-installed version in packages.yaml: openssl: paths: openssl@system: /usr buildable: False

Certain Spack internals look for the @system version and do appropriate things in that case.

@local

Indicates the version was built manually from some source tree of unknown provenance (see spack setup).

1.4. Packaging Guide 73 Spack Documentation, Release 0.9

1.4.25 Packaging workflow commands

When you are building packages, you will likely not get things completely right the first time. The spack install command performs a number of tasks before it finally installs each package. It downloads an archive, expands it in a temporary directory, and only then gives control to the package’s install() method. If the build doesn’t go as planned, you may want to clean up the temporary directory, or if the package isn’t downloading properly, you might want to run only the fetch stage of the build. A typical package workflow might look like this: $ spack edit mypackage $ spack install mypackage ... build breaks! ... $ spack clean mypackage $ spack edit mypackage $ spack install mypackage ... repeat clean/install until install works ...

Below are some commands that will allow you some finer-grained control over the install process.

spack fetch

The first step of spack install. Takes a spec and determines the correct download URL to use for the requested package version, then downloads the archive, checks it against an MD5 checksum, and stores it in a staging directory if the check was successful. The staging directory will be located under $SPACK_HOME/var/spack. When run after the archive has already been downloaded, spack fetch is idempotent and will not download the archive again.

spack stage

The second step in spack install after spack fetch. Expands the downloaded archive in its temporary directory, where it will be built by spack install. Similar to fetch, if the archive has already been expanded, stage is idempotent.

spack patch

After staging, Spack applies patches to downloaded packages, if any have been specified in the package file. This command will run the install process through the fetch, stage, and patch phases. Spack keeps track of whether patches have already been applied and skips this step if they have been. If Spack discovers that patches didn’t apply cleanly on some previous run, then it will restage the entire package before patching.

spack restage

Restores the source code to pristine state, as it was before building. Does this in one of two ways: 1. If the source was fetched as a tarball, deletes the entire build directory and re-expands the tarball. 2. If the source was checked out from a repository, this deletes the build directory and checks it out again.

74 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack clean

Cleans up temporary files for a particular package, by deleting the expanded/checked out source code and any down- loaded archive. If fetch, stage, or install are run again after this, Spack’s build process will start from scratch.

spack purge

Cleans up all of Spack’s temporary and cached files. This can be used to recover disk space if temporary files from interrupted or failed installs accumulate in the staging area. When called with --stage or --all (or without arguments, in which case the default is --all) this removes all staged files; this is equivalent to running spack clean for every package you have fetched or staged. When called with --cache or --all this will clear all resources cached during installs.

Keeping the stage directory on success

By default, spack install will delete the staging area once a package has been successfully built and installed. Use --keep-stage to leave the build directory intact: $ spack install --keep-stage

This allows you to inspect the build directory and potentially debug the build. You can use purge or clean later to get rid of the unwanted temporary files.

Keeping the install prefix on failure

By default, spack install will delete any partially constructed install prefix if anything fails during install(). If you want to keep the prefix anyway (e.g. to diagnose a bug), you can use --keep-prefix: $ spack install --keep-prefix

Note that this may confuse Spack into thinking that the package has been installed properly, so you may need to use spack uninstall --force to get rid of the install prefix before you build again: $ spack uninstall --force

1.4.26 Graphing dependencies

spack graph

Spack provides the spack graph command for graphing dependencies. The command by default generates an ASCII rendering of a spec’s dependency graph. For example: $ spack graph mpileaks o mpileaks |\ | |\ | o | callpath |/| | | |\| | |\ \ | | |\ \ | | | |\ \

1.4. Packaging Guide 75 Spack Documentation, Release 0.9

| | | | | o adept-utils | |_|_|_|/| |/| | | |/| o | | | | | mpi ///// | | o | | dyninst | |/| | | |/|/| | | | | |\| | | | | |/ | | |/| | o | | libdwarf |/ / / o | | libelf // | o cmake | o boost

At the top is the root package in the DAG, with dependency edges emerging from it. On a color terminal, the edges are colored by which dependency they lead to. You can also use spack graph to generate graphs in the widely used Dot format. For example: $ spack graph --dot mpileaks digraph G { = "Spack Dependencies" labelloc = "b" rankdir = "LR" ranksep = "5"

"callpath" [label="callpath"] "adept-utils" [label="adept-utils"] "dyninst" [label="dyninst"] "libdwarf" [label="libdwarf"] "boost" [label="boost"] "cmake" [label="cmake"] "libelf" [label="libelf"] "mpileaks" [label="mpileaks"] "mpi" [label="mpi"]

"callpath" -> "cmake" "callpath" -> "dyninst" "callpath" -> "adept-utils" "callpath" -> "libelf" "callpath" -> "mpi" "callpath" -> "libdwarf" "adept-utils" -> "cmake" "adept-utils" -> "boost" "adept-utils" -> "mpi" "dyninst" -> "cmake" "dyninst" -> "boost" "dyninst" -> "libelf" "dyninst" -> "libdwarf" "libdwarf" -> "libelf" "boost" -> "python" "boost" -> "bzip2" "boost" -> "zlib" "boost" -> "icu"

76 Chapter 1. Table of Contents Spack Documentation, Release 0.9

"boost" -> "mpi" "cmake" -> "py-sphinx" "cmake" -> "bzip2" "cmake" -> "expat" "cmake" -> "qt" "cmake" -> "python" "cmake" -> "zlib" "cmake" -> "openssl" "cmake" -> "libarchive" "cmake" -> "xz" "cmake" -> "ncurses" "cmake" -> "curl" "elf" -> "libelf" "mpileaks" -> "adept-utils" "mpileaks" -> "callpath" "mpileaks" -> "mpi" }

This graph can be provided as input to other graphing tools, such as those in Graphviz.

1.4.27 Interactive shell support

Spack provides some limited shell support to make life easier for packagers. You can enable these commands by sourcing a setup file in the share/spack directory. For bash or ksh, run: export SPACK_ROOT=/path/to/spack . $SPACK_ROOT/share/spack/setup-env.sh

For csh and tcsh run: setenv SPACK_ROOT /path/to/spack source $SPACK_ROOT/share/spack/setup-env.csh spack cd will then be available. spack cd spack cd allows you to quickly cd to pertinent directories in Spack. Suppose you’ve staged a package but you want to modify it before you build it: $ spack stage libelf ==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.13.tar.gz ######################################################################## 100.0% ==> Staging archive: /Users/gamblin2/src/spack/var/spack/stage/[email protected]%[email protected] arch=linux-debian7-x86_64/libelf-0.8.13.tar.gz ==> Created stage in /Users/gamblin2/src/spack/var/spack/stage/[email protected]%[email protected] arch=linux-debian7-x86_64. $ spack cd libelf $ pwd /Users/gamblin2/src/spack/var/spack/stage/[email protected]%[email protected] arch=linux-debian7-x86_64/libelf-0.8.13 spack cd here changed the current working directory to the directory containing the expanded libelf source code. There are a number of other places you can cd to in the spack directory hierarchy: $ spack cd -h usage: spack cd [-h] [-m | -r | -i | -p | -P | -s | -S | -b] ... positional arguments: spec spec of package to fetch directory for.

1.4. Packaging Guide 77 Spack Documentation, Release 0.9

optional arguments: -h, --help show this help message and exit -m, --module-dir Spack python module directory. -r, --spack-root Spack installation root. -i, --install-dir Install prefix for spec (spec need not be installed). -p, --package-dir Directory enclosing a spec's package.py file. -P, --packages Top-level packages directory for Spack. -s, --stage-dir Stage directory for a spec. -S, --stages Top level Stage directory. -b, --build-dir Checked out or expanded source directory for a spec (requires it to be staged first).

Some of these change directory into package-specific locations (stage directory, install directory, package directory) and others change to core spack locations. For example, spack cd -m will take you to the main python source directory of your spack install.

spack env

spack env functions much like the standard unix env command, but it takes a spec as an argument. You can use it to see the environment variables that will be set when a particular build runs, for example: $ spack env [email protected]%intel

This will display the entire environment that will be set when the [email protected]%intel build runs. To run commands in a package’s build environment, you can simply provide them after the spec argument to spack env: $ spack cd [email protected]%intel $ spack env [email protected]%intel ./configure

This will cd to the build directory and then run configure in the package’s build environment. spack location spack location is the same as spack cd but it does not require shell support. It simply prints out the path you ask for, rather than cd’ing to it. In bash, this: $ cd $(spack location -b )

is the same as: $ spack cd -b

spack location is intended for use in scripts or makefiles that need to know where packages are installed. e.g., in a makefile you might write: DWARF_PREFIX= $(spack location -i libdwarf) CXXFLAGS +=-I$DWARF_PREFIX/include CXXFLAGS +=-L$DWARF_PREFIX/lib

1.4.28 Build System Configuration Support

Imagine a developer creating a CMake or Autotools-based project in a local directory, which depends on libraries A-Z. Once Spack has installed those dependencies, one would like to run cmake with appropriate command line and

78 Chapter 1. Table of Contents Spack Documentation, Release 0.9 environment so CMake can find them. The spack setup command does this conveniently, producing a CMake configuration that is essentially the same as how Spack would have configured the project. This can be demonstrated with a usage example: $ cd myproject $ spack setup myproject@local $ mkdir build; cd build $ ../spconfig.py .. $ make $ make install

Notes: • Spack must have myproject/package.py in its repository for this to work. • spack setup produces the executable script spconfig.py in the local directory, and also creates the module file for the package. spconfig.py is normally run from the user’s out-of-source build directory. • The version number given to spack setup is arbitrary, just like spack diy. myproject/package.py does not need to have any valid downloadable versions listed (typical when a project is new). • spconfig.py produces a CMake configuration that does not use the Spack wrappers. Any resulting binaries will not use RPATH, unless the user has enabled it. This is recommended for development purposes, not production. • spconfig.py is human readable, and can serve as a developer reference of what dependencies are being used. • make install installs the package into the Spack repository, where it may be used by other Spack packages. • CMake-generated makefiles re-run CMake in some circumstances. Use of spconfig.py breaks this behavior, requiring the developer to manually re-run spconfig.py when a CMakeLists.txt file has changed.

CMakePackage

In order to enable spack setup functionality, the author of myproject/package.py must subclass from CMakePackage instead of the standard Package superclass. Because CMake is standardized, the packager does not need to tell Spack how to run cmake; make; make install. Instead the packager only needs to create (optional) methods configure_args() and configure_env(), which provide the arguments (as a list) and extra environment variables (as a dict) to provide to the cmake command. Usually, these will translate variant flags into CMake definitions. For example: def configure_args(self): spec= self.spec return [ '-DUSE_EVERYTRACE=%s'%('YES' if '+everytrace' in spec else 'NO'), '-DBUILD_PYTHON=%s'%('YES' if '+python' in spec else 'NO'), '-DBUILD_GRIDGEN=%s'%('YES' if '+gridgen' in spec else 'NO'), '-DBUILD_COUPLER=%s'%('YES' if '+coupler' in spec else 'NO'), '-DUSE_PISM=%s'%('YES' if '+pism' in spec else 'NO') ]

If needed, a packager may also override methods defined in StagedPackage (see below).

StagedPackage

CMakePackage is implemented by subclassing the StagedPackage superclass, which breaks down the standard Package.install() method into several sub-stages: setup, configure, build and install. Details:

1.4. Packaging Guide 79 Spack Documentation, Release 0.9

• Instead of implementing the standard install() method, package authors implement the meth- ods for the sub-stages install_setup(), install_configure(), install_build(), and install_install(). • The spack install command runs the sub-stages configure, build and install in order. (The setup stage is not run by default; see below). • The spack setup command runs the sub-stages setup and a dummy install (to create the module file). • The sub-stage install methods take no arguments (other than self). The arguments spec and prefix to the standard install() method may be accessed via self.spec and self.prefix.

GNU Autotools

The setup functionality is currently only available for CMake-based packages. Extending this functionality to GNU Autotools-based packages would be easy (and should be done by a developer who actively uses Autotools). Packages that use non-standard build systems can gain setup functionality by subclassing StagedPackage directly.

1.5 Mirrors

Some sites may not have access to the internet for fetching packages. These sites will need a local repository of tarballs from which they can get their files. Spack has support for this with mirrors. A mirror is a URL that points to a directory, either on the local filesystem or on some server, containing tarballs for all of Spack’s packages. Here’s an example of a mirror’s directory structure: mirror/ cmake/ cmake-2.8.10.2.tar.gz dyninst/ dyninst-8.1.1.tgz dyninst-8.1.2.tgz libdwarf/ libdwarf-20130126.tar.gz libdwarf-20130207.tar.gz libdwarf-20130729.tar.gz libelf/ libelf-0.8.12.tar.gz libelf-0.8.13.tar.gz libunwind/ libunwind-1.1.tar.gz mpich/ mpich-3.0.4.tar.gz mvapich2/ mvapich2-1.9.tgz

The structure is very simple. There is a top-level directory. The second level directories are named after packages, and the third level contains tarballs for each package, named after each package.

Note: Archives are not named exactly the way they were in the package’s fetch URL. They have the form -., where is Spack’s name for the package, is the ver- sion of the tarball, and is whatever format the package’s fetch URL contains. In order to make mirror creation reasonably fast, we copy the tarball in its original format to the mirror directory, but we do not standardize on a particular compression algorithm, because this would potentially require expanding and

80 Chapter 1. Table of Contents Spack Documentation, Release 0.9 re-compressing each archive.

1.5.1 spack mirror

Mirrors are managed with the spack mirror command. The help for spack mirror looks like this: $ spack help mirror usage: spack mirror [-h] [-n] SUBCOMMAND ... positional arguments: SUBCOMMAND create Create a directory to be used as a spack mirror, and fill it with package archives. add Add a mirror to Spack. remove (rm) Remove a mirror by name. list Print out available mirrors to the console. optional arguments: -h, --help show this help message and exit -n, --no-checksum Do not check fetched packages against checksum

The create command actually builds a mirror by fetching all of its packages from the internet and checksumming them. The other three commands are for managing mirror configuration. They control the URL(s) from which Spack down- loads its packages.

1.5.2 spack mirror create

You can create a mirror using the spack mirror create command, assuming you’re on a machine where you can access the internet. The command will iterate through all of Spack’s packages and download the safe ones into a directory structure like the one above. Here is what it looks like: $ spack mirror create libelf libdwarf ==> Created new mirror in spack-mirror-2014-06-24 ==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.13.tar.gz ########################################################## 81.6% ==> Checksum passed for [email protected] ==> Added [email protected] ==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.12.tar.gz ###################################################################### 98.6% ==> Checksum passed for [email protected] ==> Added [email protected] ==> Trying to fetch from http://www.prevanders.net/libdwarf-20130207.tar.gz ###################################################################### 97.3% ==> Checksum passed for libdwarf@20130207 ==> Added libdwarf@20130207 ==> Trying to fetch from http://www.prevanders.net/libdwarf-20130126.tar.gz ######################################################## 78.9% ==> Checksum passed for libdwarf@20130126 ==> Added libdwarf@20130126 ==> Trying to fetch from http://www.prevanders.net/libdwarf-20130729.tar.gz ############################################################# 84.7% ==> Added libdwarf@20130729

1.5. Mirrors 81 Spack Documentation, Release 0.9

==> Added spack-mirror-2014-06-24/libdwarf/libdwarf-20130729.tar.gz to mirror ==> Added [email protected]. ==> Successfully updated mirror in spack-mirror-2015-02-24. Archive stats: 0 already present 5 added 0 failed to fetch.

Once this is done, you can tar up the spack-mirror-2014-06-24 directory and copy it over to the machine you want it hosted on.

Custom package sets

Normally, spack mirror create downloads all the archives it has checksums for. If you want to only create a mirror for a subset of packages, you can do that by supplying a list of package specs on the command line after spack mirror create. For example, this command: $ spack mirror create [email protected]: [email protected]:

Will create a mirror for libelf versions greater than or equal to 0.8.12 and boost versions greater than or equal to 1.44.

Mirror files

If you have a very large number of packages you want to mirror, you can supply a file with specs in it, one per line: $ cat specs.txt libdwarf [email protected]: [email protected]: [email protected] ... $ spack mirror create -f specs.txt ...

This is useful if there is a specific suite of software managed by your site.

1.5.3 spack mirror add

Once you have a mirror, you need to let spack know about it. This is relatively simple. First, figure out the URL for the mirror. If it’s a file, you can use a file URL like this one: file:///Users/gamblin2/spack-mirror-2014-06-24

That points to the directory on the local filesystem. If it were on a web server, you could use a URL like this one: https://example.com/some/web-hosted/directory/spack-mirror-2014-06-24 Spack will use the URL as the root for all of the packages it fetches. You can tell your Spack installation to use that mirror like this: $ spack mirror add local_filesystem file:///Users/gamblin2/spack-mirror-2014-06-24

Each mirror has a name so that you can refer to it again later.

82 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.5.4 spack mirror list

To see all the mirrors Spack knows about, run spack mirror list: $ spack mirror list local_filesystem file:///Users/gamblin2/spack-mirror-2014-06-24

1.5.5 spack mirror remove

To remove a mirror by name, run: $ spack mirror remove local_filesystem $ spack mirror list ==> No mirrors configured.

1.5.6 Mirror precedence

Adding a mirror really adds a line in ~/.spack/mirrors.yaml: mirrors: local_filesystem: file:///Users/gamblin2/spack-mirror-2014-06-24 remote_server: https://example.com/some/web-hosted/directory/spack-mirror-2014-06-24

If you want to change the order in which mirrors are searched for packages, you can edit this file and reorder the sections. Spack will search the topmost mirror first and the bottom-most mirror last.

1.5.7 Local Default Cache

Spack caches resources that are downloaded as part of installs. The cache is a valid spack mirror: it uses the same direc- tory structure and naming scheme as other Spack mirrors (so it can be copied anywhere and referenced with a URL like other mirrors). The mirror is maintained locally (within the Spack installation directory) at var/spack/cache/. It is always enabled (and is always searched first when attempting to retrieve files for an installation) but can be cleared with purge; the cache directory can also be deleted manually without issue. Caching includes retrieved tarball archives and source control repositories, but only resources with an associated digest or commit ID (e.g. a revision number for SVN) will be cached.

1.6 Configuration

1.6.1 Temporary space

Warning: Temporary space configuration will eventually be moved to configuration files, but currently these settings are in lib/spack/spack/__init__.py

By default, Spack will try to do all of its building in temporary space. There are two main reasons for this. First, Spack is designed to run out of a user’s home directory, and on may systems the home directory is network mounted and potentially not a very fast filesystem. We create build stages in a temporary directory to avoid this. Second, many systems impose quotas on home directories, and /tmp or similar directories often have more available space. This helps conserve space for installations in users’ home directories.

1.6. Configuration 83 Spack Documentation, Release 0.9

You can customize temporary directories by editing lib/spack/spack/__init__.py. Specifically, find this part of the file: # Whether to build in tmp space or directly in the stage_path. # If this is true, then spack will make stage directories in # a tmp filesystem, and it will symlink them into stage_path. use_tmp_stage= True

# Locations to use for staging and building, in order of preference # Use a %u to add a username to the stage paths here, in case this # is a shared filesystem. Spack will use the first of these paths # that it can create. tmp_dirs=['/nfs/tmp2/ %u/spack-stage', '/var/tmp/%u/spack-stage', '/tmp/%u/spack-stage']

The use_tmp_stage variable controls whether Spack builds directly inside the var/spack/ directory. Normally, Spack will try to find a temporary directory for a build, then it symlinks that temporary directory into var/spack/ so that you can keep track of what temporary directories Spack is using. The tmp_dirs variable is a list of paths Spack should search when trying to find a temporary directory. They can optionally contain a %u, which will substitute the current user’s name into the path. The list is searched in order, and Spack will create a temporary stage in the first directory it finds to which it has write access. Add more elements to the list to indicate where your own site’s temporary directory is.

1.6.2 External Packages

Spack can be configured to use externally-installed packages rather than building its own packages. This may be desirable if machines ship with system packages, such as a customized MPI that should be used instead of Spack building its own MPI. External packages are configured through the packages.yaml file found in a Spack installation’s etc/spack/ or a user’s ~/.spack/ directory. Here’s an example of an external configuration: packages: openmpi: paths: [email protected]%[email protected] arch=linux-x86_64-debian7: /opt/openmpi-1.4.3 [email protected]%[email protected] arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug [email protected]%[email protected] arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel

This example lists three installations of OpenMPI, one built with gcc, one built with gcc and debug information, and another built with Intel. If Spack is asked to build a package that uses one of these MPIs as a dependency, it will use the the pre-installed OpenMPI in the given directory. Packages.yaml can also be used to specify modules Each packages.yaml begins with a packages: token, followed by a list of package names. To specify externals, add a paths or modules token under the package name, which lists externals in a spec: /path or spec: module-name format. Each spec should be as well-defined as reasonably possible. If a package lacks a spec component, such as missing a compiler or package version, then Spack will guess the missing component based on its most-favored packages, and it may guess incorrectly. Each package version and compilers listed in an external should have entries in Spack’s packages and compiler con- figuration, even though the package and compiler may not every be built. The packages configuration can tell Spack to use an external location for certain package versions, but it does not restrict Spack to using external packages. In the above example, if an OpenMPI 1.8.4 became available Spack may choose to start building and linking with that version rather than continue using the pre-installed OpenMPI versions.

84 Chapter 1. Table of Contents Spack Documentation, Release 0.9

To prevent this, the packages.yaml configuration also allows packages to be flagged as non-buildable. The previ- ous example could be modified to be: packages: openmpi: paths: [email protected]%[email protected] arch=linux-x86_64-debian7: /opt/openmpi-1.4.3 [email protected]%[email protected] arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug [email protected]%[email protected] arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel buildable: False

The addition of the buildable flag tells Spack that it should never build its own version of OpenMPI, and it will instead always rely on a pre-built OpenMPI. Similar to paths, buildable is specified as a property under a package name. If an external module is specified as not buildable, then Spack will load the external module into the build environment which can be used for linking. The buildable does not need to be paired with external packages. It could also be used alone to forbid packages that may be buggy or otherwise undesirable.

1.6.3 Concretization Preferences

Spack can be configured to prefer certain compilers, package versions, depends_on, and variants during concretization. The preferred configuration can be controlled via the ~/.spack/packages.yaml file for user configuations, or the etc/spack/packages.yaml site configuration. Here’s an example packages.yaml file that sets preferred packages: packages: opencv: compiler: [[email protected]] variants: +debug gperftools: version: [2.2, 2.4, 2.3] all: compiler: [[email protected], [email protected]:, intel, clang, pgi] providers: mpi: [mvapich, mpich, openmpi]

At a high level, this example is specifying how packages should be concretized. The opencv package should prefer using gcc 4.9 and be built with debug options. The gperftools package should prefer version 2.2 over 2.4. Every package on the system should prefer mvapich for its MPI and gcc 4.4.7 (except for opencv, which overrides this by preferring gcc 4.9). These options are used to fill in implicit defaults. Any of them can be overwritten on the command line if explicitly requested. Each packages.yaml file begins with the string packages: and package names are specified on the next level. The special string all applies settings to each package. Underneath each package name is one or more components: compiler, variants, version, or providers. Each component has an ordered list of spec constraints, with earlier entries in the list being preferred over later entries. Sometimes a package installation may have constraints that forbid the first concretization rule, in which case Spack will use the first legal concretization rule. Going back to the example, if a user requests gperftools 2.3 or later, then Spack will install version 2.4 as the 2.4 version of gperftools is preferred over 2.3. An explicit concretization rule in the preferred section will always take preference over unlisted concretizations. In the above example, xlc isn’t listed in the compiler list. Every listed compiler from gcc to pgi will thus be preferred over the xlc compiler.

1.6. Configuration 85 Spack Documentation, Release 0.9

The syntax for the provider section differs slightly from other concretization rules. A provider lists a value that packages may depend_on (e.g, mpi) and a list of rules for fulfilling that dependency.

1.6.4 Profiling

Spack has some limited built-in support for profiling, and can report statistics using standard Python timing tools. To use this feature, supply -p to Spack on the command line, before any subcommands. spack --profile spack --profile output looks like this: $ spack --profile graph dyninst o dyninst |\ | |\ | | |\ | o | | libdwarf |/ / / o | | libelf // o | cmake / o boost 915655 function calls (911609 primitive calls) in 0.852 seconds

Ordered by: internal time

ncalls tottime percall cumtime percall filename:lineno(function) 224/222 0.133 0.001 0.423 0.002 inspect.py:472(getmodule) 169877 0.084 0.000 0.131 0.000 inspect.py:51(ismodule) 224749 0.066 0.000 0.066 0.000 {isinstance} 6057 0.059 0.000 0.059 0.000 {.stat} 95679 0.044 0.000 0.044 0.000 {hasattr} 5604/5224 0.043 0.000 0.603 0.000 inspect.py:440(getsourcefile) 4664 0.031 0.000 0.031 0.000 {posix.lstat} 97077 0.022 0.000 0.022 0.000 {method 'get' of 'dict' objects} 5835 0.018 0.000 0.053 0.000 inspect.py:398(getfile) ...

The bottom of the output shows the top most time consuming functions, slowest on top. The profiling support is from Python’s built-in tool, cProfile.

1.7 Developer Guide

This guide is intended for people who want to work on Spack itself. If you just want to develop packages, see the Packaging Guide. It is assumed that you’ve read the Basic usage and Packaging Guide sections, and that you’re familiar with the concepts discussed there. If you’re not, we recommend reading those first.

86 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.7.1 Overview

Spack is designed with three separate roles in mind: 1. Users, who need to install software without knowing all the details about how it is built. 2. Packagers who know how a particular software package is built and encode this information in package files. 3. Developers who work on Spack, add new features, and try to make the jobs of packagers and users easier. Users could be end users installing software in their home directory, or administrators installing software to a shared directory on a shared machine. Packagers could be administrators who want to automate software builds, or application developers who want to make their software more accessible to users. As you might expect, there are many types of users with different levels of sophistication, and Spack is designed to accommodate both simple and complex use cases for packages. A user who only knows that he needs a certain package should be able to type something simple, like spack install , and get the package that he wants. If a user wants to ask for a specific version, use particular compilers, or build several versions with different configurations, then that should be possible with a minimal amount of additional specification. This gets us to the two key concepts in Spack’s software design: 1. Specs: expressions for describing builds of software, and 2. Packages: Python modules that build software according to a spec. A package is a template for building particular software, and a spec as a descriptor for one or more instances of that template. Users express the configuration they want using a spec, and a package turns the spec into a complete build. The obvious difficulty with this design is that users under-specify what they want. To build a software package, the package object needs a complete specification. In Spack, if a spec describes only one instance of a package, then we say it is concrete. If a spec could describes many instances, (i.e. it is under-specified in one way or another), then we say it is abstract. Spack’s job is to take an abstract spec from the user, find a concrete spec that satisfies the constraints, and hand the task of building the software off to the package object. The rest of this document describes all the pieces that come together to make that happen.

1.7.2 Directory Structure

So that you can familiarize yourself with the project, we’ll start with a high level view of Spack’s directory structure: spack/ <- installation root bin/ spack <- main spack executable

etc/ spack/ <- Spack config files. Can be overridden by files in ~/.spack.

var/ spack/ <- build & stage directories repos/ <- contains package repositories builtin/ <- pkg repository that comes with Spack repo.yaml <- descriptor for the builtin repository packages/ <- directories under here contain packages cache/ <- saves resources downloaded during installs

opt/ spack/ <- packages are installed here

1.7. Developer Guide 87 Spack Documentation, Release 0.9

lib/ spack/ docs/ <- source for this documentation env/ <- compiler wrappers for build environment

external/ <- external libs included in Spack distro llnl/ <- some general-use libraries

spack/ <- spack module; contains Python code cmd/ <- each file in here is a spack subcommand compilers/ <- compiler description files test/ <- unit test modules util/ <- common code

Spack is designed so that it could live within a standard UNIX directory hierarchy, so lib, var, and opt all contain a spack subdirectory in case Spack is installed alongside other software. Most of the interesting parts of Spack live in lib/spack. Spack has one directory layout and there is no install process. Most Python programs don’t look like this (they use distutils, setup.py, etc.) but we wanted to make Spack very easy to use. The simple layout spares users from the need to install Spack into a Python environment. Many users don’t have write access to a Python installation, and installing an entire new instance of Python to bootstrap Spack would be very complicated. Users should not have to install install a big, complicated package to use the thing that’s supposed to spare them from the details of big, complicated packages. The end result is that Spack works out of the box: clone it and add bin to your PATH and you’re ready to go.

1.7.3 Code Structure

This section gives an overview of the various Python modules in Spack, grouped by functionality.

Package-related modules spack.package Contains the Package class, which is the superclass for all packages in Spack. Methods on Package implement all phases of the package lifecycle and manage the build process. spack.packages Contains all of the packages in Spack and methods for managing them. Functions like packages.get and class_name_for_package_name handle mapping package module names to class names and dynamically instantiating packages by name from module files. spack.relations Relations are relationships between packages, like depends_on and provides. See De- pendencies and Virtual dependencies. spack.multimethod Implementation of the @when decorator, which allows multimethods in packages.

Spec-related modules spack.spec Contains Spec and SpecParser. Also implements most of the logic for normalization and con- cretization of specs. spack.parse Contains some base classes for implementing simple recursive descent parsers: Parser and Lexer. Used by SpecParser. spack.concretize Contains DefaultConcretizer implementation, which allows site administrators to change Spack’s Concretization Policies.

88 Chapter 1. Table of Contents Spack Documentation, Release 0.9 spack.version Implements a simple Version class with simple comparison semantics. Also implements VersionRange and VersionList. All three are comparable with each other and offer union and inter- section operations. Spack uses these classes to compare versions and to manage version constraints on specs. Comparison semantics are similar to the LooseVersion class in distutils and to the way RPM compares version strings. spack.compilers Submodules contains descriptors for all valid compilers in Spack. This is used by the build system to set up the build environment.

Warning: Not yet implemented. Currently has two compiler descriptions, but compilers aren’t fully inte- grated with the build process yet. spack.architecture architecture.sys_type is used to determine the host architecture while building.

Warning: Not yet implemented. Should eventually have architecture descriptions for cross-compiling.

Build environment spack.stage Handles creating temporary directories for builds. spack.compilation This contains utility functions used by the compiler wrapper script, cc. spack.directory_layout Classes that control the way an installation directory is laid out. Create more imple- mentations of this to change the hierarchy and naming scheme in $spack_prefix/opt

Spack Subcommands spack.cmd Each module in this package implements a Spack subcommand. See writing commands for details.

Unit tests spack.test Implements Spack’s test suite. Add a module and put its name in the test suite in __init__.py to add more unit tests. spack.test.mock_packages This is a fake package hierarchy used to mock up packages for Spack’s test suite.

Other Modules spack.globals Includes global settings for Spack. the default policy classes for things like temporary space and concretization. spack.tty Basic output functions for all of the messages Spack writes to the terminal. spack.color Implements a color formatting syntax used by spack.tty. spack.url URL parsing, for deducing names and versions of packages from tarball URLs. spack.util In this package are a number of utility modules for the rest of Spack. spack.error SpackError, the base class for Spack’s exception hierarchy.

1.7. Developer Guide 89 Spack Documentation, Release 0.9

1.7.4 Spec objects

1.7.5 Package objects

Most spack commands look something like this: 1. Parse an abstract spec (or specs) from the command line, 2. Normalize the spec based on information in package files, 3. Concretize the spec according to some customizable policies, 4. Instantiate a package based on the spec, and 5. Call methods (e.g., install()) on the package object. The information in Package files is used at all stages in this process. Conceptually, packages are overloaded. They contain:

1.7.6 Stage objects

1.7.7 Writing commands

1.7.8 Unit tests

1.7.9 Unit testing

1.7.10 Developer commands spack doc spack test

1.8 Using Spack for CMake-based Development

These are instructions on how to use Spack to aid in the development of a CMake-based project. Spack is used to help find the dependencies for the project, configure it at development time, and then package it it in a way that others can install. Using Spack for CMake-based development consists of three parts: 1. Setting up the CMake build in your software 2. Writing the Spack Package 3. Using it from Spack.

1.8.1 Setting Up the CMake Build

You should follow standard CMake conventions in setting up your software, your CMake build should NOT depend on or require Spack to build. See here for an example: https://github.com/citibeth/icebin Note that there’s one exception here to the rule I mentioned above. In CMakeLists.txt, I have the following line:

90 Chapter 1. Table of Contents Spack Documentation, Release 0.9

include_directories($ENV{CMAKE_TRANSITIVE_INCLUDE_PATH})

This is a hook into Spack, and it ensures that all transitive dependencies are included in the include path. It’s not needed if everything is in one tree, but it is (sometimes) in the Spack world; when running without Spack, it has no effect. Note that this “feature” is controversial, could break with future versions of GNU ld, and probably not the best to use. The best practice is that you make sure that anything you #include is listed as a dependency in your CMakeLists.txt. To be more specific: if you #inlcude something from package A and an installed HEADER FILE in A #includes something from package B, then you should also list B as a dependency in your CMake build. If you depend on A but header files exported by A do NOT #include things from B, then you do NOT need to list B as a dependency — even if linking to A links in libB.so as well. I also recommend that you set up your CMake build to use RPATHs correctly. Not only is this a good idea and nice, but it also ensures that your package will build the same with or without spack install.

1.8.2 Writing the Spack Package

Now that you have a CMake build, you want to tell Spack how to configure it. This is done by writing a Spack package for your software. See here for example: https://github.com/citibeth/spack/blob/efischer/develop/var/spack/repos/builtin/packages/icebin/package.py You need to subclass CMakePackage, as is done in this example. This enables advanced features of Spack for helping you in configuring your software (keep reading...). Instead of an install() method used when subclassing Package, you write configure_args(). See here for more info on how this works: https://github.com/LLNL/spack/pull/543/files NOTE: if your software is not publicly available, you do not need to set the URL or version. Or you can set up bogus URLs and versions... whatever causes Spack to not crash.

1.8.3 Using it from Spack

Now that you have a Spack package, you can get Spack to setup your CMake project for you. Use the following to setup, configure and build your project: $ cd myproject $ spack spconfig myproject@local $ mkdir build; cd build $ ../spconfig.py .. $ make $ make install

Everything here should look pretty familiar here from a CMake perspective, except that spack spconfig creates the file spconfig.py, which calls CMake with arguments appropriate for your Spack configuration. Think of it as the equivalent to running a bunch of spack location -i commands. You will run spconfig.py instead of running CMake directly. If your project is publicly available (eg on GitHub), then you can ALSO use this setup to “just install” a release version without going through the manual configuration/build step. Just do: 1. Put tag(s) on the version(s) in your GitHub repo you want to be release versions. 2. Set the url in your package.py to download a tarball for the appropriate version. (GitHub will give you a tarball for any version in the repo, if you tickle it the right way). For example: https://github.com/citibeth/icebin/tarball/v0.1.0

1.8. Using Spack for CMake-based Development 91 Spack Documentation, Release 0.9

Set up versions as appropriate in your package.py. (Manually download the tarball and run md5sum to determine the appropriate checksum for it). 3. Now you should be able to say spack install myproject@version and things “just work.” NOTE... in order to use the features outlined in this post, you currently need to use the following branch of Spack: https://github.com/citibeth/spack/tree/efischer/develop There is a pull request open on this branch ( https://github.com/LLNL/spack/pull/543 ) and we are working to get it integrated into the main develop branch.

1.8.4 Activating your Software

Once you’ve built your software, you will want to load it up. You can use spack load mypackage@local for that in your .bashrc, but that is slow. Try stuff like the following instead: The following command will load the Spack-installed packages needed for basic Python use of IceBin: $ module load`spack module find tcl icebin netcdf [email protected]` $ module load`spack module find --dependencies tcl py-basemap py-giss`

You can speed up shell startup by turning these into module load commands. 1. Cut-n-paste the script make_spackenv: #!/bin/sh # # Generate commands to load the Spack environment

SPACKENV=$HOME/spackenv.sh

spack module find --shell tcl git icebin@local ibmisc netcdf [email protected] > $SPACKENV spack module find --dependencies --shell tcl py-basemap py-giss >> $SPACKENV

2. Add the following to your .bashrc file: source $HOME/spackenv.sh # Preferentially use your checked-out Python source export PYTHONPATH=$HOME/icebin/pylib:$PYTHONPATH

3. Run sh make_spackenv whenever your Spack installation changes (including right now).

1.8.5 Giving Back

If your software is publicly available, you should submit the package.py for it as a pull request to the main Spack GitHub project. This will ensure that anyone can install your software (almost) painlessly with a simple spack install command. See here for how that has turned into detailed instructions that have successfully enabled col- laborators to install complex software: https://github.com/citibeth/icebin/blob/develop/README.rst

1.9 Command index

This is an alphabetical list of commands with links to the places they appear in the documentation. • spack activate

92 Chapter 1. Table of Contents Spack Documentation, Release 0.9

• spack cd • spack checksum • spack clean • spack compiler add • spack compiler find • spack compiler info • spack compilers • spack create • spack deactivate • spack edit • spack edit –force • spack env • spack extensions • spack fetch • spack find • spack graph • spack help • spack info • spack install • spack list • spack location • spack mirror • spack mirror add • spack mirror create • spack mirror list • spack mirror remove • spack module refresh • spack –profile • spack patch • spack providers • spack purge • spack restage • spack spec • spack stage • spack uninstall • spack versions

1.10 Package List

This is a list of things you can install using Spack. It is automatically generated based on the packages in the latest Spack release. Spack currently has 697 mainline packages:

ack llvm qrupdate activeharmony llvm-lld qt adept-utils lmdb qt-creator adios lmod qthreads adol-c lrslib R allinea-forge lrzip r-abind allinea-reports lua r-assertthat Continued on next page

1.10. Package List 93 Spack Documentation, Release 0.9

Table 1.1 – continued from previous page antlr lua-luafilesystem r-base64enc ape lua-luaposix r-bh apex LuaJIT r-BiocGenerics apr lwgrp r-boot apr-util lwm2 r-brew armadillo lz4 r-car arpack lzma r-caret arpack-ng lzo r-chron asciidoc m4 r-class astyle mafft r-cluster atk mariadb r-codetools atlas matio r-colorspace atop mbedtls r-crayon autoconf meep r-cubature automaded memaxes r-curl automake mercurial r-datatable bash mesa r-dbi bbcp metis r-devtools bcftools mfem r-diagrammer bdw-gc Mitos r-dichromat bear mkl r-digest bertini moab r-doparallel bib2xhtml mpc r-dplyr binutils mpe2 r-dt bison mpfr r-dygraphs bliss mpibash r-e1071 blitz mpich r-filehash boost mpileaks r-foreach bowtie2 mrnet r-foreign boxlib msgpack-c r-gdata bpp-core mumps r-geosphere bpp-phyl munge r-ggmap bpp-seq muparser r-ggplot2 bpp-suite muster r-ggvis bwa mvapich2 r-git2r bzip2 mxml r-glmnet c-blosc nag r-googlevis cairo nano r-gridbase caliper nasm r-gridextra callpath nauty r-gtable cantera nccmp r-gtools cask ncdu r-htmltools cblas nco r-htmlwidgets cbtf ncurses r-httpuv cbtf-argonavis ncview r-httr cbtf-krell ndiff r-igraph cbtf-lanl netcdf r-influencer cdd netcdf-cxx r-inline cddlib netcdf-cxx4 r-irlba cdo netcdf-fortran r-iterators Continued on next page

94 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Table 1.1 – continued from previous page cereal netgauge r-jpeg cfitsio netlib-lapack r-jsonlite cgal netlib-scalapack r-labeling cgm nettle r-lattice cgns nextflow r-lazyeval cityhash ninja r-leaflet cleverleaf numdiff r-lme4 cloog nwchem r-lmtest cmake ocaml r-lubridate cmocka oce r-magic cnmem octave r-magrittr coreutils octave-splines r-mapproj cp2k octopus r-maps cppcheck ompss r-maptools cram ompt-openmp r-markdown cryptopp opari2 r-mass cscope openblas r-matrix cube opencoarrays r-matrixmodels cuda opencv r-memoise curl openexr r-mgcv czmq openjpeg r-mime daal openmpi r-minqa dakota openspeedshop r-multcomp damselfly openssl r-munsell datamash opium r-mvtnorm dbus osu-micro-benchmarks r-ncdf4 dealii otf r-networkd3 dia otf2 r-nlme docbook-xml p4est r-nloptr doxygen panda r-nmf dri2proto pango r-nnet dtcmp papi r-np dyninst paradiseo r-openssl eigen parallel r-packrat elfutils parallel-netcdf r-pbkrtest elk paraver r-pkgmaker elpa paraview r-plotrix emacs parmetis r-plyr environment-modules parmgridgen r-png espresso parpack r-praise exodusii patchelf r-proto exonerate pcre r-quantmod expat pcre2 r-quantreg extrae pdt r-R6 exuberant-ctags perl r-randomforest fastx_toolkit petsc r-raster fenics pgi r-rcolorbrewer ferret pidx r-rcpp fftw pixman r-rcppeigen fish pkg-config r-registry Continued on next page

1.10. Package List 95 Spack Documentation, Release 0.9

Table 1.1 – continued from previous page flex plumed r-reshape2 fltk pmgr_collective r-rgooglemaps flux pngwriter r-rjava foam-extend polymake r-rjson fontconfig porta r-rjsonio freetype postgresql r-rmysql gasnet ppl r-rngtools gcc prank r-rodbc gdal proj r-roxygen2 gdb protobuf r-rpostgresql gdk-pixbuf psi4 r-rsqlite geos py-3to2 r-rstan gettext py-alabaster r-rstudioapi gflags py-argcomplete r-sandwich ghostscript py-astroid r-scales giflib py-astropy r-shiny git py-autopep8 r-sp gl2ps py-babel r-sparsem glib py-basemap r-stanheaders glm py-beautifulsoup4 r-stringi global py-biopython r-stringr glog py-blessings r-survey glpk py-bottleneck r-survival gmp py-cclib r-tarifx gmsh py-cffi r-testthat gnu-prolog py-coverage r-thdata gnuplot py-csvkit r-threejs gnutls py-cycler r-tibble go py-cython r-tidyr go-bootstrap py-dask r-ttr gobject-introspection py-dateutil r-vcd googletest py-dbf r-visnetwork gperf py-decorator r-whisker gperftools py-docutils r-withr graphlib py-emcee r-xlconnect graphviz py-epydoc r-xlconnectjars gromacs py-flake8 r-xlsx gsl py-funcsigs r-xlsxjars gtkplus py-genders r-xml gts py-genshi r-xtable guile py-gnuplot r-xts harfbuzz py-h5py r-yaml harminv py-imagesize r-zoo hdf py-iminuit raja hdf5 py-ipython ravel hdf5-blosc py-jdcal readline hmmer py-jinja2 rose hoomd-blue py-lockfile rsync hpl py-logilab-common ruby hpx5 py-mako rust Continued on next page

96 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Table 1.1 – continued from previous page htslib py-markupsafe rust-bindgen hub py-matplotlib SAMRAI hwloc py-meep samtools hydra py-mistune scalasca hypre py-mock scons ibmisc py-mpi4py scorep icu py-mpmath scotch icu4c py-mx scr ilmbase py-mysqldb1 screen ImageMagick py-nestle sed intel py-netcdf seqtk intel-parallel-studio py-networkx serf intltool py-nose silo ior py-numexpr slepc ipopt py-numpy snappy ipp py-openpyxl sparsehash isl py-pandas spindle jasper py-pbr spot jdk py-pep8 sqlite jemalloc py-periodictable stat jpeg py-pexpect stream jsoncpp py-phonopy subversion judy py-pil suite-sparse julia py-pillow sundials kdiff3 py-ply superlu kealib py-pmw superlu-dist kripke py-prettytable superlu-mt launchmon py-protobuf swiftsim lcms py-py2cairo swig leveldb py-py2neo sympol libaio py-pychecker szip libarchive py-pycparser tar libatomic-ops py-pydatalog task libcerf py-pyelftools taskd libcircle py-pygments tau libctl py-pygobject tbb libdrm py-pygtk tcl libdwarf py-pylint tetgen libedit py-pypar texinfo libelf py-pyparsing texlive libepoxy py-pyqt the_platinum_searcher libevent py-pyside the_silver_searcher libffi py-pytables thrift libgcrypt py-python-daemon tk libgd py-pytz tmux libgpg-error py-pyyaml tmuxinator libgtextutils py-restview tree libhio py-rpy2 triangle libiconv py-scientificpython trilinos libjpeg-turbo py-scikit-image turbomole Continued on next page

1.10. Package List 97 Spack Documentation, Release 0.9

Table 1.1 – continued from previous page libjson-c py-scikit-learn udunits2 libmng py-scipy uncrustify libmonitor py-setuptools unibilium libNBC py-shiboken unison libpciaccess py-sip unixodbc libpng py-six util-linux libpthread-stubs py-sncosmo valgrind libsigsegv py-snowballstemmer vim libsodium py-sphinx visit libsplash py-sphinx-rtd-theme vtk libtermkey py-SQLAlchemy wget libtiff py-storm wx libtool py-sympy wxpropgrid libunistring py-tappy xcb-proto libunwind py-tuiview xerces-c libuuid py-twisted xorg-util-macros libuv py-unittest2 xproto libvterm py-unittest2py3k xz libxau py-urwid yasm libxc py-virtualenv zeromq libxcb py-wcsaxes zfp libxml2 py-wheel zlib libxpm py-xlrd zoltan libxshmfence py-yapf zsh libxslt python libxsmm qhull

1.10.1 ack

Homepage: • http://beyondgrep.com/ Spack package: • ack/package.py Versions: 2.14 Build Dependencies perl Link Dependencies perl Description: ack 2.14 is a tool like grep, optimized for programmers. Designed for programmers with large hetero- geneous trees of source code, ack is written purely in portable Perl 5 and takes advantage of the power of Perl’s regular expressions.

98 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.2 activeharmony

Homepage: • http://www.dyninst.org/harmony Spack package: • activeharmony/package.py Versions: 4.5 Description: Active : a framework for auto-tuning (the automated search for values to improve the perfor- mance of a target application).

1.10.3 adept-utils

Homepage: • https://github.com/llnl/adept-utils Spack package: • adept-utils/package.py Versions: 1.0.1, 1.0 Build Dependencies boost, cmake, mpi Link Dependencies boost, mpi Description: Utility libraries for LLNL performance tools.

1.10.4 adios

Homepage: • http://www.olcf.ornl.gov/center-projects/adios/ Spack package: • adios/package.py Versions: 1.10.0, 1.9.0 Build Dependencies hdf5, python, zlib, mpi, libtool, mxml, szip, autoconf , automake, netcdf Link Dependencies hdf5, zlib, mpi, netcdf , mxml, szip Description: The Adaptable IO System (ADIOS) provides a simple, flexible way for scientists to describe the data in their code that may need to be written, read, or processed outside of the running simulation.

1.10. Package List 99 Spack Documentation, Release 0.9

1.10.5 adol-c

Homepage: • https://projects.coin-or.org/ADOL-C Spack package: • adol-c/package.py Versions: 2.6.1, head Description: A package for the automatic differentiation of first and higher derivatives of vector functions in C and C++ programs by operator overloading.

1.10.6 allinea-forge

Homepage: • http://www.allinea.com/products/develop-allinea-forge Spack package: • allinea-forge/package.py Versions: 6.0.4 Description: Allinea Forge is the complete toolsuite for software development - with everything needed to debug, profile, optimize, edit and build C, C++ and Fortran applications on Linux for high performance - from single threads through to complex parallel HPC codes with MPI, OpenMP, threads or CUDA.

1.10.7 allinea-reports

Homepage: • http://www.allinea.com/products/allinea-performance-reports Spack package: • allinea-reports/package.py Versions: 6.0.4 Description: Allinea Performance Reports are the most effective way to characterize and understand the performance of HPC application runs. One single-page HTML report elegantly answers a range of vital questions for any HPC site

100 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.8 antlr

Homepage: • http://www.antlr.org Spack package: • antlr/package.py Versions: 2.7.7 Description: ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, pro- cessing, executing, or translating structured text or binary files. It’s widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.

1.10.9 ape

Homepage: • http://www.tddft.org/programs/APE/ Spack package: • ape/package.py Versions: 2.2.1 Build Dependencies libxc, gsl Link Dependencies libxc, gsl Description: A tool for generating atomic pseudopotentials within a Density- Functional Theory framework

1.10.10 apex

Homepage: • http://github.com/khuck/xpress-apex Spack package: • apex/package.py Versions: 0.1 Build Dependencies boost, cmake, activeharmony, binutils, ompt-openmp Link Dependencies boost, activeharmony, binutils, ompt-openmp Description:

1.10. Package List 101 Spack Documentation, Release 0.9

1.10.11 apr

Homepage: • https://apr.apache.org/ Spack package: • apr/package.py Versions: 1.5.2 Description: Apache portable runtime.

1.10.12 apr-util

Homepage: • https://apr.apache.org/ Spack package: • apr-util/package.py Versions: 1.5.4 Build Dependencies apr Link Dependencies apr Description: Apache Portable Runtime Utility

1.10.13 armadillo

Homepage: • http://arma.sourceforge.net/ Spack package: • armadillo/package.py Versions: 7.200.2, 7.200.1 Build Dependencies cmake, superlu, lapack, blas, hdf5, arpack-ng Link Dependencies lapack, blas, superlu, arpack-ng, hdf5 Description: 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.

102 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.14 arpack

Homepage: • http://www.caam.rice.edu/software/ARPACK/ Spack package: • arpack/package.py Versions: 96 Build Dependencies lapack, blas Link Dependencies lapack, blas Description: A collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.

1.10.15 arpack-ng

Homepage: • https://github.com/opencollab/arpack-ng Spack package: • arpack-ng/package.py Versions: 3.4.0, 3.3.0 Build Dependencies cmake, lapack, blas, automake, libtool, autoconf , mpi Link Dependencies lapack, blas, mpi Description: ARPACK-NG is a collection of Fortran77 subroutines designed to solve large scale eigenvalue prob- lems. Important Features: * Reverse Communication Interface. * Single and Double Precision Real Arithmetic Versions for Symmetric, Non-symmetric, Standard or Generalized Problems. * Single and Double Precision Complex Arithmetic Versions for Standard or Generalized Problems. * Routines for Banded Matrices - Stan- dard or Generalized Problems. * Routines for The Singular Value Decomposition. * Example driver routines that may be used as templates to implement numerous Shift-Invert strategies for all problem types, data types and precision. This project is a joint project between Debian, Octave and in order to provide a common and maintained version of arpack. Indeed, no single release has been published by Rice university for the last few years and since many software (Octave, Scilab, R, Matlab...) forked it and implemented their own modifi- cations, arpack-ng aims to tackle this by providing a common repository and maintained versions. arpack-ng is replacing arpack almost everywhere.

1.10.16 asciidoc

Homepage: • http://asciidoc.org Spack package: • asciidoc/package.py Versions: 8.6.9

1.10. Package List 103 Spack Documentation, Release 0.9

Build Dependencies libxml2, libxslt Link Dependencies libxml2, libxslt Description: A presentable text document format for writing articles, UNIX man pages and other small to medium sized documents.

1.10.17 astyle

Homepage: • http://astyle.sourceforge.net/ Spack package: • astyle/package.py Versions: 2.04 Description: A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code.

1.10.18 atk

Homepage: • https://developer.gnome.org/atk/ Spack package: • atk/package.py Versions: 2.20.0, 2.14.0 Build Dependencies glib, pkg-config Link Dependencies glib Description: ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications.

1.10.19 atlas

Homepage: • http://math-atlas.sourceforge.net/ Spack package: • atlas/package.py Versions: 3.11.34, 3.10.2 Description: Automatically Tuned Linear Algebra Software, generic shared ATLAS is an approach for the automatic generation and optimization of numerical software. Currently ATLAS supplies optimized versions for the com- plete set of linear algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines in the LAPACK library.

104 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.20 atop

Homepage: • http://www.atoptool.nl/index.php Spack package: • atop/package.py Versions: 2.2-3 Description: Atop is an ASCII full-screen performance monitor for Linux

1.10.21 autoconf

Homepage: • https://www.gnu.org/software/autoconf/ Spack package: • autoconf/package.py Versions: 2.69, 2.62 Build Dependencies m4 Description: Autoconf – system configuration part of autotools

1.10.22 automaded

Homepage: • https://github.com/llnl/AutomaDeD Spack package: • automaded/package.py Versions: 1.0 Build Dependencies boost, cmake, callpath, mpi Link Dependencies boost, callpath, mpi Description: AutomaDeD (Automata-based Debugging for Dissimilar parallel tasks) is a tool for automatic diagnosis of performance and correctness problems in MPI applications. It creates control-flow models of each MPI process and, when a failure occurs, these models are leveraged to find the origin of problems automatically. MPI calls are intercepted (using wrappers) to create the models. When an MPI application hangs, AutomaDeD creates a progress-dependence graph that helps finding the process (or group of processes) that caused the hang.

1.10. Package List 105 Spack Documentation, Release 0.9

1.10.23 automake

Homepage: • http://www.gnu.org/software/automake/ Spack package: • automake/package.py Versions: 1.15, 1.14.1, 1.11.6 Build Dependencies autoconf Link Dependencies autoconf Description: Automake – make file builder part of autotools

1.10.24 bash

Homepage: • https://www.gnu.org/software/bash/ Spack package: • bash/package.py Versions: 4.3 Build Dependencies readline Link Dependencies readline Description: The GNU Project’s Bourne Again SHell.

1.10.25 bbcp

Homepage: • http://www.slac.stanford.edu/~abh/bbcp/ Spack package: • bbcp/package.py Versions: git Description: Securely and quickly copy data from source to target

106 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.26 bcftools

Homepage: • http://samtools.github.io/bcftools/ Spack package: • bcftools/package.py Versions: 1.3.1 Build Dependencies zlib Link Dependencies zlib Description: BCFtools is a set of utilities that manipulate variant calls in the Variant Call Format (VCF) and its binary counterpart BCF. All commands work transparently with both VCFs and BCFs, both uncompressed and BGZF- compressed.

1.10.27 bdw-gc

Homepage: • http://www.hboehm.info/gc/ Spack package: • bdw-gc/package.py Versions: 7.4.4 Build Dependencies libatomic-ops Link Dependencies libatomic-ops Description: The Boehm-Demers-Weiser conservative garbage collector is a garbage collecting replacement for C malloc or C++ new.

1.10.28 bear

Homepage: • https://github.com/rizsotto/Bear Spack package: • bear/package.py Versions: 2.0.4 Build Dependencies python, cmake Link Dependencies python Description: Bear is a tool that generates a compilation database for clang tooling from non-cmake build systems.

1.10. Package List 107 Spack Documentation, Release 0.9

1.10.29 bertini

Homepage: • https://bertini.nd.edu/ Spack package: • bertini/package.py Versions: 1.5 Build Dependencies flex, gmp, bison, mpfr, mpi Link Dependencies gmp, mpfr, mpi Description: Bertini is a general-purpose solver, written in C, that was created for research about polynomial contin- uation. It solves for the numerical solution of systems of polynomial equations using homotopy continuation.

1.10.30 bib2xhtml

Homepage: • http://www.spinellis.gr/sw/textproc/bib2xhtml/ Spack package: • bib2xhtml/package.py Versions: 3.0-15-gf506 Description: bib2xhtml is a program that converts BibTeX files into HTML.

1.10.31 binutils

Homepage: • http://www.gnu.org/software/binutils/ Spack package: • binutils/package.py Versions: 2.26, 2.25, 2.24, 2.23.2, 2.20.1 Build Dependencies m4, bison, flex Description: GNU binutils, which contain the linker, assembler, objdump and others

108 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.32 bison

Homepage: • http://www.gnu.org/software/bison/ Spack package: • bison/package.py Versions: 3.0.4 Build Dependencies m4 Description: Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.

1.10.33 bliss

Homepage: • http://www.tcs.hut.fi/Software/bliss/ Spack package: • bliss/package.py Versions: 0.73 Build Dependencies gmp, libtool Link Dependencies gmp Description: bliss: A Tool for Computing Automorphism Groups and Canonical Labelings of Graphs

1.10.34 blitz

Homepage: • http://github.com/blitzpp/blitz Spack package: • blitz/package.py Versions: 1.0.0 Description: N-dimensional arrays for C++

1.10. Package List 109 Spack Documentation, Release 0.9

1.10.35 boost

Homepage: • http://www.boost.org Spack package: • boost/package.py Versions: 1.61.0, 1.60.0, 1.59.0, 1.58.0, 1.57.0, 1.56.0, 1.55.0, 1.54.0, 1.53.0, 1.52.0, 1.51.0, 1.50.0, 1.49.0, 1.48.0, 1.47.0, 1.46.1, 1.46.0, 1.45.0, 1.44.0, 1.43.0, 1.42.0, 1.41.0, 1.40.0, 1.39.0, 1.38.0, 1.37.0, 1.36.0, 1.35.0, 1.34.1, 1.34.0 Build Dependencies python, bzip2, zlib, icu, mpi Link Dependencies python, bzip2, zlib, icu, mpi Description: Boost provides free peer-reviewed portable C++ source libraries, emphasizing libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use.

1.10.36 bowtie2

Homepage: • bowtie-bio.sourceforge.net/bowtie2/index.shtml Spack package: • bowtie2/package.py Versions: 2.2.5 Description: Description

1.10.37 boxlib

Homepage: • https://ccse.lbl.gov/BoxLib/ Spack package: • boxlib/package.py Versions: master Build Dependencies cmake, mpi Link Dependencies mpi Description: BoxLib, a software framework for massively parallel block-structured adaptive mesh refinement (AMR) codes.

110 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.38 bpp-core

Homepage: • http://biopp.univ-montp2.fr/wiki/index.php/Installation Spack package: • bpp-core/package.py Versions: 2.2.0 Build Dependencies cmake Description: Bio++ core library.

1.10.39 bpp-phyl

Homepage: • http://biopp.univ-montp2.fr/wiki/index.php/Installation Spack package: • bpp-phyl/package.py Versions: 2.2.0 Build Dependencies cmake, bpp-core, bpp-seq Link Dependencies bpp-core, bpp-seq Description: Bio++ phylogeny library.

1.10.40 bpp-seq

Homepage: • http://biopp.univ-montp2.fr/wiki/index.php/Installation Spack package: • bpp-seq/package.py Versions: 2.2.0 Build Dependencies cmake, bpp-core Link Dependencies bpp-core Description: Bio++ seq library.

1.10. Package List 111 Spack Documentation, Release 0.9

1.10.41 bpp-suite

Homepage: • http://biopp.univ-montp2.fr/wiki/index.php/BppSuite Spack package: • bpp-suite/package.py Versions: 2.2.0 Build Dependencies bpp-phyl, cmake, texinfo, bpp-core, bpp-seq Link Dependencies bpp-phyl, bpp-core, bpp-seq Description: BppSuite is a suite of ready-to-use programs for phylogenetic and sequence analysis.

1.10.42 bwa

Homepage: • http://github.com/lh3/bwa Spack package: • bwa/package.py Versions: 0.7.15 Build Dependencies zlib Link Dependencies zlib Description: Burrow-Wheeler Aligner for pairwise alignment between DNA sequences.

1.10.43 bzip2

Homepage: • http://www.bzip.org Spack package: • bzip2/package.py Versions: 1.0.6 Description: bzip2 is a freely available, patent free high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.

112 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.44 c-blosc

Homepage: • http://www.blosc.org Spack package: • c-blosc/package.py Versions: 1.9.2, 1.9.1, 1.9.0, 1.8.1, 1.8.0 Build Dependencies snappy, zlib, cmake Link Dependencies snappy, zlib Description: Blosc, an extremely fast, multi-threaded, meta-compressor library

1.10.45 cairo

Homepage: • http://cairographics.org Spack package: • cairo/package.py Versions: 1.14.0 Build Dependencies glib, freetype, fontconfig, libpng, pkg-config, pixman Link Dependencies glib, libpng, freetype, pixman, fontconfig Description: Cairo is a 2D with support for multiple output devices.

1.10.46 caliper

Homepage: • https://github.com/LLNL/Caliper Spack package: • caliper/package.py Versions: master Build Dependencies papi, libunwind, cmake, mpi Link Dependencies libunwind, papi, mpi Description: Caliper is a generic context annotation system. It gives programmers the ability to provide arbitrary program context information to (performance) tools at runtime.

1.10. Package List 113 Spack Documentation, Release 0.9

1.10.47 callpath

Homepage: • https://github.com/llnl/callpath Spack package: • callpath/package.py Versions: 1.0.2, 1.0.1 Build Dependencies cmake, dyninst, mpi, libelf , adept-utils, libdwarf Link Dependencies dyninst, mpi, libdwarf , libelf , adept-utils Description: Library for representing callpaths consistently in distributed-memory performance tools.

1.10.48 cantera

Homepage: • http://www.cantera.org/docs/sphinx/html/index.html Spack package: • cantera/package.py Versions: 2.2.1 Build Dependencies py-scipy, scons, lapack, blas, sundials, py-numpy, py-cython, python, py-3to2, boost Link Dependencies lapack, python, blas, sundials, boost Run Dependencies py-scipy, py-cython, py-3to2, py-numpy Description: Cantera is a suite of object-oriented software tools for problems involving chemical kinetics, thermody- namics, and/or transport processes.

1.10.49 cask

Homepage: • http://cask.readthedocs.io/en/latest/ Spack package: • cask/package.py Versions: 0.7.4 Build Dependencies emacs Run Dependencies emacs Description: Cask is a project management tool for Emacs Lisp to automate the package development cycle; devel- opment, dependencies, testing, building, packaging and more.

114 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.50 cblas

Homepage: • http://www.netlib.org/blas/_cblas/ Spack package: • cblas/package.py Versions: 2015-06-06 Build Dependencies blas Link Dependencies blas Description: The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations.

1.10.51 cbtf

Homepage: • http://sourceforge.net/p/cbtf/wiki/Home Spack package: • cbtf/package.py Versions: 1.6 Build Dependencies cmake, mrnet, boost, xerces-c, libxml2 Link Dependencies xerces-c, mrnet, boost, libxml2 Description: CBTF project contains the base code for CBTF that supports creating components, component networks and the support to connect these components and component networks into sequential and distributed network tools.

1.10.52 cbtf-argonavis

Homepage: • http://sourceforge.net/p/cbtf/wiki/Home/ Spack package: • cbtf-argonavis/package.py Versions: 1.6 Build Dependencies cmake, mrnet, cbtf-krell, cuda, papi, boost, cbtf Link Dependencies papi, mrnet, cbtf-krell, cuda, boost, cbtf Description: CBTF Argo Navis project contains the CUDA collector and supporting libraries that was done as a result of a DOE SBIR grant.

1.10. Package List 115 Spack Documentation, Release 0.9

1.10.53 cbtf-krell

Homepage: • http://sourceforge.net/p/cbtf/wiki/Home/ Spack package: • cbtf-krell/package.py Versions: 1.6 Build Dependencies mvapich2, mpich2, cmake, boost, dyninst, xerces-c, mrnet, mpt, openmpi, mpich, mvapich, libunwind, papi, cbtf , binutils, libmonitor Link Dependencies mvapich2, mpich2, mrnet, boost, dyninst, xerces-c, mpt, openmpi, mpich, mvapich, libunwind, papi, cbtf , binutils, libmonitor Description: CBTF Krell project contains the Krell Institute contributions to the CBTF project. These contributions include many performance data collectors and support libraries as well as some example tools that drive the data collection at HPC levels of scale.

1.10.54 cbtf-lanl

Homepage: • http://sourceforge.net/p/cbtf/wiki/Home/ Spack package: • cbtf-lanl/package.py Versions: 1.6 Build Dependencies cmake, mrnet, xerces-c, cbtf , cbtf-krell Link Dependencies cbtf-krell, mrnet, xerces-c, cbtf Description: CBTF LANL project contains a memory tool and data center type system command monitoring tool.

1.10.55 cdd

Homepage: • https://www.inf.ethz.ch/personal/fukudak/cdd_home/cdd.html Spack package: • cdd/package.py Versions: 0.61a Build Dependencies libtool Description: The program cdd+ (cdd, respectively) is a C++ (ANSI C) implementation of the Double Description Method [MRTT53] for generating all vertices (i.e. extreme points) and extreme rays of a general convex poly- hedron given by a system of linear inequalities

116 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.56 cddlib

Homepage: • https://www.inf.ethz.ch/personal/fukudak/cdd_home/ Spack package: • cddlib/package.py Versions: 0.94h Build Dependencies gmp, libtool Link Dependencies gmp Description: The C-library cddlib is a C implementation of the Double Description Method of Motzkin et al. for generating all vertices (i.e. extreme points) and extreme rays of a general convex polyhedron in R^d given by a system of linear inequalities

1.10.57 cdo

Homepage: • https://code.zmaw.de/projects/cdo Spack package: • cdo/package.py Versions: 1.6.9 Build Dependencies netcdf Link Dependencies netcdf Description: CDO is a collection of command line Operators to manipulate and analyse Climate and NWP model Data.

1.10.58 cereal

Homepage: • http://uscilab.github.io/cereal/ Spack package: • cereal/package.py Versions: 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.0.0, 0.9.1 Build Dependencies cmake Description: cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON. cereal was designed to be fast, light-weight, and easy to extend - it has no external dependencies and can be easily bundled with other code or used standalone.

1.10. Package List 117 Spack Documentation, Release 0.9

1.10.59 cfitsio

Homepage: • http://heasarc.gsfc.nasa.gov/fitsio/ Spack package: • cfitsio/package.py Versions: 3.370 Description: CFITSIO is a library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format.

1.10.60 cgal

Homepage: • http://www.cgal.org/ Spack package: • cgal/package.py Versions: 4.7, 4.6.3 Build Dependencies gmp, zlib, boost, cmake, mpfr Link Dependencies gmp, zlib, boost, mpfr Description: CGAL is a software project that provides easy access to efficient and reliable geometric algorithms in the form of a C++ library. CGAL is used in various areas needing geometric computation, such as geo- graphic information systems, computer aided design, molecular biology, medical imaging, computer graphics, and robotics.

1.10.61 cgm

Homepage: • http://trac.mcs.anl.gov/projects/ITAPS/wiki/CGM Spack package: • cgm/package.py Versions: 13.1.1, 13.1.0, 13.1 Build Dependencies mpi Link Dependencies mpi Description: The Common Geometry Module, Argonne (CGMA) is a code library which provides geometry func- tionality used for mesh generation and other applications.

118 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.62 cgns

Homepage: • http://cgns.github.io/ Spack package: • cgns/package.py Versions: 3.3.0 Build Dependencies cmake, hdf5 Link Dependencies hdf5 Description: The CFD General Notation System (CGNS) provides a general, portable, and extensible standard for the storage and retrieval of computational fluid dynamics (CFD) analysis data.

1.10.63 cityhash

Homepage: • https://github.com/google/cityhash Spack package: • cityhash/package.py Versions: 2013-07-31, master Description: CityHash, a family of hash functions for strings.

1.10.64 cleverleaf

Homepage: • http://uk-mac.github.io/CleverLeaf/ Spack package: • cleverleaf/package.py Versions: develop Build Dependencies boost, cmake, SAMRAI, hdf5 Link Dependencies boost, SAMRAI, hdf5 Description: CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with Adaptive Mesh Refinement using the SAMRAI toolkit from Lawrence Livermore National Laboratory. The primary goal of CleverLeaf is to evaluate the application of AMR to the Lagrangian-Eulerian hydrodynamics scheme used by CloverLeaf.

1.10. Package List 119 Spack Documentation, Release 0.9

1.10.65 cloog

Homepage: • http://www.cloog.org Spack package: • cloog/package.py Versions: 0.18.1, 0.18.0, 0.17.0 Build Dependencies gmp, isl Link Dependencies gmp, isl Description: CLooG is a and library to generate code for scanning Z-polyhedra. That is, it finds a code (e.g. in C, FORTRAN...) that reaches each integral point of one or more parameterized polyhedra.

1.10.66 cmake

Homepage: • https://www.cmake.org Spack package: • cmake/package.py Versions: 3.6.1, 3.6.0, 3.5.2, 3.5.1, 3.5.0, 3.4.3, 3.4.0, 3.3.1, 3.0.2, 2.8.10.2 Build Dependencies py-sphinx, bzip2, zlib, qt, python, expat, openssl, libarchive, xz, ncurses, curl Link Dependencies bzip2, expat, qt, ncurses, zlib, openssl, libarchive, xz, curl Description: A cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software.

1.10.67 cmocka

Homepage: • https://cmocka.org/ Spack package: • cmocka/package.py Versions: 1.0.1 Build Dependencies cmake Description: Unit-testing framework in pure C

120 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.68 cnmem

Homepage: • https://github.com/NVIDIA/cnmem Spack package: • cnmem/package.py Versions: git Description: CNMem mempool for CUDA devices

1.10.69 coreutils

Homepage: • http://www.gnu.org/software/coreutils/ Spack package: • coreutils/package.py Versions: 8.23 Description: The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.

1.10.70 cp2k

Homepage: • https://www.cp2k.org Spack package: • cp2k/package.py Versions: 3.0 Build Dependencies python, blas, fftw, plumed, lapack, mpi, scalapack Link Dependencies lapack, blas, fftw, plumed, mpi, scalapack Description: CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems

1.10. Package List 121 Spack Documentation, Release 0.9

1.10.71 cppcheck

Homepage: • http://cppcheck.sourceforge.net/ Spack package: • cppcheck/package.py Versions: 1.68 Description: A tool for static C/C++ code analysis.

1.10.72 cram

Homepage: • https://github.com/llnl/cram Spack package: • cram/package.py Versions: 1.0.1 Build Dependencies python, cmake, mpi Link Dependencies python, mpi Description: Cram runs many small MPI jobs inside one large MPI job.

1.10.73 cryptopp

Homepage: • http://www.cryptopp.com Spack package: • cryptopp/package.py Versions: 5.6.3, 5.6.2, 5.6.1 Description: Crypto++ is an open-source C++ library of cryptographic schemes. The library supports a number of different cryptography algorithms, including authenticated encryption schemes (GCM, CCM), hash functions (SHA-1, SHA2), public-key encryption (RSA, DSA), and a few obsolete/historical encryption algorithms (MD5, Panama).

122 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.74 cscope

Homepage: • http://http://cscope.sourceforge.net/ Spack package: • cscope/package.py Versions: 15.8b Description: Cscope is a developer’s tool for browsing source code.

1.10.75 cube

Homepage: • http://www.scalasca.org/software/cube-4.x/download.html Spack package: • cube/package.py Versions: 4.3.4, 4.3.3, 4.2.3 Build Dependencies zlib Link Dependencies zlib Description: Cube the profile viewer for Score-P and Scalasca profiles. It displays a multi-dimensional performance space consisting of the dimensions: - performance metric - call path - system resource

1.10.76 cuda

Homepage: • http://www.nvidia.com/object/cuda_home_new.html Spack package: • cuda/package.py Versions: 7.5.18, 6.5.14 Description: CUDA is a parallel computing platform and programming model invented by NVIDIA. It enables dra- matic increases in computing performance by harnessing the power of the (GPU). Note: NVIDIA does not provide a download URL for CUDA so you will need to download it yourself. Go to https://developer.nvidia.com/cuda-downloads and select your Operating System, Architecture, Distribution, and Version. For the Installer Type, select runfile and click Download. Spack will search your current directory for this file. Alternatively, add this file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html Note: This package does not currently install the drivers necessary to run CUDA. These will need to be installed manually. See: http://docs.nvidia.com/cuda/cuda- getting-started-guide-for-linux for details.

1.10. Package List 123 Spack Documentation, Release 0.9

1.10.77 curl

Homepage: • http://curl.haxx.se Spack package: • curl/package.py Versions: 7.50.1, 7.49.1, 7.47.1, 7.46.0, 7.45.0, 7.44.0, 7.43.0, 7.42.1 Build Dependencies zlib, openssl Link Dependencies zlib, openssl Description: cURL is an command line tool and library for transferring data with URL syntax

1.10.78 czmq

Homepage: • http://czmq.zeromq.org Spack package: • czmq/package.py Versions: 3.0.2 Build Dependencies zeromq, autoconf , libtool, automake, pkg-config Link Dependencies zeromq Description: A C interface to the ZMQ library

1.10.79 daal

Homepage: • https://software.intel.com/en-us/daal Spack package: • daal/package.py Versions: 2016.3.210, 2016.2.181 Description: Intel Data Analytics Acceleration Library. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html

124 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.80 dakota

Homepage: • https://dakota.sandia.gov/ Spack package: • dakota/package.py Versions: 6.3 Build Dependencies cmake, lapack, blas, mpi, python, boost Link Dependencies lapack, python, blas, boost, mpi Description: The Dakota toolkit provides a flexible, extensible interface between analysis codes and iterative systems analysis methods. Dakota contains algorithms for: - optimization with gradient and non gradient-based methods; - uncertainty quantification with sampling, reliability, stochastic - expansion, and epistemic methods; - parameter estimation with nonlinear least squares methods; - sensitivity/variance analysis with design of experiments and - parameter study methods. These capabilities may be used on their own or as components within advanced strategies such as hybrid optimization, surrogate-based optimization, mixed integer nonlinear programming, or optimization under uncertainty.

1.10.81 damselfly

Homepage: • https://github.com/llnl/damselfly Spack package: • damselfly/package.py Versions: 1.0 Build Dependencies cmake Description: Damselfly is a model-based parallel network simulator.

1.10.82 datamash

Homepage: • https://www.gnu.org/software/datamash/ Spack package: • datamash/package.py Versions: 1.1.0, 1.0.7, 1.0.6, 1.0.5 Description: GNU datamash is a command-line program which performs basic numeric, textual and statistical oper- ations on input textual data files.

1.10. Package List 125 Spack Documentation, Release 0.9

1.10.83 dbus

Homepage: • http://dbus.freedesktop.org/ Spack package: • dbus/package.py Versions: 1.11.2, 1.9.0, 1.8.8, 1.8.6, 1.8.4, 1.8.2 Build Dependencies expat Link Dependencies expat Description: D-Bus is a message bus system, a simple way for applications to talk to one another. D-Bus supplies both a system daemon (for events such new hardware device printer queue ) and a per-user-login-session daemon (for general IPC needs among user applications). Also, the message bus is built on top of a general one-to-one message passing framework, which can be used by any two applications to communicate directly (without going through the message bus daemon).

1.10.84 dealii

Homepage: • https://www.dealii.org Spack package: • dealii/package.py Versions: develop, 8.4.1, 8.4.0, 8.3.0, 8.2.1, 8.1.0 Build Dependencies zlib, blas, graphviz, netcdf , arpack-ng, bzip2, cmake, lapack, oce, astyle, boost, trilinos, mu- parser, p4est, mpi, suite-sparse, tbb, doxygen, hdf5, slepc, numdiff , metis, petsc, netcdf-cxx, gsl Link Dependencies zlib, blas, graphviz, netcdf , arpack-ng, bzip2, lapack, oce, astyle, boost, trilinos, muparser, p4est, mpi, suite-sparse, tbb, doxygen, hdf5, slepc, numdiff , metis, petsc, netcdf-cxx, gsl Description: C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.

1.10.85 dia

Homepage: • https://wiki.gnome.org/Apps/Dia Spack package: • dia/package.py Versions: 0.97.3 Build Dependencies intltool, python, cairo, swig, gtkplus, libpng, libxslt Link Dependencies python, cairo, swig, gtkplus, libpng, libxslt

126 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Dia is a program for drawing structured diagrams.

1.10.86 docbook-xml

Homepage: • http://www.oasis-open.org/docbook Spack package: • docbook-xml/package.py Versions: 4.5 Description: Docbook DTD XML files.

1.10.87 doxygen

Homepage: • http://www.stack.nl/~dimitri/doxygen/ Spack package: • doxygen/package.py Versions: 1.8.11, 1.8.10 Build Dependencies flex, cmake, bison Run Dependencies graphviz Description: Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D..

1.10.88 dri2proto

Homepage: • http://http://cgit.freedesktop.org/xorg/proto/dri2proto/ Spack package: • dri2proto/package.py Versions: 2.8 Description: DRI2 Protocol Headers.

1.10. Package List 127 Spack Documentation, Release 0.9

1.10.89 dtcmp

Homepage: • https://github.com/hpc/dtcmp Spack package: • dtcmp/package.py Versions: 1.0.3 Build Dependencies lwgrp, mpi Link Dependencies lwgrp, mpi Description: The Datatype Comparison Library provides comparison operations and parallel sort algorithms for MPI applications.

1.10.90 dyninst

Homepage: • https://paradyn.org Spack package: • dyninst/package.py Versions: 9.2.0, 9.1.0, 8.2.1, 8.1.2, 8.1.1 Build Dependencies boost, cmake, libelf , libdwarf Link Dependencies boost, libelf , libdwarf Description: API for dynamic binary instrumentation. Modify programs while they are executing without recompil- ing, re-linking, or re-executing.

1.10.91 eigen

Homepage: • http://eigen.tuxfamily.org/ Spack package: • eigen/package.py Versions: 3.2.7 Build Dependencies metis, cmake, fftw, suite-sparse, gmp, scotch, mpfr Link Dependencies metis, fftw, suite-sparse, gmp, scotch, mpfr Description: Eigen is a C++ template library for linear algebra matrices, vectors, numerical solvers, and related algorithms.

128 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.92 elfutils

Homepage: • https://fedorahosted.org/elfutils/ Spack package: • elfutils/package.py Versions: 0.163 Description: elfutils is a collection of various binary tools such as eu-objdump, eu- readelf, and other utilities that allow you to inspect and manipulate ELF files. Refer to Table 5.Tools Included in elfutils for Red Hat Developer for a complete list of binary tools that are distributed with the Red Hat Developer Toolset version of elfutils.

1.10.93 elk

Homepage: • http://elk.sourceforge.net/ Spack package: • elk/package.py Versions: 3.3.17 Build Dependencies lapack, blas, fftw, libxc, mpi Link Dependencies lapack, blas, fftw, libxc, mpi Description: An all-electron full-potential linearised augmented-plane wave (FP-LAPW) code with many advanced features.

1.10.94 elpa

Homepage: • http://elpa.mpcdf.mpg.de/ Spack package: • elpa/package.py Versions: 2015.11.001 Build Dependencies lapack, blas, scalapack, mpi Link Dependencies lapack, blas, scalapack, mpi Description: Eigenvalue solvers for Petaflop-Applications (ELPA)

1.10. Package List 129 Spack Documentation, Release 0.9

1.10.95 emacs

Homepage: • https://www.gnu.org/software/emacs Spack package: • emacs/package.py Versions: 24.5 Build Dependencies ncurses, libtiff , gtkplus, giflib, libxpm, libpng Link Dependencies ncurses, libtiff , gtkplus, giflib, libxpm, libpng Description: The Emacs programmable text editor.

1.10.96 environment-modules

Homepage: • https://sourceforge.net/p/modules/wiki/Home/ Spack package: • environment-modules/package.py Versions: 3.2.10 Build Dependencies tcl Link Dependencies tcl Run Dependencies tcl Description: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

1.10.97 espresso

Homepage: • http://quantum-espresso.org Spack package: • espresso/package.py Versions: 5.4.0, 5.3.0 Build Dependencies lapack, blas, fftw, scalapack, mpi Link Dependencies lapack, blas, fftw, scalapack, mpi Description: QE is an integrated suite of Open-Source computer codes for electronic- structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.

130 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.98 exodusii

Homepage: • https://github.com/gsjaardema/seacas Spack package: • exodusii/package.py Versions: 2016-02-08 Build Dependencies cmake, netcdf , hdf5 Link Dependencies netcdf , hdf5 Description: Exodus II is a C++/Fortran library developed to store and retrieve data for finite element analyses. It’s used for preprocessing (problem definition), postprocessing (results visualization), and data transfer between codes. An Exodus II data file is a random access, machine independent, binary file that is written and read via C, C++, or Fortran API routines.

1.10.99 exonerate

Homepage: • http://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate Spack package: • exonerate/package.py Versions: 2.4.0 Build Dependencies glib, pkg-config Link Dependencies glib Description: Pairwise sequence alignment of DNA and proteins

1.10.100 expat

Homepage: • http://expat.sourceforge.net/ Spack package: • expat/package.py Versions: 2.2.0, 2.1.0 Description: is an XML parser library written in C

1.10. Package List 131 Spack Documentation, Release 0.9

1.10.101 extrae

Homepage: • http://www.bsc.es/computer-sciences/extrae Spack package: • extrae/package.py Versions: 3.0.1 Build Dependencies papi, dyninst, mpi, libunwind, boost, libdwarf Link Dependencies papi, dyninst, mpi, libunwind, boost, libdwarf Description: Extrae is the package devoted to generate tracefiles which can be analyzed later by Paraver. Extrae is a tool that uses different interposition mechanisms to inject probes into the target application so as to gather information regarding the application performance. The Extrae instrumentation package can instrument the MPI programin model, and the following parallel programming models either alone or in conjunction with MPI : OpenMP, CUDA, OpenCL, pthread, OmpSs

1.10.102 exuberant-ctags

Homepage: • ctags.sourceforge.net Spack package: • exuberant-ctags/package.py Versions: 5.8 Description: The canonical ctags generator

1.10.103 fastx_toolkit

Homepage: • http://hannonlab.cshl.edu/fastx_toolkit/ Spack package: • fastx_toolkit/package.py Versions: 0.0.14 Build Dependencies libgtextutils Link Dependencies libgtextutils Description: The FASTX-Toolkit is a collection of command line tools for Short-Reads FASTA/FASTQ files prepro- cessing.

132 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.104 fenics

Homepage: • http://fenicsproject.org/ Spack package: • fenics/package.py Versions: 1.6.0, 1.5.0 Build Dependencies py-sphinx, suite-sparse, cmake, eigen, hdf5, python, slepc, swig, parmetis, py-numpy, py-six, py-ply, trilinos, boost, py-setuptools, petsc, mpi, scotch, vtk, qt Link Dependencies py-sphinx, suite-sparse, cmake, eigen, hdf5, python, slepc, swig, parmetis, py-numpy, py-six, py-ply, trilinos, boost, py-setuptools, petsc, mpi, scotch, vtk, qt Description: FEniCS is organized as a collection of interoperable components that together form the FEniCS Project. These components include the problem- solving environment DOLFIN, the form compiler FFC, the finite ele- ment tabulator FIAT, the just-in-time compiler Instant, the code generation interface UFC, the form language UFL and a range of additional components.

1.10.105 ferret

Homepage: • http://ferret.noaa.gov/Ferret/ Spack package: • ferret/package.py Versions: 6.96 Build Dependencies readline, zlib, netcdf , netcdf-fortran, hdf5 Link Dependencies readline, zlib, netcdf , netcdf-fortran, hdf5 Description: 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.

1.10.106 fftw

Homepage: • http://www.fftw.org Spack package: • fftw/package.py Versions: 3.3.5, 3.3.4 Build Dependencies mpi Link Dependencies mpi

1.10. Package List 133 Spack Documentation, Release 0.9

Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). We believe that FFTW, which is free software, should become the FFT library of choice for most applications.

1.10.107 fish

Homepage: • http://fishshell.com/ Spack package: • fish/package.py Versions: 2.2.0 Description: fish is a smart and user-friendly command line shell for OS X, Linux, and the rest of the family.

1.10.108 flex

Homepage: • http://flex.sourceforge.net/ Spack package: • flex/package.py Versions: 2.6.0, 2.5.39 Build Dependencies m4, bison Description: Flex is a tool for generating scanners.

1.10.109 fltk

Homepage: • http://www.fltk.org/ Spack package: • fltk/package.py Versions: 1.3.3 Description: FLTK (pronounced “fulltick”) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), , and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.

134 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.110 flux

Homepage: • https://github.com/flux-framework/flux-core Spack package: • flux/package.py Versions: master Build Dependencies hwloc, docbook-xml, python, czmq, munge, asciidoc, lua, py-cffi, libxslt, zeromq, libjson-c Link Dependencies hwloc, python, czmq, munge, lua, py-cffi, libxslt, zeromq, libjson-c Description: A next-generation resource manager (pre-alpha)

1.10.111 foam-extend

Homepage: • http://www.extend-project.de/ Spack package: • foam-extend/package.py Versions: 3.2, 3.1, 3.0 Build Dependencies flex, zlib, cmake, python, metis, mpi, parmgridgen, scotch, parmetis, paraview Link Dependencies flex, zlib, python, metis, mpi, parmgridgen, scotch, parmetis, paraview Description: The foam-extend project is a fork of the OpenFOAM open source library for Computational Fluid Dynamics (CFD).

1.10.112 fontconfig

Homepage: • http://www.freedesktop.org/wiki/Software/fontconfig/ Spack package: • fontconfig/package.py Versions: 2.11.1 Build Dependencies libxml2, freetype Link Dependencies libxml2, freetype Description: Fontconfig customizing font access

1.10. Package List 135 Spack Documentation, Release 0.9

1.10.113 freetype

Homepage: • http://http://www.freetype.org Spack package: • freetype/package.py Versions: 2.5.3 Build Dependencies libpng Link Dependencies libpng Description: Font package

1.10.114 gasnet

Homepage: • http://gasnet.lbl.gov Spack package: • gasnet/package.py Versions: 1.24.0 Description: GASNet is a language-independent, low-level networking layer that provides network-independent, high-performance communication primitives tailored for implementing parallel global address space SPMD languages and libraries such as UPC, Co-Array Fortran, SHMEM, Cray Chapel, and Titanium.

1.10.115 gcc

Homepage: • https://gcc.gnu.org Spack package: • gcc/package.py Versions: 6.2.0, 6.1.0, 5.4.0, 5.3.0, 5.2.0, 5.1.0, 4.9.4, 4.9.3, 4.9.2, 4.9.1, 4.8.5, 4.8.4, 4.7.4, 4.6.4, 4.5.4 Build Dependencies mpfr, gmp, mpc, binutils, isl Link Dependencies mpfr, gmp, mpc, binutils, isl Description: The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, and Java.

136 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.116 gdal

Homepage: • http://www.gdal.org/ Spack package: • gdal/package.py Versions: 2.0.2 Build Dependencies libtiff , hdf5, python, swig, zlib, py-numpy, hdf , netcdf , proj, libpng, openjpeg, kealib, geos Link Dependencies libtiff , hdf5, python, swig, zlib, hdf , netcdf , proj, libpng, openjpeg, kealib, geos Run Dependencies py-numpy Description: GDAL is a translator library for raster and vector geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single raster abstract data model and vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing.

1.10.117 gdb

Homepage: • https://www.gnu.org/software/gdb Spack package: • gdb/package.py Versions: 7.11, 7.10.1, 7.10, 7.9.1, 7.9, 7.8.2 Build Dependencies texinfo Description: GDB, the GNU Project debugger, allows you to see what is going on ‘inside’ another program while it executes – or what another program was doing at the moment it crashed.

1.10.118 gdk-pixbuf

Homepage: • https://developer.gnome.org/gdk-pixbuf/ Spack package: • gdk-pixbuf/package.py Versions: 2.31.2 Build Dependencies glib, libpng, libtiff , jpeg Link Dependencies glib, libpng, libtiff , jpeg Description: The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. It is used by GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it was distributed as part of GTK+ 2 but it was split off into a separate package in preparation for the change to GTK+ 3.

1.10. Package List 137 Spack Documentation, Release 0.9

1.10.119 geos

Homepage: • http://trac.osgeo.org/geos/ Spack package: • geos/package.py Versions: 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3 Description: GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). As such, it aims to contain the complete functionality of JTS in C++. This includes all the OpenGIS Simple Features for SQL spatial predicate functions and spatial operators, as well as specific JTS enhanced topology functions.

1.10.120 gettext

Homepage: • https://www.gnu.org/software/gettext/ Spack package: • gettext/package.py Versions: 0.19.8.1, 0.19.7 Build Dependencies bzip2, tar, libunistring, ncurses, libxml2, xz Link Dependencies bzip2, tar, libunistring, ncurses, libxml2, xz Description: GNU internationalization (i18n) and localization (l10n) library.

1.10.121 gflags

Homepage: • https://gflags.github.io/gflags Spack package: • gflags/package.py Versions: 2.1.2 Build Dependencies cmake Description: The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used. Online documentation available at: https://gflags.github.io/gflags/

138 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.122 ghostscript

Homepage: • http://ghostscript.com/ Spack package: • ghostscript/package.py Versions: 9.18 Build Dependencies libtiff Link Dependencies libtiff Description: An interpreter for the PostScript language and for PDF.

1.10.123 giflib

Homepage: • http://giflib.sourceforge.net/ Spack package: • giflib/package.py Versions: 5.1.4 Description: The GIFLIB project maintains the giflib service library, which has been pulling images out of GIFs since 1989.

1.10.124 git

Homepage: • http://git-scm.com Spack package: • git/package.py Versions: 2.9.3, 2.9.2, 2.9.1, 2.9.0, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.3, 2.7.1 Build Dependencies pcre, expat, zlib, openssl, gettext, perl, curl, autoconf Link Dependencies pcre, expat, zlib, openssl, gettext, perl, curl Description: Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

1.10. Package List 139 Spack Documentation, Release 0.9

1.10.125 gl2ps

Homepage: • http://www.geuz.org/gl2ps/ Spack package: • gl2ps/package.py Versions: 1.3.9 Build Dependencies libpng Link Dependencies libpng Description: GL2PS is a C library providing high quality vector output for any OpenGL application.

1.10.126 glib

Homepage: • https://developer.gnome.org/glib/ Spack package: • glib/package.py Versions: 2.49.4, 2.48.1, 2.42.1 Build Dependencies libffi, pcre, zlib, gettext, pkg-config Link Dependencies libffi, pcre, zlib, gettext Description: The GLib package contains a low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading and an object system.

1.10.127 glm

Homepage: • https://github.com/g-truc/glm Spack package: • glm/package.py Versions: 0.9.7.1 Build Dependencies cmake Description: OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification.

140 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.128 global

Homepage: • http://www.gnu.org/software/global Spack package: • global/package.py Versions: 6.5 Build Dependencies ncurses, exuberant-ctags Link Dependencies ncurses Run Dependencies exuberant-ctags Description: The Gnu Global tagging system

1.10.129 glog

Homepage: • https://github.com/google/glog Spack package: • glog/package.py Versions: 0.3.3 Description: C++ implementation of the Google logging module.

1.10.130 glpk

Homepage: • https://www.gnu.org/software/glpk Spack package: • glpk/package.py Versions: 4.57 Build Dependencies gmp Link Dependencies gmp Description: The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear program- ming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library

1.10. Package List 141 Spack Documentation, Release 0.9

1.10.131 gmp

Homepage: • https://gmplib.org Spack package: • gmp/package.py Versions: 6.1.1, 6.1.0, 6.0.0a, 6.0.0 Build Dependencies m4 Description: GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.

1.10.132 gmsh

Homepage: • http://gmsh.info Spack package: • gmsh/package.py Versions: 2.12.0, 2.11.0 Build Dependencies cmake, fltk, hdf5, lapack, blas, zlib, oce, mpi, petsc, gmp, slepc Link Dependencies fltk, hdf5, lapack, blas, zlib, oce, mpi, petsc, gmp, slepc Description: Gmsh is a free 3D finite element grid generator with a built-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visu- alization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of any input to these modules is done either interactively using the or in ASCII text files using Gmsh’s own scripting language.

1.10.133 gnu-prolog

Homepage: • http://www.gprolog.org/ Spack package: • gnu-prolog/package.py Versions: 1.4.4 Description: A free Prolog compiler with constraint solving over finite domains.

142 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.134 gnuplot

Homepage: • http://www.gnuplot.info Spack package: • gnuplot/package.py Versions: 5.0.1 Build Dependencies cairo, libcerf , libgd, pango, readline, wx Link Dependencies cairo, libcerf , libgd, pango, readline, wx Description: Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. The source code is copyrighted but freely distributed (i.e., you don’t have to pay for it). It was originally created to allow scientists and students to visualize mathematical functions and data inter- actively, but has grown to support many non-interactive uses such as web scripting. It is also used as a plotting engine by third-party applications like Octave. Gnuplot has been supported and under active development since 1986

1.10.135 gnutls

Homepage: • http://www.gnutls.org Spack package: • gnutls/package.py Versions: 3.3.9 Build Dependencies nettle Link Dependencies nettle Description: GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them. It provides a simple C language application programming interface (API) to access the secure communications protocols as well as APIs to parse and write X.509, PKCS #12, OpenPGP and other required structures. It is aimed to be portable and efficient with focus on security and interoperability.

1.10.136 go

Homepage: • https://golang.org Spack package: • go/package.py Versions: 1.6.2, 1.5.4 Build Dependencies go-bootstrap, git Link Dependencies git

1.10. Package List 143 Spack Documentation, Release 0.9

Run Dependencies git Description: The golang compiler and build environment

1.10.137 go-bootstrap

Homepage: • https://golang.org Spack package: • go-bootstrap/package.py Versions: 1.4.2 Build Dependencies git Link Dependencies git Description: Old C-bootstrapped go to bootstrap real go

1.10.138 gobject-introspection

Homepage: • https://wiki.gnome.org/Projects/GObjectIntrospection Spack package: • gobject-introspection/package.py Versions: 1.48.0 Build Dependencies glib, python, cairo Link Dependencies glib, python, cairo Description: The GObject Introspection is used to describe the program APIs and collect them in a uniform, machine readable format.Cairo is a 2D graphics library with support for multiple output

1.10.139 googletest

Homepage: • https://github.com/google/googletest Spack package: • googletest/package.py Versions: 1.7.0 Build Dependencies cmake Description: Google test framework for C++. Also called gtest.

144 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.140 gperf

Homepage: • https://www.gnu.org/software/gperf/ Spack package: • gperf/package.py Versions: 3.0.4 Description: GNU gperf is a perfect hash function generator. For a given list of strings, it produces a hash function and hash table, in form of C or C++ code, for looking up a value depending on the input string. The hash function is perfect, which means that the hash table has no collisions, and the hash table lookup needs a single string comparison only.

1.10.141 gperftools

Homepage: • https://code.google.com/p/gperftools Spack package: • gperftools/package.py Versions: 2.4, 2.3 Build Dependencies libunwind Link Dependencies libunwind Description: Google’s fast malloc/free implementation, especially for multi-threaded applications. Contains tcmal- loc, heap-checker, heap-profiler, and cpu- profiler.

1.10.142 graphlib

Homepage: • https://github.com/LLNL/graphlib Spack package: • graphlib/package.py Versions: 3.0.0, 2.0.0 Build Dependencies cmake Description: Library to create, manipulate, and export graphs Graphlib.

1.10. Package List 145 Spack Documentation, Release 0.9

1.10.143 graphviz

Homepage: • http://www.graphviz.org Spack package: • graphviz/package.py Versions: 2.38.0 Build Dependencies python, swig, ghostscript, pkg-config Link Dependencies python, swig, ghostscript Description: Graph Visualization Software

1.10.144 gromacs

Homepage: • http://www.gromacs.org Spack package: • gromacs/package.py Versions: 5.1.2 Build Dependencies mpi, fftw, cmake, plumed Link Dependencies mpi, fftw, plumed Description: GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primar- ily designed for simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry department of University of Groningen, and is now maintained by contributors in universities and re- search centers across the world. GROMACS is one of the fastest and most popular software packages available and can run on CPUs as well as GPUs. It is free, open source released under the GNU General Public License. Starting from version 4.6, GROMACS is released under the GNU Lesser General Public License.

1.10.145 gsl

Homepage: • http://www.gnu.org/software/gsl Spack package: • gsl/package.py Versions: 2.1, 2.0, 1.16 Description: The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.

146 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.146 gtkplus

Homepage: • http://www.gtk.org Spack package: • gtkplus/package.py Versions: 2.24.25 Build Dependencies gdk-pixbuf , pango, atk Link Dependencies gdk-pixbuf , pango, atk Description: The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications.

1.10.147 gts

Homepage: • http://gts.sourceforge.net/index.html Spack package: • gts/package.py Versions: 121130 Build Dependencies glib Link Dependencies glib Description: GTS stands for the GNU Triangulated Surface Library. It is an Open Source Free Software Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles. The source code is available free of charge under the Free Software LGPL license. The code is written entirely in C with an object-oriented approach based mostly on the design of GTK+. Careful attention is paid to performance related issues as the initial goal of GTS is to provide a simple and efficient library to scientists dealing with 3D computational surface meshes.

1.10.148 guile

Homepage: • https://www.gnu.org/software/guile/ Spack package: • guile/package.py Versions: 2.0.11 Build Dependencies libunistring, gettext, bdw-gc, libtool, libffi, readline, gmp, pkg-config Link Dependencies libunistring, gettext, bdw-gc, libtool, libffi, readline, gmp Description: Guile is the GNU Ubiquitous Intelligent Language for Extensions, the official extension language for the GNU operating system.

1.10. Package List 147 Spack Documentation, Release 0.9

1.10.149 harfbuzz

Homepage: • http://www.freedesktop.org/wiki/Software/HarfBuzz/ Spack package: • harfbuzz/package.py Versions: 0.9.37 Build Dependencies glib, cairo, freetype, zlib, icu Link Dependencies glib, cairo, freetype, zlib, icu Description: The Harfbuzz package contains an OpenType text shaping engine.

1.10.150 harminv

Homepage: • http://ab-initio.mit.edu/wiki/index.php/Harminv Spack package: • harminv/package.py Versions: 1.4 Build Dependencies lapack, blas Link Dependencies lapack, blas Description: Harminv is a free program (and accompanying library) to solve the problem of harmonic inversion - given a discrete-time, finite-length signal that consists of a sum of finitely-many sinusoids (possibly exponen- tially decaying) in a given bandwidth, it determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.

1.10.151 hdf

Homepage: • https://www.hdfgroup.org/products/hdf4/ Spack package: • hdf/package.py Versions: 4.2.11 Build Dependencies zlib, szip, jpeg Link Dependencies zlib, szip, jpeg Description: HDF4 (also known as HDF) is a library and multi-object file format for storing and managing data between machines.

148 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.152 hdf5

Homepage: • http://www.hdfgroup.org/HDF5/ Spack package: • hdf5/package.py Versions: 1.10.0-patch1, 1.10.0, 1.8.16, 1.8.15, 1.8.13 Build Dependencies zlib, szip, mpi Link Dependencies zlib, szip, mpi Description: HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data.

1.10.153 hdf5-blosc

Homepage: • https://github.com/Blosc/hdf5-blosc Spack package: • hdf5-blosc/package.py Versions: master Build Dependencies c-blosc, libtool, hdf5 Link Dependencies c-blosc, hdf5 Description: Blosc filter for HDF5

1.10.154 hmmer

Homepage: • http://www.hmmer.org Spack package: • hmmer/package.py Versions: 3.1b2, 3.0, 2.4i, 2.3.2, 2.3.1 Build Dependencies gsl, mpi Link Dependencies gsl, mpi Description: HMMER is used for searching sequence databases for sequence homologs, and for making sequence alignments. It implements methods using probabilistic models called profile hidden Markov models (profile HMMs).

1.10. Package List 149 Spack Documentation, Release 0.9

1.10.155 hoomd-blue

Homepage: • https://codeblue.umich.edu/hoomd-blue/index.html Spack package: • hoomd-blue/package.py Versions: 1.3.3 Build Dependencies doxygen, cmake, python, py-numpy, cuda, mpi, boost Link Dependencies python, boost, cuda, mpi Run Dependencies py-numpy Description: HOOMD-blue is a general-purpose particle simulation toolkit. It scales from a single CPU core to thousands of GPUs. You define particle initial conditions and interactions in a high-level python script. Then tell HOOMD-blue how you want to execute the job and it takes care of the rest. Python job scripts give you unlimited flexibility to create custom initialization routines, control simulation parameters, and perform in situ analysis.

1.10.156 hpl

Homepage: • http://www.netlib.org/benchmark/hpl/ Spack package: • hpl/package.py Versions: 2.2 Build Dependencies blas, mpi Link Dependencies blas, mpi Description: HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the High Performance Computing Linpack Benchmark.

1.10.157 hpx5

Homepage: • http://hpx.crest.iu.edu Spack package: • hpx5/package.py Versions: 2.0.0, 1.3.0, 1.2.0, 1.1.0, 1.0.0 Build Dependencies mpi Link Dependencies mpi

150 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: The HPX-5 Runtime System. HPX-5 (High Performance ParalleX) is an open source, portable, performance-oriented runtime developed at CREST (Indiana University). HPX-5 provides a distributed pro- gramming model allowing programs to run unmodified on systems from a single SMP to large clusters and supercomputers with thousands of nodes. HPX-5 supports a wide variety of Intel and ARM platforms. It is being used by a broad range of scientific applications enabling scientists to write code that performs and scales better than contemporary runtimes.

1.10.158 htslib

Homepage: • https://github.com/samtools/htslib Spack package: • htslib/package.py Versions: 1.3.1 Build Dependencies zlib Link Dependencies zlib Description: C library for high-throughput sequencing data formats.

1.10.159 hub

Homepage: • https://github.com/github/hub Spack package: • hub/package.py Versions: 2.2.3, 2.2.2, 2.2.1, 2.2.0, 1.12.4, head Build Dependencies go Link Dependencies go Description: The github git wrapper

1.10.160 hwloc

Homepage: • http://www.open-mpi.org/projects/hwloc/ Spack package: • hwloc/package.py Versions: 1.11.3, 1.11.2, 1.11.1, 1.9 Build Dependencies libpciaccess

1.10. Package List 151 Spack Documentation, Release 0.9

Link Dependencies libpciaccess Description: The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, In- finiBand HCAs or GPUs. It primarily aims at helping applications with gathering information about modern computing hardware so as to exploit it accordingly and efficiently.

1.10.161 hydra

Homepage: • http://www.mpich.org Spack package: • hydra/package.py Versions: 3.2 Description: Hydra is a process management system for starting parallel jobs. Hydra is designed to natively work with existing launcher daemons (such as ssh, rsh, fork), as well as natively integrate with resource management systems (such as slurm, pbs, sge).

1.10.162 hypre

Homepage: • http://computation.llnl.gov/project/linear_solvers/software.php Spack package: • hypre/package.py Versions: 2.10.1, 2.10.0b Build Dependencies lapack, blas, mpi Link Dependencies lapack, blas, mpi Description: Hypre is a library of high performance preconditioners that features parallel multigrid methods for both structured and unstructured grid problems.

1.10.163 ibmisc

Homepage: • https://github.com/citibeth/ibmisc Spack package: • ibmisc/package.py Versions: 0.1.0

152 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies doxygen, cmake, eigen, python, netcdf-cxx4, blitz, everytrace, py-numpy, py-cython, udunits2, googletest, proj, boost Link Dependencies eigen, python, netcdf-cxx4, blitz, everytrace, udunits2, proj, boost Run Dependencies py-cython, py-numpy Description: Misc. reusable utilities used by IceBin.

1.10.164 icu

Homepage: • http://www.example.com Spack package: • icu/package.py Versions: 54.1 Description: The International Components for Unicode (ICU) package is a mature, widely used set of C/C++ li- braries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms.

1.10.165 icu4c

Homepage: • http://site.icu-project.org/ Spack package: • icu4c/package.py Versions: 54_1 Description: ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications.

1.10.166 ilmbase

Homepage: • http://www.openexr.com/ Spack package: • ilmbase/package.py Versions: 2.2.0, 2.1.0, 2.0.1, 1.0.2, 0.9.0 Description: OpenEXR ILM Base libraries (high dynamic-range image file format)

1.10. Package List 153 Spack Documentation, Release 0.9

1.10.167 ImageMagick

Homepage: • http://www.imagemagick.org Spack package: • ImageMagick/package.py Versions: 7.0.2-7, 7.0.2-6 Build Dependencies freetype, ghostscript, libtiff , jpeg, fontconfig, libtool, libpng Link Dependencies freetype, ghostscript, libtiff , jpeg, fontconfig, libpng Description: ImageMagick is a software suite to create, edit, compose, or convert bitmap images.

1.10.168 intel

Homepage: • https://software.intel.com/en-us/intel-parallel-studio-xe Spack package: • intel/package.py Versions: 16.0.3, 16.0.2 Description: Intel Compilers. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html

1.10.169 intel-parallel-studio

Homepage: • https://software.intel.com/en-us/intel-parallel-studio-xe Spack package: • intel-parallel-studio/package.py Versions: professional.2016.3, professional.2016.2, .2016.3, composer.2016.2, cluster.2016.3, clus- ter.2016.2 Description: Intel Parallel Studio. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html

154 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.170 intltool

Homepage: • https://freedesktop.org/wiki/Software/intltool/ Spack package: • intltool/package.py Versions: 0.51.0 Description: intltool is a set of tools to centralize translation of many different file formats using GNU gettext- compatible PO files.

1.10.171 ior

Homepage: • https://github.com/LLNL/ior Spack package: • ior/package.py Versions: 3.0.1 Build Dependencies mpi, netcdf , hdf5 Link Dependencies mpi, netcdf , hdf5 Description: The IOR software is used for benchmarking parallel file systems using POSIX, MPI-IO, or HDF5 interfaces.

1.10.172 ipopt

Homepage: • https://projects.coin-or.org/Ipopt Spack package: • ipopt/package.py Versions: 3.12.4, 3.12.3, 3.12.2, 3.12.1, 3.12.0 Build Dependencies lapack, blas, mumps, pkg-config Link Dependencies lapack, blas, mumps Description: Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software package for large-scale nonlin- ear optimization.

1.10. Package List 155 Spack Documentation, Release 0.9

1.10.173 ipp

Homepage: • https://software.intel.com/en-us/intel-ipp Spack package: • ipp/package.py Versions: 9.0.3.210 Description: Intel Integrated Performance Primitives. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html

1.10.174 isl

Homepage: • http://isl.gforge.inria.fr Spack package: • isl/package.py Versions: 0.14 Build Dependencies gmp Link Dependencies gmp Description: isl is a thread-safe C library for manipulating sets and relations of integer points bounded by affine constraints.

1.10.175 jasper

Homepage: • https://www.ece.uvic.ca/~frodo/jasper/ Spack package: • jasper/package.py Versions: 1.900.1 Build Dependencies libjpeg-turbo Link Dependencies libjpeg-turbo Description: Library for manipulating JPEG-2000 images

156 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.176 jdk

Homepage: • http://www.oracle.com/technetwork/java/javase/downloads/index.html Spack package: • jdk/package.py Versions: 8u92-linux-x64, 8u66-linux-x64 Description: The Java Development Kit (JDK) released by Oracle Corporation in the form of a binary product aimed at Java developers.

1.10.177 jemalloc

Homepage: • http://www.canonware.com/jemalloc/ Spack package: • jemalloc/package.py Versions: 4.1.0, 4.0.4 Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support.

1.10.178 jpeg

Homepage: • http://www.ijg.org Spack package: • jpeg/package.py Versions: 9b, 9a Description: libjpeg is a widely used free library with functions for handling the JPEG image data format. It imple- ments a JPEG codec (encoding and decoding) alongside various utilities for handling JPEG data.

1.10.179 jsoncpp

Homepage: • https://github.com/open-source-parsers/jsoncpp Spack package: • jsoncpp/package.py Versions: 1.7.3

1.10. Package List 157 Spack Documentation, Release 0.9

Build Dependencies cmake Description: JsonCpp is a C++ library that allows manipulating JSON values, including serialization and deserializa- tion to and from strings. It can also preserve existing comment in unserialization/serialization steps, making it a convenient format to store user input files.

1.10.180 judy

Homepage: • http://judy.sourceforge.net/ Spack package: • judy/package.py Versions: 1.0.5 Description: Judy: General-purpose dynamic array, associative array and hash-trie.

1.10.181 julia

Homepage: • http://julialang.org Spack package: • julia/package.py Versions: 0.4.6, 0.4.5, 0.4.3, release-0.5, release-0.4, master Build Dependencies git, cmake, python, openssl, m4, curl, binutils Link Dependencies git, cmake, python, openssl, curl, binutils Run Dependencies py-matplotlib, mpi, hdf5 Description: The Julia Language: A fresh approach to technical computing

1.10.182 kdiff3

Homepage: • http://kdiff3.sourceforge.net/ Spack package: • kdiff3/package.py Versions: 0.9.98 Build Dependencies qt Link Dependencies qt Description: Compare and merge 2 or 3 files or directories.

158 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.183 kealib

Homepage: • http://kealib.org/ Spack package: • kealib/package.py Versions: 1.4.5 Build Dependencies hdf5 Link Dependencies hdf5 Description: An HDF5 Based Raster File Format KEALib provides an implementation of the GDAL data model. The format supports raster attribute tables, image pyramids, meta-data and in-built statistics while also handling very large files and compression throughout. Based on the HDF5 standard, it also provides a base from which other formats can be derived and is a good choice for long term data archiving. An independent software library (libkea) provides complete access to the KEA image format and a GDAL driver allowing KEA images to be used from any GDAL supported software. Development work on this project has been funded by Landcare Research.

1.10.184 kripke

Homepage: • https://codesign.llnl.gov/kripke.php Spack package: • kripke/package.py Versions: 1.1 Build Dependencies mpi Link Dependencies mpi Description: Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app.

1.10.185 launchmon

Homepage: • https://github.com/LLNL/LaunchMON Spack package: • launchmon/package.py Versions: 1.0.2 Build Dependencies autoconf , libtool, libgcrypt, libgpg-error, automake Link Dependencies libgcrypt, libgpg-error Description: Software infrastructure that enables HPC run-time tools to co-locate tool daemons with a parallel job.

1.10. Package List 159 Spack Documentation, Release 0.9

1.10.186 lcms

Homepage: • http://www.littlecms.com Spack package: • lcms/package.py Versions: 2.6 Build Dependencies libtiff , zlib, jpeg Link Dependencies libtiff , zlib, jpeg Description: Little cms is a color management library. Implements fast transforms between ICC profiles. It is focused on speed, and is portable across several platforms (MIT license).

1.10.187 leveldb

Homepage: • https://github.com/google/leveldb Spack package: • leveldb/package.py Versions: 1.18 Build Dependencies snappy Link Dependencies snappy Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

1.10.188 libaio

Homepage: • https://git.fedorahosted.org/cgit/libaio.git Spack package: • libaio/package.py Versions: 0.3.110-1 Description: This is the linux native Asynchronous I/O interface library.

160 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.189 libarchive

Homepage: • http://www.libarchive.org Spack package: • libarchive/package.py Versions: 3.2.1, 3.1.2, 3.1.1, 3.1.0 Build Dependencies lzma, xz, bzip2, zlib, libxml2, expat, lz4, openssl, nettle, lzo Link Dependencies lzma, xz, bzip2, zlib, libxml2, expat, lz4, openssl, nettle, lzo Description: libarchive: C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats.

1.10.190 libatomic-ops

Homepage: • https://github.com/ivmai/libatomic_ops Spack package: • libatomic-ops/package.py Versions: 7.4.4 Description: This package provides semi-portable access to hardware-provided atomic memory update operations on a number architectures.

1.10.191 libcerf

Homepage: • http://sourceforge.net/projects/libcerf Spack package: • libcerf/package.py Versions: 1.3 Description: A self-contained C library providing complex error functions, based on Faddeeva’s plasma dispersion function w(z). Also provides Dawson’s integral and Voigt’s convolution of a Gaussian and a Lorentzian

1.10. Package List 161 Spack Documentation, Release 0.9

1.10.192 libcircle

Homepage: • https://github.com/hpc/libcircle Spack package: • libcircle/package.py Versions: 0.2.1-rc.1 Build Dependencies mpi Link Dependencies mpi Description: libcircle provides an efficient distributed queue on a cluster, using self-stabilizing work stealing.

1.10.193 libctl

Homepage: • http://ab-initio.mit.edu/wiki/index.php/Libctl Spack package: • libctl/package.py Versions: 3.2.2 Build Dependencies guile Link Dependencies guile Description: libctl is a free Guile-based library implementing flexible control files for scientific simulations.

1.10.194 libdrm

Homepage: • http://dri.freedesktop.org/libdrm/ Spack package: • libdrm/package.py Versions: 2.4.59, 2.4.33 Build Dependencies libpciaccess Link Dependencies libpciaccess Description: A userspace library for accessing the DRM, direct rendering manager, on Linux, BSD and other oper- ating systems that support the ioctl interface.

162 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.195 libdwarf

Homepage: • http://www.prevanders.net/dwarf.html Spack package: • libdwarf/package.py Versions: 20160507, 20130729, 20130207, 20130126 Build Dependencies libelf Link Dependencies libelf Description: The DWARF Debugging Information Format is of interest to programmers working on compilers and debuggers (and any one interested in reading or writing DWARF information). It was developed by a committee (known as the PLSIG at the time) starting around 1991. Starting around 1991 SGI developed the libdwarf and dwarfdump tools for internal use and as part of SGI IRIX developer tools. Since that time dwarfdump and libdwarf have been shipped (as an executable and archive respectively, not source) with every release of the SGI MIPS/IRIX C compiler.

1.10.196 libedit

Homepage: • http://thrysoee.dk/editline/ Spack package: • libedit/package.py Versions: 3.1 Build Dependencies ncurses Link Dependencies ncurses Description: An autotools compatible port of the NetBSD editline library

1.10.197 libelf

Homepage: • http://www.mr511.de/software/english.html Spack package: • libelf/package.py Versions: 0.8.13, 0.8.12 Description: libelf lets you read, modify or create ELF object files in an architecture-independent way. The library takes care of size and endian issues, e.g. you can process a file for SPARC processors on an Intel- based system.

1.10. Package List 163 Spack Documentation, Release 0.9

1.10.198 libepoxy

Homepage: • https://github.com/anholt/libepoxy Spack package: • libepoxy/package.py Versions: 1.3.1 Description: Epoxy is a library for handling OpenGL function pointer management for you.

1.10.199 libevent

Homepage: • http://libevent.org Spack package: • libevent/package.py Versions: 2.0.21, 2.0.20, 2.0.19, 2.0.18, 2.0.17, 2.0.16, 2.0.15, 2.0.14, 2.0.13, 2.0.12 Build Dependencies openssl Link Dependencies openssl Description: The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts.

1.10.200 libffi

Homepage: • https://sourceware.org/libffi/ Spack package: • libffi/package.py Versions: 3.2.1 Description: The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time.

164 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.201 libgcrypt

Homepage: • http://www.gnu.org/software/libgcrypt/ Spack package: • libgcrypt/package.py Versions: 1.6.2 Build Dependencies libgpg-error Link Dependencies libgpg-error Description: Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides func- tions for all cryptographic building blocks: symmetric ciphers, hash algorithms, MACs, public key algorithms, large integer functions, random numbers and a lot of supporting functions.

1.10.202 libgd

Homepage: • https://github.com/libgd/libgd Spack package: • libgd/package.py Versions: 2.1.1 Build Dependencies libpng, cmake Link Dependencies libpng Description: GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, WebP, XPM, BMP images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development.

1.10.203 libgpg-error

Homepage: • https://www.gnupg.org/related_software/libgpg-error Spack package: • libgpg-error/package.py Versions: 1.21, 1.18 Description: Libgpg-error is a small library that defines common error values for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the future.

1.10. Package List 165 Spack Documentation, Release 0.9

1.10.204 libgtextutils

Homepage: • https://github.com/agordon/libgtextutils Spack package: • libgtextutils/package.py Versions: 0.7 Description: Gordon’s Text utils Library.

1.10.205 libhio

Homepage: • https://github.com/hpc/libhio/ Spack package: • libhio/package.py Versions: 1.3.0.1 Build Dependencies libjson-c, bzip2, pkg-config Link Dependencies libjson-c, bzip2 Description: A library for writing to hierarchical data store systems.

1.10.206 libiconv

Homepage: • https://www.gnu.org/software/libiconv/ Spack package: • libiconv/package.py Versions: 1.14 Description: GNU libiconv provides an implementation of the iconv() function and the iconv program for character set conversion.

1.10.207 libjpeg-turbo

Homepage: • http://libjpeg-turbo.virtualgl.org Spack package: • libjpeg-turbo/package.py

166 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Versions: 1.3.1 Build Dependencies yasm, nasm Description: libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG compres- sion and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding.

1.10.208 libjson-c

Homepage: • https://github.com/json-c/json-c/wiki Spack package: • libjson-c/package.py Versions: 0.11 Description: A JSON implementation in C

1.10.209 libmng

Homepage: • http://sourceforge.net/projects/libmng/ Spack package: • libmng/package.py Versions: 2.0.2 Build Dependencies zlib, jpeg, lcms Link Dependencies zlib, jpeg, lcms Description: libmng -THE reference library for reading, displaying, writing and examining Multiple-Image Network Graphics. MNG is the animation extension to the popular PNG image-format.

1.10.210 libmonitor

Homepage: • https://github.com/HPCToolkit/libmonitor Spack package: • libmonitor/package.py Versions: 20130218 Description: Libmonitor is a library for process and thread control.

1.10. Package List 167 Spack Documentation, Release 0.9

1.10.211 libNBC

Homepage: • http://unixer.de/research/nbcoll/libnbc/ Spack package: • libNBC/package.py Versions: 1.1.1 Build Dependencies mpi Link Dependencies mpi Description: LibNBC is a prototypic implementation of a nonblocking interface for MPI collective operations. Based on ANSI C and MPI-1, it supports all MPI-1 collective operations in a nonblocking manner. LibNBC is dis- tributed under the BSD license.

1.10.212 libpciaccess

Homepage: • http://cgit.freedesktop.org/xorg/lib/libpciaccess/ Spack package: • libpciaccess/package.py Versions: 0.13.4 Build Dependencies libtool Description: Generic PCI access library.

1.10.213 libpng

Homepage: • http://www.libpng.org/pub/png/libpng.html Spack package: • libpng/package.py Versions: 1.6.16, 1.6.15, 1.6.14, 1.5.26, 1.4.19, 1.2.56 Build Dependencies zlib Link Dependencies zlib Description: libpng graphics file format

168 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.214 libpthread-stubs

Homepage: • http://xcb.freedesktop.org/ Spack package: • libpthread-stubs/package.py Versions: 0.3 Description: The libpthread-stubs package provides weak aliases for pthread functions not provided in libc or other- wise available by default.

1.10.215 libsigsegv

Homepage: • https://www.gnu.org/software/libsigsegv/ Spack package: • libsigsegv/package.py Versions: 2.10 Description: GNU libsigsegv is a library for handling page faults in user mode.

1.10.216 libsodium

Homepage: • https://download.libsodium.org/doc/ Spack package: • libsodium/package.py Versions: 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.7.1 Description: Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hash- ing and more.

1.10.217 libsplash

Homepage: • https://github.com/ComputationalRadiationPhysics/libSplash Spack package: • libsplash/package.py Versions: 1.4.0, 1.3.1, 1.2.4

1.10. Package List 169 Spack Documentation, Release 0.9

Build Dependencies hdf5, cmake, mpi Link Dependencies hdf5, mpi Description: libSplash aims at developing a HDF5-based I/O library for HPC simulations. It is created as an easy- to-use frontend for the standard HDF5 library with support for MPI processes in a cluster environment. While the standard HDF5 library provides detailed low-level control, libSplash simplifies tasks commonly found in large-scale HPC simulations, such as iterative computations and MPI distributed processes.

1.10.218 libtermkey

Homepage: • http://www.leonerd.org.uk/code/libtermkey/ Spack package: • libtermkey/package.py Versions: 0.18, 0.17, 0.16, 0.15b, 0.14 Description: Easy keyboard entry processing for terminal programs

1.10.219 libtiff

Homepage: • http://www.remotesensing.org/libtiff/ Spack package: • libtiff/package.py Versions: 4.0.3 Build Dependencies xz, zlib, jpeg Link Dependencies xz, zlib, jpeg Description: libtiff graphics format library

1.10.220 libtool

Homepage: • https://www.gnu.org/software/libtool/ Spack package: • libtool/package.py Versions: 2.4.6, 2.4.2 Build Dependencies m4 Description: libtool – library building part of autotools

170 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.221 libunistring

Homepage: • https://www.gnu.org/software/libunistring/ Spack package: • libunistring/package.py Versions: 0.9.6 Description: This library provides functions for manipulating Unicode strings and for manipulating C strings accord- ing to the Unicode standard.

1.10.222 libunwind

Homepage: • http://www.nongnu.org/libunwind/ Spack package: • libunwind/package.py Versions: 1.1 Description: A portable and efficient C programming interface (API) to determine the call-chain of a program.

1.10.223 libuuid

Homepage: • http://sourceforge.net/projects/libuuid/ Spack package: • libuuid/package.py Versions: 1.0.3 Description: Portable uuid C library

1.10.224 libuv

Homepage: • http://libuv.org Spack package: • libuv/package.py Versions: 1.9.0 Build Dependencies autoconf , libtool, automake

1.10. Package List 171 Spack Documentation, Release 0.9

Description: Multi-platform library with a focus on asynchronous IO

1.10.225 libvterm

Homepage: • http://www.leonerd.org.uk/code/libvterm/ Spack package: • libvterm/package.py Versions: 681 Description: An abstract library implementation of a terminal emulator

1.10.226 libxau

Homepage: • http://xcb.freedesktop.org/ Spack package: • libxau/package.py Versions: 1.0.8 Build Dependencies xproto, pkg-config Link Dependencies xproto Description: The libXau package contains a library implementing the X11 Authorization Protocol. This is useful for restricting client access to the display.

1.10.227 libxc

Homepage: • http://www.tddft.org/programs/octopus/wiki/index.php/Libxc Spack package: • libxc/package.py Versions: 2.2.2 Description: Libxc is a library of exchange-correlation functionals for density- functional theory.

172 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.228 libxcb

Homepage: • http://xcb.freedesktop.org/ Spack package: • libxcb/package.py Versions: 1.11.1, 1.11 Build Dependencies python, libpthread-stubs, libxau, xcb-proto, pkg-config Link Dependencies libpthread-stubs, xcb-proto, libxau Description: The X protocol C- (XCB) is a replacement for featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.

1.10.229 libxml2

Homepage: • http://xmlsoft.org Spack package: • libxml2/package.py Versions: 2.9.4, 2.9.2 Build Dependencies python, xz, zlib Link Dependencies python, xz, zlib Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License.

1.10.230 libxpm

Homepage: • https://www.x.org/ Spack package: • libxpm/package.py Versions: 3.5.11, 3.5.10, 3.5.9, 3.5.8, 3.5.7 Description: Xpm file format library

1.10. Package List 173 Spack Documentation, Release 0.9

1.10.231 libxshmfence

Homepage: • http://keithp.com/blogs/dri3_extension/ Spack package: • libxshmfence/package.py Versions: 1.2 Description: This is a tiny library that exposes a event API on top of Linux futexes.

1.10.232 libxslt

Homepage: • http://www.xmlsoft.org/XSLT/index.html Spack package: • libxslt/package.py Versions: 1.1.28 Build Dependencies xz, libxml2, zlib, libgcrypt Link Dependencies xz, libxml2, zlib, libgcrypt Description: Libxslt is the XSLT C library developed for the GNOME project. XSLT itself is a an XML language to define transformation for XML. Libxslt is based on libxml2 the XML C library developed for the GNOME project. It also implements most of the EXSLT set of processor-portable extensions functions and some of Saxon’s evaluate and expressions extensions.

1.10.233 libxsmm

Homepage: • https://github.com/hfp/libxsmm Spack package: • libxsmm/package.py Versions: 1.4.3, 1.4.2, 1.4.1, 1.4 Description: LIBXSMM is a library for small dense and small sparse matrix-matrix multiplications targeting Intel Architecture (x86).

174 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.234 llvm

Homepage: • http://llvm.org/ Spack package: • llvm/package.py Versions: 3.8.0, 3.7.1, 3.7.0, 3.6.2, 3.5.1, 3.0, trunk Build Dependencies cmake, libedit, python, swig, ncurses, isl, gmp, binutils Link Dependencies libedit, python, swig, ncurses, isl, gmp, binutils Description: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them. The name “LLVM” itself is not an acronym; it is the full name of the project.

1.10.235 llvm-lld

Homepage: • http://lld.llvm.org Spack package: • llvm-lld/package.py Versions: 3.4 Build Dependencies llvm, cmake Link Dependencies llvm Description: lld - The LLVM Linker lld is a new set of modular code for creating linker tools.

1.10.236 lmdb

Homepage: • http://www.openldap.org/software/repo.html Spack package: • lmdb/package.py Versions: 0.9.16 Description: Read-only mirror of official repo on openldap.org. Issues and pull requests here are ignored. Use OpenLDAP ITS for issues. http://www.openldap.org/software/repo.html

1.10. Package List 175 Spack Documentation, Release 0.9

1.10.237 lmod

Homepage: • https://www.tacc.utexas.edu/research-development/tacc-projects/lmod Spack package: • lmod/package.py Versions: 6.4.5, 6.4.1, 6.3.7, 6.0.1 Build Dependencies lua, tcl, lua-luaposix, lua-luafilesystem Link Dependencies lua Run Dependencies tcl, lua-luaposix, lua-luafilesystem Description: Lmod is a Lua based module system that easily handles the MODULEPATH Hierarchical problem. Environment Modules provide a convenient way to dynamically change the users’ environment through mod- ulefiles. This includes easily adding or removing directories to the PATH environment variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found.

1.10.238 lrslib

Homepage: • http://cgm.cs.mcgill.ca/~avis/C/lrs.html Spack package: • lrslib/package.py Versions: 6.2, 6.1, 6.0, 5.1, 4.3 Build Dependencies gmp, libtool Link Dependencies gmp Description: lrslib Ver 6.2 is a self-contained ANSI C implementation of the reverse search algorithm for vertex enumeration/convex hull problems and comes with a choice of three arithmetic packages

1.10.239 lrzip

Homepage: • http://lrzip.kolivas.org Spack package: • lrzip/package.py Versions: 0.630, 0.621, 0.616, 0.615, master Build Dependencies bzip2, zlib, lzo Link Dependencies bzip2, zlib, lzo

176 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: A compression utility that excels at compressing large files (usually > 10-50 MB). Larger files and/or more free RAM means that the utility will be able to more effectively compress your files (ie: faster / smaller size), especially if the filesize(s) exceed 100 MB. You can either choose to optimise for speed (fast compression / decompression) or size, but not both.

1.10.240 lua

Homepage: • http://www.lua.org Spack package: • lua/package.py Versions: 5.3.2, 5.3.1, 5.3.0, 5.2.4, 5.2.3, 5.2.2, 5.2.1, 5.2.0, 5.1.5, 5.1.4, 5.1.3 Build Dependencies ncurses, readline Link Dependencies ncurses, readline Description: The Lua programming language interpreter and library

1.10.241 lua-luafilesystem

Homepage: • http://keplerproject.github.io/luafilesystem Spack package: • lua-luafilesystem/package.py Versions: 1_6_3 Build Dependencies lua Link Dependencies lua Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem is free software and uses the same license as Lua 5.1

1.10.242 lua-luaposix

Homepage: • https://github.com/luaposix/luaposix/ Spack package: • lua-luaposix/package.py Versions: 33.4.0 Build Dependencies lua

1.10. Package List 177 Spack Documentation, Release 0.9

Link Dependencies lua Description: Lua posix bindings, including ncurses

1.10.243 LuaJIT

Homepage: • http://www.luajit.org Spack package: • LuaJIT/package.py Versions: 2.0.4 Description: Flast flexible JITed lua

1.10.244 lwgrp

Homepage: • https://github.com/hpc/lwgrp Spack package: • lwgrp/package.py Versions: 1.0.2 Build Dependencies mpi Link Dependencies mpi Description: Thie light-weight group library provides process group representations using O(log N) space and time.

1.10.245 lwm2

Homepage: • https://jay.grs.rwth-aachen.de/redmine/projects/lwm2 Spack package: • lwm2/package.py Versions: torus Build Dependencies papi, mpi Link Dependencies papi, mpi Description: LWM2: Light Weight Measurement Module. This is a PMPI module that can collect a number of time-sliced MPI and POSIX I/O measurements from a program.

178 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.246 lz4

Homepage: • http://cyan4973.github.io/lz4/ Spack package: • lz4/package.py Versions: 131 Description: LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

1.10.247 lzma

Homepage: • http://tukaani.org/lzma/ Spack package: • lzma/package.py Versions: 4.32.7 Description: LZMA Utils are legacy data compression software with high compression ratio. LZMA Utils are no longer developed, although critical bugs may be fixed as long as fixing them doesn’t require huge changes to the code. Users of LZMA Utils should move to XZ Utils. XZ Utils support the legacy .lzma format used by LZMA Utils, and can also emulate the command line tools of LZMA Utils. This should make transition from LZMA Utils to XZ Utils relatively easy.

1.10.248 lzo

Homepage: • https://www.oberhumer.com/opensource/lzo/ Spack package: • lzo/package.py Versions: 2.09, 2.08, 2.07, 2.06, 2.05 Description: Real-time data compression library

1.10. Package List 179 Spack Documentation, Release 0.9

1.10.249 m4

Homepage: • https://www.gnu.org/software/m4/m4.html Spack package: • m4/package.py Versions: 1.4.17 Build Dependencies libsigsegv Link Dependencies libsigsegv Description: GNU M4 is an implementation of the traditional Unix macro processor.

1.10.250 mafft

Homepage: • http://mafft.cbrc.jp/alignment/software/index.html Spack package: • mafft/package.py Versions: 7.221 Description: MAFFT is a multiple sequence alignment program for unix-like operating systems. It offers a range of multiple alignment methods, L-INS-i (accurate; for alignment of <~200 sequences), FFT-NS-2 (fast; for alignment of <~30,000 sequences), etc.

1.10.251 mariadb

Homepage: • https://mariadb.org/about/ Spack package: • mariadb/package.py Versions: 10.1.14, 5.5.49 Build Dependencies libaio, cmake, libedit, ncurses, zlib, libevent, jemalloc, boost Link Dependencies libaio, cmake, libedit, ncurses, zlib, libevent, jemalloc, boost Description: MariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. It is an enhanced, drop- in replacement for MySQL. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.

180 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.252 matio

Homepage: • http://sourceforge.net/projects/matio/ Spack package: • matio/package.py Versions: 1.5.2 Description: matio is an C library for reading and writing Matlab MAT files

1.10.253 mbedtls

Homepage: • https://tls.mbed.org Spack package: • mbedtls/package.py Versions: 2.2.1, 2.2.0, 2.1.4, 2.1.3, 1.3.16 Build Dependencies cmake Description: mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.

1.10.254 meep

Homepage: • http://ab-initio.mit.edu/wiki/index.php/Meep Spack package: • meep/package.py Versions: 1.3, 1.2.1, 1.1.1 Build Dependencies guile, hdf5, lapack, blas, harminv, mpi, libctl, gsl Link Dependencies guile, hdf5, lapack, blas, harminv, mpi, libctl, gsl Description: Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems.

1.10. Package List 181 Spack Documentation, Release 0.9

1.10.255 memaxes

Homepage: • https://github.com/llnl/MemAxes Spack package: • memaxes/package.py Versions: 0.5 Build Dependencies cmake, qt Link Dependencies qt Description: MemAxes is a visualizer for sampled memory trace data.

1.10.256 mercurial

Homepage: • https://www.mercurial-scm.org Spack package: • mercurial/package.py Versions: 3.9, 3.8.4, 3.8.3, 3.8.2, 3.8.1 Build Dependencies python, py-docutils Link Dependencies python Description: Mercurial is a free, distributed source control management tool.

1.10.257 mesa

Homepage: • http://www.mesa3d.org Spack package: • mesa/package.py Versions: 8.0.5 Build Dependencies libxml2, libdrm, llvm Link Dependencies libxml2, libdrm, llvm Description: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.

182 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.258 metis

Homepage: • http://glaros.dtc.umn.edu/gkhome/metis/metis/overview Spack package: • metis/package.py Versions: 5.1.0, 5.0.2, 4.0.3 Build Dependencies cmake Description: METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and pro- ducing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.

1.10.259 mfem

Homepage: • http://www.mfem.org Spack package: • mfem/package.py Versions: 3.2, 3.1 Build Dependencies hypre, cmake, lapack, blas, metis, mpi, suite-sparse Link Dependencies hypre, lapack, blas, metis, mpi, suite-sparse Description: Free, lightweight, scalable C++ library for finite element methods.

1.10.260 Mitos

Homepage: • https://github.com/llnl/Mitos Spack package: • Mitos/package.py Versions: 0.9.2, 0.9.1 Build Dependencies dyninst, cmake, hwloc, mpi Link Dependencies dyninst, hwloc, mpi Description: Mitos is a library and a tool for collecting sampled memory performance data to view with MemAxes

1.10. Package List 183 Spack Documentation, Release 0.9

1.10.261 mkl

Homepage: • https://software.intel.com/en-us/intel-mkl Spack package: • mkl/package.py Versions: 11.3.3.210, 11.3.2.181 Description: Intel Math Kernel Library. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html. To set the threading layer at run time set MKL_THREADING_LAYER variable to one of the following values: INTEL (default), SEQUENTIAL, PGI. To set interface layer at run time, use set the MKL_INTERFACE_LAYER variable to LP64 (default) or ILP64.

1.10.262 moab

Homepage: • https://bitbucket.org/fathomteam/moab Spack package: • moab/package.py Versions: 4.9.1, 4.9.0, 4.8.2 Build Dependencies trilinos, mpi, netcdf , parmetis, hdf5 Link Dependencies trilinos, mpi, netcdf , parmetis, hdf5 Description: MOAB is a component for representing and evaluating mesh data. MOAB can store structured and unstructured mesh, consisting of elements in the finite element ‘zoo.’ The functional interface to MOAB is simple yet powerful, allowing the representation of many types of metadata commonly found on the mesh. MOAB is optimized for efficiency in space and time, based on access to mesh in chunks rather than through individual entities, while also versatile enough to support individual entity access.

1.10.263 mpc

Homepage: • http://www.multiprecision.org Spack package: • mpc/package.py Versions: 1.0.3, 1.0.2 Build Dependencies gmp, mpfr Link Dependencies gmp, mpfr Description: Gnu Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.

184 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.264 mpe2

Homepage: • http://www.mcs.anl.gov/research/projects/perfvis/software/MPE/ Spack package: • mpe2/package.py Versions: 1.3.0 Build Dependencies mpi Link Dependencies mpi Description: Message Passing Extensions (MPE): Parallel, shared X graphics

1.10.265 mpfr

Homepage: • http://www.mpfr.org Spack package: • mpfr/package.py Versions: 3.1.4, 3.1.3, 3.1.2 Build Dependencies gmp Link Dependencies gmp Description: The MPFR library is a C library for multiple-precision floating-point computations with correct round- ing.

1.10.266 mpibash

Homepage: • http://www.ccs3.lanl.gov/~pakin/software/mpibash-4.3.html Spack package: • mpibash/package.py Versions: 4.3 Build Dependencies autoconf , libcircle, mpi Link Dependencies libcircle, mpi Description: Parallel scripting right from the Bourne-Again Shell (Bash)

1.10. Package List 185 Spack Documentation, Release 0.9

1.10.267 mpich

Homepage: • http://www.mpich.org Spack package: • mpich/package.py Versions: 3.2, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1, 3.0.4 Description: MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.

1.10.268 mpileaks

Homepage: • https://github.com/hpc/mpileaks Spack package: • mpileaks/package.py Versions: 1.0 Build Dependencies mpi, callpath, adept-utils Link Dependencies mpi, callpath, adept-utils Description: Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.

1.10.269 mrnet

Homepage: • http://paradyn.org/mrnet Spack package: • mrnet/package.py Versions: 5.0.1-2, 5.0.1, 4.1.0, 4.0.0 Build Dependencies boost Link Dependencies boost Description: The MRNet Multi-Cast Reduction Network.

186 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.270 msgpack-c

Homepage: • http://www.msgpack.org Spack package: • msgpack-c/package.py Versions: 1.4.1 Build Dependencies cmake Description: A small, fast binary interchange format convertible to/from JSON

1.10.271 mumps

Homepage: • http://mumps.enseeiht.fr Spack package: • mumps/package.py Versions: 5.0.1 Build Dependencies scotch, blas, metis, mpi, scalapack, parmetis Link Dependencies scotch, blas, metis, mpi, scalapack, parmetis Description: MUMPS: a MUltifrontal Massively Parallel sparse direct Solver

1.10.272 munge

Homepage: • https://code.google.com/p/munge/ Spack package: • munge/package.py Versions: 0.5.11 Build Dependencies openssl, libgcrypt Link Dependencies openssl, libgcrypt Description: MUNGE Uid ‘N’ Gid Emporium

1.10. Package List 187 Spack Documentation, Release 0.9

1.10.273 muparser

Homepage: • http://muparser.beltoforion.de/ Spack package: • muparser/package.py Versions: 2.2.5 Description: C++ math expression parser library.

1.10.274 muster

Homepage: • https://github.com/llnl/muster Spack package: • muster/package.py Versions: 1.0.1, 1.0 Build Dependencies boost, cmake, mpi Link Dependencies boost, mpi Description: The Muster library provides implementations of sequential and parallel K-Medoids clustering algo- rithms. It is intended as a general framework for parallel cluster analysis, particularly for performance data analysis on systems with very large numbers of processes.

1.10.275 mvapich2

Homepage: • http://mvapich.cse.ohio-state.edu/ Spack package: • mvapich2/package.py Versions: 2.2rc2, 2.2b, 2.2a, 2.1, 2.0, 1.9 Build Dependencies libpciaccess Link Dependencies libpciaccess Description: MVAPICH2 is an MPI implementation for Infiniband networks.

188 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.276 mxml

Homepage: • http://www.msweet.org Spack package: • mxml/package.py Versions: 2.9, 2.8, 2.7, 2.6, 2.5 Description: Mini-XML is a small XML library that you can use to read and write XML and XML-like data files in your application without requiring large non- standard libraries.

1.10.277 nag

Homepage: • http://www.nag.com/nagware/np.asp Spack package: • nag/package.py Versions: 6.1, 6.0 Description: The NAG Fortran Compiler.

1.10.278 nano

Homepage: • http://www.nano-editor.org Spack package: • nano/package.py Versions: 2.6.3, 2.6.2 Description: Tiny little text editor

1.10.279 nasm

Homepage: • http://www.nasm.us Spack package: • nasm/package.py Versions: 2.11.06

1.10. Package List 189 Spack Documentation, Release 0.9

Description: NASM () is an 80x86 assembler designed for portability and modularity. It includes a disassembler as well.

1.10.280 nauty

Homepage: • http://pallini.di.uniroma1.it/index.html Spack package: • nauty/package.py Versions: 2.6r7, 2.6r5, 2.5r9 Description: nauty and Traces are programs for computing automorphism groups of graphsq and digraphs

1.10.281 nccmp

Homepage: • http://nccmp.sourceforge.net/ Spack package: • nccmp/package.py Versions: 1.8.2.0 Build Dependencies netcdf Link Dependencies netcdf Description: Compare NetCDF Files

1.10.282 ncdu

Homepage: • http://dev.yorhel.nl/ncdu Spack package: • ncdu/package.py Versions: 1.11, 1.10, 1.9, 1.8, 1.7 Build Dependencies ncurses Link Dependencies ncurses Description: Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don’t have an entire gaphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.

190 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.283 nco

Homepage: • https://sourceforge.net/projects/nco Spack package: • nco/package.py Versions: 4.5.5 Build Dependencies antlr, udunits2, netcdf , gsl Link Dependencies antlr, udunits2, netcdf , gsl Description: The NCO toolkit manipulates and analyzes data stored in netCDF- accessible formats

1.10.284 ncurses

Homepage: • http://invisible-island.net/ncurses/ncurses.html Spack package: • ncurses/package.py Versions: 6.0, 5.9 Description: The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD curses.

1.10.285 ncview

Homepage: • http://meteora.ucsd.edu/~pierce/ncview_home_page.html Spack package: • ncview/package.py Versions: 2.1.7 Build Dependencies udunits2, netcdf Link Dependencies udunits2, netcdf Description: Simple viewer for NetCDF files.

1.10. Package List 191 Spack Documentation, Release 0.9

1.10.286 ndiff

Homepage: • http://ftp.math.utah.edu/pub/ndiff/ Spack package: • ndiff/package.py Versions: 2.00, 1.00 Description: The ndiff tool is a binary utility that compares putatively similar files while ignoring small numeric differernces. This utility is most often used to compare files containing a lot of floating-point numeric data that may be slightly different due to numeric error.

1.10.287 netcdf

Homepage: • http://www.unidata.ucar.edu/software/netcdf Spack package: • netcdf/package.py Versions: 4.4.1, 4.4.0, 4.3.3 Build Dependencies m4, curl, zlib, hdf , hdf5 Link Dependencies hdf , curl, zlib, hdf5 Description: NetCDF is a set of software libraries and self-describing, machine- independent data formats that sup- port the creation, access, and sharing of array-oriented scientific data.

1.10.288 netcdf-cxx

Homepage: • http://www.unidata.ucar.edu/software/netcdf Spack package: • netcdf-cxx/package.py Versions: 4.2 Build Dependencies netcdf Link Dependencies netcdf Description: Deprecated C++ compatibility bindings for NetCDF. These do NOT read or write NetCDF-4 files, and are no longer maintained by Unidata. Developers should migrate to current NetCDF C++ bindings, in Spack package netcdf-cxx4.

192 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.289 netcdf-cxx4

Homepage: • http://www.unidata.ucar.edu/software/netcdf Spack package: • netcdf-cxx4/package.py Versions: 4.3.0, 4.2.1 Build Dependencies autoconf , netcdf Link Dependencies netcdf Description: C++ interface for NetCDF4

1.10.290 netcdf-fortran

Homepage: • http://www.unidata.ucar.edu/software/netcdf Spack package: • netcdf-fortran/package.py Versions: 4.4.4, 4.4.3 Build Dependencies netcdf Link Dependencies netcdf Description: Fortran interface for NetCDF4

1.10.291 netgauge

Homepage: • http://unixer.de/research/netgauge/ Spack package: • netgauge/package.py Versions: 2.4.6 Build Dependencies mpi Link Dependencies mpi Description: Netgauge is a high-precision network parameter measurement tool. It supports benchmarking of many different network protocols and communication patterns. The main focus lies on accuracy, statistical analysis and easy extensibility.

1.10. Package List 193 Spack Documentation, Release 0.9

1.10.292 netlib-lapack

Homepage: • http://www.netlib.org/lapack/ Spack package: • netlib-lapack/package.py Versions: 3.6.0, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.1 Build Dependencies blas, cmake Link Dependencies blas Description: LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations includ- ing matrix inversions, least squared solutions to linear sets of equations, eigenvector analysis, singular value decomposition, etc. It is a very comprehensive and reputable package that has found extensive use in the scien- tific community.

1.10.293 netlib-scalapack

Homepage: • http://www.netlib.org/scalapack/ Spack package: • netlib-scalapack/package.py Versions: 2.0.2, 2.0.1, 2.0.0 Build Dependencies lapack, cmake, mpi Link Dependencies lapack, mpi Description: ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines

1.10.294 nettle

Homepage: • https://www.lysator.liu.se/~nisse/nettle/ Spack package: • nettle/package.py Versions: 3.2, 2.7 Build Dependencies gmp Link Dependencies gmp Description: The Nettle package contains the low-level cryptographic library that is designed to fit easily in many contexts.

194 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.295 nextflow

Homepage: • http://www.nextflow.io Spack package: • nextflow/package.py Versions: 0.20.1 Build Dependencies jdk Link Dependencies jdk Description: Data-driven computational pipelines

1.10.296 ninja

Homepage: • https://martine.github.io/ninja/ Spack package: • ninja/package.py Versions: 1.6.0 Build Dependencies python Link Dependencies python Description: A small, fast Make alternative

1.10.297 numdiff

Homepage: • https://www.nongnu.org/numdiff Spack package: • numdiff/package.py Versions: 5.8.1 Description: Numdiff is a little program that can be used to compare putatively similar files line by line and field by field, ignoring small numeric differences or/and different numeric formats.

1.10. Package List 195 Spack Documentation, Release 0.9

1.10.298 nwchem

Homepage: • http://www.nwchem-sw.org Spack package: • nwchem/package.py Versions: 6.6 Build Dependencies lapack, python, blas, scalapack, mpi Link Dependencies lapack, blas, scalapack, mpi Run Dependencies python Description: High-performance computational chemistry software

1.10.299 ocaml

Homepage: • http://ocaml.org/ Spack package: • ocaml/package.py Versions: 4.03.0 Build Dependencies ncurses Link Dependencies ncurses Description: OCaml is an industrial strength programming language supporting functional, imperative and object- oriented styles

1.10.300 oce

Homepage: • https://github.com/tpaviot/oce Spack package: • oce/package.py Versions: 0.17.2, 0.17.1, 0.17, 0.16.1, 0.16 Build Dependencies tbb, cmake Link Dependencies tbb Description: Open CASCADE Community Edition: patches/improvements/experiments contributed by users over the official Open CASCADE library.

196 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.301 octave

Homepage: • https://www.gnu.org/software/octave/ Spack package: • octave/package.py Versions: 4.0.2, 4.0.0 Build Dependencies zlib, ImageMagick, qhull, blas, curl, qrupdate, pcre, fltk, gnuplot, lapack, fontconfig, gl2ps, freetype, llvm, suite-sparse, readline, glpk, qt, jdk, hdf5, fftw, arpack, pkg-config Link Dependencies zlib, ImageMagick, qhull, blas, curl, qrupdate, pcre, fltk, gnuplot, lapack, fontconfig, gl2ps, freetype, llvm, suite-sparse, readline, glpk, qt, jdk, hdf5, fftw, arpack Description: GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

1.10.302 octave-splines

Homepage: • http://octave.sourceforge.net/splines/index.html Spack package: • octave-splines/package.py Versions: 1.3.1 Build Dependencies octave Link Dependencies octave Description: Additional spline functions.

1.10.303 octopus

Homepage: • http://www.tddft.org/programs/octopus/ Spack package: • octopus/package.py Versions: 5.0.1 Build Dependencies libxc, lapack, blas, fftw, mpi, gsl Link Dependencies libxc, lapack, blas, fftw, mpi, gsl Description: A real-space finite-difference (time-dependent) density-functional theory code.

1.10. Package List 197 Spack Documentation, Release 0.9

1.10.304 ompss

Homepage: • http://pm.bsc.es/ Spack package: • ompss/package.py Versions: 14.10 Build Dependencies hwloc, extrae, mpi Link Dependencies hwloc, extrae, mpi Description: OmpSs is an effort to integrate features from the StarSs programming model developed by BSC into a single programming model. In particular, our objective is to extend OpenMP with new directives to support asynchronous parallelism and heterogeneity (devices like GPUs). However, it can also be understood as new directives extending other accelerator based APIs like CUDA or OpenCL. Our OmpSs environment is built on top of our Mercurium compiler and Nanos++ runtime system.

1.10.305 ompt-openmp

Homepage: • https://github.com/OpenMPToolsInterface/LLVM-openmp Spack package: • ompt-openmp/package.py Versions: 0.1 Build Dependencies cmake Description: LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP mirror. This library provides a drop-in replacement of the OpenMP runtimes for GCC, Intel and LLVM/Clang.

1.10.306 opari2

Homepage: • http://www.vi-hps.org/projects/score-p Spack package: • opari2/package.py Versions: 2.0, 1.1.4, 1.1.2 Description: OPARI2 is a source-to-source instrumentation tool for OpenMP and hybrid codes. It surrounds OpenMP directives and runtime library calls with calls to the POMP2 measurement interface. OPARI2 will provide you with a new initialization method that allows for multi-directory and parallel builds as well as the usage of pre-instrumented libraries. Furthermore, an efficient way of tracking parent-child relationships was added. Additionally, we extended OPARI2 to support instrumentation of OpenMP 3.0 tied tasks.

198 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.307 openblas

Homepage: • http://www.openblas.net Spack package: • openblas/package.py Versions: 0.2.18, 0.2.17, 0.2.16, 0.2.15 Description: OpenBLAS: An optimized BLAS library

1.10.308 opencoarrays

Homepage: • http://www.opencoarrays.org/ Spack package: • opencoarrays/package.py Versions: 1.6.2 Build Dependencies cmake, mpi Link Dependencies mpi Description: OpenCoarrays is an open-source software project that produces an application binary interface (ABI) supporting coarray Fortran (CAF) compilers, an application programming interface (API) that supports users of non-CAF compilers, and an associated compiler wrapper and program launcher.

1.10.309 opencv

Homepage: • http://opencv.org/ Spack package: • opencv/package.py Versions: 3.1.0 Build Dependencies zlib, cmake, eigen, jdk, python, libjpeg-turbo, vtk, libtiff , gtkplus, cuda, jasper, libpng, py- numpy, qt Link Dependencies zlib, qt, jdk, python, libjpeg-turbo, vtk, libtiff , gtkplus, jasper, libpng, cuda Run Dependencies py-numpy Description: OpenCV is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real- time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 9

1.10. Package List 199 Spack Documentation, Release 0.9

million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.

1.10.310 openexr

Homepage: • http://www.openexr.com/ Spack package: • openexr/package.py Versions: 2.2.0, 2.1.0, 2.0.1, 1.7.0, 1.6.1, 1.5.0, 1.4.0a, 1.3.2 Build Dependencies ilmbase, pkg-config Link Dependencies ilmbase Description: OpenEXR Graphics Tools (high dynamic-range image file format)

1.10.311 openjpeg

Homepage: • https://github.com/uclouvain/openjpeg Spack package: • openjpeg/package.py Versions: 2.1, 2.0.1, 2.0, 1.5.2, 1.5.1 Build Dependencies cmake Description: OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, a still-image compression standard from the Joint Photographic Experts Group (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a JPEG 2000 Reference Software.

1.10.312 openmpi

Homepage: • http://www.open-mpi.org Spack package: • openmpi/package.py Versions: 2.0.0, 1.10.3, 1.10.2, 1.10.1, 1.10.0, 1.8.8, 1.6.5 Build Dependencies hwloc, sqlite Link Dependencies hwloc, sqlite

200 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Open MPI is a project combining technologies and resources from several other projects (FT-MPI, LA- MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library available. A completely new MPI-2 compliant implementation, Open MPI offers advantages for system and software vendors, application developers and computer science researchers.

1.10.313 openspeedshop

Homepage: • http://www.openspeedshop.org Spack package: • openspeedshop/package.py Versions: 2.2 Build Dependencies mvapich2, sqlite, mrnet, cbtf , libmonitor, cmake, openmpi, mpich, bison, boost, flex, mpich2, papi, python, dyninst, mpt, libunwind, mvapich, qt, cbtf-argonavis, cbtf-krell, libelf , binutils, libdwarf Link Dependencies mvapich2, sqlite, mpich2, mrnet, qt, python, dyninst, cbtf-argonavis, mpt, openmpi, cbtf-krell, libelf , mvapich, mpich, papi, libunwind, libdwarf , boost, cbtf , libmonitor Description: OpenSpeedShop is a community effort by The Krell Institute with current direct funding from DOEs NNSA. It builds on top of a broad list of community infrastructures, most notably Dyninst and MRNet from UW, libmonitor from Rice, and PAPI from UTK. OpenSpeedShop is an open source multi platform Linux performance tool which is targeted to support performance analysis of applications running on both single node and large scale IA64, IA32, EM64T, AMD64, PPC, ARM, Blue Gene and Cray platforms. OpenSpeedShop development is hosted by the Krell Institute. The infrastructure and base components of OpenSpeedShop are released as open source code primarily under LGPL.

1.10.314 openssl

Homepage: • http://www.openssl.org Spack package: • openssl/package.py Versions: 1.0.2h, 1.0.2g, 1.0.2f, 1.0.2e, 1.0.2d, 1.0.1t, 1.0.1r, 1.0.1h Build Dependencies zlib Link Dependencies zlib Description: The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.

1.10. Package List 201 Spack Documentation, Release 0.9

1.10.315 opium

Homepage: • https://opium.sourceforge.net/index.html Spack package: • opium/package.py Versions: 3.8 Build Dependencies lapack, blas Link Dependencies lapack, blas Description: DFT pseudopotential generation project

1.10.316 osu-micro-benchmarks

Homepage: • http://mvapich.cse.ohio-state.edu/benchmarks/ Spack package: • osu-micro-benchmarks/package.py Versions: 5.3 Build Dependencies cuda, mpi Link Dependencies cuda, mpi Description: The Ohio MicroBenchmark suite is a collection of independent MPI message passing performance microbenchmarks developed and written at The Ohio State University. It includes traditional benchmarks and performance measures such as latency, bandwidth and host overhead and can be used for both traditional and GPU-enhanced nodes.

1.10.317 otf

Homepage: • http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/otf/index_html/document_view?set_language=en Spack package: • otf/package.py Versions: 1.12.5salmon Build Dependencies zlib Link Dependencies zlib Description: To improve scalability for very large and massively parallel traces the Open Trace Format (OTF) is developed at ZIH as a successor format to the Vampir Trace Format (VTF3).

202 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.318 otf2

Homepage: • http://www.vi-hps.org/score-p Spack package: • otf2/package.py Versions: 2.0, 1.5.1, 1.4, 1.3.1, 1.2.1 Description: The Open Trace Format 2 is a highly scalable, memory efficient event trace data format plus support library.

1.10.319 p4est

Homepage: • http://www.p4est.org Spack package: • p4est/package.py Versions: 1.1 Build Dependencies mpi, zlib, automake, lua, libtool, autoconf Link Dependencies lua, zlib, mpi Description: Dynamic management of a collection (a forest) of adaptive octrees in parallel

1.10.320 panda

Homepage: • http://comopt.ifi.uni-heidelberg.de/software/PANDA/index.html Spack package: • panda/package.py Versions: current Build Dependencies cmake, mpi Link Dependencies mpi Description: PANDA: Parallel AdjaceNcy Decomposition Algorithm

1.10. Package List 203 Spack Documentation, Release 0.9

1.10.321 pango

Homepage: • http://www.pango.org Spack package: • pango/package.py Versions: 1.40.1, 1.36.8 Build Dependencies cairo, harfbuzz Link Dependencies cairo, harfbuzz Description: Pango is a library for laying out and rendering of text, with an emphasis on internationalization. It can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the context of the GTK+ widget toolkit.

1.10.322 papi

Homepage: • http://icl.cs.utk.edu/papi/index.html Spack package: • papi/package.py Versions: 5.4.3, 5.4.1, 5.3.0 Description: PAPI provides the tool designer and application engineer with a consistent interface and methodology for use of the performance counter hardware found in most major microprocessors. PAPI enables software engineers to see, in near real time, the relation between software performance and processor events. In ad- dition Component PAPI provides access to a collection of components that expose performance measurement opportunites across the hardware and software stack.

1.10.323 paradiseo

Homepage: • http://paradiseo.gforge.inria.fr/ Spack package: • paradiseo/package.py Versions: head, dev-safe Build Dependencies doxygen, cmake, eigen, gnuplot, mpi, boost Link Dependencies boost, gnuplot, mpi Description: A C++ white-box object-oriented framework dedicated to the reusable design of metaheuristics.

204 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.324 parallel

Homepage: • http://www.gnu.org/software/parallel/ Spack package: • parallel/package.py Versions: 20160422, 20160322 Description: GNU parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input.

1.10.325 parallel-netcdf

Homepage: • https://trac.mcs.anl.gov/projects/parallel-netcdf Spack package: • parallel-netcdf/package.py Versions: 1.7.0, 1.6.1 Build Dependencies m4, mpi Link Dependencies mpi Description: Parallel netCDF (PnetCDF) is a library providing high-performance parallel I/O while still maintaining file-format compatibility with Unidata’s NetCDF.

1.10.326 paraver

Homepage: • http://www.bsc.es/computer-sciences/performance-tools/paraver Spack package: • paraver/package.py Versions: 4.5.3 Build Dependencies boost, wxpropgrid, wx Link Dependencies boost, wxpropgrid, wx Description: “A very powerful performance visualization and analysis tool based on traces that can be used to analyse any information that is expressed on its input trace format. Traces for parallel MPI, OpenMP and other programs can be genereated with Extrae.

1.10. Package List 205 Spack Documentation, Release 0.9

1.10.327 paraview

Homepage: • http://www.paraview.org Spack package: • paraview/package.py Versions: 5.0.0, 4.4.0 Build Dependencies bzip2, libtiff , cmake, qt, python, libxml2, zlib, freetype, jpeg, mpi, tcl, libpng Link Dependencies bzip2, libtiff , qt, python, libxml2, zlib, freetype, jpeg, mpi, tcl, libpng Run Dependencies py-matplotlib, py-numpy Description:

1.10.328 parmetis

Homepage: • http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview Spack package: • parmetis/package.py Versions: 4.0.3, 4.0.2 Build Dependencies metis, cmake, mpi Link Dependencies metis, mpi Description: ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices.

1.10.329 parmgridgen

Homepage: • http://www-users.cs.umn.edu/~moulitsa/software.html Spack package: • parmgridgen/package.py Versions: 1.0 Build Dependencies mpi Link Dependencies mpi Description: MGRIDGEN is a serial library written entirely in ANSI C that implements (serial) algorithms for obtain- ing a sequence of successive coarse grids that are well-suited for geometric multigrid methods. ParMGridGen is the parallel version of MGridGen

206 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.330 parpack

Homepage: • http://www.caam.rice.edu/software/ARPACK/download.html Spack package: • parpack/package.py Versions: 96 Build Dependencies lapack, blas, mpi Link Dependencies lapack, blas, mpi Description: ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.

1.10.331 patchelf

Homepage: • https://nixos.org/patchelf.html Spack package: • patchelf/package.py Versions: 0.8 Description: PatchELF is a small utility to modify the dynamic linker and RPATH of ELF executables.

1.10.332 pcre

Homepage: • http://www.pcre.org Spack package: • pcre/package.py Versions: 8.39, 8.38 Description: The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for imple- menting regular expression pattern matching using the same syntax and semantics as Perl 5.

1.10.333 pcre2

Homepage: • http://www.pcre.org Spack package: • pcre2/package.py

1.10. Package List 207 Spack Documentation, Release 0.9

Versions: 10.20 Description: The PCRE2 package contains Perl Compatible Regular Expression libraries. These are useful for im- plementing regular expression pattern matching using the same syntax and semantics as Perl 5.

1.10.334 pdt

Homepage: • https://www.cs.uoregon.edu/research/pdt/home.php Spack package: • pdt/package.py Versions: 3.22.1, 3.22, 3.21, 3.19, 3.18.1 Description: Program Database Toolkit (PDT) is a framework for analyzing source code written in several program- ming languages and for making rich program knowledge accessible to developers of static and dynamic analysis tools. PDT implements a standard program representation, the program database (PDB), that can be accessed in a uniform way through a class library supporting common PDB operations.

1.10.335 perl

Homepage: • http://www.perl.org Spack package: • perl/package.py Versions: 5.24.0, 5.22.2, 5.20.3 Description: Perl 5 is a highly capable, feature-rich programming language with over 27 years of development.

1.10.336 petsc

Homepage: • http://www.mcs.anl.gov/petsc/index.html Spack package: • petsc/package.py Versions: 3.7.2, 3.6.4, 3.6.3, 3.5.3, 3.5.2, 3.5.1, 3.4.4 Build Dependencies hypre, superlu-dist, hdf5, lapack, boost, blas, metis, mpi, python, mumps, scalapack, parmetis Link Dependencies hypre, superlu-dist, hdf5, lapack, boost, blas, metis, mpi, python, mumps, scalapack, parmetis Description: PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applica- tions modeled by partial differential equations.

208 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.337 pgi

Homepage: • http://www.pgroup.com/ Spack package: • pgi/package.py Versions: 16.5, 16.3 Description: PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows with support for debugging and profiling of local MPI processes. Note: The PGI compilers are licensed software. You will need to create an account on the PGI homepage and download PGI yourself. Once the download finishes, rename the file (which may contain information such as the architecture) to the format: pgi-.tar.gz. Spack will search your current directory for a file of this format. Alternatively, add this file to a mirror so that Spack can find it. For instructions on how to set up a mirror, see http://software.llnl.gov/spack/mirrors.html

1.10.338 pidx

Homepage: • http://www.cedmav.com/pidx Spack package: • pidx/package.py Versions: 1.0 Build Dependencies cmake, mpi Link Dependencies mpi Description: PIDX Parallel I/O Library. PIDX is an efficient parallel I/O library that reads and writes multiresolution IDX data files.

1.10.339 pixman

Homepage: • http://www.pixman.org Spack package: • pixman/package.py Versions: 0.32.6 Build Dependencies libpng, pkg-config Link Dependencies libpng Description: The Pixman package contains a library that provides low-level pixel manipulation features such as image compositing and trapezoid rasterization.

1.10. Package List 209 Spack Documentation, Release 0.9

1.10.340 pkg-config

Homepage: • http://www.freedesktop.org/wiki/Software/pkg-config/ Spack package: • pkg-config/package.py Versions: 0.29.1, 0.28 Description: pkg-config is a helper tool used when compiling applications and libraries

1.10.341 plumed

Homepage: • http://www.plumed.org/ Spack package: • plumed/package.py Versions: 2.2.3 Build Dependencies lapack, blas, zlib, gsl, mpi Link Dependencies lapack, blas, zlib, gsl, mpi Description: PLUMED is an open source library for free energy calculations in molecular systems which works together with some of the most popular molecular dynamics engines. Free energy calculations can be performed as a function of many order parameters with a particular focus on biological problems, using state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. The software, written in C++, can be easily interfaced with both fortran and C/C++ codes.

1.10.342 pmgr_collective

Homepage: • http://www.sourceforge.net/projects/pmgrcollective Spack package: • pmgr_collective/package.py Versions: 1.0 Description: PMGR_COLLECTIVE provides a scalable network for bootstrapping MPI jobs.

210 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.343 pngwriter

Homepage: • http://pngwriter.sourceforge.net/ Spack package: • pngwriter/package.py Versions: 0.5.6 Build Dependencies libpng, freetype, zlib, cmake Link Dependencies libpng, freetype, zlib Description: PNGwriter is a very easy to use open source graphics library that uses PNG as its output format. The interface has been designed to be as simple and intuitive as possible. It supports plotting and reading pixels in the RGB (red, green, blue), HSV (hue, saturation, value/brightness) and CMYK (cyan, magenta, yellow, black) colour spaces, basic shapes, scaling, bilinear interpolation, full TrueType antialiased and rotated text support, bezier curves, opening existing PNG images and more.

1.10.344 polymake

Homepage: • https://polymake.org/doku.php Spack package: • polymake/package.py Versions: 3.0r2, 3.0r1 Build Dependencies ppl, bliss, cddlib, lrslib, gmp, boost, mpfr Link Dependencies ppl, bliss, cddlib, lrslib, gmp, boost, mpfr Description: polymake is open source software for research in polyhedral geometry

1.10.345 porta

Homepage: • http://porta.zib.de Spack package: • porta/package.py Versions: 1.4.1 Build Dependencies libtool Description: PORTA is a collection of routines for analyzing polytopes and polyhedra

1.10. Package List 211 Spack Documentation, Release 0.9

1.10.346 postgresql

Homepage: • http://www.postgresql.org/ Spack package: • postgresql/package.py Versions: 9.5.3, 9.3.4 Build Dependencies readline, openssl Link Dependencies readline, openssl Description: PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.

1.10.347 ppl

Homepage: • http://bugseng.com/products/ppl/ Spack package: • ppl/package.py Versions: 1.1 Build Dependencies gmp Link Dependencies gmp Description: The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems. These abstractions include convex polyhedra, some special classes of polyhedra shapes that offer interesting complexity/precision tradeoffs, and grids which represent regularly spaced points that satisfy a set of linear congruence relations. The library also supports finite powersets and products of polyhedra and grids, a mixed integer linear programming problem solver using an exact-arithmetic version of the simplex algorithm, a parametric integer programming solver, and primitives for termination analysis via the automatic synthesis of linear ranking functions.

1.10.348 prank

Homepage: • http://wasabiapp.org/software/prank/ Spack package: • prank/package.py Versions: 150803 Build Dependencies bpp-suite, exonerate, mafft Link Dependencies bpp-suite, exonerate, mafft

212 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: A powerful multiple sequence alignment browser.

1.10.349 proj

Homepage: • https://github.com/OSGeo/proj.4/wiki Spack package: • proj/package.py Versions: 4.9.2, 4.9.1, 4.8.0, 4.7.0, 4.6.1 Description: Cartographic Projections

1.10.350 protobuf

Homepage: • https://developers.google.com/protocol-buffers Spack package: • protobuf/package.py Versions: 2.5.0 Description: Google’s data interchange format.

1.10.351 psi4

Homepage: • http://www.psicode.org/ Spack package: • psi4/package.py Versions: 0.5 Build Dependencies cmake, lapack, blas, py-numpy, python, boost Link Dependencies lapack, python, blas, boost Run Dependencies py-numpy Description: Psi4 is an open-source suite of ab initio quantum chemistry programs designed for efficient, high- accuracy simulations of a variety of molecular properties.

1.10. Package List 213 Spack Documentation, Release 0.9

1.10.352 py-3to2

Homepage: • https://pypi.python.org/pypi/3to2 Spack package: • py-3to2/package.py Versions: 1.1.1 Build Dependencies python Link Dependencies python Description: lib3to2 is a set of fixers that are intended to backport code written for Python version 3.x into Python version 2.x.

1.10.353 py-alabaster

Homepage: • https://pypi.python.org/pypi/alabaster Spack package: • py-alabaster/package.py Versions: 0.7.9 Build Dependencies python, py-setuptools Link Dependencies python Description: Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx documentation system.

1.10.354 py-argcomplete

Homepage: • https://pypi.python.org/pypi/argcomplete Spack package: • py-argcomplete/package.py Versions: 1.1.1 Build Dependencies python Link Dependencies python Description: Bash completion for argparse.

214 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.355 py-astroid

Homepage: • https://www.astroid.org/ Spack package: • py-astroid/package.py Versions: 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1 Build Dependencies python, py-six, py-logilab-common, py-setuptools Link Dependencies python Run Dependencies py-six, py-logilab-common Description:

1.10.356 py-astropy

Homepage: • http://www.astropy.org/ Spack package: • py-astropy/package.py Versions: 1.1.2, 1.1.post1 Build Dependencies py-scipy, py-scikit-image, py-pyyaml, python, libxml2, cfitsio, expat, py-h5py, py-numpy, py- pandas, py-beautifulsoup4, py-pytz, py-matplotlib Link Dependencies python, libxml2, cfitsio, expat Run Dependencies py-scipy, py-scikit-image, py-pyyaml, py-h5py, py-numpy, py-pandas, py-beautifulsoup4, py-pytz, py-matplotlib Description: The Astropy Project is a community effort to develop a single core package for Astronomy in Python and foster interoperability between Python astronomy packages.

1.10.357 py-autopep8

Homepage: • https://github.com/hhatto/autopep8 Spack package: • py-autopep8/package.py Versions: 1.2.2 Build Dependencies python, py-pep8, py-setuptools Link Dependencies python Run Dependencies py-pep8

1.10. Package List 215 Spack Documentation, Release 0.9

Description: Automatic pep8 formatter

1.10.358 py-babel

Homepage: • http://babel.pocoo.org/en/latest/ Spack package: • py-babel/package.py Versions: 2.3.4 Build Dependencies python, py-pytz, py-setuptools Link Dependencies python Run Dependencies py-pytz Description: Babel is an integrated collection of utilities that assist in internationalizing and localizing Python appli- cations, with an emphasis on web-based applications.

1.10.359 py-basemap

Homepage: • http://matplotlib.org/basemap/ Spack package: • py-basemap/package.py Versions: 1.0.7 Build Dependencies pil, python, geos, py-numpy, py-setuptools, py-matplotlib Link Dependencies python, geos Run Dependencies py-matplotlib, pil, py-numpy Description: The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.

1.10.360 py-beautifulsoup4

Homepage: • https://www.crummy.com/software/BeautifulSoup Spack package: • py-beautifulsoup4/package.py Versions: 4.4.1 Build Dependencies python

216 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Description: Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree.

1.10.361 py-biopython

Homepage: • http://biopython.org/wiki/Main_Page Spack package: • py-biopython/package.py Versions: 1.65 Build Dependencies python, py-mx, py-numpy Link Dependencies python Run Dependencies py-mx, py-numpy Description: A distributed collaborative effort to develop Python libraries and applications which address the needs of current and future work in bioinformatics.

1.10.362 py-blessings

Homepage: • https://github.com/erikrose/blessings Spack package: • py-blessings/package.py Versions: 1.6 Build Dependencies python, py-setuptools Link Dependencies python Description: A nicer, kinder way to write to the terminal

1.10.363 py-bottleneck

Homepage: • https://pypi.python.org/pypi/Bottleneck/1.0.0 Spack package: • py-bottleneck/package.py Versions: 1.0.0 Build Dependencies python, py-numpy

1.10. Package List 217 Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-numpy Description: A collection of fast NumPy array functions written in Cython.

1.10.364 py-cclib

Homepage: • https://cclib.github.io/ Spack package: • py-cclib/package.py Versions: 1.5 Build Dependencies python, py-numpy Link Dependencies python Run Dependencies py-numpy Description: Open source library for parsing and interpreting the results of computational chemistry packages

1.10.365 py-cffi

Homepage: • http://cffi.readthedocs.org/en/latest/ Spack package: • py-cffi/package.py Versions: 1.1.2 Build Dependencies python, libffi, py-pycparser, py-setuptools Link Dependencies python, libffi Run Dependencies py-pycparser Description: Foreign Function Interface for Python calling C code

1.10.366 py-coverage

Homepage: • http://nedbatchelder.com/code/coverage/ Spack package: • py-coverage/package.py Versions: 4.0a6

218 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies python, py-setuptools Link Dependencies python Description: Testing coverage checker for python

1.10.367 py-csvkit

Homepage: • http://csvkit.rtfd.org/ Spack package: • py-csvkit/package.py Versions: 0.9.1 Build Dependencies py-dbf , python, py-SQLAlchemy, py-dateutil, py-openpyxl, py-six, py-xlrd Link Dependencies python Run Dependencies py-openpyxl, py-SQLAlchemy, py-dbf , py-dateutil, py-six, py-xlrd Description: A library of utilities for working with CSV, the king of tabular file formats

1.10.368 py-cycler

Homepage: • http://matplotlib.org/cycler/ Spack package: • py-cycler/package.py Versions: 0.10.0 Build Dependencies python, py-six, py-setuptools Link Dependencies python Run Dependencies py-six Description: Composable style cycles.

1.10.369 py-cython

Homepage: • https://pypi.python.org/pypi/cython Spack package: • py-cython/package.py Versions: 0.23.5, 0.23.4, 0.22, 0.21.2

1.10. Package List 219 Spack Documentation, Release 0.9

Build Dependencies python Link Dependencies python Description: The Cython compiler for writing C extensions for the Python language.

1.10.370 py-dask

Homepage: • https://github.com/dask/dask/ Spack package: • py-dask/package.py Versions: 0.8.1 Build Dependencies python, py-setuptools Link Dependencies python Description: Minimal task scheduling abstraction

1.10.371 py-dateutil

Homepage: • https://pypi.python.org/pypi/dateutil Spack package: • py-dateutil/package.py Versions: 2.5.2, 2.4.2, 2.4.0 Build Dependencies python, py-six, py-setuptools Link Dependencies python Run Dependencies py-six Description: Extensions to the standard Python datetime module.

1.10.372 py-dbf

Homepage: • https://pypi.python.org/pypi/dbf Spack package: • py-dbf/package.py Versions: 0.96.005 Build Dependencies python

220 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Description: Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro .dbf files (including memos)

1.10.373 py-decorator

Homepage: • https://github.com/micheles/decorator Spack package: • py-decorator/package.py Versions: 4.0.9 Build Dependencies python, py-setuptools Link Dependencies python Description: The aim of the decorator module it to simplify the usage of decorators for the average programmer, and to popularize decorators by showing various non-trivial examples.

1.10.374 py-docutils

Homepage: • http://docutils.sourceforge.net/ Spack package: • py-docutils/package.py Versions: 0.12 Build Dependencies python Link Dependencies python Description: Docutils is an open-source text processing system for processing plaintext documentation into useful formats, such as HTML, LaTeX, man- pages, open-document or XML. It includes reStructuredText, the easy to read, easy to use, what-you-see-is-what-you-get plaintext markup language.

1.10.375 py-emcee

Homepage: • http://dan.iel.fm/emcee/current/ Spack package: • py-emcee/package.py Versions: 2.1.0 Build Dependencies python, py-numpy

1.10. Package List 221 Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-numpy Description: emcee is an MIT licensed pure-Python implementation of Goodman & Weare’s Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler.

1.10.376 py-epydoc

Homepage: • https://pypi.python.org/pypi/epydoc Spack package: • py-epydoc/package.py Versions: 3.0.1 Build Dependencies python Link Dependencies python Description: Epydoc is a tool for generating API documentation documentation for Python modules, based on their docstrings.

1.10.377 py-flake8

Homepage: • http://flake8.readthedocs.io/en/latest/ Spack package: • py-flake8/package.py Versions: 2.5.4 Build Dependencies python, py-setuptools Link Dependencies python Description: Flake8 is a wrapper around PyFlakes, pep8 and Ned Batchelder’s McCabe script.

1.10.378 py-funcsigs

Homepage: • https://pypi.python.org/pypi/funcsigs Spack package: • py-funcsigs/package.py Versions: 0.4 Build Dependencies python, py-setuptools

222 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Description: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2.

1.10.379 py-genders

Homepage: • https://github.com/chaos/genders Spack package: • py-genders/package.py Versions: 1.22 Build Dependencies python Link Dependencies python Description: Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters.

1.10.380 py-genshi

Homepage: • https://genshi.edgewall.org/ Spack package: • py-genshi/package.py Versions: 0.7, 0.6.1, 0.6 Build Dependencies python, py-setuptools Link Dependencies python Description: Python toolkit for generation of output for the web

1.10.381 py-gnuplot

Homepage: • http://gnuplot-py.sourceforge.net/ Spack package: • py-gnuplot/package.py Versions: 1.8 Build Dependencies python, py-numpy Link Dependencies python

1.10. Package List 223 Spack Documentation, Release 0.9

Run Dependencies py-numpy Description: Gnuplot.py is a Python package that allows you to create graphs from within Python using the gnuplot plotting program.

1.10.382 py-h5py

Homepage: • https://pypi.python.org/pypi/h5py Spack package: • py-h5py/package.py Versions: 2.6.0, 2.5.0, 2.4.0 Build Dependencies py-cython, hdf5, python, mpi, py-six, py-setuptools, py-numpy, py-mpi4py, pkg-config Link Dependencies python, mpi, py-mpi4py, hdf5 Run Dependencies py-six, py-numpy Description: The h5py package provides both a high- and low-level interface to the HDF5 library from Python.

1.10.383 py-imagesize

Homepage: • https://pypi.python.org/pypi/imagesize Spack package: • py-imagesize/package.py Versions: 0.7.1 Build Dependencies python, py-setuptools Link Dependencies python Description: Parses image file headers and returns image size. Supports PNG, JPEG, JPEG2000, and GIF image file formats.

1.10.384 py-iminuit

Homepage: • https://pypi.python.org/pypi/iminuit Spack package: • py-iminuit/package.py Versions: 1.2 Build Dependencies python, py-cython, py-numpy, py-setuptools, py-matplotlib

224 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-numpy, py-matplotlib Description: Interactive IPython-Friendly Minimizer based on SEAL Minuit2.

1.10.385 py-ipython

Homepage: • https://pypi.python.org/pypi/ipython Spack package: • py-ipython/package.py Versions: 3.1.0, 2.3.1 Build Dependencies python, py-pygments, py-setuptools Link Dependencies python Run Dependencies py-pygments, py-setuptools Description: IPython provides a rich toolkit to help you make the most out of using Python interactively.

1.10.386 py-jdcal

Homepage: • http://github.com/phn/jdcal Spack package: • py-jdcal/package.py Versions: 1.2 Build Dependencies python Link Dependencies python Description: Julian dates from proleptic Gregorian and Julian calendars

1.10.387 py-jinja2

Homepage: • http://jinja.pocoo.org/ Spack package: • py-jinja2/package.py Versions: 2.8, 2.7.3, 2.7.2, 2.7.1, 2.7 Build Dependencies python, py-markupsafe, py-babel, py-setuptools

1.10. Package List 225 Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-markupsafe, py-babel Description: Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.

1.10.388 py-lockfile

Homepage: • https://pypi.python.org/pypi/lockfile Spack package: • py-lockfile/package.py Versions: 0.10.2 Build Dependencies python, py-setuptools Link Dependencies python Description: The lockfile package exports a LockFile class which provides a simple API for locking files. Unlike the Windows msvcrt.locking function, the fcntl.lockf and flock functions, and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature of the link (on Unix) and mkdir (on Windows) system calls. An implementation based on SQLite is also provided, more as a demonstration of the possibilities it provides than as production-quality code.

1.10.389 py-logilab-common

Homepage: • https://www.logilab.org/project/logilab-common Spack package: • py-logilab-common/package.py Versions: 1.2.0 Build Dependencies python, py-six, py-setuptools Link Dependencies python Run Dependencies py-six Description: Common modules used by Logilab projects

226 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.390 py-mako

Homepage: • https://pypi.python.org/pypi/mako Spack package: • py-mako/package.py Versions: 1.0.1 Build Dependencies python, py-setuptools Link Dependencies python Description: A super-fast templating language that borrows the best ideas from the existing templating languages.

1.10.391 py-markupsafe

Homepage: • http://www.pocoo.org/projects/markupsafe/ Spack package: • py-markupsafe/package.py Versions: 0.23, 0.22, 0.21, 0.20, 0.19 Build Dependencies python, py-setuptools Link Dependencies python Description: MarkupSafe is a library for Python that implements a unicode string that is aware of HTML escaping rules and can be used to implement automatic string escaping. It is used by Jinja 2, the Mako templating engine, the Pylons web framework and many more.

1.10.392 py-matplotlib

Homepage: • https://pypi.python.org/pypi/matplotlib Spack package: • py-matplotlib/package.py Versions: 1.5.1, 1.4.3, 1.4.2 Build Dependencies py-pyparsing, freetype, py-ipython, ImageMagick, qt, python, qhull, py-setuptools, py-dateutil, py-numpy, py-six, py-pillow, py-mock, py-nose, tk, py-pytz, py-cycler, libpng, py-pyside, pkg-config Link Dependencies freetype, py-ipython, ImageMagick, qt, python, qhull, py-mock, py-nose, tk, libpng Run Dependencies py-pyparsing, py-pillow, py-dateutil, py-numpy, py-six, py-pytz, py-cycler, py-pyside Description: matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.

1.10. Package List 227 Spack Documentation, Release 0.9

1.10.393 py-meep

Homepage: • https://launchpad.net/python-meep Spack package: • py-meep/package.py Versions: 1.4.2 Build Dependencies py-scipy, python, swig, py-numpy, mpi, meep, py-matplotlib Link Dependencies python, swig, meep, mpi Run Dependencies py-scipy, py-matplotlib, py-numpy Description: Python-meep is a wrapper around libmeep. It allows the scripting of Meep-simulations with Python

1.10.394 py-mistune

Homepage: • http://mistune.readthedocs.org/en/latest/ Spack package: • py-mistune/package.py Versions: 0.7.1, 0.7, 0.6, 0.5.1, 0.5 Build Dependencies python, py-setuptools Link Dependencies python Description: Python markdown parser

1.10.395 py-mock

Homepage: • https://github.com/testing-cabal/mock Spack package: • py-mock/package.py Versions: 1.3.0 Build Dependencies python, py-pbr, py-setuptools Link Dependencies python Run Dependencies py-pbr Description: mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used.

228 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.396 py-mpi4py

Homepage: • https://pypi.python.org/pypi/mpi4py Spack package: • py-mpi4py/package.py Versions: 2.0.0, 1.3.1 Build Dependencies python, py-setuptools, mpi Link Dependencies python, mpi Description: This package provides Python bindings for the Message Passing Interface (MPI) standard. It is imple- mented on top of the MPI-1/MPI-2 specification and exposes an API which grounds on the standard MPI-2 C++ bindings.

1.10.397 py-mpmath

Homepage: • http://mpmath.org Spack package: • py-mpmath/package.py Versions: 0.19 Build Dependencies python Link Dependencies python Description: A Python library for arbitrary-precision floating-point arithmetic.

1.10.398 py-mx

Homepage: • http://www.egenix.com/products/python/mxBase/ Spack package: • py-mx/package.py Versions: 3.2.8 Build Dependencies python Link Dependencies python Description: The eGenix.com mx Base Distribution for Python is a collection of professional quality software tools which enhance Python’s usability in many important areas such as fast text searching, date/time processing and high speed data types.

1.10. Package List 229 Spack Documentation, Release 0.9

1.10.399 py-mysqldb1

Homepage: • https://github.com/farcepest/MySQLdb1 Spack package: • py-mysqldb1/package.py Versions: 1.2.5 Build Dependencies python, py-setuptools Link Dependencies python Description: Legacy mysql bindings for python

1.10.400 py-nestle

Homepage: • http://kbarbary.github.io/nestle/ Spack package: • py-nestle/package.py Versions: 0.1.1 Build Dependencies python, py-scipy, py-numpy Link Dependencies python Run Dependencies py-scipy, py-numpy Description: Nested sampling algorithms for evaluating Bayesian evidence.

1.10.401 py-netcdf

Homepage: • http://unidata.github.io/netcdf4-python Spack package: • py-netcdf/package.py Versions: 1.2.3.1 Build Dependencies python, py-cython, netcdf , py-numpy Link Dependencies python, netcdf Run Dependencies py-cython, py-numpy Description: Python interface to the netCDF Library.

230 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.402 py-networkx

Homepage: • http://networkx.github.io/ Spack package: • py-networkx/package.py Versions: 1.11 Build Dependencies python, py-decorator, py-setuptools Link Dependencies python Run Dependencies py-decorator Description: NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

1.10.403 py-nose

Homepage: • https://pypi.python.org/pypi/nose Spack package: • py-nose/package.py Versions: 1.3.7, 1.3.6, 1.3.4 Build Dependencies python, py-setuptools Link Dependencies python Description: nose extends the test loading and running features of unittest, making it easier to write, find and run tests.

1.10.404 py-numexpr

Homepage: • https://pypi.python.org/pypi/numexpr Spack package: • py-numexpr/package.py Versions: 2.5, 2.4.6 Build Dependencies python, py-numpy Link Dependencies python Run Dependencies py-numpy Description: Fast numerical expression evaluator for NumPy

1.10. Package List 231 Spack Documentation, Release 0.9

1.10.405 py-numpy

Homepage: • http://www.numpy.org/ Spack package: • py-numpy/package.py Versions: 1.11.0, 1.10.4, 1.9.2, 1.9.1 Build Dependencies python, lapack, blas, py-nose, py-setuptools Link Dependencies python, lapack, blas Description: NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object, sophisticated (broadcasting) functions, tools for integrating C/C++ and Fortran code, and useful linear algebra, Fourier transform, and random number capabilities

1.10.406 py-openpyxl

Homepage: • http://openpyxl.readthedocs.org/ Spack package: • py-openpyxl/package.py Versions: 2.4.0-a1 Build Dependencies python, py-jdcal, py-setuptools Link Dependencies python Run Dependencies py-jdcal Description: A Python library to read/write Excel 2007 xlsx/xlsm files

1.10.407 py-pandas

Homepage: • http://pandas.pydata.org/ Spack package: • py-pandas/package.py Versions: 0.18.0, 0.16.1, 0.16.0 Build Dependencies py-numexpr, py-bottleneck, python, py-dateutil, py-numpy, py-pytz, py-setuptools Link Dependencies python Run Dependencies py-pytz, py-numpy, py-numexpr, py-bottleneck, py-dateutil

232 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with relational or labeled data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python. Additionally, it has the broader goal of becoming the most powerful and flexible open source data analysis / manipulation tool available in any language.

1.10.408 py-pbr

Homepage: • https://pypi.python.org/pypi/pbr Spack package: • py-pbr/package.py Versions: 1.8.1 Build Dependencies python, py-setuptools Link Dependencies python Description: PBR is a library that injects some useful and sensible default behaviors into your setuptools run.

1.10.409 py-pep8

Homepage: • https://github.com/PyCQA/pycodestyle Spack package: • py-pep8/package.py Versions: 1.7.0 Build Dependencies python, py-setuptools Link Dependencies python Description: python pep8 format checker

1.10.410 py-periodictable

Homepage: • https://pypi.python.org/pypi/periodictable Spack package: • py-periodictable/package.py Versions: 1.4.1 Build Dependencies python, py-pyparsing, py-numpy Link Dependencies python

1.10. Package List 233 Spack Documentation, Release 0.9

Run Dependencies py-pyparsing, py-numpy Description: nose extends the test loading and running features of unittest, making it easier to write, find and run tests.

1.10.411 py-pexpect

Homepage: • https://pypi.python.org/pypi/pexpect Spack package: • py-pexpect/package.py Versions: 3.3 Build Dependencies python Link Dependencies python Description: Pexpect allows easy control of interactive console applications.

1.10.412 py-phonopy

Homepage: • http://atztogo.github.io/phonopy/index.html Spack package: • py-phonopy/package.py Versions: 1.10.0 Build Dependencies python, py-scipy, py-numpy, py-pyyaml, py-matplotlib Link Dependencies python Run Dependencies py-scipy, py-numpy, py-pyyaml, py-matplotlib Description: Phonopy is an open source package for phonon calculations at harmonic and quasi-harmonic levels.

1.10.413 py-pil

Homepage: • http://www.pythonware.com/products/pil/ Spack package: • py-pil/package.py Versions: 1.1.7 Build Dependencies python

234 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Description: The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.

1.10.414 py-pillow

Homepage: • https://python-pillow.org/ Spack package: • py-pillow/package.py Versions: 3.3.0.dev0, 3.2.0, 3.0.0 Build Dependencies freetype, libtiff , python, zlib, jpeg, py-setuptools, openjpeg, binutils, lcms Link Dependencies freetype, libtiff , python, zlib, jpeg, openjpeg, lcms Description: Pillow is a fork of the Python Imaging Library (PIL). It adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graph- ics capabilities.

1.10.415 py-ply

Homepage: • http://www.dabeaz.com/ply Spack package: • py-ply/package.py Versions: 3.8 Build Dependencies python Link Dependencies python Description: PLY is nothing more than a straightforward lex/yacc implementation.

1.10.416 py-pmw

Homepage: • https://pypi.python.org/pypi/Pmw Spack package: • py-pmw/package.py Versions: 2.0.0 Build Dependencies python

1.10. Package List 235 Spack Documentation, Release 0.9

Link Dependencies python Description: Pmw is a toolkit for building high-level compound widgets, or megawidgets, constructed using other widgets as component parts.

1.10.417 py-prettytable

Homepage: • https://code.google.com/archive/p/prettytable/ Spack package: • py-prettytable/package.py Versions: 0.7.2 Build Dependencies python, py-setuptools Link Dependencies python Description: PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables.

1.10.418 py-protobuf

Homepage: • https://developers.google.com/protocol-buffers/ Spack package: • py-protobuf/package.py Versions: 3.0.0b2, 2.6.1, 2.5.0, 2.4.1, 2.3.0 Build Dependencies python, py-setuptools Link Dependencies python Description: are Google’s language-neutral, platform-neutral, extensible mechanism for serializing structured data - think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

1.10.419 py-py2cairo

Homepage: • https://pypi.python.org/pypi/pycairo Spack package: • py-py2cairo/package.py Versions: 1.10.0

236 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies python, cairo, pixman Link Dependencies python, cairo, pixman Description: bindings for the Cairo for Python 2, to be used in Python.

1.10.420 py-py2neo

Homepage: • http://www.example.com Spack package: • py-py2neo/package.py Versions: 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4 Build Dependencies python, py-setuptools Link Dependencies python Description: FIXME: put a proper description of your package here.

1.10.421 py-pychecker

Homepage: • http://pychecker.sourceforge.net/ Spack package: • py-pychecker/package.py Versions: 0.8.19 Build Dependencies python Link Dependencies python Description:

1.10.422 py-pycparser

Homepage: • https://github.com/eliben/pycparser Spack package: • py-pycparser/package.py Versions: 2.13 Build Dependencies python, py-setuptools Link Dependencies python

1.10. Package List 237 Spack Documentation, Release 0.9

Description: A complete parser of the C language, written in pure python.

1.10.423 py-pydatalog

Homepage: • https://pypi.python.org/pypi/pyDatalog/ Spack package: • py-pydatalog/package.py Versions: 0.17.1 Build Dependencies python Link Dependencies python Description: pyDatalog adds logic programming to Python.

1.10.424 py-pyelftools

Homepage: • https://pypi.python.org/pypi/pyelftools Spack package: • py-pyelftools/package.py Versions: 0.23 Build Dependencies python Link Dependencies python Description: A pure-Python library for parsing and analyzing ELF files and DWARF debugging information

1.10.425 py-pygments

Homepage: • https://pypi.python.org/pypi/pygments Spack package: • py-pygments/package.py Versions: 2.1.3, 2.0.2, 2.0.1 Build Dependencies python, py-setuptools Link Dependencies python Description: Pygments is a syntax highlighting package written in Python.

238 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.426 py-pygobject

Homepage: • https://pypi.python.org/pypi/pygobject Spack package: • py-pygobject/package.py Versions: 2.28.3 Build Dependencies python, libffi, py-py2cairo, glib, gobject-introspection Link Dependencies python, libffi, py-py2cairo, glib, gobject-introspection Description: bindings for the GLib, and GObject, to be used in Python.

1.10.427 py-pygtk

Homepage: • http://www.pygtk.org/ Spack package: • py-pygtk/package.py Versions: 2.24.0 Build Dependencies glib, py-pygobject, python, cairo, py-py2cairo, gtkplus, libffi Link Dependencies glib, py-pygobject, python, cairo, py-py2cairo, gtkplus, libffi Description: bindings for the Gtk in Python

1.10.428 py-pylint

Homepage: • https://pypi.python.org/pypi/pylint Spack package: • py-pylint/package.py Versions: 1.4.3, 1.4.1 Build Dependencies python, py-nose, py-setuptools Link Dependencies python Description: array processing for numbers, strings, records, and objects.

1.10. Package List 239 Spack Documentation, Release 0.9

1.10.429 py-pypar

Homepage: • http://code.google.com/p/pypar/ Spack package: • py-pypar/package.py Versions: 2.1.5_108 Build Dependencies python, mpi Link Dependencies python, mpi Description: Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using MPI.

1.10.430 py-pyparsing

Homepage: • https://pypi.python.org/pypi/pyparsing Spack package: • py-pyparsing/package.py Versions: 2.0.3 Build Dependencies python Link Dependencies python Description: A Python Parsing Module.

1.10.431 py-pyqt

Homepage: • http://www.riverbankcomputing.com/software/pyqt/intro Spack package: • py-pyqt/package.py Versions: 4.11.3 Build Dependencies python, py-sip, qt Link Dependencies python, qt Run Dependencies py-sip Description: PyQt is a set of Python v2 and v3 bindings for Digia’s Qt and runs on all plat- forms supported by Qt including Windows, MacOS/X and Linux.

240 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.432 py-pyside

Homepage: • https://pypi.python.org/pypi/pyside Spack package: • py-pyside/package.py Versions: 1.2.4, 1.2.2 Build Dependencies cmake, qt, python, libxml2, py-setuptools, libxslt Link Dependencies python, libxml2, qt, libxslt Description: Python bindings for Qt.

1.10.433 py-pytables

Homepage: • http://www.pytables.org/ Spack package: • py-pytables/package.py Versions: 3.2.2 Build Dependencies py-numexpr, hdf5, python, py-numpy, py-cython, py-setuptools Link Dependencies python, hdf5 Run Dependencies py-cython, py-numexpr, py-numpy Description: PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data.

1.10.434 py-python-daemon

Homepage: • https://pypi.python.org/pypi/python-daemon/ Spack package: • py-python-daemon/package.py Versions: 2.0.5 Build Dependencies python, py-lockfile, py-setuptools Link Dependencies python Run Dependencies py-lockfile

1.10. Package List 241 Spack Documentation, Release 0.9

Description: Library to implement a well-behaved Unix daemon process. This library implements the well-behaved daemon specification of PEP Standard daemon process. A well-behaved Unix daemon process is tricky to get right, but the required steps are much the same for every daemon program. A DaemonContext instance holds the behaviour and configured process environment for the program; use the instance as a context manager to enter a daemon state.

1.10.435 py-pytz

Homepage: • https://pypi.python.org/pypi/pytz Spack package: • py-pytz/package.py Versions: 2016.6.1, 2016.3, 2015.4, 2014.10 Build Dependencies python, py-setuptools Link Dependencies python Description: World timezone definitions, modern and historical.

1.10.436 py-pyyaml

Homepage: • http://pyyaml.org/wiki/PyYAML Spack package: • py-pyyaml/package.py Versions: 3.11 Build Dependencies python Link Dependencies python Description: PyYAML is a YAML parser and emitter for Python.

1.10.437 py-restview

Homepage: • https://mg.pov.lt/restview/ Spack package: • py-restview/package.py Versions: 2.6.1 Build Dependencies python, py-docutils, py-pygments

242 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-docutils, py-pygments Description: A viewer for ReStructuredText documents that renders them on the fly.

1.10.438 py-rpy2

Homepage: • https://pypi.python.org/pypi/rpy2 Spack package: • py-rpy2/package.py Versions: 2.5.6, 2.5.4 Build Dependencies python, R, py-setuptools Link Dependencies python, R Description: rpy2 is a redesign and rewrite of rpy. It is providing a low-level interface to R from Python, a proposed high-level interface, including wrappers to graphical libraries, as well as R-like structures and functions.

1.10.439 py-scientificpython

Homepage: • https://sourcesup.renater.fr/projects/scientific-py/ Spack package: • py-scientificpython/package.py Versions: 2.8.1 Build Dependencies python Link Dependencies python Description: ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization.

1.10.440 py-scikit-image

Homepage: • http://scikit-image.org/ Spack package: • py-scikit-image/package.py Versions: 0.12.3 Build Dependencies py-scipy, pil, python, py-six, py-dask, py-networkx, py-setuptools, py-matplotlib

1.10. Package List 243 Spack Documentation, Release 0.9

Link Dependencies python Run Dependencies py-scipy, pil, py-six, py-dask, py-networkx, py-matplotlib Description: Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipula- tion, object detection, etc.

1.10.441 py-scikit-learn

Homepage: • https://pypi.python.org/pypi/scikit-learn Spack package: • py-scikit-learn/package.py Versions: 0.17.1, 0.16.1, 0.15.2 Build Dependencies python, py-scipy, py-setuptools, py-numpy Link Dependencies python Run Dependencies py-scipy, py-numpy Description:

1.10.442 py-scipy

Homepage: • http://www.scipy.org/ Spack package: • py-scipy/package.py Versions: 0.17.0, 0.15.1, 0.15.0 Build Dependencies python, py-nose, py-numpy Link Dependencies python Run Dependencies py-numpy Description: Scientific Library for Python.

1.10.443 py-setuptools

Homepage: • https://pypi.python.org/pypi/setuptools Spack package: • py-setuptools/package.py

244 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Versions: 25.2.0, 20.7.0, 20.6.7, 20.5, 19.2, 18.1, 16.0, 11.3.1 Build Dependencies python Link Dependencies python Description: A Python utility that aids in the process of downloading, building, upgrading, installing, and uninstalling Python packages.

1.10.444 py-shiboken

Homepage: • https://shiboken.readthedocs.org/ Spack package: • py-shiboken/package.py Versions: 1.2.2 Build Dependencies python, libxml2, cmake, qt, py-setuptools Link Dependencies python, libxml2, qt Description: Shiboken generates bindings for C++ libraries using CPython.

1.10.445 py-sip

Homepage: • http://www.riverbankcomputing.com/software/sip/intro Spack package: • py-sip/package.py Versions: 4.16.7, 4.16.5 Build Dependencies python Link Dependencies python Description: SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.

1.10.446 py-six

Homepage: • https://pypi.python.org/pypi/six Spack package: • py-six/package.py Versions: 1.10.0, 1.9.0

1.10. Package List 245 Spack Documentation, Release 0.9

Build Dependencies python, py-setuptools Link Dependencies python Description: Python 2 and 3 compatibility utilities.

1.10.447 py-sncosmo

Homepage: • http://sncosmo.readthedocs.io/ Spack package: • py-sncosmo/package.py Versions: 1.2.0 Build Dependencies py-scipy, py-emcee, python, py-nestle, py-numpy, py-astropy, py-iminuit, py-matplotlib Link Dependencies python Run Dependencies py-scipy, py-emcee, py-nestle, py-numpy, py-astropy, py-iminuit, py-matplotlib Description: SNCosmo is a Python library for high-level supernova cosmology analysis.

1.10.448 py-snowballstemmer

Homepage: • https://pypi.python.org/pypi/snowballstemmer Spack package: • py-snowballstemmer/package.py Versions: 1.2.1 Build Dependencies python Link Dependencies python Description: This package provides 16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms.

1.10.449 py-sphinx

Homepage: • http://sphinx-doc.org Spack package: • py-sphinx/package.py Versions: 1.4.5, 1.3.1

246 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies py-pygments, python, py-setuptools, py-alabaster, py-sphinx-rtd-theme, py-six, py-babel, py- snowballstemmer, py-docutils, py-jinja2, py-imagesize Link Dependencies python Run Dependencies py-babel, py-setuptools, py-alabaster, py-sphinx-rtd-theme, py-six, py-pygments, py- snowballstemmer, py-docutils, py-jinja2, py-imagesize Description: Sphinx Documentation Generator.

1.10.450 py-sphinx-rtd-theme

Homepage: • https://pypi.python.org/pypi/sphinx_rtd_theme Spack package: • py-sphinx-rtd-theme/package.py Versions: 0.1.10a0 Build Dependencies python, py-setuptools Link Dependencies python Description: ReadTheDocs.org theme for Sphinx.

1.10.451 py-SQLAlchemy

Homepage: • http://www.sqlalchemy.org/ Spack package: • py-SQLAlchemy/package.py Versions: 1.0.12 Build Dependencies python Link Dependencies python Description: The Python SQL Toolkit and Object Relational Mapper

1.10.452 py-storm

Homepage: • https://storm.canonical.com/ Spack package: • py-storm/package.py Versions: 0.20

1.10. Package List 247 Spack Documentation, Release 0.9

Build Dependencies python, py-setuptools Link Dependencies python Description: Storm is an object-relational mapper (ORM) for Python

1.10.453 py-sympy

Homepage: • https://pypi.python.org/pypi/sympy Spack package: • py-sympy/package.py Versions: 1.0, 0.7.6 Build Dependencies python, py-mpmath Link Dependencies python, py-mpmath Description: SymPy is a Python library for symbolic mathematics.

1.10.454 py-tappy

Homepage: • https://github.com/mblayman/tappy Spack package: • py-tappy/package.py Versions: 1.6 Build Dependencies python, py-setuptools Link Dependencies python Description: Python TAP interface module for unit tests

1.10.455 py-tuiview

Homepage: • https://bitbucket.org/chchrsc/tuiview Spack package: • py-tuiview/package.py Versions: 1.1.7 Build Dependencies python, py-pyqt, gdal, py-numpy Link Dependencies python, gdal

248 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Run Dependencies py-pyqt, py-numpy Description: TuiView is a lightweight raster GIS with powerful raster attribute table manipulation abilities.

1.10.456 py-twisted

Homepage: • https://twistedmatrix.com/ Spack package: • py-twisted/package.py Versions: 15.4.0, 15.3.0 Build Dependencies python, py-setuptools Link Dependencies python Description: An asynchronous networking framework written in Python

1.10.457 py-unittest2

Homepage: • https://pypi.python.org/pypi/unittest2 Spack package: • py-unittest2/package.py Versions: 1.1.0 Build Dependencies python, py-setuptools Link Dependencies python Description: unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7 and onwards.

1.10.458 py-unittest2py3k

Homepage: • https://pypi.python.org/pypi/unittest2py3k Spack package: • py-unittest2py3k/package.py Versions: 0.5.1 Build Dependencies python, py-setuptools Link Dependencies python

1.10. Package List 249 Spack Documentation, Release 0.9

Description: unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7 and 3.2. This is a Python 3 compatible version of unittest2.

1.10.459 py-urwid

Homepage: • http://urwid.org/ Spack package: • py-urwid/package.py Versions: 1.3.0 Build Dependencies python, py-setuptools Link Dependencies python Description: A full-featured console UI library

1.10.460 py-virtualenv

Homepage: • http://virtualenv.readthedocs.org/projects/virtualenv/ Spack package: • py-virtualenv/package.py Versions: 15.0.1, 13.0.1, 1.11.6 Build Dependencies python, py-setuptools Link Dependencies python Description: virtualenv is a tool to create isolated Python environments.

1.10.461 py-wcsaxes

Homepage: • http://wcsaxes.readthedocs.io/en/latest/index.html Spack package: • py-wcsaxes/package.py Versions: 0.8 Build Dependencies python, py-astropy, py-numpy, py-matplotlib Link Dependencies python Run Dependencies py-astropy, py-numpy, py-matplotlib

250 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: WCSAxes is a framework for making plots of Astronomical data in Matplotlib.

1.10.462 py-wheel

Homepage: • https://pypi.python.org/pypi/wheel Spack package: • py-wheel/package.py Versions: 0.26.0 Build Dependencies python, py-setuptools Link Dependencies python Description: A built-package format for Python.

1.10.463 py-xlrd

Homepage: • http://www.python-excel.org/ Spack package: • py-xlrd/package.py Versions: 0.9.4 Build Dependencies python Link Dependencies python Description: Library for developers to extract data from Microsoft Excel (tm) spreadsheet files

1.10.464 py-yapf

Homepage: • https://github.com/google/yapf Spack package: • py-yapf/package.py Versions: 0.2.1 Build Dependencies python, py-setuptools Link Dependencies python Description: Yet Another Python Formatter

1.10. Package List 251 Spack Documentation, Release 0.9

1.10.465 python

Homepage: • http://www.python.org Spack package: • python/package.py Versions: 3.5.2, 3.5.1, 3.5.0, 3.4.3, 3.3.6, 3.2.6, 3.1.5, 2.7.12, 2.7.11, 2.7.10, 2.7.9, 2.7.8 Build Dependencies bzip2, ncurses, zlib, openssl, sqlite, tcl, tk, readline Link Dependencies bzip2, ncurses, zlib, openssl, sqlite, tcl, tk, readline Description: The Python programming language.

1.10.466 qhull

Homepage: • http://www.qhull.org Spack package: • qhull/package.py Versions: 2015.2, 2012.1 Build Dependencies cmake Description: Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, furt hest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. It handles roundoff errors from floating point arithmetic. It computes volumes, surface areas, and approximations to the convex hull.

1.10.467 qrupdate

Homepage: • http://sourceforge.net/projects/qrupdate/ Spack package: • qrupdate/package.py Versions: 1.1.2 Build Dependencies lapack, blas Link Dependencies lapack, blas Description: qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions.

252 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.468 qt

Homepage: • http://qt.io Spack package: • qt/package.py Versions: 5.7.0, 5.5.1, 5.4.2, 5.4.0, 5.3.2, 5.2.1, 4.8.6, 3.3.8b Build Dependencies zlib, libxml2, dbus, libtiff , jpeg, gtkplus, libxcb, libpng, libmng, mesa Link Dependencies zlib, libxml2, dbus, libtiff , jpeg, gtkplus, libxcb, libpng, libmng, mesa Description: Qt is a comprehensive cross-platform C++ application framework.

1.10.469 qt-creator

Homepage: • https://www.qt.io/ide/ Spack package: • qt-creator/package.py Versions: 4.1.0 Build Dependencies qt Link Dependencies qt Description: The Qt Creator IDE.

1.10.470 qthreads

Homepage: • http://www.cs.sandia.gov/qthreads/ Spack package: • qthreads/package.py Versions: 1.10 Build Dependencies hwloc, autoconf Link Dependencies hwloc Description: The qthreads API is designed to make using large numbers of threads convenient and easy, and to allow portable access to threading constructs used in massively parallel shared memory environments. The API maps well to both MTA-style threading and PIM-style threading, and we provide an implementation of this interface in both a standard SMP context as well as the SST context. The qthreads API provides access to full/empty-bit (FEB) semantics, where every word of memory can be marked either full or empty, and a thread can wait for any word to attain either state.

1.10. Package List 253 Spack Documentation, Release 0.9

1.10.471R

Homepage: • https://www.r-project.org Spack package: • R/package.py Versions: 3.3.1, 3.3.0, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2 Build Dependencies glib, pcre, bzip2, zlib, pango, jdk, lapack, cairo, blas, libtiff , freetype, jpeg, ncurses, tcl, tk, readline, curl, icu Link Dependencies glib, pcre, bzip2, zlib, pango, jdk, lapack, cairo, blas, libtiff , freetype, jpeg, ncurses, tcl, tk, readline, curl, icu Description: 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 informa- tion.

1.10.472 r-abind

Homepage: • https://cran.r-project.org/ Spack package: • r-abind/package.py Versions: 1.4-3 Build Dependencies R Link Dependencies R Description: Combine multidimensional arrays into a single array. This is a generalization of ‘cbind’ and ‘rbind’. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions ‘adrop’, ‘asub’, and ‘afill’ for manipulating, extracting and replacing data in arrays.

1.10.473 r-assertthat

Homepage: • https://cran.r-project.org/web/packages/assertthat/index.html Spack package: • r-assertthat/package.py Versions: 0.1 Build Dependencies R Link Dependencies R

254 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: assertthat is an extension to stopifnot() that makes it easy to declare the pre and post conditions that you code should satisfy, while also producing friendly error messages so that your users know what they’ve done wrong.

1.10.474 r-base64enc

Homepage: • http://www.rforge.net/base64enc Spack package: • r-base64enc/package.py Versions: 0.1-3 Build Dependencies R Link Dependencies R Description: This package provides tools for handling base64 encoding. It is more flexible than the orphaned base64 package.

1.10.475 r-bh

Homepage: • https://cran.r-project.org/web/packages/BH/index.html Spack package: • r-bh/package.py Versions: 1.60.0-2 Build Dependencies R Link Dependencies R Description: Boost provides free peer-reviewed portable C++ source libraries. A large part of Boost is provided as C++ template code which is resolved entirely at compile-time without linking. This package aims to provide the most useful subset of Boost libraries for template use among CRAN package. By placing these libraries in this package, we offer a more efficient distribution system for CRAN as replication of this code in the sources of other packages is avoided. As of release 1.60.0-2, the following Boost libraries are included: ‘algorithm’ ‘any’ ‘bimap’ ‘bind’ ‘circular_buffer’ ‘concept’ ‘config’ ‘container’ ‘date’_’time’ ‘detail’ ‘dynamic_bitset’ ‘excep- tion’ ‘filesystem’ ‘flyweight’ ‘foreach’ ‘functional’ ‘fusion’ ‘geometry’ ‘graph’ ‘heap’ ‘icl’ ‘integer’ ‘interpro- cess’ ‘intrusive’ ‘io’ ‘iostreams’ ‘iterator’ ‘math’ ‘move’ ‘mpl’ ‘multiprcecision’ ‘numeric’ ‘pending’ ‘phoenix’ ‘preprocessor’ ‘random’ ‘range’ ‘smart_ptr’ ‘spirit’ ‘tuple’ ‘type_trains’ ‘typeof’ ‘unordered’ ‘utility’ ‘uuid’.

1.10. Package List 255 Spack Documentation, Release 0.9

1.10.476 r-BiocGenerics

Homepage: • https://bioconductor.org/packages/BiocGenerics/ Spack package: • r-BiocGenerics/package.py Versions: bioc-3.3, bioc-3.2 Build Dependencies R Link Dependencies R Description: S4 generic functions needed by many Bioconductor packages.

1.10.477 r-boot

Homepage: • https://cran.r-project.org/package=boot Spack package: • r-boot/package.py Versions: 1.3-18 Build Dependencies R Link Dependencies R Description: Functions and datasets for bootstrapping from the book “Bootstrap Methods and Their Application” by A. C. Davison and D. V. Hinkley (1997, CUP), originally written by Angelo Canty for S.

1.10.478 r-brew

Homepage: • https://cran.r-project.org/package=brew Spack package: • r-brew/package.py Versions: 1.0-6 Build Dependencies R Link Dependencies R Description: brew implements a templating framework for mixing text and R code for report generation. brew tem- plate syntax is similar to PHP, Ruby’s erb module, Java Server Pages, and Python’s psp module.

256 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.479 r-car

Homepage: • https://r-forge.r-project.org/projects/car/ Spack package: • r-car/package.py Versions: 2.1-2 Build Dependencies r-nnet, r-mass, R, r-pbkrtest, r-quantreg, r-mgcv Link Dependencies R Run Dependencies r-pbkrtest, r-mass, r-quantreg, r-mgcv, r-nnet Description: Functions and Datasets to Accompany J. Fox and S. Weisberg, An R Companion to Applied Regression, Second Edition, Sage, 2011.

1.10.480 r-caret

Homepage: • https://github.com/topepo/caret/ Spack package: • r-caret/package.py Versions: 6.0-70 Build Dependencies r-plyr, r-lattice, r-foreach, r-reshape2, r-car, R, r-nlme, r-ggplot2 Link Dependencies R Run Dependencies r-plyr, r-lattice, r-foreach, r-reshape2, r-car, r-nlme, r-ggplot2 Description: Misc functions for training and plotting classification and regression models.

1.10.481 r-chron

Homepage: • https://cran.r-project.org/package=chron Spack package: • r-chron/package.py Versions: 2.3-47 Build Dependencies R Link Dependencies R Description: Chronological objects which can handle dates and times.

1.10. Package List 257 Spack Documentation, Release 0.9

1.10.482 r-class

Homepage: • http://www.stats.ox.ac.uk/pub/MASS4/ Spack package: • r-class/package.py Versions: 7.3-14 Build Dependencies r-mass, R Link Dependencies R Run Dependencies r-mass Description: Various functions for classification, including k-nearest neighbour, Learning Vector Quantization and Self-Organizing Maps.

1.10.483 r-cluster

Homepage: • https://cran.r-project.org/web/packages/cluster/index.html Spack package: • r-cluster/package.py Versions: 2.0.4 Build Dependencies R Link Dependencies R Description: Methods for Cluster analysis. Much extended the original from Peter Rousseeuw, Anja Struyf and Mia Hubert, based on Kaufman and Rousseeuw (1990) “Finding Groups in Data”.

1.10.484 r-codetools

Homepage: • https://cran.r-project.org/web/packages/codetools/index.html Spack package: • r-codetools/package.py Versions: 0.2-14 Build Dependencies R Link Dependencies R Description: Code analysis tools for R.

258 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.485 r-colorspace

Homepage: • https://cran.r-project.org/web/packages/colorspace/index.html Spack package: • r-colorspace/package.py Versions: 1.2-6 Build Dependencies R Link Dependencies R Description: Carries out mapping between assorted color spaces including RGB, HSV, HLS, CIEXYZ, CIELUV, HCL (polar CIELUV), CIELAB and polar CIELAB. Qualitative, sequential, and diverging color palettes based on HCL colors are provided.

1.10.486 r-crayon

Homepage: • https://github.com/gaborcsardi/crayon Spack package: • r-crayon/package.py Versions: 1.3.2 Build Dependencies R Link Dependencies R Description: Colored terminal output on terminals that support ‘ANSI’ color and highlight codes. It also works in ‘Emacs’ ‘ESS’. ‘ANSI’ color support is automatically detected. Colors and highlighting can be combined and nested. New styles can also be created easily. This package was inspired by the ‘chalk’ ‘JavaScript’ project.

1.10.487 r-cubature

Homepage: • https://cran.r-project.org/package=cubature Spack package: • r-cubature/package.py Versions: 1.1-2 Build Dependencies R Link Dependencies R Description: Adaptive multivariate integration over hypercubes

1.10. Package List 259 Spack Documentation, Release 0.9

1.10.488 r-curl

Homepage: • https://github.com/jeroenooms/curl Spack package: • r-curl/package.py Versions: 1.0, 0.9.7 Build Dependencies curl, R Link Dependencies curl, R Description: 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, au- thentication, 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.

1.10.489 r-datatable

Homepage: • https://github.com/Rdatatable/data.table/wiki Spack package: • r-datatable/package.py Versions: 1.9.6 Build Dependencies R, r-chron Link Dependencies R Run Dependencies r-chron Description: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns and a fast file reader (fread). Offers a natural and flexible syntax, for faster development.

1.10.490 r-dbi

Homepage: • https://github.com/rstats-db/DBI Spack package: • r-dbi/package.py Versions: 0.4-1 Build Dependencies R

260 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies R Description: A database interface definition for communication between R and relational database management sys- tems. All classes in this package are virtual and need to be extended by the various R/DBMS implementations.

1.10.491 r-devtools

Homepage: • https://github.com/hadley/devtools Spack package: • r-devtools/package.py Versions: 1.11.1 Build Dependencies r-withr, r-rstudioapi, r-httr, r-whisker, r-git2r, r-jsonlite, R, r-digest, r-memoise Link Dependencies R Run Dependencies r-withr, r-rstudioapi, r-httr, r-whisker, r-git2r, r-jsonlite, r-digest, r-memoise Description: Collection of package development tools.

1.10.492 r-diagrammer

Homepage: • https://github.com/rich-iannone/DiagrammeR Spack package: • r-diagrammer/package.py Versions: 0.8.4 Build Dependencies r-rstudioapi, r-influencer, r-igraph, R, r-htmlwidgets, r-stringr, r-visnetwork, r-scales Link Dependencies R Run Dependencies r-rstudioapi, r-influencer, r-igraph, r-htmlwidgets, r-stringr, r-visnetwork, r-scales Description: Create graph diagrams and flowcharts using R.

1.10.493 r-dichromat

Homepage: • https://cran.r-project.org/web/packages/dichromat/index.html Spack package: • r-dichromat/package.py Versions: 2.0-0

1.10. Package List 261 Spack Documentation, Release 0.9

Build Dependencies R Link Dependencies R Description: Collapse red-green or green-blue distinctions to simulate the effects of different types of color-blindness.

1.10.494 r-digest

Homepage: • http://dirk.eddelbuettel.com/code/digest.html Spack package: • r-digest/package.py Versions: 0.6.9 Build Dependencies R Link Dependencies R Description: 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 ‘()’ 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.

1.10.495 r-doparallel

Homepage: • https://cran.r-project.org/web/packages/doParallel/index.html Spack package: • r-doparallel/package.py Versions: 1.0.10 Build Dependencies R, r-iterators, r-foreach Link Dependencies R Run Dependencies r-iterators, r-foreach Description: Provides a parallel backend for the %dopar% function using the parallel package.

262 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.496 r-dplyr

Homepage: • https://github.com/hadley/dplyr Spack package: • r-dplyr/package.py Versions: 0.5.0 Build Dependencies r-tibble, r-assertthat, r-lazyeval, r-R6, R, r-bh, r-dbi, r-rcpp, r-magrittr Link Dependencies R Run Dependencies r-tibble, r-dbi, r-assertthat, r-lazyeval, r-bh, r-R6, r-rcpp, r-magrittr Description: A fast, consistent tool for working with data like objects, both in memory and out of memory.

1.10.497 r-dt

Homepage: • http://rstudio.github.io/DT Spack package: • r-dt/package.py Versions: 0.1 Build Dependencies R, r-htmltools, r-htmlwidgets, r-magrittr Link Dependencies R Run Dependencies r-htmltools, r-htmlwidgets, r-magrittr Description: Data objects in R can be rendered as HTML tables using the JavaScript library ‘DataTables’ (typically via R Markdown or Shiny). The ‘DataTables’ library has been included in this R package. The package name ‘DT’ is an abbreviation of ‘DataTables’.

1.10.498 r-dygraphs

Homepage: • https://cran.r-project.org/web/packages/dygraphs/index.html Spack package: • r-dygraphs/package.py Versions: 0.9 Build Dependencies r-zoo, R, r-magrittr, r-htmlwidgets, r-xts Link Dependencies R Run Dependencies r-zoo, r-xts, r-magrittr, r-htmlwidgets

1.10. Package List 263 Spack Documentation, Release 0.9

Description: An R interface to the ‘dygraphs’ JavaScript charting library (a copy of which is included in the package). Provides rich facilities for charting time-series data in R, including highly configurable series- and axis- display and interactive features like zoom/pan and series/point highlighting.

1.10.499 r-e1071

Homepage: • https://cran.r-project.org/package=e1071 Spack package: • r-e1071/package.py Versions: 1.6-7 Build Dependencies R, r-class Link Dependencies R Run Dependencies r-class Description: Functions for latent class analysis, short time Fourier transform, fuzzy clustering, support vector ma- chines, shortest path computation, bagged clustering, naive Bayes classifier, ...

1.10.500 r-filehash

Homepage: • https://cran.r-project.org/ Spack package: • r-filehash/package.py Versions: 2.3 Build Dependencies R Link Dependencies R Description: Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple interface is provided for inserting, retrieving, and deleting data from the database. Utilities are provided that allow ‘filehash’ databases to be treated much like environments and lists are already used in R. These utilities are provided to encourage interactive and exploratory analysis on large datasets. Three different file formats for representing the database are currently available and new formats can easily be incorporated by third parties for use in the ‘filehash’ framework.

264 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.501 r-foreach

Homepage: • https://cran.r-project.org/web/packages/foreach/index.html Spack package: • r-foreach/package.py Versions: 1.4.3 Build Dependencies R, r-codetools, r-iterators Link Dependencies R Run Dependencies r-codetools, r-iterators Description: Support for the foreach looping construct. Foreach is an idiom that allows for iterating over elements in a collection, without the use of an explicit loop counter. This package in particular is intended to be used for its return value, rather than for its side effects. In that sense, it is similar to the standard lapply function, but doesn’t require the evaluation of a function. Using foreach without side effects also facilitates executing the loop in parallel.

1.10.502 r-foreign

Homepage: • https://cran.r-project.org/web/packages/foreign/index.html Spack package: • r-foreign/package.py Versions: 0.8-66 Build Dependencies R Link Dependencies R Description: Functions for reading and writing data stored by some versions of Epi Info, Minitab, S, SAS, SPSS, Stata, Systat and and for reading and writing some dBase files.

1.10.503 r-gdata

Homepage: • https://cran.r-project.org/package=gdata Spack package: • r-gdata/package.py Versions: 2.17.0 Build Dependencies R, r-gtools Link Dependencies R Run Dependencies r-gtools

1.10. Package List 265 Spack Documentation, Release 0.9

Description: Various R programming tools for data manipulation, including: - medical unit conversions (‘Con- vertMedUnits’, ‘MedUnits’), - combining objects (‘bindData’, ‘cbindX’, ‘combine’, ‘interleave’), - char- acter vector operations (‘centerText’, ‘startsWith’, ‘trim’), - factor manipulation (‘levels’, ‘reorder.factor’, ‘mapLevels’), - obtaining information about R objects (‘object.size’, ‘elem’, ‘env’, ‘humanReadable’, ‘is.what’, ‘ll’, ‘keep’, ‘ls.funs’, ‘Args’,’nPairs’, ‘nobs’), - manipulating MS- Excel formatted files (‘read.xls’, ‘installXL- SXsupport’, ‘sheetCount’, ‘xlsFormats’), - generating fixed-width format files (‘write.fwf’), - extricating com- ponents of date & time objects (‘getYear’, ‘getMonth’, ‘getDay’, ‘getHour’, ‘getMin’, ‘getSec’), - operations on columns of data frames (‘matchcols’, ‘rename.vars’), - matrix operations (‘unmatrix’, ‘upperTriangle’, ‘low- erTriangle’), - operations on vectors (‘case’, ‘unknownToNA’, ‘duplicated2’, ‘trimSum’), - operations on data frames (‘frameApply’, ‘wideByFactor’), - value of last evaluated expression (‘ans’), and - wrapper for ‘sample’ that ensures consistent behavior for both scalar and vector arguments (‘resample’).

1.10.504 r-geosphere

Homepage: • https://cran.r-project.org/package=geosphere Spack package: • r-geosphere/package.py Versions: 1.5-5 Build Dependencies r-sp, R Link Dependencies R Run Dependencies r-sp Description: Spherical trigonometry for geographic applications. That is, compute distances and related measures for angular (longitude/latitude) locations.

1.10.505 r-ggmap

Homepage: • https://github.com/dkahle/ggmap Spack package: • r-ggmap/package.py Versions: 2.6.1 Build Dependencies r-geosphere, r-mapproj, r-ggplot2, r-png, r-proto, r-rjson, r-plyr, r-reshape2, R, r-rgooglemaps, r-digest, r-jpeg, r-scales Link Dependencies R Run Dependencies r-geosphere, r-mapproj, r-ggplot2, r-png, r-proto, r-rjson, r-plyr, r-reshape2, r-jpeg, r- rgooglemaps, r-digest, r-scales Description: A collection of functions to visualize spatial data and models on top of static maps from various online sources (e.g and Stamen Maps). It includes tools common to those tasks, including functions for geolocation and routing.

266 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.506 r-ggplot2

Homepage: • http://ggplot2.org/ Spack package: • r-ggplot2/package.py Versions: 2.1.0 Build Dependencies r-mass, r-plyr, r-gtable, r-reshape2, R, r-digest, r-scales Link Dependencies R Run Dependencies r-mass, r-plyr, r-gtable, r-reshape2, r-digest, r-scales Description: An implementation of the grammar of graphics in R. It combines the advantages of both base and lattice graphics: conditioning and shared axes are handled automatically, and you can still build up a plot step by step from multiple data sources. It also implements a sophisticated multidimensional conditioning system and a consistent interface to map data to aesthetic attributes. See http://ggplot2.org for more information, documentation and examples.

1.10.507 r-ggvis

Homepage: • http://ggvis.rstudio.com/ Spack package: • r-ggvis/package.py Versions: 0.4.2 Build Dependencies r-jsonlite, r-htmltools, r-shiny, r-assertthat, r-lazyeval, R, r-dplyr, r-magrittr Link Dependencies R Run Dependencies r-jsonlite, r-htmltools, r-shiny, r-assertthat, r-lazyeval, r-dplyr, r-magrittr Description: An implementation of an interactive grammar of graphics, taking the best parts of ‘ggplot2’, combining them with the reactive framework from ‘shiny’ and web graphics from ‘vega’.

1.10.508 r-git2r

Homepage: • https://github.com/ropensci/git2r Spack package: • r-git2r/package.py Versions: 0.15.0 Build Dependencies R, zlib, openssl Link Dependencies R, zlib, openssl

1.10. Package List 267 Spack Documentation, Release 0.9

Description: 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.

1.10.509 r-glmnet

Homepage: • http://www.jstatsoft.org/v33/i01/ Spack package: • r-glmnet/package.py Versions: 2.0-5 Build Dependencies r-matrix, R, r-foreach Link Dependencies R Run Dependencies r-matrix, r-foreach Description: Extremely efficient procedures for fitting the entire lasso or elastic- net regularization path for linear regression, logistic and multinomial regression models, Poisson regression and the Cox model. Two recent ad- ditions are the multiple-response Gaussian, and the grouped multinomial. The algorithm uses cyclical coordinate descent in a path- wise fashion, as described in the paper linked to via the URL below.

1.10.510 r-googlevis

Homepage: • https://github.com/mages/googleVis#googlevis Spack package: • r-googlevis/package.py Versions: 0.6.0 Build Dependencies R, r-jsonlite Link Dependencies R Run Dependencies r-jsonlite Description: R interface to Google Charts API, allowing users to create interactive charts based on data frames. Charts are displayed locally via the R HTTP help server. A modern browser with an Internet connection is required and for some charts a Flash player. The data remains local and is not uploaded to Google.

268 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.511 r-gridbase

Homepage: • https://cran.r-project.org/web/packages/gridBase/index.html Spack package: • r-gridbase/package.py Versions: 0.4-7 Build Dependencies R Link Dependencies R Description: Integration of base and grid graphics.

1.10.512 r-gridextra

Homepage: • https://github.com/baptiste/gridextra Spack package: • r-gridextra/package.py Versions: 2.2.1 Build Dependencies r-gtable, R Link Dependencies R Run Dependencies r-gtable Description: Provides a number of user-level functions to work with “grid” graphics, notably to arrange multiple grid-based plots on a page, and draw tables.

1.10.513 r-gtable

Homepage: • https://cran.r-project.org/web/packages/gtable/index.html Spack package: • r-gtable/package.py Versions: 0.2.0 Build Dependencies R Link Dependencies R Description: Tools to make it easier to work with “tables” of ‘grobs’.

1.10. Package List 269 Spack Documentation, Release 0.9

1.10.514 r-gtools

Homepage: • https://cran.r-project.org/package=gtools Spack package: • r-gtools/package.py Versions: 3.5.0 Build Dependencies R Link Dependencies R Description: Functions to assist in R programming, including: - assist in developing, updating, and maintaining R and R packages (‘ask’, ‘checkRVersion’, ‘getDependencies’, ‘keywords’, ‘scat’), - calculate the logit and inverse logit transformations (‘logit’, ‘inv.logit’), - test if a value is missing, empty or contains only NA and NULL values (‘invalid’), - manipulate R’s .Last function (‘addLast’), - define macros (‘defmacro’), - detect odd and even integers (‘odd’, ‘even’), - convert strings containing non-ASCII characters (like single quotes) to plain ASCII (‘ASCIIfy’), - perform a binary search (‘binsearch’), - sort strings containing both numeric and character components (‘mixedsort’), - create a factor variable from the quantiles of a continuous variable (‘quantcut’), - enumerate permutations and combinations (‘combinations’, ‘permutation’), - calculate and convert between fold-change and log- ratio (‘foldchange’, ‘logratio2foldchange’, ‘foldchange2logratio’), - calculate probabilities and generate random numbers from Dirichlet distributions (‘rdirichlet’, ‘ddirichlet’), - apply a function over adjacent subsets of a vector (‘running’), - modify the TCP_NODELAY (‘de-Nagle’) flag for socket objects, - efficient ‘rbind’ of data frames, even if the column names don’t match (‘smartbind’), - generate significance stars from p-values (‘stars.pval’), - convert characters to/from ASCII codes.

1.10.515 r-htmltools

Homepage: • https://github.com/rstudio/htmltools Spack package: • r-htmltools/package.py Versions: 0.3.5 Build Dependencies R, r-digest, r-rcpp Link Dependencies R Run Dependencies r-digest, r-rcpp Description: Tools for HTML generation and output.

1.10.516 r-htmlwidgets

Homepage: • https://github.com/ramnathv/htmlwidgets Spack package:

270 Chapter 1. Table of Contents Spack Documentation, Release 0.9

• r-htmlwidgets/package.py Versions: 0.6 Build Dependencies r-yaml, R, r-htmltools, r-jsonlite Link Dependencies R Run Dependencies r-yaml, r-jsonlite, r-htmltools Description: A framework for creating HTML widgets that render in various contexts including the R console, ‘R Markdown’ documents, and ‘Shiny’ web applications.

1.10.517 r-httpuv

Homepage: • https://github.com/rstudio/httpuv Spack package: • r-httpuv/package.py Versions: 1.3.3 Build Dependencies R, r-rcpp Link Dependencies R Run Dependencies r-rcpp Description: Provides low-level socket and protocol support for handling HTTP and WebSocket requests directly from within R. It is primarily intended as a building block for other packages, rather than making it particularly easy to create complete web applications using httpuv alone. httpuv is built on top of the libuv and http-parser C libraries, both of which were developed by Joyent, Inc. (See LICENSE file for libuv and http- parser license information.)

1.10.518 r-httr

Homepage: • https://github.com/hadley/httr Spack package: • r-httr/package.py Versions: 1.1.0 Build Dependencies r-R6, r-jsonlite, r-mime, r-openssl, R, r-curl Link Dependencies R Run Dependencies r-curl, r-R6, r-mime, r-jsonlite, r-openssl Description: 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).

1.10. Package List 271 Spack Documentation, Release 0.9

1.10.519 r-igraph

Homepage: • http://igraph.org/ Spack package: • r-igraph/package.py Versions: 1.0.1 Build Dependencies r-matrix, libxml2, r-irlba, r-nmf , R, gmp, r-magrittr Link Dependencies libxml2, R, gmp Run Dependencies r-matrix, r-irlba, r-nmf , r-magrittr Description: Routines for simple graphs and network analysis. It can handle large graphs very well and provides functions for generating random and regular graphs, graph visualization, centrality methods and much more.

1.10.520 r-influencer

Homepage: • https://github.com/rcc-uchicago/influenceR Spack package: • r-influencer/package.py Versions: 0.1.0 Build Dependencies r-matrix, R, r-igraph Link Dependencies R Run Dependencies r-matrix, r-igraph Description: Provides functionality to compute various node centrality measures on networks. Included are functions to compute betweenness centrality (by utilizing Madduri and Bader’s SNAP library), implementations of Burt’s constraint and effective network size (ENS) metrics, Borgatti’s algorithm to identify key players, and Valente’s bridging metric. On Unix systems, the betweenness, Key Players, and bridging implementations are parallelized with OpenMP, which may run faster on systems which have OpenMP configured.

1.10.521 r-inline

Homepage: • https://cran.r-project.org/web/packages/inline/index.html Spack package: • r-inline/package.py Versions: 0.3.14 Build Dependencies R Link Dependencies R

272 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Functionality to dynamically define R functions and S4 methods with inlined C, C++ or Fortran code supporting .C and .Call calling conventions.

1.10.522 r-irlba

Homepage: • https://cran.r-project.org/web/packages/irlba/index.html Spack package: • r-irlba/package.py Versions: 2.0.0 Build Dependencies r-matrix, R Link Dependencies R Run Dependencies r-matrix Description: Fast and memory efficient methods for truncated singular and eigenvalue decompositions and principal component analysis of large sparse or dense matrices.

1.10.523 r-iterators

Homepage: • https://cran.r-project.org/web/packages/iterators/index.html Spack package: • r-iterators/package.py Versions: 1.0.8 Build Dependencies R Link Dependencies R Description: Support for iterators, which allow a programmer to traverse through all the elements of a vector, list, or other collection of data.

1.10.524 r-jpeg

Homepage: • http://www.rforge.net/jpeg/ Spack package: • r-jpeg/package.py Versions: 0.1-8 Build Dependencies R, jpeg

1.10. Package List 273 Spack Documentation, Release 0.9

Link Dependencies R, jpeg Description: This package provides an easy and simple way to read, write and display bitmap images stored in the JPEG format. It can read and write both files and in-memory raw vectors.

1.10.525 r-jsonlite

Homepage: • https://github.com/jeroenooms/jsonlite Spack package: • r-jsonlite/package.py Versions: 1.0, 0.9.21 Build Dependencies R Link Dependencies R Description: 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 inter- acting 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.

1.10.526 r-labeling

Homepage: • https://cran.r-project.org/web/packages/labeling/index.html Spack package: • r-labeling/package.py Versions: 0.3 Build Dependencies R Link Dependencies R Description: Provides a range of axis labeling algorithms.

1.10.527 r-lattice

Homepage: • http://lattice.r-forge.r-project.org/ Spack package:

274 Chapter 1. Table of Contents Spack Documentation, Release 0.9

• r-lattice/package.py Versions: 0.20-33 Build Dependencies R Link Dependencies R Description: A powerful and elegant high-level data visualization system inspired by Trellis graphics, with an em- phasis on multivariate data. Lattice is sufficient for typical graphics needs, and is also flexible enough to handle most nonstandard requirements. See ?Lattice for an introduction.

1.10.528 r-lazyeval

Homepage: • https://cran.r-project.org/web/packages/lazyeval/index.html Spack package: • r-lazyeval/package.py Versions: 0.2.0 Build Dependencies R Link Dependencies R Description: An alternative approach to non-standard evaluation using formulas. Provides a full implementation of LISP style ‘quasiquotation’, making it easier to generate code with other code.

1.10.529 r-leaflet

Homepage: • http://rstudio.github.io/leaflet/ Spack package: • r-leaflet/package.py Versions: 1.0.1 Build Dependencies r-rcolorbrewer, r-png, r-htmltools, r-markdown, r-sp, R, r-raster, r-base64enc, r-htmlwidgets, r-magrittr, r-scales Link Dependencies R Run Dependencies r-rcolorbrewer, r-png, r-htmltools, r-markdown, r-sp, r-raster, r-base64enc, r-htmlwidgets, r- magrittr, r-scales Description: Create and customize interactive maps using the ‘Leaflet’ JavaScript library and the ‘htmlwidgets’ pack- age. These maps can be used directly from the R console, from ‘RStudio’, in Shiny apps and R Markdown documents.

1.10. Package List 275 Spack Documentation, Release 0.9

1.10.530 r-lme4

Homepage: • https://github.com/lme4/lme4/ Spack package: • r-lme4/package.py Versions: 1.1-12 Build Dependencies r-matrix, r-minqa, r-lattice, r-rcppeigen, r-mass, r-nloptr, R, r-nlme, r-rcpp Link Dependencies R Run Dependencies r-matrix, r-minqa, r-lattice, r-rcppeigen, r-mass, r-nloptr, r-nlme, r-rcpp Description: Fit linear and generalized linear mixed-effects models. The models and their components are repre- sented using S4 classes and methods. The core computational algorithms are implemented using the ‘Eigen’ C++ library for numerical linear algebra and ‘RcppEigen’ “glue”.

1.10.531 r-lmtest

Homepage: • https://cran.r-project.org/package=lmtest Spack package: • r-lmtest/package.py Versions: 0.9-34 Build Dependencies r-zoo, R Link Dependencies R Run Dependencies r-zoo Description: A collection of tests, data sets, and examples for diagnostic checking in linear regression models. Fur- thermore, some generic tools for inference in parametric models are provided.

1.10.532 r-lubridate

Homepage: • https://cran.r-project.org/web/packages/lubridate/index.html Spack package: • r-lubridate/package.py Versions: 1.5.6 Build Dependencies R, r-stringr Link Dependencies R Run Dependencies r-stringr

276 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Functions to work with date-times and timespans: fast and user friendly parsing of date-time data, extraction and updating of components of a date-time (years, months, days, hours, minutes, and seconds), alge- braic manipulation on date-time and timespan objects. The ‘lubridate’ package has a consistent and memorable syntax that makes working with dates easy and fun.

1.10.533 r-magic

Homepage: • https://cran.r-project.org/ Spack package: • r-magic/package.py Versions: 1.5-6 Build Dependencies r-abind, R Link Dependencies R Run Dependencies r-abind Description: A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of functions for the manipulation and analysis of arbitrarily dimensioned arrays.

1.10.534 r-magrittr

Homepage: • https://cran.r-project.org/web/packages/magrittr/index.html Spack package: • r-magrittr/package.py Versions: 1.5 Build Dependencies R Link Dependencies R Description: Provides a mechanism for chaining commands with a new forward-pipe operator, %>%. This operator will forward a value, or the result of an expression, into the next function call/expression. There is flexible support for the type of right-hand side expressions. For more information, see package vignette.

1.10.535 r-mapproj

Homepage: • https://cran.r-project.org/package=mapproj Spack package: • r-mapproj/package.py

1.10. Package List 277 Spack Documentation, Release 0.9

Versions: 1.2-4 Build Dependencies r-maps, R Link Dependencies R Run Dependencies r-maps Description: Converts latitude/longitude into projected coordinates.

1.10.536 r-maps

Homepage: • https://cran.r-project.org/ Spack package: • r-maps/package.py Versions: 3.1.1 Build Dependencies R Link Dependencies R Description: Display of maps. Projection code and larger maps are in separate packages (‘mapproj’ and ‘mapdata’).

1.10.537 r-maptools

Homepage: • http://r-forge.r-project.org/projects/maptools/ Spack package: • r-maptools/package.py Versions: 0.8-39 Build Dependencies r-sp, R, r-foreign, r-lattice Link Dependencies R Run Dependencies r-sp, r-foreign, r-lattice Description: Set of tools for manipulating and reading geographic data, in particular ESRI shapefiles; C code used from shapelib. It includes binary access to GSHHG shoreline files. The package also provides interface wrap- pers for exchanging spatial objects with packages such as PBSmapping, spatstat, maps, RArcInfo, Stata tmap, WinBUGS, Mondrian, and others.

278 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.538 r-markdown

Homepage: • https://github.com/rstudio/markdown Spack package: • r-markdown/package.py Versions: 0.7.7 Build Dependencies R, r-mime Link Dependencies R Run Dependencies r-mime Description: Provides R bindings to the ‘Sundown’ ‘Markdown’ rendering library (https://github.com/vmg/sundown). ‘Markdown’ is a plain-text formatting syntax that can be converted to ‘XHTML’ or other formats. See http://en.wikipedia.org/wiki/Markdown for more information about ‘Markdown’.

1.10.539 r-mass

Homepage: • http://www.stats.ox.ac.uk/pub/MASS4/ Spack package: • r-mass/package.py Versions: 7.3-45 Build Dependencies R Link Dependencies R Description: Functions and datasets to support Venables and Ripley, “Modern Applied Statistics with S” (4th edition, 2002).

1.10.540 r-matrix

Homepage: • http://matrix.r-forge.r-project.org/ Spack package: • r-matrix/package.py Versions: 1.2-6 Build Dependencies r-lattice, R Link Dependencies R Run Dependencies r-lattice

1.10. Package List 279 Spack Documentation, Release 0.9

Description: Classes and methods for dense and sparse matrices and operations on them using ‘LAPACK’ and ‘SuiteSparse’.

1.10.541 r-matrixmodels

Homepage: • http://matrix.r-forge.r-project.org/ Spack package: • r-matrixmodels/package.py Versions: 0.4-1 Build Dependencies r-matrix, R Link Dependencies R Run Dependencies r-matrix Description: Modelling with sparse and dense ‘Matrix’ matrices, using modular prediction and response module classes.

1.10.542 r-memoise

Homepage: • https://github.com/hadley/memoise Spack package: • r-memoise/package.py Versions: 1.0.0 Build Dependencies R, r-digest Link Dependencies R Run Dependencies r-digest Description: Cache the results of a function so that when you call it again with the same arguments it returns the pre-computed value.

1.10.543 r-mgcv

Homepage: • https://cran.r-project.org/package=mgcv Spack package: • r-mgcv/package.py Versions: 1.8-13

280 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies r-matrix, r-nlme, R Link Dependencies R Run Dependencies r-matrix, r-nlme Description: GAMs, GAMMs and other generalized ridge regression with multiple smoothing parameter estimation by GCV, REML or UBRE/AIC. Includes a gam() function, a wide variety of smoothers, JAGS support and distributions beyond the exponential family.

1.10.544 r-mime

Homepage: • https://github.com/yihui/mime Spack package: • r-mime/package.py Versions: 0.5, 0.4 Build Dependencies R Link Dependencies R Description: Guesses the MIME type from a filename extension using the data derived from /etc/mime.types in UNIX-type systems.

1.10.545 r-minqa

Homepage: • http://optimizer.r-forge.r-project.org/ Spack package: • r-minqa/package.py Versions: 1.2.4 Build Dependencies R, r-rcpp Link Dependencies R Run Dependencies r-rcpp Description: Derivative-free optimization by quadratic approximation based on an interface to Fortran implementa- tions by M. J. D. Powell.

1.10. Package List 281 Spack Documentation, Release 0.9

1.10.546 r-multcomp

Homepage: • http://multcomp.r-forge.r-project.org/ Spack package: • r-multcomp/package.py Versions: 1.4-6 Build Dependencies r-survival, r-codetools, r-thdata, r-mvtnorm, r-sandwich, R Link Dependencies R Run Dependencies r-mvtnorm, r-codetools, r-survival, r-sandwich, r-thdata Description: Simultaneous tests and confidence intervals for general linear hypotheses in parametric models, includ- ing linear, generalized linear, linear mixed effects, and survival models. The package includes demos repro- ducing analyzes presented in the book “Multiple Comparisons Using R” (Bretz, Hothorn, Westfall, 2010, CRC Press).

1.10.547 r-munsell

Homepage: • https://cran.r-project.org/web/packages/munsell/index.html Spack package: • r-munsell/package.py Versions: 0.4.3 Build Dependencies r-colorspace, R Link Dependencies R Run Dependencies r-colorspace Description: Provides easy access to, and manipulation of, the Munsell colours. Provides a mapping between Mun- sell’s original notation (e.g. “5R 5/10”) and hexadecimal strings suitable for use directly in R graphics. Also provides utilities to explore slices through the Munsell colour tree, to transform Munsell colours and display colour palettes.

1.10.548 r-mvtnorm

Homepage: • http://mvtnorm.r-forge.r-project.org/ Spack package: • r-mvtnorm/package.py Versions: 1.0-5 Build Dependencies R

282 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies R Description: Computes multivariate normal and t probabilities, quantiles, random deviates and densities.

1.10.549 r-ncdf4

Homepage: • http://cirrus.ucsd.edu/~pierce/ncdf Spack package: • r-ncdf4/package.py Versions: 1.15 Build Dependencies R, netcdf Link Dependencies R, netcdf Description: Provides a high-level R interface to data files written using Unidata’s netCDF library (version 4 or earlier), which are binary data files that are portable across platforms and include metadata information in addition to the data sets. Using this package, netCDF files (either version 4 or “classic” version 3) can be opened and data sets read in easily. It is also easy to create new netCDF dimensions, variables, and files, in either version 3 or 4 format, and manipulate existing netCDF files. This package replaces the former ncdf package, which only worked with netcdf version 3 files. For various reasons the names of the functions have had to be changed from the names in the ncdf package. The old ncdf package is still available at the URL given below, if you need to have backward compatibility. It should be possible to have both the ncdf and ncdf4 packages installed simultaneously without a problem. However, the ncdf package does not provide an interface for netcdf version 4 files.

1.10.550 r-networkd3

Homepage: • http://cran.r-project.org/package=networkD3 Spack package: • r-networkd3/package.py Versions: 0.2.12 Build Dependencies R, r-igraph, r-magrittr, r-htmlwidgets Link Dependencies R Run Dependencies r-igraph, r-magrittr, r-htmlwidgets Description: Creates ‘D3’ ‘JavaScript’ network, tree, dendrogram, and Sankey graphs from ‘R’.

1.10. Package List 283 Spack Documentation, Release 0.9

1.10.551 r-nlme

Homepage: • https://cran.r-project.org/package=nlme Spack package: • r-nlme/package.py Versions: 3.1-128 Build Dependencies r-lattice, R Link Dependencies R Run Dependencies r-lattice Description: Fit and compare Gaussian linear and nonlinear mixed-effects models.

1.10.552 r-nloptr

Homepage: • https://cran.r-project.org/package=nloptr Spack package: • r-nloptr/package.py Versions: 1.0.4 Build Dependencies R Link Dependencies R Description: nloptr is an R interface to NLopt. NLopt is a free/open-source library for nonlinear optimization, provid- ing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms. See http://ab- initio.mit.edu/wiki/index.php/NLopt_Introduction for more information on the available algorithms. During installation on Unix the NLopt code is downloaded and compiled from the NLopt website.

1.10.553 r-nmf

Homepage: • http://renozao.github.io/NMF Spack package: • r-nmf/package.py Versions: 0.20.6 Build Dependencies r-digest, r-cluster, r-rcolorbrewer, r-doparallel, r-gridbase, r-stringr, r-registry, r-foreach, r- reshape2, r-colorspace, R, r-rngtools, r-ggplot2, r-pkgmaker Link Dependencies R

284 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Run Dependencies r-digest, r-cluster, r-rcolorbrewer, r-doparallel, r-gridbase, r-stringr, r-registry, r-foreach, r- reshape2, r-colorspace, r-rngtools, r-ggplot2, r-pkgmaker Description: Provides a framework to perform Non-negative Matrix Factorization (NMF). The package implements a set of already published algorithms and seeding methods, and provides a framework to test, develop and plug new/custom algorithms. Most of the built-in algorithms have been optimized in C++, and the main interface function provides an easy way of performing parallel computations on multicore machines..

1.10.554 r-nnet

Homepage: • http://www.stats.ox.ac.uk/pub/MASS4/ Spack package: • r-nnet/package.py Versions: 7.3-12 Build Dependencies R Link Dependencies R Description: Software for feed-forward neural networks with a single hidden layer, and for multinomial log-linear models.

1.10.555 r-np

Homepage: • https://github.com/JeffreyRacine/R-Package-np/ Spack package: • r-np/package.py Versions: 0.60-2 Build Dependencies R, r-cubature, r-boot Link Dependencies R Run Dependencies r-cubature, r-boot Description: This package provides a variety of nonparametric (and semiparametric) kernel methods that seamlessly handle a mix of continuous, unordered, and ordered factor data types. We would like to gratefully acknowledge support from the Natural Sciences and Engineering Research Council of Canada (NSERC:www.nserc.ca), the Social Sciences and Humanities Research Council of Canada (SSHRC:www.sshrc.ca), and the Shared Hierar- chical Academic Research Computing Network (SHARCNET:www.sharcnet.ca).

1.10. Package List 285 Spack Documentation, Release 0.9

1.10.556 r-openssl

Homepage: • https://github.com/jeroenooms/openssl#readme Spack package: • r-openssl/package.py Versions: 0.9.4 Build Dependencies R, openssl Link Dependencies R, openssl Description: 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.

1.10.557 r-packrat

Homepage: • https://github.com/rstudio/packrat/ Spack package: • r-packrat/package.py Versions: 0.4.7-1 Build Dependencies R Link Dependencies R Description: Manage the R packages your project depends on in an isolated, portable, and reproducible way.

1.10.558 r-pbkrtest

Homepage: • http://people.math.aau.dk/~sorenh/software/pbkrtest/ Spack package: • r-pbkrtest/package.py Versions: 0.4-6 Build Dependencies r-matrix, r-mass, R, r-lme4 Link Dependencies R Run Dependencies r-matrix, r-mass, r-lme4

286 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Test in mixed effects models. Attention is on mixed effects models as implemented in the ‘lme4’ package. This package implements a parametric bootstrap test and a Kenward Roger modification of F-tests for linear mixed effects models and a parametric bootstrap test for generalized linear mixed models.

1.10.559 r-pkgmaker

Homepage: • https://renozao.github.io/pkgmaker Spack package: • r-pkgmaker/package.py Versions: 0.22 Build Dependencies r-codetools, r-stringr, r-registry, R, r-xtable, r-digest Link Dependencies R Run Dependencies r-digest, r-codetools, r-xtable, r-registry, r-stringr Description: This package provides some low-level utilities to use for package development. It currently provides managers for multiple package specific options and registries, vignette, unit test and bibtex related utilities. It serves as a base package for packages like NMF, RcppOctave, doRNG, and as an incubator package for other general purposes utilities, that will eventually be packaged separately. It is still under heavy development and changes in the interface(s) are more than likely to happen.

1.10.560 r-plotrix

Homepage: • https://cran.r-project.org/package=plotrix Spack package: • r-plotrix/package.py Versions: 3.6-3 Build Dependencies R Link Dependencies R Description: Lots of plots, various labeling, axis and color scaling functions.

1.10.561 r-plyr

Homepage: • http://had.co.nz/plyr Spack package: • r-plyr/package.py

1.10. Package List 287 Spack Documentation, Release 0.9

Versions: 1.8.4 Build Dependencies R, r-rcpp Link Dependencies R Run Dependencies r-rcpp Description: A set of tools that solves a common set of problems: you need to break a big problem down into manageable pieces, operate on each piece and then put all the pieces back together. For example, you might want to fit a model to each spatial location or time point in your study, summarise data by panels or collapse high- dimensional arrays to simpler summary statistics. The development of ‘plyr’ has been generously supported by ‘Becton Dickinson’.

1.10.562 r-png

Homepage: • http://www.rforge.net/png/ Spack package: • r-png/package.py Versions: 0.1-7 Build Dependencies libpng, R Link Dependencies libpng, R Description: This package provides an easy and simple way to read, write and display bitmap images stored in the PNG format. It can read and write both files and in-memory raw vectors.

1.10.563 r-praise

Homepage: • https://github.com/gaborcsardi/praise Spack package: • r-praise/package.py Versions: 1.0.0 Build Dependencies R Link Dependencies R Description: Build friendly R packages that praise their users if they have done something good, or they just need it to feel better.

288 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.564 r-proto

Homepage: • http://r-proto.googlecode.com/ Spack package: • r-proto/package.py Versions: 0.3-10 Build Dependencies R Link Dependencies R Description: An object oriented system using object-based, also called prototype- based, rather than class-based object oriented ideas.

1.10.565 r-quantmod

Homepage: • http://www.quantmod.com/ Spack package: • r-quantmod/package.py Versions: 0.4-5 Build Dependencies r-zoo, R, r-ttr, r-xts Link Dependencies R Run Dependencies r-zoo, r-xts, r-ttr Description: Specify, build, trade, and analyse quantitative financial trading strategies.

1.10.566 r-quantreg

Homepage: • https://cran.r-project.org/package=quantreg Spack package: • r-quantreg/package.py Versions: 5.26 Build Dependencies r-matrix, r-matrixmodels, R, r-sparsem Link Dependencies R Run Dependencies r-matrix, r-matrixmodels, r-sparsem Description: Estimation and inference methods for models of conditional quantiles: Linear and nonlinear parametric and non-parametric (total variation penalized) models for conditional quantiles of a univariate response and several methods for handling censored survival data. Portfolio selection methods based on expected shortfall risk are also included.

1.10. Package List 289 Spack Documentation, Release 0.9

1.10.567 r-R6

Homepage: • https://github.com/wch/R6/ Spack package: • r-R6/package.py Versions: 2.1.2 Build Dependencies R Link Dependencies R Description: 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.

1.10.568 r-randomforest

Homepage: • https://www.stat.berkeley.edu/~breiman/RandomForests/ Spack package: • r-randomforest/package.py Versions: 4.6-12 Build Dependencies R Link Dependencies R Description: Classification and regression based on a forest of trees using random inputs.

1.10.569 r-raster

Homepage: • http://cran.r-project.org/package=raster Spack package: • r-raster/package.py Versions: 2.5-8 Build Dependencies r-sp, R, r-rcpp Link Dependencies R Run Dependencies r-sp, r-rcpp

290 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The package imple- ments basic and high-level functions. Processing of very large files is supported.

1.10.570 r-rcolorbrewer

Homepage: • http://colorbrewer2.org Spack package: • r-rcolorbrewer/package.py Versions: 1.1-2 Build Dependencies R Link Dependencies R Description: Provides color schemes for maps (and other graphics) designed by Cynthia Brewer as described at http://colorbrewer2.org

1.10.571 r-rcpp

Homepage: • http://dirk.eddelbuettel.com/code/rcpp.html Spack package: • r-rcpp/package.py Versions: 0.12.6, 0.12.5 Build Dependencies R Link Dependencies R Description: The ‘Rcpp’ package provides R functions as well as C++ classes which offer a seamless integration of R and C++. Many R data types and objects can be mapped back and forth to C++ equivalents which facilitates both writing of new code as well as easier integration of third-party libraries. Documentation about ‘Rcpp’ is provided by several vignettes included in this package, via the ‘Rcpp Gallery’ site at , the paper by Eddelbuettel and Francois (2011, JSS), and the book by Eddelbuettel (2013, Springer); see ‘citation(“Rcpp”)’ for details on these last two.

1.10.572 r-rcppeigen

Homepage: • http://eigen.tuxfamily.org/ Spack package: • r-rcppeigen/package.py

1.10. Package List 291 Spack Documentation, Release 0.9

Versions: 0.3.2.8.1 Build Dependencies r-matrix, R, r-rcpp Link Dependencies R Run Dependencies r-matrix, r-rcpp Description: R and ‘Eigen’ integration using ‘Rcpp’. ‘Eigen’ is a C++ template library for linear algebra: matrices, vectors, numerical solvers and related algorithms. It supports dense and sparse matrices on integer, floating point and complex numbers, decompositions of such matrices, and solutions of linear systems. Its performance on many algorithms is comparable with some of the best implementations based on ‘Lapack’ and level-3 ‘BLAS’. The ‘RcppEigen’ package includes the header files from the ‘Eigen’ C++ template library (currently version 3.2.8). Thus users do not need to install ‘Eigen’ itself in order to use ‘RcppEigen’. Since version 3.1.1, ‘Eigen’ is licensed under the Mozilla Public License (version 2); earlier version were licensed under the GNU LGPL version 3 or later. ‘RcppEigen’ (the ‘Rcpp’ bindings/bridge to ‘Eigen’) is licensed under the GNU GPL version 2 or later, as is the rest of ‘Rcpp’.

1.10.573 r-registry

Homepage: • https://cran.r-project.org/web/packages/registry/index.html Spack package: • r-registry/package.py Versions: 0.3 Build Dependencies R Link Dependencies R Description: Provides a generic infrastructure for creating and using registries.

1.10.574 r-reshape2

Homepage: • https://github.com/hadley/reshape Spack package: • r-reshape2/package.py Versions: 1.4.1 Build Dependencies r-plyr, R, r-rcpp, r-stringr Link Dependencies R Run Dependencies r-plyr, r-rcpp, r-stringr Description: Flexibly restructure and aggregate data using just two functions: melt and dcast (or acast).

292 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.575 r-rgooglemaps

Homepage: • https://cran.r-project.org/package=RgoogleMaps Spack package: • r-rgooglemaps/package.py Versions: 1.2.0.7 Build Dependencies R, r-rjsonio, r-png Link Dependencies R Run Dependencies r-rjsonio, r-png Description: This package serves two purposes: (i) Provide a comfortable R interface to query the Google server for static maps, and (ii) Use the map as a background image to overlay plots within R. This requires proper coordinate scaling.

1.10.576 r-rjava

Homepage: • http://www.rforge.net/rJava/ Spack package: • r-rjava/package.py Versions: 0.9-8 Build Dependencies R, jdk Link Dependencies R, jdk Description: Low-level interface to Java VM very much like .C/.Call and friends. Allows creation of objects, calling methods and accessing fields.

1.10.577 r-rjson

Homepage: • https://cran.r-project.org/package=rjson Spack package: • r-rjson/package.py Versions: 0.2.15 Build Dependencies R Link Dependencies R Description: Converts R object into JSON objects and vice-versa.

1.10. Package List 293 Spack Documentation, Release 0.9

1.10.578 r-rjsonio

Homepage: • https://cran.r-project.org/package=RJSONIO Spack package: • r-rjsonio/package.py Versions: 1.3-0 Build Dependencies R Link Dependencies R Description: This is a package that allows conversion to and from data in Javascript object notation (JSON) format. This allows R objects to be inserted into Javascript/ECMAScript/ActionScript code and allows R programmers to read and convert JSON content to R objects. This is an alternative to rjson package. Originally, that was too slow for converting large R objects to JSON and was not extensible. rjson’s performance is now similar to this package, and perhaps slightly faster in some cases. This package uses methods and is readily extensible by defining methods for different classes, vectorized operations, and C code and callbacks to R functions for deserializing JSON objects to R. The two packages intentionally share the same basic interface. This package (RJSONIO) has many additional options to allow customizing the generation and processing of JSON content. This package uses libjson rather than implementing yet another JSON parser. The aim is to support other general projects by building on their work, providing feedback and benefit from their ongoing development.

1.10.579 r-rmysql

Homepage: • https://github.com/rstats-db/rmysql Spack package: • r-rmysql/package.py Versions: 0.10.9 Build Dependencies R, r-dbi, mariadb Link Dependencies R, mariadb Run Dependencies r-dbi Description: Implements ‘DBI’ Interface to ‘MySQL’ and ‘MariaDB’ Databases.

1.10.580 r-rngtools

Homepage: • https://renozao.github.io/rngtools Spack package: • r-rngtools/package.py Versions: 1.2.4

294 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies r-pkgmaker, R, r-digest, r-stringr Link Dependencies R Run Dependencies r-pkgmaker, r-digest, r-stringr Description: This package contains a set of functions for working with Random Number Generators (RNGs). In particular, it defines a generic S4 framework for getting/setting the current RNG, or RNG data that are embedded into objects for reproducibility. Notably, convenient default methods greatly facilitate the way current RNG settings can be changed.

1.10.581 r-rodbc

Homepage: • https://cran.rstudio.com/web/packages/RODBC/ Spack package: • r-rodbc/package.py Versions: 1.3-13 Build Dependencies unixodbc, R Link Dependencies unixodbc, R Description: An ODBC database interface.

1.10.582 r-roxygen2

Homepage: • https://github.com/klutometis/roxygen Spack package: • r-roxygen2/package.py Versions: 5.0.1 Build Dependencies r-stringi, R, r-stringr, r-digest, r-rcpp, r-brew Link Dependencies R Run Dependencies r-rcpp, r-digest, r-stringi, r-brew, r-stringr Description: A ‘Doxygen’-like in-source documentation system for Rd, collation, and ‘NAMESPACE’ files.

1.10. Package List 295 Spack Documentation, Release 0.9

1.10.583 r-rpostgresql

Homepage: • https://code.google.com/p/rpostgresql/ Spack package: • r-rpostgresql/package.py Versions: 0.4-1 Build Dependencies R, postgresql, r-dbi Link Dependencies R, postgresql Run Dependencies r-dbi Description: Database interface and PostgreSQL driver for R This package provides a Database Interface (DBI) compliant driver for R to access PostgreSQL database systems. In order to build and install this package from source, PostgreSQL itself must be present your system to provide PostgreSQL functionality via its libraries and header files. These files are provided as postgresql-devel package under some Linux distributions. On Microsoft Windows system the attached libpq library source will be used. A wiki and issue tracking system for the package are available at Google Code at https://code.google.com/p/rpostgresql/.

1.10.584 r-rsqlite

Homepage: • https://github.com/rstats-db/RSQLite Spack package: • r-rsqlite/package.py Versions: 1.0.0 Build Dependencies R, r-dbi Link Dependencies R Run Dependencies r-dbi Description: This package embeds the SQLite database engine in R and provides an interface compliant with the DBI package. The source for the SQLite engine (version 3.8.6) is included.

1.10.585 r-rstan

Homepage: • http://mc-stan.org/ Spack package: • r-rstan/package.py Versions: 2.10.1 Build Dependencies r-gridextra, r-inline, r-stanheaders, r-rcppeigen, R, r-bh, r-ggplot2, r-rcpp

296 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies R Run Dependencies r-gridextra, r-inline, r-stanheaders, r-rcppeigen, r-bh, r-ggplot2, r-rcpp Description: User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by ac- cessing the header-only Stan library provided by the ‘StanHeaders’ package. The Stan project develops a prob- abilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via variational approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evalu- ate gradients without burdening the user with the need to derive the partial derivatives.

1.10.586 r-rstudioapi

Homepage: • https://cran.r-project.org/web/packages/rstudioapi/index.html Spack package: • r-rstudioapi/package.py Versions: 0.6, 0.5 Build Dependencies R Link Dependencies R Description: Access the RStudio API (if available) and provide informative error messages when it’s not.

1.10.587 r-sandwich

Homepage: • https://cran.r-project.org/package=sandwich Spack package: • r-sandwich/package.py Versions: 2.3-4 Build Dependencies r-zoo, R Link Dependencies R Run Dependencies r-zoo Description: Model-robust standard error estimators for cross-sectional, time series, and longitudinal data.

1.10. Package List 297 Spack Documentation, Release 0.9

1.10.588 r-scales

Homepage: • https://github.com/hadley/scales Spack package: • r-scales/package.py Versions: 0.4.0 Build Dependencies r-rcolorbrewer, r-labeling, r-plyr, r-munsell, R, r-dichromat, r-rcpp Link Dependencies R Run Dependencies r-rcolorbrewer, r-labeling, r-plyr, r-munsell, r-dichromat, r-rcpp Description: Graphical scales map data to aesthetics, and provide methods for automatically determining breaks and labels for axes and legends.

1.10.589 r-shiny

Homepage: • http://shiny.rstudio.com/ Spack package: • r-shiny/package.py Versions: 0.13.2 Build Dependencies r-digest, r-httpuv, r-jsonlite, r-htmltools, r-mime, R, r-xtable, r-R6 Link Dependencies R Run Dependencies r-digest, r-httpuv, r-jsonlite, r-htmltools, r-mime, r-xtable, r-R6 Description: Makes it incredibly easy to build interactive web applications with R. Automatic “reactive” binding between inputs and outputs and extensive pre-built widgets make it possible to build beautiful, responsive, and powerful applications with minimal effort.

1.10.590 r-sp

Homepage: • https://github.com/edzer/sp/ Spack package: • r-sp/package.py Versions: 1.2-3 Build Dependencies r-lattice, R Link Dependencies R Run Dependencies r-lattice

298 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: Classes and methods for spatial data; the classes document where the spatial location information re- sides, for 2D or 3D data. Utility functions are provided, e.g. for plotting data as maps, spatial selection, as well as methods for retrieving coordinates, for subsetting, print, summary, etc.

1.10.591 r-sparsem

Homepage: • http://www.econ.uiuc.edu/~roger/research/sparse/sparse.html Spack package: • r-sparsem/package.py Versions: 1.7 Build Dependencies R Link Dependencies R Description: Some basic linear algebra functionality for sparse matrices is provided: including Cholesky decompo- sition and backsolving as well as standard R subsetting and Kronecker products.

1.10.592 r-stanheaders

Homepage: • http://mc-stan.org/ Spack package: • r-stanheaders/package.py Versions: 2.10.0-2 Build Dependencies R Link Dependencies R Description: The C++ header files of the Stan project are provided by this package, but it contains no R code, vi- gnettes, or function documentation. There is a shared object containing part of the CVODES library, but it is not accessible from R. StanHeaders is only useful for developers who want to utilize the LinkingTo directive of their package’s DESCRIPTION file to build on the Stan library without incurring unnecessary dependencies. The Stan project develops a probabilistic programming language that implements full or approximate Bayesian statistical inference via Markov Chain Monte Carlo or variational methods and implements (optionally pe- nalized) maximum likelihood estimation via optimization. The Stan library includes an advanced automatic differentiation scheme, templated statistical and linear algebra functions that can handle the automatically dif- ferentiable scalar types (and doubles, ints, etc.), and a parser for the Stan language. The ‘rstan’ package provides user-facing R functions to parse, compile, test, estimate, and analyze Stan models.

1.10. Package List 299 Spack Documentation, Release 0.9

1.10.593 r-stringi

Homepage: • http://www.gagolewski.com/software/stringi/ Spack package: • r-stringi/package.py Versions: 1.1.1 Build Dependencies R, icu Link Dependencies R, icu Description: Allows for fast, correct, consistent, portable, as well as convenient character string/text processing in every locale and any native encoding. Owing to the use of the ICU library, the package provides R users with platform-independent functions known to Java, Perl, Python, PHP, and Ruby programmers. Among available features there are: pattern searching (e.g., with ICU Java-like regular expressions or the Unicode Collation Al- gorithm), random string generation, case mapping, string transliteration, concatenation, Unicode normalization, date-time formatting and parsing, etc.

1.10.594 r-stringr

Homepage: • https://cran.r-project.org/web/packages/stringr/index.html Spack package: • r-stringr/package.py Versions: 1.0.0 Build Dependencies R, r-stringi, r-magrittr Link Dependencies R Run Dependencies r-stringi, r-magrittr Description: A consistent, simple and easy to use set of wrappers around the fantastic ‘stringi’ package. All function and argument names (and positions) are consistent, all functions deal with “NA“‘s and zero length vectors in the same way, and the output from one function is easy to feed into the input of another.

1.10.595 r-survey

Homepage: • http://r-survey.r-forge.r-project.org/survey/ Spack package: • r-survey/package.py Versions: 3.30-3 Build Dependencies R

300 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies R Description: Summary statistics, two-sample tests, rank tests, generalised linear models, cumulative link models, Cox models, loglinear models, and general maximum pseudolikelihood estimation for multistage stratified, cluster- sampled, unequally weighted survey samples. Variances by Taylor series linearisation or replicate weights. Post-stratification, calibration, and raking. Two-phase subsampling designs. Graphics. PPS sampling without replacement. Principal components, factor analysis.

1.10.596 r-survival

Homepage: • https://cran.r-project.org/package=survival Spack package: • r-survival/package.py Versions: 2.39-5 Build Dependencies r-matrix, R Link Dependencies R Run Dependencies r-matrix Description: Contains the core survival analysis routines, including definition of Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox models, and parametric accelerated failure time models.

1.10.597 r-tarifx

Homepage: • https://cran.r-project.org/package=taRifx Spack package: • r-tarifx/package.py Versions: 1.0.6 Build Dependencies r-plyr, r-reshape2, R Link Dependencies R Run Dependencies r-plyr, r-reshape2 Description: A collection of various utility and convenience functions.

1.10. Package List 301 Spack Documentation, Release 0.9

1.10.598 r-testthat

Homepage: • https://github.com/hadley/testthat Spack package: • r-testthat/package.py Versions: 1.0.2 Build Dependencies r-R6, r-praise, R, r-crayon, r-digest, r-magrittr Link Dependencies R Run Dependencies r-digest, r-crayon, r-R6, r-magrittr, r-praise Description: A unit testing system designed to be fun, flexible and easy to set up.

1.10.599 r-thdata

Homepage: • https://cran.r-project.org/package=TH.data Spack package: • r-thdata/package.py Versions: 1.0-7 Build Dependencies r-mass, R, r-survival Link Dependencies R Run Dependencies r-mass, r-survival Description: Contains data sets used in other packages Torsten Hothorn maintains.

1.10.600 r-threejs

Homepage: • http://bwlewis.github.io/rthreejs Spack package: • r-threejs/package.py Versions: 0.2.2 Build Dependencies r-matrix, R, r-base64enc, r-jsonlite, r-htmlwidgets Link Dependencies R Run Dependencies r-matrix, r-jsonlite, r-base64enc, r-htmlwidgets Description: Create interactive 3D scatter plots, network plots, and globes using the ‘three.js’ visualization library (“http://threejs.org”).

302 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.601 r-tibble

Homepage: • https://github.com/hadley/tibble Spack package: • r-tibble/package.py Versions: 1.1 Build Dependencies r-lazyeval, R, r-rcpp, r-assertthat Link Dependencies R Run Dependencies r-lazyeval, r-rcpp, r-assertthat Description: Provides a ‘tbl_df’ class that offers better checking and printing capabilities than traditional data frames.

1.10.602 r-tidyr

Homepage: • https://github.com/hadley/tidyr Spack package: • r-tidyr/package.py Versions: 0.5.1 Build Dependencies r-tibble, r-stringi, r-lazyeval, R, r-dplyr, r-rcpp, r-magrittr Link Dependencies R Run Dependencies r-tibble, r-stringi, r-lazyeval, r-dplyr, r-rcpp, r-magrittr Description: An evolution of ‘reshape2’. It’s designed specifically for data tidying (not general reshaping or aggre- gating) and works well with ‘dplyr’ data pipelines.

1.10.603 r-ttr

Homepage: • https://github.com/joshuaulrich/TTR Spack package: • r-ttr/package.py Versions: 0.23-1 Build Dependencies r-zoo, R, r-xts Link Dependencies R Run Dependencies r-zoo, r-xts Description: Functions and data to construct technical trading rules with R.

1.10. Package List 303 Spack Documentation, Release 0.9

1.10.604 r-vcd

Homepage: • https://cran.r-project.org/package=vcd Spack package: • r-vcd/package.py Versions: 1.4-1 Build Dependencies r-mass, r-colorspace, R, r-lmtest Link Dependencies R Run Dependencies r-mass, r-colorspace, r-lmtest Description: Visualization techniques, data sets, summary and inference procedures aimed particularly at categorical data. Special emphasis is given to highly extensible grid graphics. The package was package was originally inspired by the book “Visualizing Categorical Data” by Michael Friendly and is now the main support package for a new book, “Discrete Data Analysis with R” by Michael Friendly and David Meyer (2015).

1.10.605 r-visnetwork

Homepage: • https://github.com/datastorm-open/visNetwork Spack package: • r-visnetwork/package.py Versions: 1.0.1 Build Dependencies r-htmlwidgets, R, r-htmltools, r-jsonlite, r-magrittr Link Dependencies R Run Dependencies r-jsonlite, r-htmlwidgets, r-htmltools, r-magrittr Description: Provides an R interface to the ‘vis.js’ JavaScript charting library. It allows an interactive visualization of networks.

1.10.606 r-whisker

Homepage: • http://github.com/edwindj/whisker Spack package: • r-whisker/package.py Versions: 0.3-2 Build Dependencies R Link Dependencies R

304 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: logicless templating, reuse templates in many programming languages including R

1.10.607 r-withr

Homepage: • http://github.com/jimhester/withr Spack package: • r-withr/package.py Versions: 1.0.1 Build Dependencies R Link Dependencies R Description: A set of functions to run code ‘with’ safely and temporarily modified global state. Many of these func- tions were originally a part of the ‘devtools’ package, this provides a simple package with limited dependencies to provide access to these functions.

1.10.608 r-xlconnect

Homepage: • http://miraisolutions.wordpress.com/ Spack package: • r-xlconnect/package.py Versions: 0.2-12, 0.2-11 Build Dependencies r-xlconnectjars, R, r-rjava Link Dependencies R Run Dependencies r-xlconnectjars, r-rjava Description: Provides comprehensive functionality to read, write and format Excel data.

1.10.609 r-xlconnectjars

Homepage: • http://miraisolutions.wordpress.com/ Spack package: • r-xlconnectjars/package.py Versions: 0.2-12, 0.2-9 Build Dependencies R, r-rjava Link Dependencies R

1.10. Package List 305 Spack Documentation, Release 0.9

Run Dependencies r-rjava Description: Provides external JAR dependencies for the XLConnect package.

1.10.610 r-xlsx

Homepage: • http://code.google.com/p/rexcel/ Spack package: • r-xlsx/package.py Versions: 0.5.7 Build Dependencies R, r-rjava, r-xlsxjars Link Dependencies R Run Dependencies r-rjava, r-xlsxjars Description: Provide R functions to read/write/format Excel 2007 and Excel 97/2000/XP/2003 file formats.

1.10.611 r-xlsxjars

Homepage: • https://cran.rstudio.com/web/packages/xlsxjars/index.html Spack package: • r-xlsxjars/package.py Versions: 0.6.1 Build Dependencies R, r-rjava Link Dependencies R Run Dependencies r-rjava Description: The xlsxjars package collects all the external jars required for the xlxs package. This release corresponds to POI 3.10.1.

1.10.612 r-xml

Homepage: • http://www.omegahat.net/RSXML Spack package: • r-xml/package.py Versions: 3.98-1

306 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies libxml2, R Link Dependencies libxml2, R Description: Many approaches for both reading and creating XML (and HTML) documents (including DTDs), both local and accessible via HTTP or FTP. Also offers access to an ‘XPath’ “interpreter”.

1.10.613 r-xtable

Homepage: • http://xtable.r-forge.r-project.org/ Spack package: • r-xtable/package.py Versions: 1.8-2 Build Dependencies R Link Dependencies R Description: Coerce data to LaTeX and HTML tables.

1.10.614 r-xts

Homepage: • http://r-forge.r-project.org/projects/xts/ Spack package: • r-xts/package.py Versions: 0.9-7 Build Dependencies r-zoo, R Link Dependencies R Run Dependencies r-zoo Description: Provide for uniform handling of R’s different time-based data classes by extending zoo, maximizing na- tive format information preservation and allowing for user level customization and extension, while simplifying cross-class interoperability.

1.10.615 r-yaml

Homepage: • https://cran.r-project.org/web/packages/yaml/index.html Spack package: • r-yaml/package.py

1.10. Package List 307 Spack Documentation, Release 0.9

Versions: 2.1.13 Build Dependencies R Link Dependencies R Description: This package implements the libyaml YAML 1.1 parser and emitter (http://pyyaml.org/wiki/LibYAML) for R.

1.10.616 r-zoo

Homepage: • http://zoo.r-forge.r-project.org/ Spack package: • r-zoo/package.py Versions: 1.7-13 Build Dependencies r-lattice, R Link Dependencies R Run Dependencies r-lattice Description: An S3 class with methods for totally ordered indexed observations. It is particularly aimed at irregular time series of numeric vectors/matrices and factors. zoo’s key design goals are independence of a particular index/date/time class and consistency with ts and base R by providing methods to extend standard generics.

1.10.617 raja

Homepage: • http://software.llnl.gov/RAJA/ Spack package: • raja/package.py Versions: git Description: RAJA Parallel Framework.

1.10.618 ravel

Homepage: • https://github.com/llnl/ravel Spack package: • ravel/package.py Versions: 1.0.0

308 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Build Dependencies muster, otf2, cmake, qt, otf Link Dependencies muster, otf2, qt, otf Description: Ravel is a parallel communication trace visualization tool that orders events according to logical time.

1.10.619 readline

Homepage: • http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html Spack package: • readline/package.py Versions: 6.3 Build Dependencies ncurses Link Dependencies ncurses Description: The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.

1.10.620 rose

Homepage: • http://rosecompiler.org/ Spack package: • rose/package.py Versions: master Build Dependencies libtool, autoconf , boost, jdk, automake Link Dependencies boost, jdk Description: A compiler infrastructure to build source-to-source program transformation and analysis tools. (Devel- oped at Lawrence Livermore National Lab)

1.10.621 rsync

Homepage: • https://rsync.samba.org Spack package: • rsync/package.py

1.10. Package List 309 Spack Documentation, Release 0.9

Versions: 3.1.2, 3.1.1 Description: An open source utility that provides fast incremental file transfer.

1.10.622 ruby

Homepage: • https://www.ruby-lang.org/ Spack package: • ruby/package.py Versions: 2.2.0 Build Dependencies libffi, readline, zlib, openssl Link Dependencies libffi, readline, zlib, openssl Description: A dynamic, open source programming language with a focus on simplicity and productivity.

1.10.623 rust

Homepage: • http://www.rust-lang.org Spack package: • rust/package.py Versions: 1.8.0 Build Dependencies git, cmake, python, openssl, llvm, curl Link Dependencies git, cmake, python, openssl, llvm, curl Description: The rust programming language toolchain

1.10.624 rust-bindgen

Homepage: • http://www.rust-lang.org Spack package: • rust-bindgen/package.py Versions: 0.16 Build Dependencies llvm, rust Link Dependencies llvm, rust Description: The rust programming language toolchain

310 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.625 SAMRAI

Homepage: • https://computation.llnl.gov/project/SAMRAI/ Spack package: • SAMRAI/package.py Versions: 3.9.1, 3.8.0, 3.7.3, 3.7.2, 3.6.3-beta, 3.5.2-beta, 3.5.0-beta, 3.4.1-beta, 3.3.3-beta, 3.3.2-beta, 2.4.4 Build Dependencies mpi, zlib, boost, hdf5 Link Dependencies mpi, zlib, boost, hdf5 Description: SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure) is an object-oriented C++ software library enables exploration of numerical, algorithmic, parallel computing, and software issues associ- ated with applying structured adaptive mesh refinement (SAMR) technology in large-scale parallel application development.

1.10.626 samtools

Homepage: • www.htslib.org Spack package: • samtools/package.py Versions: 1.3.1, 1.2 Build Dependencies ncurses, htslib, zlib Link Dependencies ncurses, htslib, zlib Description: SAM Tools provide various utilities for manipulating alignments in the SAM format, including sorting, merging, indexing and generating alignments in a per-position format

1.10.627 scalasca

Homepage: • http://www.scalasca.org Spack package: • scalasca/package.py Versions: 2.2.2, 2.1 Build Dependencies cube, scorep, mpi Link Dependencies cube, scorep, mpi Description: Scalasca is a software tool that supports the performance optimization of parallel programs by measuring and analyzing their runtime behavior. The analysis identifies potential performance bottlenecks - in particular those concerning communication and synchronization - and offers guidance in exploring their causes.

1.10. Package List 311 Spack Documentation, Release 0.9

1.10.628 scons

Homepage: • http://scons.org Spack package: • scons/package.py Versions: 2.5.0 Build Dependencies python Link Dependencies python Description: SCons is a software construction tool

1.10.629 scorep

Homepage: • http://www.vi-hps.org/projects/score-p Spack package: • scorep/package.py Versions: 2.0.2, 1.4.2, 1.3 Build Dependencies otf2, opari2, cube, papi, mpi Link Dependencies otf2, opari2, cube, papi, mpi Description: The Score-P measurement infrastructure is a highly scalable and easy-to- use tool suite for profiling, event tracing, and online analysis of HPC applications.

1.10.630 scotch

Homepage: • http://www.labri.fr/perso/pelegrin/scotch/ Spack package: • scotch/package.py Versions: 6.0.3, 6.0.0, 5.1.10b Build Dependencies flex, zlib, bison, mpi Link Dependencies zlib, mpi Description: Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.

312 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.631 scr

Homepage: • https://computation.llnl.gov/project/scr/ Spack package: • scr/package.py Versions: 1.1.8, 1.1-7 Build Dependencies mpi Link Dependencies mpi Description: SCR caches checkpoint data in storage on the compute nodes of a Linux cluster to provide a fast, scalable checkpoint/restart capability for MPI codes

1.10.632 screen

Homepage: • https://www.gnu.org/software/screen/ Spack package: • screen/package.py Versions: 4.3.1, 4.3.0, 4.2.1, 4.2.0, 4.0.3, 4.0.2, 3.9.15, 3.9.11, 3.9.10, 3.9.9, 3.9.8, 3.9.4, 3.7.6, 3.7.4, 3.7.2, 3.7.1 Build Dependencies ncurses Link Dependencies ncurses Description: Screen is a full-screen that multiplexes a physical terminal between several processes, typically interactive shells.

1.10.633 sed

Homepage: • http://www.gnu.org/software/sed/ Spack package: • sed/package.py Versions: 4.2.2 Description: GNU implementation of the famous stream editor.

1.10. Package List 313 Spack Documentation, Release 0.9

1.10.634 seqtk

Homepage: • https://github.com/lh3/seqtk Spack package: • seqtk/package.py Versions: 1.2, 1.1 Build Dependencies zlib Link Dependencies zlib Description: Toolkit for processing sequences in FASTA/Q formats.

1.10.635 serf

Homepage: • https://serf.apache.org/ Spack package: • serf/package.py Versions: 1.3.8 Build Dependencies expat, apr, zlib, openssl, apr-util, scons Link Dependencies apr, apr-util, zlib, expat, openssl Description: Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library

1.10.636 silo

Homepage: • http://wci.llnl.gov/simulation/computer-codes/silo Spack package: • silo/package.py Versions: 4.10.2, 4.9, 4.8 Build Dependencies qt, hdf5 Link Dependencies qt, hdf5 Description: Silo is a library for reading and writing a wide variety of scientific data to binary, disk files.

314 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.637 slepc

Homepage: • http://www.grycap.upv.es/slepc Spack package: • slepc/package.py Versions: 3.7.1, 3.6.3, 3.6.2 Build Dependencies petsc, arpack-ng Link Dependencies petsc, arpack-ng Description: Scalable Library for Eigenvalue Problem Computations.

1.10.638 snappy

Homepage: • https://code.google.com/p/snappy Spack package: • snappy/package.py Versions: 1.1.3 Description: A fast compressor/decompressor: https://code.google.com/p/snappy

1.10.639 sparsehash

Homepage: • https://github.com/sparsehash/sparsehash Spack package: • sparsehash/package.py Versions: 2.0.3 Description: Sparse and dense hash-tables for C++ by Google

1.10.640 spindle

Homepage: • https://computation.llnl.gov/project/spindle/ Spack package: • spindle/package.py Versions: 0.8.1

1.10. Package List 315 Spack Documentation, Release 0.9

Build Dependencies launchmon Link Dependencies launchmon Description: Spindle improves the library-loading performance of dynamically linked HPC applications. Without Spindle large MPI jobs can overload on a shared file system when loading dynamically linked libraries, causing site-wide performance problems.

1.10.641 spot

Homepage: • https://spot.lrde.epita.fr/index.html Spack package: • spot/package.py Versions: 1.99.3 Build Dependencies python Link Dependencies python Description: Spot is a C++11 library for omega-automata manipulation and model checking.

1.10.642 sqlite

Homepage: • www.sqlite.org Spack package: • sqlite/package.py Versions: 3.8.5 Description: SQLite3 is an SQL database engine in a C library. Programs that link the SQLite3 library can have SQL database access without running a separate RDBMS process.

1.10.643 stat

Homepage: • http://paradyn.org/STAT/STAT.html Spack package: • stat/package.py Versions: 3.0.0b, 2.2.0, 2.1.0, 2.0.0 Build Dependencies autoconf , launchmon, py-pygtk, swig, automake, python, mrnet, libtool, libelf , graphviz, graphlib, mpi, dyninst, libdwarf

316 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Link Dependencies launchmon, py-pygtk, swig, mpi, python, mrnet, libelf , graphlib, graphviz, dyninst, libdwarf Run Dependencies graphviz Description: Library to create, manipulate, and export graphs Graphlib.

1.10.644 stream

Homepage: • https://www.cs.virginia.edu/stream/ref.html Spack package: • stream/package.py Versions: 5.10 Description: The STREAM benchmark is a simple synthetic benchmark program that measures sustainable memory bandwidth (in MB/s) and the corresponding computation rate for simple vector kernels.

1.10.645 subversion

Homepage: • https://subversion.apache.org/ Spack package: • subversion/package.py Versions: 1.9.3, 1.8.13 Build Dependencies apr, apr-util, sqlite, zlib, serf Link Dependencies apr, apr-util, sqlite, zlib, serf Description: Apache Subversion - an open source version control system.

1.10.646 suite-sparse

Homepage: • http://faculty.cse.tamu.edu/davis/suitesparse.html Spack package: • suite-sparse/package.py Versions: 4.5.3, 4.5.1 Build Dependencies lapack, blas, tbb, metis Link Dependencies lapack, blas, tbb, metis Description: SuiteSparse is a suite of sparse matrix algorithms

1.10. Package List 317 Spack Documentation, Release 0.9

1.10.647 sundials

Homepage: • http://computation.llnl.gov/casc/sundials/ Spack package: • sundials/package.py Versions: 2.6.2 Build Dependencies superlu-mt, cmake, lapack, blas, mpi, suite-sparse Link Dependencies superlu-mt, lapack, blas, suite-sparse, mpi Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)

1.10.648 superlu

Homepage: • http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu Spack package: • superlu/package.py Versions: 5.2.1 Build Dependencies blas Link Dependencies blas Description: 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.

1.10.649 superlu-dist

Homepage: • http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ Spack package: • superlu-dist/package.py Versions: 5.0.0, 4.3, 4.2, 4.1, 4.0 Build Dependencies lapack, blas, metis, parmetis, mpi Link Dependencies lapack, blas, metis, parmetis, mpi Description: A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equa- tions on high performance machines.

318 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.650 superlu-mt

Homepage: • http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt Spack package: • superlu-mt/package.py Versions: 3.1 Build Dependencies blas Link Dependencies blas Description: SuperLU is a general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines. SuperLU_MT is designed for shared memory parallel ma- chines.

1.10.651 swiftsim

Homepage: • http://icc.dur.ac.uk/swift/ Spack package: • swiftsim/package.py Versions: 0.3.0 Build Dependencies hdf5, metis, mpi, m4, libtool, autoconf , automake Link Dependencies mpi, metis, hdf5 Description: SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides astrophysicists with a state of the art framework to perform particle based simulations.

1.10.652 swig

Homepage: • http://www.swig.org Spack package: • swig/package.py Versions: 3.0.10, 3.0.8, 3.0.2, 2.0.12, 2.0.2, 1.3.40 Build Dependencies pcre Link Dependencies pcre Description: SWIG is an interface compiler that connects programs written in C and C++ with scripting languages such as Perl, Python, Ruby, and Tcl. It works by taking the declarations found in C/C++ header files and using them to generate the wrapper code that scripting languages need to access the underlying C/C++ code. In addition, SWIG provides a variety of customization features that let you tailor the wrapping process to suit your application.

1.10. Package List 319 Spack Documentation, Release 0.9

1.10.653 sympol

Homepage: • http://www.math.uni-rostock.de/~rehn/software/sympol.html Spack package: • sympol/package.py Versions: 0.1.8 Build Dependencies lrslib, boost, cmake, bliss, gmp Link Dependencies lrslib, boost, gmp, bliss Description: SymPol is a C++ tool to work with symmetric polyhedra

1.10.654 szip

Homepage: • https://www.hdfgroup.org/doc_resource/SZIP/ Spack package: • szip/package.py Versions: 2.1 Description: An implementation of the extended-Rice lossless compression algorithm. It provides lossless compres- sion of scientific data, and is provided with HDF software products.

1.10.655 tar

Homepage: • https://www.gnu.org/software/tar/ Spack package: • tar/package.py Versions: 1.29, 1.28 Description: GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation.

320 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.656 task

Homepage: • http://www.taskwarrior.org Spack package: • task/package.py Versions: 2.4.4 Build Dependencies gnutls, libuuid, cmake Link Dependencies gnutls, libuuid Description: Feature-rich console based todo list manager

1.10.657 taskd

Homepage: • http://www.taskwarrior.org Spack package: • taskd/package.py Versions: 1.1.0 Build Dependencies gnutls, libuuid, cmake Link Dependencies gnutls, libuuid Description: TaskWarrior task synchronization daemon

1.10.658 tau

Homepage: • http://www.cs.uoregon.edu/research/tau Spack package: • tau/package.py Versions: 2.25, 2.24.1, 2.24, 2.23.1 Build Dependencies pdt, scorep, binutils, mpi Link Dependencies pdt, scorep, binutils, mpi Description: A portable profiling and tracing toolkit for performance analysis of parallel programs written in Fortran, C, C++, UPC, Java, Python.

1.10. Package List 321 Spack Documentation, Release 0.9

1.10.659 tbb

Homepage: • http://www.threadingbuildingblocks.org/ Spack package: • tbb/package.py Versions: 4.4.4, 4.4.3 Description: Widely used C++ template library for task parallelism. Intel Threading Building Blocks (Intel TBB) lets you easily write parallel C++ programs that take full advantage of multicore performance, that are portable and composable, and that have future-proof scalability.

1.10.660 tcl

Homepage: • http://www.tcl.tk Spack package: • tcl/package.py Versions: 8.6.5, 8.6.4, 8.6.3, 8.5.19 Build Dependencies zlib Link Dependencies zlib Description: Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more. Open source and business-friendly, Tcl is a mature yet evolving language that is truly cross platform, easily deployed and highly extensible.

1.10.661 tetgen

Homepage: • http://www.tetgen.org Spack package: • tetgen/package.py Versions: 1.5.0, 1.4.3 Build Dependencies cmake Description: TetGen is a program and library that can be used to generate tetrahedral meshes for given 3D polyhedral domains. TetGen generates exact constrained Delaunay tetrahedralizations, boundary conforming Delaunay meshes, and Voronoi paritions.

322 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.662 texinfo

Homepage: • https://www.gnu.org/software/texinfo/ Spack package: • texinfo/package.py Versions: 6.0, 5.2, 5.1, 5.0 Description: Texinfo is the official documentation format of the GNU project. It was invented by and Bob Chassell many years ago, loosely based on Brian Reid’s Scribe and other formatting languages of the time. It is used by many non-GNU projects as well.FIXME: put a proper description of your package here.

1.10.663 texlive

Homepage: • http://www.tug.org/texlive Spack package: • texlive/package.py Versions: live Build Dependencies perl Description: TeX Live is a free software distribution for the TeX typesetting system

1.10.664 the_platinum_searcher

Homepage: • https://github.com/monochromegane/the_platinum_searcher Spack package: • the_platinum_searcher/package.py Versions: head Build Dependencies go Link Dependencies go Description: Fast parallel recursive grep alternative

1.10. Package List 323 Spack Documentation, Release 0.9

1.10.665 the_silver_searcher

Homepage: • http://geoff.greer.fm/ag/ Spack package: • the_silver_searcher/package.py Versions: 0.32.0, 0.30.0 Build Dependencies pcre, xz, pkg-config Link Dependencies pcre, xz Description: Fast recursive grep alternative

1.10.666 thrift

Homepage: • http://thrift.apache.org Spack package: • thrift/package.py Versions: 0.9.2 Build Dependencies flex, jdk, python, zlib, openssl, automake, libtool, libevent, bison, autoconf , boost Link Dependencies jdk, python, zlib, openssl, libevent, boost Description: Software framework for scalable cross-language services development. Thrift combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and and other languages.

1.10.667 tk

Homepage: • http://www.tcl.tk Spack package: • tk/package.py Versions: 8.6.5, 8.6.3 Build Dependencies tcl Link Dependencies tcl Description: Tk is a graphical user interface toolkit that takes developing desktop applications to a higher level than conventional approaches. Tk is the standard GUI not only for Tcl, but for many other dynamic languages, and can produce rich, native applications that run unchanged across Windows, Mac OS X, Linux and more.

324 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.668 tmux

Homepage: • http://tmux.github.io Spack package: • tmux/package.py Versions: 2.2, 2.1, 1.9a Build Dependencies ncurses, libevent Link Dependencies ncurses, libevent Description: 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.

1.10.669 tmuxinator

Homepage: • https://github.com/tmuxinator/tmuxinator Spack package: • tmuxinator/package.py Versions: 0.6.11 Build Dependencies ruby Link Dependencies ruby Description: A session configuration creator and manager for tmux

1.10.670 tree

Homepage: • http://mama.indstate.edu/users/ice/tree/ Spack package: • tree/package.py Versions: 1.7.0 Description: Tree is a recursive directory listing command that produces a depth indented listing of files, which is colorized ala dircolors if the LS_COLORS environment variable is set and output is to tty. Tree has been ported and reported to work under the following operating systems: Linux, FreeBSD, OS X, Solaris, HP/UX, Cygwin, HP Nonstop and OS/2.

1.10. Package List 325 Spack Documentation, Release 0.9

1.10.671 triangle

Homepage: • http://www.cs.cmu.edu/~quake/triangle.html Spack package: • triangle/package.py Versions: 1.6 Description: Triangle is a two-dimensional mesh generator and Delaunay triangulator. Triangle generates exact De- launay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations, Voronoi dia- grams, and high-quality triangular meshes.

1.10.672 trilinos

Homepage: • https://trilinos.org/ Spack package: • trilinos/package.py Versions: 12.6.4, 12.6.3, 12.6.2, 12.6.1, 12.4.2, 12.2.1, 12.0.1, 11.14.3, 11.14.2, 11.14.1 Build Dependencies superlu-dist, matio, cmake, glm, hypre, lapack, boost, swig, metis, parmetis, mpi, suite-sparse, netcdf , mumps, python, py-numpy, scalapack, blas, hdf5 Link Dependencies superlu-dist, matio, glm, hypre, lapack, boost, swig, metis, parmetis, mpi, suite-sparse, netcdf , mumps, python, py-numpy, scalapack, blas, hdf5 Description: The Trilinos Project is an effort to develop algorithms and enabling technologies within an object- oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages.

1.10.673 turbomole

Homepage: • http://www.turbomole-gmbh.com/ Spack package: • turbomole/package.py Versions: 7.0.2 Description: TURBOMOLE: Program Package for ab initio Electronic Structure Calculations. NB: Requires a li- cense to download.

326 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.674 udunits2

Homepage: • http://www.unidata.ucar.edu/software/udunits Spack package: • udunits2/package.py Versions: 2.2.20 Build Dependencies expat Link Dependencies expat Description: Automated units conversion

1.10.675 uncrustify

Homepage: • http://uncrustify.sourceforge.net/ Spack package: • uncrustify/package.py Versions: 0.61 Description: Source Code Beautifier for C, C++, C#, ObjectiveC, Java, and others.

1.10.676 unibilium

Homepage: • https://github.com/mauke/unibilium Spack package: • unibilium/package.py Versions: 1.2.0 Description: A terminfo parsing library

1.10.677 unison

Homepage: • https://www.cis.upenn.edu/~bcpierce/unison/ Spack package: • unison/package.py Versions: 2.48.4

1.10. Package List 327 Spack Documentation, Release 0.9

Build Dependencies ocaml Description: Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

1.10.678 unixodbc

Homepage: • http://www.unixodbc.org/ Spack package: • unixodbc/package.py Versions: 2.3.4 Description: ODBC is an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.

1.10.679 util-linux

Homepage: • http://freecode.com/projects/util-linux Spack package: • util-linux/package.py Versions: 2.25 Build Dependencies python Link Dependencies python Description: Util-linux is a suite of essential utilities for any Linux system.

1.10.680 valgrind

Homepage: • http://valgrind.org/ Spack package: • valgrind/package.py Versions: 3.11.0, 3.10.1, 3.10.0 Build Dependencies boost, mpi Link Dependencies boost, mpi

328 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Description: An instrumentation framework for building dynamic analysis. There are Valgrind tools that can auto- matically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools. Valgrind is Open Source / Free Software, and is freely available under the GNU General Public License, version 2.

1.10.681 vim

Homepage: • http://www.vim.org Spack package: • vim/package.py Versions: 7.4, 7.3, 7.2, 7.1, 7.0, 6.4, 6.3, 6.2, 6.1.405, 6.1, 6.0 Build Dependencies python, ruby Link Dependencies python, ruby Run Dependencies cscope Description: Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. Vim is often called a “programmer’s editor,” and so useful for programming that many consider it an entire IDE. It’s not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.

1.10.682 visit

Homepage: • https://wci.llnl.gov/simulation/computer-codes/visit/ Spack package: • visit/package.py Versions: 2.10.2, 2.10.1 Build Dependencies python, vtk, qt, silo Link Dependencies python, vtk, qt, silo Description: VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.

1.10.683 vtk

Homepage: • http://www.vtk.org Spack package: • vtk/package.py

1.10. Package List 329 Spack Documentation, Release 0.9

Versions: 7.0.0, 6.3.0, 6.1.0 Build Dependencies cmake, qt Link Dependencies qt Description: The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing and visualization.

1.10.684 wget

Homepage: • http://www.gnu.org/software/wget/ Spack package: • wget/package.py Versions: 1.17, 1.16 Build Dependencies openssl Link Dependencies openssl Description: GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely- used Internet protocols. It is a non- interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.

1.10.685 wx

Homepage: • http://www.wxwidgets.org/ Spack package: • wx/package.py Versions: 3.0.1, 2.8.12 Build Dependencies gtkplus Link Dependencies gtkplus Description: wxWidgets is a C++ library that lets developers create applications for Windows, Mac OS X, Linux and other platforms with a single code base. It has popular language bindings for Python, Perl, Ruby and many other languages, and unlike other cross-platform toolkits, wxWidgets gives applications a truly native because it uses the platform’s native API rather than emulating the GUI. It’s also extensive, free, open-source and mature.

330 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.686 wxpropgrid

Homepage: • http://wxpropgrid.sourceforge.net/ Spack package: • wxpropgrid/package.py Versions: 1.4.15 Build Dependencies wx Link Dependencies wx Description: wxPropertyGrid is a property sheet control for wxWidgets. In other words, it is a specialized two- column grid for editing properties such as strings, numbers, flagsets, string arrays, and colours.

1.10.687 xcb-proto

Homepage: • http://xcb.freedesktop.org/ Spack package: • xcb-proto/package.py Versions: 1.11 Description: Protocol for libxcb

1.10.688 xerces-c

Homepage: • https://xerces.apache.org/xerces-c Spack package: • xerces-c/package.py Versions: 3.1.4 Description: Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs.

1.10. Package List 331 Spack Documentation, Release 0.9

1.10.689 xorg-util-macros

Homepage: • http://www.example.com Spack package: • xorg-util-macros/package.py Versions: 1.19.0 Description: The m4 macros used by all of the Xorg packages.

1.10.690 xproto

Homepage: • http://www.x.org/ Spack package: • xproto/package.py Versions: 7.0.29 Build Dependencies xorg-util-macros Link Dependencies xorg-util-macros Description: The Xorg protocol headers provide the header files required to build the system, and to allow other applications to build against the installed .

1.10.691 xz

Homepage: • http://tukaani.org/xz/ Spack package: • xz/package.py Versions: 5.2.2, 5.2.0 Description: XZ Utils is free general-purpose data compression software with high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.

332 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.10.692 yasm

Homepage: • http://yasm.tortall.net Spack package: • yasm/package.py Versions: 1.3.0 Description: Yasm is a complete rewrite of the NASM-2.11.06 assembler. It supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 object formats.

1.10.693 zeromq

Homepage: • http://zguide.zeromq.org/ Spack package: • zeromq/package.py Versions: 4.1.2, 4.1.1, 4.0.7, 4.0.6, 4.0.5 Build Dependencies libsodium Link Dependencies libsodium Description: The ZMQ networking/concurrency library and core API

1.10.694 zfp

Homepage: • http://computation.llnl.gov/projects/floating-point-compression Spack package: • zfp/package.py Versions: 0.5.0 Description: zfp is an open source C library for compressed floating-point arrays that supports very high throughput read and write random acces, target error bounds or bit rates. Although bit-for-bit lossless compression is not always possible, zfp is usually accurate to within machine epsilon in near-lossless mode, and is often orders of magnitude more accurate than other lossy compressors.

1.10. Package List 333 Spack Documentation, Release 0.9

1.10.695 zlib

Homepage: • http://zlib.net Spack package: • zlib/package.py Versions: 1.2.8 Description: A free, general-purpose, legally unencumbered lossless data-compression library.

1.10.696 zoltan

Homepage: • http://www.cs.sandia.gov/zoltan Spack package: • zoltan/package.py Versions: 3.83, 3.8, 3.6, 3.3 Build Dependencies mpi Link Dependencies mpi Description: The Zoltan library is a toolkit of parallel combinatorial algorithms for parallel, unstructured, and/or adaptive scientific applications. Zoltan’s largest component is a suite of dynamic load-balancing and paritioning algorithms that increase applications’ parallel performance by reducing idle time. Zoltan also has graph coloring and graph ordering algorithms, which are useful in task schedulers and parallel preconditioners.

1.10.697 zsh

Homepage: • http://www.zsh.org Spack package: • zsh/package.py Versions: 5.1.1 Build Dependencies pcre Link Dependencies pcre Description: Zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.

334 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.11 spack package

1.11.1 Subpackages spack.cmd package

Subpackages spack.cmd.common package

Submodules spack.cmd.common.arguments module spack.cmd.common.arguments.add_common_arguments(parser, list_of_arguments)

Module contents

Submodules spack.cmd.activate module spack.cmd.activate.activate(parser, args) spack.cmd.activate.setup_parser(subparser) spack.cmd.arch module spack.cmd.arch.arch(parser, args) spack.cmd.bootstrap module spack.cmd.bootstrap.bootstrap(parser, args) spack.cmd.bootstrap.get_origin_info(remote) spack.cmd.bootstrap.setup_parser(subparser) spack.cmd.cd module spack.cmd.cd.cd(parser, args) spack.cmd.cd.setup_parser(subparser) This is for decoration – spack cd is used through spack’s shell support. This allows spack cd to print a descriptive help message when called with -h.

1.11. spack package 335 Spack Documentation, Release 0.9

spack.cmd.checksum module

spack.cmd.checksum.checksum(parser, args) spack.cmd.checksum.get_checksums(versions, urls, **kwargs) spack.cmd.checksum.setup_parser(subparser) spack.cmd.clean module spack.cmd.clean.clean(parser, args) spack.cmd.clean.setup_parser(subparser) spack.cmd.compiler module spack.cmd.compiler.compiler(parser, args) spack.cmd.compiler.compiler_find(args) Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack’s configuration. spack.cmd.compiler.compiler_info(args) Print info about all compilers matching a spec. spack.cmd.compiler.compiler_list(args) spack.cmd.compiler.compiler_remove(args) spack.cmd.compiler.setup_parser(subparser) spack.cmd.compilers module spack.cmd.compilers.compilers(parser, args) spack.cmd.compilers.setup_parser(subparser) spack.cmd.config module spack.cmd.config.config(parser, args) spack.cmd.config.config_edit(args) spack.cmd.config.config_get(args) spack.cmd.config.setup_parser(subparser) spack.cmd.create module class spack.cmd.create.BuildSystemGuesser Bases: object spack.cmd.create.create(parser, args) spack.cmd.create.fetch_tarballs(url, name, version) Try to find versions of the supplied archive by scraping the web. Prompts the user to select how many to download if many are found.

336 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.cmd.create.find_repository(spec, args) spack.cmd.create.guess_name_and_version(url, args) spack.cmd.create.make_version_calls(ver_hash_tuples) Adds a version() call to the package for each version found. spack.cmd.create.setup_parser(subparser) spack.cmd.deactivate module spack.cmd.deactivate.deactivate(parser, args) spack.cmd.deactivate.setup_parser(subparser) spack.cmd.dependents module spack.cmd.dependents.dependents(parser, args) spack.cmd.dependents.setup_parser(subparser) spack.cmd.diy module spack.cmd.diy.diy(self, args) spack.cmd.diy.setup_parser(subparser) spack.cmd.doc module spack.cmd.doc.doc(parser, args) spack.cmd.doc.setup_parser(subparser) spack.cmd.edit module spack.cmd.edit.edit(parser, args) spack.cmd.edit.edit_package(name, repo_path, namespace, force=False) spack.cmd.edit.setup_parser(subparser)

spack.cmd.env module

spack.cmd.env.env(parser, args) spack.cmd.env.setup_parser(subparser)

spack.cmd.extensions module

spack.cmd.extensions.extensions(parser, args) spack.cmd.extensions.setup_parser(subparser)

1.11. spack package 337 Spack Documentation, Release 0.9

spack.cmd.fetch module

spack.cmd.fetch.fetch(parser, args) spack.cmd.fetch.setup_parser(subparser)

spack.cmd.find module

spack.cmd.find.find(parser, args) spack.cmd.find.query_arguments(args) spack.cmd.find.setup_parser(subparser) spack.cmd.graph module spack.cmd.graph.graph(parser, args) spack.cmd.graph.setup_parser(subparser) spack.cmd.help module spack.cmd.help.help(parser, args) spack.cmd.help.setup_parser(subparser) spack.cmd.info module spack.cmd.info.info(parser, args) spack.cmd.info.padder(str_list, extra=0) Return a function to pad elements of a list. spack.cmd.info.print_text_info(pkg) Print out a plain text description of a package. spack.cmd.info.setup_parser(subparser)

spack.cmd.install module

spack.cmd.install.install(parser, args) spack.cmd.install.setup_parser(subparser)

spack.cmd.list module

spack.cmd.list.list(parser, args) spack.cmd.list.setup_parser(subparser)

338 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.cmd.load module

spack.cmd.load.load(parser, args) spack.cmd.load.setup_parser(subparser) Parser is only constructed so that this prints a nice help message with -h.

spack.cmd.location module

spack.cmd.location.location(parser, args) spack.cmd.location.setup_parser(subparser)

spack.cmd.md5 module

spack.cmd.md5.compute_md5_checksum(url) spack.cmd.md5.md5(parser, args) spack.cmd.md5.setup_parser(subparser) spack.cmd.mirror module spack.cmd.mirror.mirror(parser, args) spack.cmd.mirror.mirror_add(args) Add a mirror to Spack. spack.cmd.mirror.mirror_create(args) Create a directory to be used as a spack mirror, and fill it with package archives. spack.cmd.mirror.mirror_list(args) Print out available mirrors to the console. spack.cmd.mirror.mirror_remove(args) Remove a mirror by name. spack.cmd.mirror.setup_parser(subparser) spack.cmd.module module exception spack.cmd.module.MultipleMatches Bases: exceptions.Exception exception spack.cmd.module.NoMatch Bases: exceptions.Exception spack.cmd.module.find(mtype, specs, args) Look at all installed packages and see if the spec provided matches any. If it does, check whether there is a module file of type there, and print out the name that the user should type to use that package’s module. spack.cmd.module.loads(mtype, specs, args) Prompt the list of modules associated with a list of specs spack.cmd.module.module(parser, args)

1.11. spack package 339 Spack Documentation, Release 0.9 spack.cmd.module.refresh(mtype, specs, args) Regenerate module files for item in specs spack.cmd.module.rm(mtype, specs, args) Deletes module files associated with items in specs spack.cmd.module.setup_parser(subparser) spack.cmd.module.subcommand(subparser_name) Registers a function in the callbacks dictionary spack.cmd.package_list module spack.cmd.package_list.github_url(pkg) Link to a package file on github. spack.cmd.package_list.package_list(parser, args) spack.cmd.package_list.print_rst_package_list() Print out information on all packages in restructured text. spack.cmd.package_list.rst_table(elts) Print out a RST-style table. spack.cmd.patch module spack.cmd.patch.patch(parser, args) spack.cmd.patch.setup_parser(subparser) spack.cmd.pkg module spack.cmd.pkg.diff_packages(rev1, rev2) spack.cmd.pkg.get_git() spack.cmd.pkg.list_packages(rev) spack.cmd.pkg.pkg(parser, args) spack.cmd.pkg.pkg_add(args) spack.cmd.pkg.pkg_added(args) Show packages added since a commit. spack.cmd.pkg.pkg_diff(args) Compare packages available in two different git revisions. spack.cmd.pkg.pkg_list(args) List packages associated with a particular spack git revision. spack.cmd.pkg.pkg_removed(args) Show packages removed since a commit. spack.cmd.pkg.setup_parser(subparser)

340 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.cmd.providers module spack.cmd.providers.providers(parser, args) spack.cmd.providers.setup_parser(subparser) spack.cmd.purge module spack.cmd.purge.purge(parser, args) spack.cmd.purge.setup_parser(subparser) spack.cmd.python module spack.cmd.python.python(parser, args) spack.cmd.python.setup_parser(subparser) spack.cmd.reindex module spack.cmd.reindex.reindex(parser, args) spack.cmd.repo module spack.cmd.repo.repo(parser, args) spack.cmd.repo.repo_add(args) Add a package source to Spack’s configuration. spack.cmd.repo.repo_create(args) Create a new package repository. spack.cmd.repo.repo_list(args) Show registered repositories and their namespaces. spack.cmd.repo.repo_remove(args) Remove a repository from Spack’s configuration. spack.cmd.repo.setup_parser(subparser) spack.cmd.restage module spack.cmd.restage.restage(parser, args) spack.cmd.restage.setup_parser(subparser) spack.cmd.setup module spack.cmd.setup.setup(self, args) spack.cmd.setup.setup_parser(subparser)

1.11. spack package 341 Spack Documentation, Release 0.9

spack.cmd.spec module

spack.cmd.spec.setup_parser(subparser) spack.cmd.spec.spec(parser, args)

spack.cmd.stage module

spack.cmd.stage.setup_parser(subparser) spack.cmd.stage.stage(parser, args)

spack.cmd.test module

class spack.cmd.test.MockCache Bases: object fetcher(targetPath, digest) store(copyCmd, relativeDst) class spack.cmd.test.MockCacheFetcher Bases: object fetch() set_stage(stage) spack.cmd.test.setup_parser(subparser) spack.cmd.test.test(parser, args)

spack.cmd.test_install module

class spack.cmd.test_install.TestCase(classname, name, time=None) Bases: object results = {0: None, 1: ‘failure’, 2: ‘skipped’, 3: ‘error’} set_result(result_type, message=None, error_type=None, text=None) class spack.cmd.test_install.TestResult Bases: object ERRORED = 3 FAILED = 1 PASSED = 0 SKIPPED = 2 class spack.cmd.test_install.TestSuite(filename) Bases: object append(item) spack.cmd.test_install.failed_dependencies(spec) spack.cmd.test_install.fetch_log(path)

342 Chapter 1. Table of Contents Spack Documentation, Release 0.9 spack.cmd.test_install.get_filename(args, top_spec) spack.cmd.test_install.get_top_spec_or_die(args) spack.cmd.test_install.install_single_spec(spec, number_of_jobs) spack.cmd.test_install.setup_parser(subparser) spack.cmd.test_install.test_install(parser, args) spack.cmd.uninstall module spack.cmd.uninstall.concretize_specs(specs, allow_multiple_matches=False, force=False) Returns a list of specs matching the non necessarily concretized specs given from cli Args: specs: list of specs to be matched against installed packages allow_multiple_matches : if True multiple matches are admitted Return: list of specs spack.cmd.uninstall.do_uninstall(specs, force) Uninstalls all the specs in a list. Args: specs: list of specs to be uninstalled force: force uninstallation (boolean) spack.cmd.uninstall.installed_dependents(specs) Returns a dictionary that maps a spec with a list of its installed dependents Args: specs: list of specs to be checked for dependents Returns: dictionary of installed dependents spack.cmd.uninstall.setup_parser(subparser) spack.cmd.uninstall.uninstall(parser, args) spack.cmd.unload module spack.cmd.unload.setup_parser(subparser) Parser is only constructed so that this prints a nice help message with -h. spack.cmd.unload.unload(parser, args) spack.cmd.unuse module spack.cmd.unuse.setup_parser(subparser) Parser is only constructed so that this prints a nice help message with -h. spack.cmd.unuse.unuse(parser, args) spack.cmd.url_parse module spack.cmd.url_parse.print_name_and_version(url) spack.cmd.url_parse.setup_parser(subparser) spack.cmd.url_parse.url_parse(parser, args)

1.11. spack package 343 Spack Documentation, Release 0.9

spack.cmd.urls module

spack.cmd.urls.setup_parser(subparser) spack.cmd.urls.urls(parser, args)

spack.cmd.use module

spack.cmd.use.setup_parser(subparser) Parser is only constructed so that this prints a nice help message with -h. spack.cmd.use.use(parser, args)

spack.cmd.versions module

spack.cmd.versions.setup_parser(subparser) spack.cmd.versions.versions(parser, args)

spack.cmd.view module

Produce a “view” of a Spack DAG. A “view” is file hierarchy representing the union of a number of Spack-installed package file hierarchies. The union is formed from: • specs resolved from the package names given by the user (the seeds) • all depenencies of the seeds unless user specifies –no-depenencies • less any specs with names matching the regular expressions given by –exclude The view can be built and tore down via a number of methods (the “actions”): • symlink :: a file system view which is a directory hierarchy that is the union of the hierarchies of the installed packages in the DAG where installed files are referenced via symlinks. • hardlink :: like the symlink view but hardlinks are used. • statlink :: a view producing a status report of a symlink or hardlink view. The file system view concept is imspired by Nix, implemented by brett.viren@.com ca 2016. spack.cmd.view.assuredir(path) Assure path exists as a directory spack.cmd.view.check_one(spec, path, verbose=False) Check status of view in path against spec spack.cmd.view.filter_exclude(specs, exclude) Filter specs given sequence of exclude regex spack.cmd.view.flatten(seeds, descend=True) Normalize and flattend seed specs and descend hiearchy spack.cmd.view.link_one(spec, path, link=, verbose=False) Link all files in spec into directory path. spack.cmd.view.purge_empty_directories(path) Ascend up from the leaves accessible from path and remove empty directories.

344 Chapter 1. Table of Contents Spack Documentation, Release 0.9 spack.cmd.view.relative_to(prefix, path) Return end of path relative to prefix spack.cmd.view.remove_one(spec, path, verbose=False) Remove any files found in spec from path and purge empty directories. spack.cmd.view.setup_parser(sp) spack.cmd.view.transform_path(spec, path, prefix=None) Return the a relative path corresponding to given path spec.prefix spack.cmd.view.view(parser, args) Produce a view of a set of packages. spack.cmd.view.visitor_add(specs, args) Symlink all files found in specs spack.cmd.view.visitor_check(specs, args) Give status of view in args.path relative to specs spack.cmd.view.visitor_hard(specs, args) Hardlink all files found in specs spack.cmd.view.visitor_hardlink(specs, args) Hardlink all files found in specs spack.cmd.view.visitor_remove(specs, args) Remove all files and directories found in specs from args.path spack.cmd.view.visitor_rm(specs, args) Remove all files and directories found in specs from args.path spack.cmd.view.visitor_soft(specs, args) Symlink all files found in specs spack.cmd.view.visitor_statlink(specs, args) Give status of view in args.path relative to specs spack.cmd.view.visitor_status(specs, args) Give status of view in args.path relative to specs spack.cmd.view.visitor_symlink(specs, args) Symlink all files found in specs

Module contents spack.cmd.ask_for_confirmation(message) spack.cmd.disambiguate_spec(spec) spack.cmd.display_specs(specs, **kwargs) spack.cmd.elide_list(line_list, max_num=10) Takes a long list and limits it to a smaller number of elements, replacing intervening elements with ‘...’. For example: elide_list([1,2,3,4,5,6],4)

gives: [1,2,3,'...',6] spack.cmd.get_cmd_function_name(name)

1.11. spack package 345 Spack Documentation, Release 0.9

spack.cmd.get_command(name) Imports the command’s function from a module and returns it. spack.cmd.get_module(name) Imports the module for a particular command name and returns it. spack.cmd.gray_hash(spec, length) spack.cmd.parse_specs(args, **kwargs) Convenience function for parsing arguments from specs. Handles common exceptions and dies if there are errors.

spack.compilers package

Submodules

spack.compilers.cce module

class spack.compilers.cce.Cce(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler Cray compiler environment compiler. PrgEnv = ‘PrgEnv-cray’ PrgEnv_compiler = ‘cce’ cc_names = [’cc’] cxx_names = [’CC’] classmethod default_version(comp) f77_names = [’ftn’] fc_names = [’ftn’] link_paths = {‘cc’: ‘cc’, ‘cxx’: ‘c++’, ‘f77’: ‘f77’, ‘fc’: ‘fc’} suffixes = [’-mp-\\d\\.\\d’] spack.compilers.clang module class spack.compilers.clang.Clang(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler cc_names = [’clang’] cxx11_flag cxx_names = [’clang++’] classmethod default_version(comp) The ‘–version’ option works for clang compilers. On most platforms, output looks like this: clang version 3.1 (trunk 149096) Target: x86_64-unknown-linux-gnu Thread model: posix

On Mac OS X, it looks like this:

346 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.2.0 Thread model: posix

f77_names = [] fc_names = [] is_apple link_paths = {‘cc’: ‘clang/clang’, ‘cxx’: ‘clang/clang++’, ‘f77’: ‘f77’, ‘fc’: ‘f90’} openmp_flag

spack.compilers.gcc module

class spack.compilers.gcc.Gcc(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler PrgEnv = ‘PrgEnv-gnu’ PrgEnv_compiler = ‘gcc’ cc_names = [’gcc’] cxx11_flag cxx14_flag cxx_names = [’g++’] f77_names = [’gfortran’] classmethod f77_version(f77) fc_names = [’gfortran’] classmethod fc_version(fc) link_paths = {‘cc’: ‘gcc/gcc’, ‘cxx’: ‘gcc/g++’, ‘f77’: ‘gcc/gfortran’, ‘fc’: ‘gcc/gfortran’} openmp_flag suffixes = [’-mp-\\d\\.\\d’, ‘-\\d\\.\\d’, ‘-\\d’] spack.compilers.intel module class spack.compilers.intel.Intel(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler PrgEnv = ‘PrgEnv-intel’ PrgEnv_compiler = ‘intel’ cc_names = [’icc’] cxx11_flag cxx_names = [’icpc’] classmethod default_version(comp) The ‘–version’ option seems to be the most consistent one for intel compilers. Output looks like this:

1.11. spack package 347 Spack Documentation, Release 0.9

icpc (ICC) 12.1.5 20120612 Copyright (C) 1985-2012 Intel Corporation. All rights reserved.

or: ifort (IFORT) 12.1.5 20120612 Copyright (C) 1985-2012 Intel Corporation. All rights reserved.

f77_names = [’ifort’] fc_names = [’ifort’] link_paths = {‘cc’: ‘intel/icc’, ‘cxx’: ‘intel/icpc’, ‘f77’: ‘intel/ifort’, ‘fc’: ‘intel/ifort’} openmp_flag spack.compilers.nag module class spack.compilers.nag.Nag(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler cc_names = [] cxx11_flag cxx_names = [] classmethod default_version(comp) The ‘-V’ option works for nag compilers. Output looks like this: NAG Fortran Compiler Release 6.0(Hibiya) Build 1037 Product NPL6A60NA for x86-64 Linux

f77_names = [’nagfor’] f77_rpath_arg fc_names = [’nagfor’] fc_rpath_arg link_paths = {‘cc’: ‘cc’, ‘cxx’: ‘c++’, ‘f77’: ‘nag/nagfor’, ‘fc’: ‘nag/nagfor’} openmp_flag spack.compilers.pgi module class spack.compilers.pgi.Pgi(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler PrgEnv = ‘PrgEnv-pgi’ PrgEnv_compiler = ‘pgi’ cc_names = [’pgcc’] cxx11_flag cxx_names = [’pgc++’, ‘pgCC’] classmethod default_version(comp) The ‘-V’ option works for all the PGI compilers. Output looks like this:

348 Chapter 1. Table of Contents Spack Documentation, Release 0.9

pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge The Portland Group - PGI Compilers and Tools Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.

f77_names = [’pgfortran’, ‘pgf77’] fc_names = [’pgfortran’, ‘pgf95’, ‘pgf90’] link_paths = {‘cc’: ‘pgi/pgcc’, ‘cxx’: ‘pgi/pgc++’, ‘f77’: ‘pgi/pgfortran’, ‘fc’: ‘pgi/pgfortran’} openmp_flag spack.compilers.xl module class spack.compilers.xl.Xl(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: spack.compiler.Compiler cc_names = [’xlc’, ‘xlc_r’] cxx11_flag cxx_names = [’xlC’, ‘xlC_r’, ‘xlc++’, ‘xlc++_r’] classmethod default_version(comp) The ‘-qversion’ is the standard option fo XL compilers. Output looks like this: IBM XL C/C++ for Linux, V11.1 (5724-X14) Version: 11.01.0000.0000

or: IBM XL Fortran for Linux, V13.1 (5724-X16) Version: 13.01.0000.0000

or: IBM XL C/C++ for AIX, V11.1 (5724-X13) Version: 11.01.0000.0009

or: IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0 Version: 09.00.0000.0017

f77_names = [’xlf’, ‘xlf_r’] classmethod f77_version(f77) fc_names = [’xlf90’, ‘xlf90_r’, ‘xlf95’, ‘xlf95_r’, ‘xlf2003’, ‘xlf2003_r’, ‘xlf2008’, ‘xlf2008_r’] classmethod fc_version(fc) The fortran and C/C++ versions of the XL compiler are always two units apart. By this we mean that the fortran release that goes with XL C/C++ 11.1 is 13.1. Having such a difference in version number is confusing spack quite a lot. Most notably if you keep the versions as is the default xl compiler will only have fortran and no C/C++. So we associate the Fortran compiler with the version associated to the C/C++ compiler. One last stumble. Version numbers over 10 have at least a .1 those under 10 a .0. There is no xlf 9.x or under currently available. BG/P and BG/L can such a compiler mix and possibly older version of AIX and linux on power. link_paths = {‘cc’: ‘xl/xlc’, ‘cxx’: ‘xl/xlc++’, ‘f77’: ‘xl/xlf’, ‘fc’: ‘xl/xlf90’} openmp_flag

1.11. spack package 349 Spack Documentation, Release 0.9

Module contents

This module contains functions related to finding compilers on the system and configuring Spack to use multiple compilers. exception spack.compilers.CompilerSpecInsufficientlySpecificError(compiler_spec) Bases: spack.error.SpackError exception spack.compilers.InvalidCompilerConfigurationError(compiler_spec) Bases: spack.error.SpackError exception spack.compilers.NoCompilerForSpecError(compiler_spec, target) Bases: spack.error.SpackError exception spack.compilers.NoCompilersError Bases: spack.error.SpackError spack.compilers.add_compilers_to_config(compilers, scope=None, init_config=True) Add compilers to the config for the specified architecture. Arguments: • compilers: a list of Compiler objects. • scope: configuration scope to modify. spack.compilers.all_compiler_types() spack.compilers.all_compilers(scope=None, init_config=True) spack.compilers.all_compilers_config(scope=None, init_config=True) Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. spack.compilers.all_os_classes() Return the list of classes for all operating systems available on this platform spack.compilers.class_for_compiler_name(compiler_name) Given a compiler module name, get the corresponding Compiler class. spack.compilers.compiler_for_spec(cspec_like, *args, **kwargs) spack.compilers.compilers_for_spec(cspec_like, *args, **kwargs) spack.compilers.default_compiler() spack.compilers.find(cspec_like, *args, **kwargs) spack.compilers.find_compilers(*paths) Return a list of compilers found in the suppied paths. This invokes the find_compilers() method for each oper- ating system associated with the host platform, and appends the compilers detected to a list. spack.compilers.get_compiler_config(scope=None, init_config=True) Return the compiler configuration for the specified architecture. spack.compilers.remove_compiler_from_config(cspec_like, *args, **kwargs) spack.compilers.supported(cspec_like, *args, **kwargs) spack.compilers.supported_compilers() Return a set of names of compilers supported by Spack. See available_compilers() to get a list of all the available versions of supported compilers.

350 Chapter 1. Table of Contents Spack Documentation, Release 0.9 spack.hooks package

Submodules spack.hooks.dotkit module spack.hooks.dotkit.post_install(pkg) spack.hooks.dotkit.post_uninstall(pkg) spack.hooks.extensions module spack.hooks.extensions.pre_uninstall(pkg) spack.hooks.licensing module spack.hooks.licensing.post_install(pkg) This hook symlinks local licenses to the global license for licensed software. spack.hooks.licensing.pre_install(pkg) This hook handles global license setup for licensed software. spack.hooks.licensing.set_up_license(pkg) Prompt the user, letting them know that a license is required. For packages that rely on license files, a global license file is created and opened for editing. For packages that rely on environment variables to point to a license, a warning message is printed. For all other packages, documentation on how to set up a license is printed. spack.hooks.licensing.symlink_license(pkg) Create local symlinks that point to the global license file. spack.hooks.licensing.write_license_file(pkg, license_path) Writes empty license file. Comments give suggestions on alternative methods of installing a license. spack.hooks.sbang module spack.hooks.sbang.filter_shebang(path) Adds a second shebang line, using sbang, at the beginning of a file. spack.hooks.sbang.filter_shebangs_in_directory(directory) spack.hooks.sbang.post_install(pkg) This hook edits scripts so that they call /bin/bash $spack_prefix/bin/sbang instead of something longer than the shebang limit. spack.hooks.sbang.shebang_too_long(path) Detects whether a file has a shebang line that is too long.

1.11. spack package 351 Spack Documentation, Release 0.9

spack.hooks.tclmodule module spack.hooks.tclmodule.post_install(pkg) spack.hooks.tclmodule.post_uninstall(pkg)

Module contents

This package contains modules with hooks for various stages in the Spack install process. You can add modules here and they’ll be executaed by package at various times during the package lifecycle. Each hook is just a function that takes a package as a parameter. Hooks are not executed in any particular order. Currently the following hooks are supported: • pre_install() • post_install() • pre_uninstall() • post_uninstall() This can be used to implement support for things like module systems (e.g. modules, dotkit, etc.) or to add other custom features. class spack.hooks.HookRunner(hook_name) Bases: object spack.operating_systems package

Submodules spack.operating_systems.cnl module class spack.operating_systems.cnl.Cnl Bases: spack.architecture.OperatingSystem Compute Node Linux (CNL) is the operating system used for the Cray XC series super computers. It is a very stripped down version of GNU/Linux. Any compilers found through this operating system will be used with modules. If updated, user must make sure that version and name are updated to indicate that OS has been upgraded (or downgraded) find_compiler(cmp_cls, *paths) find_compilers(*paths) spack.operating_systems.linux_distro module class spack.operating_systems.linux_distro.LinuxDistro Bases: spack.architecture.OperatingSystem This class will represent the autodetected operating system for a Linux System. Since there are many different flavors of Linux, this class will attempt to encompass them all through autodetection using the python module platform and the method platform.dist()

352 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.operating_systems.mac_os module class spack.operating_systems.mac_os.MacOs Bases: spack.architecture.OperatingSystem This class represents the macOS operating system. This will be auto detected using the python plat- form.mac_ver. The macOS platform will be represented using the major version operating system name, i.e el capitan, yosemite...etc.

Module contents spack.platforms package

Submodules spack.platforms.bgq module class spack.platforms.bgq.Bgq Bases: spack.architecture.Platform back_end = ‘powerpc’ default = ‘powerpc’ classmethod detect() front_end = ‘power7’ priority = 30 spack.platforms.cray module class spack.platforms.cray.Cray Bases: spack.architecture.Platform classmethod detect() priority = 10 classmethod setup_platform_environment(pkg, env) Change the linker to default dynamic to be more similar to linux/standard linker behavior spack.platforms.darwin module class spack.platforms.darwin.Darwin Bases: spack.architecture.Platform back_end = ‘x86_64’ default = ‘x86_64’ classmethod detect() front_end = ‘x86_64’ priority = 89

1.11. spack package 353 Spack Documentation, Release 0.9

spack.platforms.linux module class spack.platforms.linux.Linux Bases: spack.architecture.Platform classmethod detect() priority = 90 spack.platforms.test module class spack.platforms.test.Test Bases: spack.architecture.Platform back_end = ‘x86_64’ back_os = ‘CNL10’ default = ‘x86_64’ default_os = ‘CNL10’ classmethod detect() front_end = ‘x86_32’ priority = 1000000

Module contents spack.schema package

Submodules spack.schema.compilers module

Schema for compiler configuration files. spack.schema.mirrors module

Schema for mirror configuration files. spack.schema.modules module

Schema for mirror configuration files. spack.schema.packages module

Schema for packages.yaml configuration files.

354 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.schema.repos module

Schema for repository configuration files.

spack.schema.targets module

Schema for target configuration files.

Module contents

This module contains jsonschema files for all of Spack’s YAML formats.

spack.test package

Subpackages

spack.test.cmd package

Submodules

spack.test.cmd.find module class spack.test.cmd.find.FindTest(methodName=’runTest’) Bases: unittest.case.TestCase test_query_arguments() spack.test.cmd.module module class spack.test.cmd.module.TestModule(methodName=’runTest’) Bases: spack.test.mock_database.MockDatabase test_module_common_operations() spack.test.cmd.test_compiler_cmd module class spack.test.cmd.test_compiler_cmd.CompilerCmdTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Test compiler commands for add and remove test_compiler_add() test_compiler_remove() class spack.test.cmd.test_compiler_cmd.MockArgs(add_paths=[], scope=None, com- piler_spec=None, all=None) Bases: object spack.test.cmd.test_compiler_cmd.make_mock_compiler() Make a directory containing a fake, but detectable compiler.

1.11. spack package 355 Spack Documentation, Release 0.9

spack.test.cmd.test_install module class spack.test.cmd.test_install.MockArgs(package) Bases: object class spack.test.cmd.test_install.MockPackage(spec, buildLogPath) Bases: object do_install(*args, **kwargs) class spack.test.cmd.test_install.MockPackageDb(init=None) Bases: object get(spec) class spack.test.cmd.test_install.MockSpec(name, version, hashStr=None) Bases: object dag_hash() dependencies(deptype=None) dependents(deptype=None) short_spec traverse(order=None) class spack.test.cmd.test_install.TestInstallTest(methodName=’runTest’) Bases: unittest.case.TestCase Tests test-install where X->Y setUp() tearDown() test_dependency_already_installed() test_installing_both() spack.test.cmd.test_install.mock_fetch_log(path) spack.test.cmd.test_install.mock_open(*args, **kwds)

spack.test.cmd.uninstall module class spack.test.cmd.uninstall.MockArgs(packages, all=False, force=False, dependents=False) Bases: object class spack.test.cmd.uninstall.TestUninstall(methodName=’runTest’) Bases: spack.test.mock_database.MockDatabase test_uninstall()

Module contents

Submodules

spack.test.architecture module

Test checks if the architecture class is created correctly and also that the functions are looking for the correct architec- ture name

356 Chapter 1. Table of Contents Spack Documentation, Release 0.9 class spack.test.architecture.ArchitectureTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest setUp() tearDown() test_boolness() test_dict_functions_for_architecture() test_platform() test_user_back_end_input() Test when user inputs backend that both the backend target and backend operating system match test_user_defaults() test_user_front_end_input() Test when user inputs just frontend that both the frontend target and frontend operating system match test_user_input_combination() spack.test.build_system_guess module class spack.test.build_system_guess.InstallTest(methodName=’runTest’) Bases: unittest.case.TestCase Tests the build system guesser in spack create check_archive(filename, system) setUp() tearDown() test_R() test_autotools() test_cmake() test_python() test_scons() test_unknown() spack.test.cc module

This test checks that the Spack cc compiler wrapper is parsing arguments correctly. class spack.test.cc.CompilerTest(methodName=’runTest’) Bases: unittest.case.TestCase check_cc(command, args, expected) check_cpp(command, args, expected) check_cxx(command, args, expected) check_fc(command, args, expected) check_ld(command, args, expected)

1.11. spack package 357 Spack Documentation, Release 0.9

setUp() tearDown() test_all_deps() Ensure includes and RPATHs for all deps are added. test_as_mode() test_ccld_mode() test_cpp_mode() test_dep_include() Ensure a single dependency include directory is added. test_dep_lib() Ensure a single dependency RPATH is added. test_dep_rpath() Ensure RPATHs for root package are added. test_flags() test_ld_deps() Ensure no (extra) -I args or -Wl, are passed in ld mode. test_ld_deps_reentrant() Make sure ld -r is handled correctly on OS’s where it doesn’t support rpaths. test_ld_mode() test_vcheck_mode() spack.test.concretize module class spack.test.concretize.ConcretizeTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_concretize(abstract_spec) check_spec(abstract, concrete) test_compiler_child() test_compiler_inheritance() test_concretize_dag() test_concretize_no_deps() test_concretize_preferred_version() test_concretize_two_virtuals() Test a package with multiple virtual dependencies. test_concretize_two_virtuals_with_dual_provider() Test a package with multiple virtual dependencies and force a provider that provides both. test_concretize_two_virtuals_with_dual_provider_and_a_conflict() Test a package with multiple virtual dependencies and force a provider that provides both, and another conflicting package that provides one. test_concretize_two_virtuals_with_one_bound() Test a package with multiple virtual dependencies and one preset.

358 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_concretize_two_virtuals_with_two_bound() Test a package with multiple virtual deps and two of them preset. test_concretize_variant() test_concretize_with_provides_when() Make sure insufficient versions of MPI are not in providers list when we ask for some advanced version. test_concretize_with_restricted_virtual() test_concretize_with_virtual() test_conretize_compiler_flags() test_external_and_virtual() test_external_package() test_external_package_module() test_find_spec_children() test_find_spec_none() test_find_spec_parents() Tests the spec finding logic used by concretization. test_find_spec_self() test_find_spec_sibling() test_my_dep_depends_on_provider_of_my_virtual_dep() test_nobuild_package() test_virtual_is_fully_expanded_for_callpath() test_virtual_is_fully_expanded_for_mpileaks() spack.test.concretize_preferences module class spack.test.concretize_preferences.ConcretizePreferencesTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Test concretization preferences are being applied correctly. assert_variant_values(spec, **variants) concretize(abstract_spec) setUp() Create config section to store concretization preferences tearDown() test_preferred_compilers() Test preferred compilers are applied correctly test_preferred_providers() Test preferred providers of virtual packages are applied correctly test_preferred_variants() Test preferred variants are applied correctly test_preferred_versions() Test preferred package versions are applied correctly

1.11. spack package 359 Spack Documentation, Release 0.9

update_packages(pkgname, section, value) Update config and reread package list

spack.test.config module

class spack.test.config.ConfigTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_config(comps, *compiler_names) Check that named compilers in comps match Spack’s config. setUp() tearDown() test_write_key_in_memory() test_write_key_to_disk() test_write_list_in_memory() test_write_to_same_priority_file() spack.test.database module

These tests check the database is functioning properly, both in memory and in its file class spack.test.database.DatabaseTest(methodName=’runTest’) Bases: spack.test.mock_database.MockDatabase test_005_db_exists() Make sure db cache file exists after creating. test_010_all_install_sanity() Ensure that the install layout reflects what we think it does. test_015_write_and_read() test_020_db_sanity() Make sure query() returns what’s actually in the db. test_030_db_sanity_from_another_process() test_040_ref_counts() Ensure that we got ref counts right when we read the DB. test_050_basic_query() Ensure querying database is consistent with what is installed. test_060_remove_and_add_root_package() test_070_remove_and_add_dependency_package() test_080_root_ref_counts() test_090_non_root_ref_counts() test_100_no_write_with_exception_on_remove() test_110_no_write_with_exception_on_install()

360 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.test.directory_layout module

This test verifies that the Spack directory layout works properly. class spack.test.directory_layout.DirectoryLayoutTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Tests that a directory layout works correctly and produces a consistent install path. setUp() tearDown() test_find() Test that finding specs within an install layout works. test_handle_unknown_package() This test ensures that spack can at least do some operations with packages that are installed but that it does not know about. This is actually not such an uncommon scenario with spack; it can happen when you switch from a git branch where you’re working on a new package. This test ensures that the directory layout stores enough information about installed packages’ specs to uninstall or query them again if the package goes away. test_read_and_write_spec() This goes through each package in spack and creates a directory for it. It then ensures that the spec for the directory’s installed package can be read back in consistently, and finally that the directory can be removed by the directory layout. spack.test.environment module class spack.test.environment.EnvironmentTest(methodName=’runTest’) Bases: unittest.case.TestCase setUp() tearDown() test_extend() test_extra_arguments() test_path_manipulation() test_set() test_set_path() test_source_files() test_unset() spack.test.file_cache module

Test Spack’s FileCache. class spack.test.file_cache.FileCacheTest(methodName=’runTest’) Bases: unittest.case.TestCase Ensure that a file cache can properly write to a file and recover its contents. setUp()

1.11. spack package 361 Spack Documentation, Release 0.9

tearDown() test_remove() Test removing an entry from the cache. test_write_and_read_cache_file() Test writing then reading a cached file. test_write_and_write_cache_file() Test two write transactions on a cached file. spack.test.git_fetch module class spack.test.git_fetch.GitFetchTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Tests fetching from a dummy git repository. assert_rev(rev) Check that the current git revision is equal to the supplied rev. setUp() Create a git repository with master and two other branches, and one tag, so that we can experiment on it. tearDown() Destroy the stage space used by this test. test_fetch_branch() Test fetching a branch. test_fetch_commit() Test fetching a particular commit. test_fetch_master() Test a default git checkout with no commit or tag specified. test_fetch_tag() Test fetching a tag. try_fetch(rev, test_file, args) Tries to: 1.Fetch the repo using a fetch strategy constructed with supplied args. 2.Check if the test_file is in the checked out repository. 3.Assert that the repository is at the revision supplied. 4.Add and remove some files, then reset the repo, and ensure it’s all there again. spack.test.hg_fetch module class spack.test.hg_fetch.HgFetchTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Tests fetching from a dummy hg repository. setUp() Create a hg repository with master and two other branches, and one tag, so that we can experiment on it. tearDown() Destroy the stage space used by this test.

362 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_fetch_default() Test a default hg checkout with no commit or tag specified. test_fetch_rev0() Test fetching a branch. try_fetch(rev, test_file, args) Tries to: 1.Fetch the repo using a fetch strategy constructed with supplied args. 2.Check if the test_file is in the checked out repository. 3.Assert that the repository is at the revision supplied. 4.Add and remove some files, then reset the repo, and ensure it’s all there again. spack.test.install module class spack.test.install.InstallTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Tests install and uninstall on a trivial package. fake_fetchify(pkg) Fake the URL for a package so it downloads from a file. setUp() tearDown() test_install_and_uninstall() test_install_environment() spack.test.link_tree module class spack.test.link_tree.LinkTreeTest(methodName=’runTest’) Bases: unittest.case.TestCase Tests Spack’s LinkTree class. check_dir(filename) check_file_link(filename) setUp() tearDown() test_ignore() test_merge_to_existing_directory() test_merge_to_new_directory() test_merge_with_empty_directories()

1.11. spack package 363 Spack Documentation, Release 0.9

spack.test.lock module

These tests ensure that our lock works correctly. class spack.test.lock.LockTest(methodName=’runTest’) Bases: unittest.case.TestCase acquire_read(barrier) acquire_write(barrier) multiproc_test(*functions) Order some processes using simple barrier synchronization. setUp() tearDown() test_complex_acquire_and_release_chain() test_read_lock_timeout_on_write() test_read_lock_timeout_on_write_2() test_read_lock_timeout_on_write_3() test_transaction() test_transaction_with_context_manager() test_transaction_with_context_manager_and_exception() test_transaction_with_exception() test_write_lock_timeout_on_read() test_write_lock_timeout_on_read_2() test_write_lock_timeout_on_read_3() test_write_lock_timeout_on_write() test_write_lock_timeout_on_write_2() test_write_lock_timeout_on_write_3() test_write_lock_timeout_with_multiple_readers_2_1() test_write_lock_timeout_with_multiple_readers_2_2() test_write_lock_timeout_with_multiple_readers_3_1() test_write_lock_timeout_with_multiple_readers_3_2() timeout_read(barrier) timeout_write(barrier) spack.test.make_executable module

Tests for Spack’s built-in parallel make support. This just tests whether the right args are getting passed to make. class spack.test.make_executable.MakeExecutableTest(methodName=’runTest’) Bases: unittest.case.TestCase

364 Chapter 1. Table of Contents Spack Documentation, Release 0.9

setUp() tearDown() test_make_explicit() test_make_normal() test_make_one_job() test_make_parallel_disabled() test_make_parallel_false() test_make_parallel_precedence() spack.test.mirror module class spack.test.mirror.MirrorTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_mirror() setUp() Sets up a mock package and a mock repo for each fetch strategy, to ensure that the mirror can create archives for each of them. set_up_package(name, MockRepoClass, url_attr) Set up a mock package to be mirrored. Each package needs us to: 1.Set up a mock repo/archive to fetch from. 2.Point the package’s version args at that repo. tearDown() Destroy all the stages created by the repos in setup. test_all_mirror() test_git_mirror() test_hg_mirror() test_svn_mirror() test_url_mirror() spack.test.mock_database module class spack.test.mock_database.MockDatabase(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest setUp() tearDown() spack.test.mock_packages_test module class spack.test.mock_packages_test.MockPackagesTest(methodName=’runTest’) Bases: unittest.case.TestCase

1.11. spack package 365 Spack Documentation, Release 0.9

cleanmock() Restore the real packages path after any test. initmock() setUp() set_pkg_dep(pkg_name, spec, deptypes=(‘build’, ‘link’, ‘run’)) Alters dependence information for a package. Adds a dependency on to pkg. Use this to mock up constraints. tearDown() spack.test.mock_repo module class spack.test.mock_repo.MockArchive Bases: spack.test.mock_repo.MockRepo Creates a very simple archive directory with a configure script and a makefile that installs to a prefix. Tars it up into an archive. class spack.test.mock_repo.MockGitRepo Bases: spack.test.mock_repo.MockVCSRepo rev_hash(rev) class spack.test.mock_repo.MockHgRepo Bases: spack.test.mock_repo.MockVCSRepo get_rev() Get current mercurial revision. class spack.test.mock_repo.MockRepo(stage_name, repo_name) Bases: object destroy() Destroy resources associated with this mock repo. class spack.test.mock_repo.MockSvnRepo Bases: spack.test.mock_repo.MockVCSRepo class spack.test.mock_repo.MockVCSRepo(stage_name, repo_name) Bases: spack.test.mock_repo.MockRepo spack.test.modules module class spack.test.modules.DotkitTests(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest get_modulefile_content(spec) setUp() tearDown() test_dotkit() class spack.test.modules.HelperFunctionsTests(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest test_inspect_path()

366 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_update_dictionary_extending_list() class spack.test.modules.TclTests(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest get_modulefile_content(spec) setUp() tearDown() test_alter_environment() test_autoload() test_blacklist() test_conflicts() test_prerequisites() test_simple_case() test_suffixes() spack.test.modules.mock_open(*args, **kwds) spack.test.multimethod module

Test for multi_method dispatch. class spack.test.multimethod.MultiMethodTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest test_default_works() test_dependency_match() test_mpi_version() test_no_version_match() test_one_version_match() test_target_match() test_undefined_mpi_version() test_version_overlap() test_virtual_dep_match() spack.test.namespace_trie module class spack.test.namespace_trie.NamespaceTrieTest(methodName=’runTest’) Bases: unittest.case.TestCase setUp() test_add_multiple() test_add_none_multiple() test_add_none_single() test_add_single()

1.11. spack package 367 Spack Documentation, Release 0.9

test_add_three() spack.test.optional_deps module class spack.test.optional_deps.ConcretizeTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_normalize(spec_string, expected) test_chained_mpi() test_default_variant() test_multiple_conditionals() test_normalize_simple_conditionals() test_transitive_chain() spack.test.package_sanity module

This test does sanity checks on Spack’s builtin package database. class spack.test.package_sanity.PackageSanityTest(methodName=’runTest’) Bases: unittest.case.TestCase check_db() Get all packages in a DB to make sure they work. test_get_all_mock_packages() Get the mock packages once each too. test_get_all_packages() Get all packages once and make sure that works. test_url_versions() Check URLs for regular packages, if they are explicitly defined. spack.test.packages module class spack.test.packages.PackagesTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest test_import_class_from_package() test_import_module_from_package() test_import_namespace_container_modules() test_import_package() test_import_package_as() test_load_package() test_nonexisting_package_filename() test_package_class_names() test_package_filename() test_package_name()

368 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.test.pattern module

class spack.test.pattern.CompositeTest(methodName=’runTest’) Bases: unittest.case.TestCase setUp() test_composite_from_interface() test_composite_from_method_list() test_error_conditions() spack.test.provider_index module

Tests for provider index cache files. Tests assume that mock packages provide this: {'blas': { blas: set([netlib-blas, openblas, openblas-with-lapack])}, 'lapack': {lapack: set([netlib-lapack, openblas-with-lapack])}, 'mpi': {mpi@:1: set([mpich@:1]), mpi@:2.0: set([mpich2]), mpi@:2.1: set([[email protected]:]), mpi@:2.2: set([[email protected]:]), mpi@:3: set([mpich@3:]), mpi@:10.0: set([zmpi])}, 'stuff': {stuff: set([externalvirtual])}}

class spack.test.provider_index.ProviderIndexTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest test_copy() test_equal() test_mpi_providers() test_providers_for_simple() test_yaml_round_trip() spack.test.python_version module

This test ensures that all Spack files are Python version 2.6 or less. Spack was originally 2.7, but enough systems in 2014 are still using 2.6 on their frontend nodes that we need 2.6 to get adopted. class spack.test.python_version.PythonVersionTest(methodName=’runTest’) Bases: unittest.case.TestCase check_python_versions(*files) package_py_files() pyfiles(*search_paths) test_core_module_compatibility() test_package_module_compatibility()

1.11. spack package 369 Spack Documentation, Release 0.9

spack.test.sbang module

Test that Spack’s shebang filtering works correctly. class spack.test.sbang.SbangTest(methodName=’runTest’) Bases: unittest.case.TestCase setUp() tearDown() test_shebang_handles_non_writable_files() test_shebang_handling() spack.test.spec_dag module

These tests check Spec DAG operations using dummy packages. You can find the dummy packages here: spack/lib/spack/spack/test/mock_packages

class spack.test.spec_dag.SpecDagTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_links(spec_to_check) test_conflicting_package_constraints() test_conflicting_spec_constraints() test_contains() test_copy_concretized() test_copy_normalized() test_copy_simple() test_dependents_and_dependencies_are_correct() test_deptype_traversal() test_deptype_traversal_full() test_deptype_traversal_run() test_deptype_traversal_with_builddeps() test_equal() test_invalid_dep() test_normalize_a_lot() test_normalize_mpileaks() test_normalize_twice() Make sure normalize can be run twice on the same spec, and that it is idempotent. test_normalize_with_virtual_package() test_normalize_with_virtual_spec() test_postorder_edge_traversal() test_postorder_node_traversal()

370 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_postorder_path_traversal() test_preorder_edge_traversal() test_preorder_node_traversal() test_preorder_path_traversal() test_unsatisfiable_architecture() test_unsatisfiable_compiler() test_unsatisfiable_compiler_version() test_unsatisfiable_version() spack.test.spec_semantics module class spack.test.spec_semantics.SpecSematicsTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest This tests satisfies(), constrain() and other semantic operations on specs. check_constrain(expected, spec, constraint) check_constrain_changed(spec, constraint) check_constrain_not_changed(spec, constraint) check_invalid_constraint(spec, constraint) check_satisfies(spec, anon_spec, concrete=False) check_unsatisfiable(spec, anon_spec, concrete=False) test_constrain_architecture() test_constrain_changed() test_constrain_compiler() test_constrain_compiler_flags() test_constrain_dependency_changed() test_constrain_dependency_not_changed() test_constrain_not_changed() test_constrain_variants() test_dep_index() test_invalid_constraint() test_satisfies() test_satisfies_architecture() test_satisfies_compiler() test_satisfies_compiler_version() test_satisfies_dependencies() test_satisfies_dependency_versions() test_satisfies_matching_compiler_flag()

1.11. spack package 371 Spack Documentation, Release 0.9

test_satisfies_matching_variant() test_satisfies_namespace() test_satisfies_namespaced_dep() Ensure spec from same or unspecified namespace satisfies namespace constraint. test_satisfies_unconstrained_compiler_flag() test_satisfies_unconstrained_variant() test_satisfies_virtual() test_satisfies_virtual_dep_with_virtual_constraint() Ensure we can satisfy virtual constraints when there are multiple vdep providers in the specs. test_satisfies_virtual_dependencies() test_satisfies_virtual_dependency_versions() test_self_index() test_spec_contains_deps() test_unsatisfiable_compiler_flag() test_unsatisfiable_compiler_flag_mismatch() test_unsatisfiable_variant_mismatch() test_unsatisfiable_variants() test_virtual_index() spack.test.spec_syntax module class spack.test.spec_syntax.SpecSyntaxTest(methodName=’runTest’) Bases: unittest.case.TestCase check_lex(tokens, spec) Check that the provided spec parses to the provided token list. check_parse(expected, spec=None, remove_arch=True) Assert that the provided spec is able to be parsed. If this is called with one argument, it assumes that the string is canonical (i.e., no spaces and ~ instead of - for variants) and that it will convert back to the string it came from. If this is called with two arguments, the first argument is the expected canonical form and the second is a non-canonical input to be parsed. test_ambiguous() test_canonicalize() test_dependencies_with_versions() test_duplicate_compiler() test_duplicate_depdendence() test_duplicate_variant() test_full_specs() test_minimal_spaces()

372 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_package_names() test_parse_errors() test_simple_dependence() test_spaces_between_dependences() test_spaces_between_options() test_way_too_many_spaces() spack.test.spec_yaml module

Test YAML serialization for specs. YAML format preserves DAG informatoin in the spec. class spack.test.spec_yaml.SpecYamlTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest check_yaml_round_trip(spec) test_ambiguous_version_spec() test_concrete_spec() test_normal_spec() test_simple_spec() test_yaml_subdag() spack.test.stage module

Test that the Stage class works correctly. class spack.test.stage.StageTest(methodName=’runTest’) Bases: unittest.case.TestCase check_chdir(stage, stage_name) check_chdir_to_source(stage, stage_name) check_destroy(stage, stage_name) Figure out whether a stage was destroyed correctly. check_expand_archive(stage, stage_name) check_fetch(stage, stage_name) check_setup(stage, stage_name) Figure out whether a stage was set up correctly. get_stage_path(stage, stage_name) Figure out where a stage should be living. This depends on whether it’s named. setUp() This sets up a mock archive to fetch, and a mock temp space for use by the Stage class. It doesn’t actually create the Stage – that is done by individual tests. tearDown() Blows away the test environment directory.

1.11. spack package 373 Spack Documentation, Release 0.9

test_chdir() test_expand_archive() test_expand_archive_with_chdir() test_fetch() test_keep_exceptions() test_keep_without_exceptions() test_no_keep_with_exceptions() test_no_keep_without_exceptions() test_restage() test_setup_and_destroy_name_with_tmp() test_setup_and_destroy_name_without_tmp() test_setup_and_destroy_no_name_with_tmp() test_setup_and_destroy_no_name_without_tmp() spack.test.stage.use_tmp(*args, **kwds) Allow some test code to be executed with spack.use_tmp_stage set to a certain value. Context manager makes sure it’s reset on failure. spack.test.svn_fetch module class spack.test.svn_fetch.SvnFetchTest(methodName=’runTest’) Bases: spack.test.mock_packages_test.MockPackagesTest Tests fetching from a dummy git repository. assert_rev(rev) Check that the current revision is equal to the supplied rev. setUp() Create an svn repository with two revisions. tearDown() Destroy the stage space used by this test. test_fetch_default() Test a default checkout and make sure it’s on rev 1 test_fetch_r1() Test fetching an older revision (0). try_fetch(rev, test_file, args) Tries to: 1.Fetch the repo using a fetch strategy constructed with supplied args. 2.Check if the test_file is in the checked out repository. 3.Assert that the repository is at the revision supplied. 4.Add and remove some files, then reset the repo, and ensure it’s all there again.

374 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.test.tally_plugin module

class spack.test.tally_plugin.Tally Bases: nose.plugins.base.Plugin addError(test, err) addFailure(test, err) addSuccess(test) configure(options, conf ) finalize(result) name = ‘tally’ numberOfTestsRun Excludes skipped tests options(parser, env={‘LANG’: ‘C.UTF-8’, ‘READTHEDOCS_PROJECT’: ‘spack’, ‘COLIFY_SIZE’: ‘25x80’, ‘READTHEDOCS’: ‘True’, ‘SPACK_ROOT’: ‘../../..’, ‘APPDIR’: ‘/app’, ‘DEBIAN_FRONTEND’: ‘noninteractive’, ‘OLD- PWD’: ‘/’, ‘HOSTNAME’: ‘build-4354849-project-57069-spack’, ‘PWD’: ‘/home/docs/checkouts/readthedocs.org/user_builds/spack/checkouts/bugfix-rtd- generation/lib/spack/docs’, ‘BIN_PATH’: ‘/home/docs/checkouts/readthedocs.org/user_builds/spack/envs/bugfix- rtd-generation/bin’, ‘READTHEDOCS_VERSION’: ‘bugfix-rtd-generation’, ‘PATH’: ‘/home/docs/checkouts/readthedocs.org/user_builds/spack/envs/bugfix-rtd- generation/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:../../../bin’, ‘HOME’: ‘/home/docs’}) spack.test.url_extrapolate module

Tests ability of spack to extrapolate URL versions from existing versions. class spack.test.url_extrapolate.UrlExtrapolateTest(methodName=’runTest’) Bases: unittest.case.TestCase check_url(base, version, new_url) test_dyninst_version() test_gcc() test_github_raw() test_libdwarf_version() test_libelf_version() test_mpileaks_version() test_partial_version_prefix() test_scalasca_partial_version() spack.test.url_parse module

This file has a bunch of versions tests taken from the excellent version detection in Homebrew.

1.11. spack package 375 Spack Documentation, Release 0.9 class spack.test.url_parse.UrlParseTest(methodName=’runTest’) Bases: unittest.case.TestCase assert_not_detected(string) check(name, v, string, **kwargs) test_angband_version_style() test_another_erlang_version_style() test_apache_version_style() test_astyle_verson_style() test_boost_version_style() test_dash_rc_style() test_dash_version_dash_style() test_debian_style_1() test_debian_style_2() test_erlang_version_style() test_fann_version() test_gcc_version() test_gcc_version_precedence() test_github_raw_url() test_gloox_beta_style() test_haxe_version() test_hdf5_version() test_iges_version() test_imagemagick_style() test_imap_version() test_jpeg_style() test_lame_version_style() test_mpileaks_version() test_mvapich2_19_version() test_mvapich2_20_version() test_new_github_style() test_no_version() test_noseparator_single_digit() test_omega_version_style() test_openssl_version() test_p7zip_version_style() test_pypy_version()

376 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_rc_style() test_ruby_version_style() test_scalasca_version() test_sphinx_beta_style() test_stable_suffix() test_suite3270_version() test_synergy_version() test_version_all_dots() test_version_developer_that_hates_us_format() test_version_dos2unix() test_version_github() test_version_github_with_high_patch_number() test_version_internal_dash() test_version_regular() test_version_single_digit() test_version_sourceforge_download() test_version_underscore_separator() test_wwwoffle_version() test_xaw3d_version() test_yet_another_erlang_version_style() test_yet_another_version() spack.test.url_substitution module

This test does sanity checks on substituting new versions into URLs class spack.test.url_substitution.PackageSanityTest(methodName=’runTest’) Bases: unittest.case.TestCase test_hypre_url_substitution() test_otf2_url_substitution() spack.test.versions module

These version tests were taken from the RPM source code. We try to maintain compatibility with RPM’s version semantics where it makes sense. class spack.test.versions.VersionsTest(methodName=’runTest’) Bases: unittest.case.TestCase assert_canonical(canonical_list, version_list) assert_does_not_satisfy(v1, v2) assert_in(needle, haystack)

1.11. spack package 377 Spack Documentation, Release 0.9

assert_no_overlap(v1, v2) assert_not_in(needle, haystack) assert_overlaps(v1, v2) assert_satisfies(v1, v2) assert_ver_eq(a, b) assert_ver_gt(a, b) assert_ver_lt(a, b) check_intersection(expected, a, b) check_union(expected, a, b) test_alpha() test_alpha_beta() test_alpha_with_dots() test_basic_version_satisfaction() test_basic_version_satisfaction_in_lists() test_canonicalize_list() test_close_numbers() test_contains() test_date_stamps() test_double_alpha() test_formatted_strings() test_get_item() test_in_list() test_intersect_with_containment() test_intersection() test_lists_overlap() test_num_alpha_with_no_separator() test_nums_and_patch() test_overlap_with_containment() test_padded_numbers() test_patch() test_ranges_overlap() test_rc_versions() test_repr_and_str() test_rpm_oddities() test_satisfaction_with_lists() test_three_segments()

378 Chapter 1. Table of Contents Spack Documentation, Release 0.9

test_two_segments() test_underscores() test_union_with_containment() test_version_range_satisfaction() test_version_range_satisfaction_in_lists() test_version_ranges() spack.test.yaml module

Test Spack’s custom YAML format. class spack.test.yaml.YamlTest(methodName=’runTest’) Bases: unittest.case.TestCase setUp() test_dict_order() test_line_numbers() test_parse()

Module contents spack.test.list_tests() Return names of all tests that can be run for Spack. spack.test.run(names, outputDir, verbose=False) Run tests with the supplied names. Names should be a list. If it’s empty, run ALL of Spack’s tests. spack.util package

Submodules spack.util.compression module spack.util.compression.allowed_archive(path) spack.util.compression.decompressor_for(path) Get the appropriate decompressor for a path. spack.util.compression.extension(path) Get the archive extension for a path. spack.util.compression.strip_extension(path) Get the part of a path that does not include its compressed type extension. spack.util.crypto module class spack.util.crypto.Checker(hexdigest, **kwargs) Bases: object

1.11. spack package 379 Spack Documentation, Release 0.9

A checker checks files against one particular hex digest. It will automatically determine what hashing algorithm to used based on the length of the digest it’s initialized with. e.g., if the digest is 32 hex characters long this will use md5. Example: know your tarball should hash to ‘abc123’. You want to check files against this. You would use this class like so: hexdigest='abc123' checker= Checker(hexdigest) success= checker.check('downloaded.tar.gz')

After the call to check, the actual checksum is available in checker.sum, in case it’s needed for error output. You can trade read performance and memory usage by adjusting the block_size optional arg. By default it’s a 1MB (2**20 bytes) buffer. check(filename) Read the file with the specified name and check its checksum against self.hexdigest. Return True if they match, False otherwise. Actual checksum is stored in self.sum. hash_name Get the name of the hash function this Checker is using. spack.util.crypto.checksum(hashlib_algo, filename, **kwargs) Returns a hex digest of the filename generated using an algorithm from hashlib. spack.util.debug module

Debug signal handler: prints a stack trace and enters interpreter. register_interrupt_handler() enables a ctrl-C handler that prints a stack trace and drops the user into an interpreter. spack.util.debug.debug_handler(sig, frame) Interrupt running process, and provide a python prompt for interactive debugging. spack.util.debug.register_interrupt_handler() Print traceback and enter an interpreter on Ctrl-C spack.util.environment module spack.util.environment.dump_environment(path) Dump the current environment out to a file. spack.util.environment.env_flag(name) spack.util.environment.get_path(name) spack.util.environment.path_put_first(var_name, directories) Puts the provided directories first in the path, adding them if they’re not already there. spack.util.environment.path_set(var_name, directories) spack.util.executable module class spack.util.executable.Executable(name) Bases: object Class representing a program that can be run on the command line.

380 Chapter 1. Table of Contents Spack Documentation, Release 0.9

add_default_arg(arg) command spack.util.executable.which(name, **kwargs) Finds an executable in the path like command-line which. exception spack.util.executable.ProcessError(msg, long_message=None) Bases: spack.error.SpackError long_message spack.util.multiproc module

This implements a parallel map operation but it can accept more values than multiprocessing.Pool.apply() can. For example, apply() will fail to pickle functions if they’re passed indirectly as parameters. spack.util.multiproc.spawn(f ) spack.util.multiproc.parmap(f, X) class spack.util.multiproc.Barrier(n, timeout=None) Simple reusable semaphore barrier. Python 2.6 doesn’t have multiprocessing barriers so we implement this. See http://greenteapress.com/semaphores/downey08semaphores.pdf, p. 41. wait() spack.util.naming module spack.util.naming.mod_to_class(mod_name) Convert a name from module style to class name style. Spack mostly follows PEP-8: •Module and package names use lowercase_with_underscores. •Class names use the CapWords convention. Regular source code follows these convetions. Spack is a bit more liberal with its Package names nad Compiler names: •They can contain ‘-‘ as well as ‘_’, but cannot start with ‘-‘. •They can start with numbers, e.g. “3proxy”. This function converts from the module convention to the class convention by removing _ and - and converting surrounding lowercase text to CapWords. If mod_name starts with a number, the class name returned will be prepended with ‘_’ to make a valid Python identifier. spack.util.naming.spack_module_to_python_module(mod_name) Given a Spack module name, returns the name by which it can be imported in Python. spack.util.naming.valid_module_name(mod_name) Return whether mod_name is valid for use in Spack. spack.util.naming.valid_fully_qualified_module_name(mod_name) Return whether mod_name is a valid namespaced module name. spack.util.naming.validate_fully_qualified_module_name(mod_name) Raise an exception if mod_name is not a valid namespaced module name.

1.11. spack package 381 Spack Documentation, Release 0.9 spack.util.naming.validate_module_name(mod_name) Raise an exception if mod_name is not valid. spack.util.naming.possible_spack_module_names(python_mod_name) Given a Python module name, return a list of all possible spack module names that could correspond to it. class spack.util.naming.NamespaceTrie(separator=’.’) Bases: object class Element(value) Bases: object NamespaceTrie.has_value(namespace) True if there is a value set for the given namespace. NamespaceTrie.is_leaf(namespace) True if this namespace has no children in the trie. NamespaceTrie.is_prefix(namespace) True if the namespace has a value, or if it’s the prefix of one that does. spack.util.pattern module class spack.util.pattern.Bunch(**kwargs) Bases: object Carries a bunch of named attributes (from Alex Martelli bunch) spack.util.pattern.(interface=None, method_list=None, container=) Returns a class decorator that patches a class adding all the methods it needs to be a composite for a given interface. Parameters • interface – class exposing the interface to which the composite object must conform. Only non-private and non-special methods will be taken into account • method_list – names of methods that should be part of the composite • container – container for the composite object (default = list). Must fulfill the Muta- bleSequence contract. The composite class will expose the container API to manage object composition Returns class decorator spack.util.prefix module

This file contains utilities to help with installing packages. class spack.util.prefix.Prefix Bases: str This class represents an installation prefix, but provides useful attributes for referring to directories inside the prefix. For example, you can do something like this: prefix= Prefix('/usr') print prefix.lib print prefix.lib64 print prefix.bin

382 Chapter 1. Table of Contents Spack Documentation, Release 0.9

print prefix.share print prefix.man4

This program would print: /usr/lib /usr/lib64 /usr/bin /usr/share /usr/share/man/man4 Prefix objects behave identically to strings. In fact, they subclass str. So operators like + are legal: print “foobar ” + prefix This prints ‘foobar /usr”. All of this is meant to make custom installs easy.

spack.util.spack_yaml module

Enhanced YAML parsing for Spack. • load() preserves YAML Marks on returned objects – this allows us to access file and line information later. • Our load methods use ‘‘OrderedDict class instead of YAML’s default unorderd dict. spack.util.spack_yaml.load(*args, **kwargs) Load but modify the loader instance so that it will add __line__ atrributes to the returned object. spack.util.spack_yaml.dump(*args, **kwargs) spack.util.string module spack.util.string.comma_and(sequence) spack.util.string.comma_list(sequence, article=’‘) spack.util.string.comma_or(sequence) spack.util.web module class spack.util.web.LinkParser Bases: HTMLParser.HTMLParser This parser just takes an HTML page and strips out the hrefs on the links. Good enough for a really simple spider. handle_starttag(tag, attrs) spack.util.web.find_versions_of_archive(*archive_urls, **kwargs) Scrape web pages for new versions of a tarball. Arguments: archive_urls: URLs for different versions of a package. Typically these are just the tarballs from the package file itself. By default, this searches the parent directories of archives. Keyword Arguments: list_url: URL for a listing of archives. Spack wills scrape these pages for download links that look like the archive URL.

list_depth: Max depth to follow links on list_url pages.

1.11. spack package 383 Spack Documentation, Release 0.9

spack.util.web.spider(root_url, **kwargs) Gets web pages from a root URL. If depth is specified (e.g., depth=2), then this will also fetches pages linked from the root and its children up to depth. This will spawn processes to fetch the children, for much improved performance over a sequential fetch.

Module contents

1.11.2 Submodules

1.11.3 spack.abi module

class spack.abi.ABI Bases: object This class provides methods to test ABI compatibility between specs. The current implementation is rather rough and could be improved. architecture_compatible(parent, child) Return true if parent and child have ABI compatible targets. compatible(parent, child, **kwargs) Returns true iff a parent and child spec are ABI compatible compiler_compatible(parent, child, **kwargs) Return true if compilers for parent and child are ABI compatible.

1.11.4 spack.architecture module

This module contains all the elements that are required to create an architecture object. These include, the target processor, the operating system, and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes. On a multiple architecture machine, the architecture spec field can be set to build a package against any target and operating system that is present on the platform. On Cray platforms or any other architecture that has different front and back end environments, the operating system will determine the method of compiler detection. There are two different types of compiler detection: 1. Through the $PATH env variable (front-end detection) 2. Through the tcl module system. (back-end detection) Depending on which operating system is specified, the compiler will be detected using one of those methods. For platforms such as linux and darwin, the operating system is autodetected and the target is set to be x86_64. The command line syntax for specifying an architecture is as follows: target= os= If the user wishes to use the defaults, either target or os can be left out of the command line and Spack will concretize using the default. These defaults are set in the ‘platforms/’ directory which contains the different subclasses for platforms. If the machine has multiple architectures, the user can also enter front-end, or fe or back-end or be. These settings will concretize to their respective front-end and back-end targets and operating systems. Additional platforms can be added by creating a subclass of Platform and adding it inside the platform directory. Platforms are an abstract class that are extended by subclasses. If the user wants to add a new type of platform (such as cray_xe), they can create a subclass and set all the class attributes such as priority, front_target, back_target, front_os, back_os. Platforms also contain a priority class attribute. A lower number signifies higher priority. These numbers

384 Chapter 1. Table of Contents Spack Documentation, Release 0.9

are arbitrarily set and can be changed though often there isn’t much need unless a new platform is added and the user wants that to be detected first. Targets are created inside the platform subclasses. Most architecture (like linux, and darwin) will have only one target (x86_64) but in the case of Cray machines, there is both a frontend and backend processor. The user can specify which targets are present on front-end and back-end architecture Depending on the platform, operating systems are either auto-detected or are set. The user can set the front-end and back-end operating setting by the class attributes front_os and back_os. The operating system as described earlier, will be responsible for compiler detection. class spack.architecture.Arch(plat=None, os=None, target=None) Bases: object Architecture is now a class to help with setting attributes. TODO: refactor so that we don’t need this class. concrete to_dict() exception spack.architecture.NoPlatformError Bases: spack.error.SpackError class spack.architecture.OperatingSystem(name, version) Bases: object Operating System will be like a class similar to platform extended by subclasses for the specifics. Operating System will contain the compiler finding logic. Instead of calling two separate methods to find compilers we call find_compilers method for each operating system find_compiler(cmp_cls, *path) Try to find the given type of compiler in the user’s environment. For each set of compilers found, this returns compiler objects with the cc, cxx, f77, fc paths and the version filled in. This will search for compilers with the names in cc_names, cxx_names, etc. and it will group them if they have common prefixes, suffixes, and versions. e.g., gcc-mp-4.7 would be grouped with g++-mp-4.7 and gfortran-mp-4.7. find_compilers(*paths) Return a list of compilers found in the suppied paths. This invokes the find() method for each Compiler class, and appends the compilers detected to a list. to_dict() class spack.architecture.Platform(name) Bases: object Abstract class that each type of Platform will subclass. Will return a instance of it once it is returned add_operating_system(name, os_class) Add the operating_system class object into the platform.operating_sys dictionary add_target(name, target) Used by the platform specific subclass to list available targets. Raises an error if the platform specifies a name that is reserved by spack as an alias. back_end = None back_os = None default = None default_os = None

1.11. spack package 385 Spack Documentation, Release 0.9

classmethod detect() Subclass is responsible for implementing this method. Returns True if the Platform class detects that it is the current platform and False if it’s not. front_end = None front_os = None operating_system(name) priority = None classmethod setup_platform_environment(pkg, env) Subclass can override this method if it requires any platform-specific build environment modifications. target(name) This is a getter method for the target dictionary that handles defaulting based on the values provided by default, front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. class spack.architecture.Target(name, module_name=None) Bases: object Target is the processor of the host machine. The host machine may have different front-end and back-end targets, especially if it is a Cray machine. The target will have a name and also the module_name (e.g craype-compiler). Targets will also recognize which platform they came from using the set_platform method. Targets will have compiler finding strategies spack.architecture.arch_from_dict(d) Uses _platform_from_dict, _operating_system_from_dict, _target_from_dict helper methods to recreate the arch tuple from the dictionary read from a yaml file

1.11.5 spack.build_environment module

This module contains all routines related to setting up the package build environment. All of this is set up by pack- age.py just before install() is called. There are two parts to the build environment: 1. Python build environment (i.e. install() method) This is how things are set up when install() is called. Spack takes advantage of each package being in its own module by adding a bunch of command-like functions (like configure(), make(), etc.) in the package’s module scope. Ths allows package writers to call them all directly in Package.install() without writing ‘self.’ everywhere. No, this isn’t Pythonic. Yes, it makes the code more readable and more like the shell script from which someone is likely porting. 2. Build execution environment This is the set of environment variables, like PATH, CC, CXX, etc. that control the build. There are also a num- ber of environment variables used to pass information (like RPATHs and other information about dependencies) to Spack’s compiler wrappers. All of these env vars are also set up here. Skimming this module is a nice way to get acquainted with the types of calls you can make from within the install() function. exception spack.build_environment.InstallError(message, long_message=None) Bases: spack.error.SpackError Raised when a package fails to install

386 Chapter 1. Table of Contents Spack Documentation, Release 0.9

class spack.build_environment.MakeExecutable(name, jobs) Bases: spack.util.executable.Executable Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using ‘parallel’ as a kwarg will override whatever the package’s global setting is, so you can either default to true or false and override particular calls. Note that if the SPACK_NO_PARALLEL_MAKE env var is set it overrides everything. spack.build_environment.fork(pkg, function, dirty=False) Fork a child process to do part of a spack build. Parameters • pkg – pkg whose environemnt we should set up the forked process for. • function – arg-less function to run in the child process. • dirty – If True, do NOT clean the environment before building. Usage: def child_fun(): # do stuff build_env.fork(pkg, child_fun)

Forked processes are run with the build environment set up by spack.build_environment. This allows package authors to have full control over the environment, etc. without affecting other builds that might be executed in the same spack call. If something goes wrong, the child process is expected to print the error and the parent process will exit with error as well. If things go well, the child exits and the parent carries on. spack.build_environment.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. spack.build_environment.get_rpaths(pkg) Get a list of all the rpaths for a package. spack.build_environment.load_external_modules(pkg) traverse the spec list and find any specs that have external modules. spack.build_environment.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. spack.build_environment.parent_class_modules(cls) Get list of super class modules that are all descend from spack.Package spack.build_environment.set_build_environment_variables(pkg, env, dirty=False) This ensures a clean install environment when we build packages. Arguments: dirty – skip unsetting the user’s environment settings. spack.build_environment.set_compiler_environment_variables(pkg, env) spack.build_environment.set_module_variables_for_package(pkg, module) Populate the module scope of install() with some useful functions. This makes things easier for package writers. spack.build_environment.setup_package(pkg, dirty=False) Execute all environment setup routines.

1.11. spack package 387 Spack Documentation, Release 0.9

1.11.6 spack.compiler module

class spack.compiler.Compiler(cspec, operating_system, paths, modules=[], alias=None, **kwargs) Bases: object This class encapsulates a Spack “compiler”, which includes C, C++, and Fortran compilers. Subclasses should implement support for specific compilers, their possible names, arguments, and how to identify the particular type of compiler. PrgEnv = None PrgEnv_compiler = None cc_names = [] cc_rpath_arg classmethod cc_version(cc) cxx11_flag cxx14_flag cxx_names = [] cxx_rpath_arg classmethod cxx_version(cxx) classmethod default_version(cc) Override just this to override all compiler version functions. f77_names = [] f77_rpath_arg classmethod f77_version(f77) fc_names = [] fc_rpath_arg classmethod fc_version(fc) openmp_flag prefixes = [] suffixes = [’-.*’] version spack.compiler.get_compiler_version(compiler_path, version_arg, regex=’(.*)’)

1.11.7 spack.concretize module

Functions here are used to take abstract specs and make them concrete. For example, if a spec asks for a version between 1.8 and 1.9, these functions might take will take the most recent 1.9 version of the package available. Or, if the user didn’t specify a compiler for a spec, then this will assign a compiler to the spec based on defaults or user preferences. TODO: make this customizable and allow users to configure concretization policies.

388 Chapter 1. Table of Contents Spack Documentation, Release 0.9 class spack.concretize.DefaultConcretizer Bases: object This class doesn’t have any state, it just provides some methods for concretization. You can subclass it to override just some of the default concretization strategies, or you can override all of them. choose_virtual_or_external(spec) Given a list of candidate virtual and external packages, try to find one that is most ABI compatible. concretize_architecture(spec) If the spec is empty provide the defaults of the platform. If the architecture is not a basestring, then check if either the platform, target or operating system are concretized. If any of the fields are changed then return True. If everything is concretized (i.e the architecture attribute is a namedtuple of classes) then return False. If the target is a string type, then convert the string into a concretized architecture. If it has no architecture and the root of the DAG has an architecture, then use the root otherwise use the defaults on the platform. concretize_compiler(spec) If the spec already has a compiler, we’re done. If not, then take the compiler used for the nearest ancestor with a compiler spec and use that. If the ancestor’s compiler is not concrete, then used the preferred compiler as specified in spackconfig. : Use the spackconfig default if no package that depends on this one has a strict compiler re- quirement. Otherwise, try to build with the compiler that will be used by libraries that link to this one, to maximize compatibility. concretize_compiler_flags(spec) The compiler flags are updated to match those of the spec whose compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. concretize_variants(spec) If the spec already has variants filled in, return. Otherwise, add the user preferences from packages.yaml or the default variants from the package specification. concretize_version(spec) If the spec is already concrete, return. Otherwise take the preferred version from spackconfig, and default to the package’s version if there are no available versions. TODO: In many cases we probably want to look for installed versions of each package and use an in- stalled version if we can link to it. The policy implemented here will tend to rebuild a lot of stuff becasue it will prefer a compiler in the spec to any compiler already- installed things were built with. There is likely some better policy that finds some middle ground between these two extremes. exception spack.concretize.NoBuildError(spec) Bases: spack.error.SpackError Raised when a package is configured with the buildable option False, but no satisfactory external versions can be found exception spack.concretize.NoValidVersionError(spec) Bases: spack.error.SpackError Raised when there is no way to have a concrete version for a particular spec. exception spack.concretize.UnavailableCompilerVersionError(compiler_spec, operat- ing_system) Bases: spack.error.SpackError Raised when there is no available compiler that satisfies a compiler spec. spack.concretize.cmp_specs(lhs, rhs)

1.11. spack package 389 Spack Documentation, Release 0.9 spack.concretize.find_spec(spec, condition) Searches the dag from spec in an intelligent order and looks for a spec that matches a condition

1.11.8 spack.config module

This module implements Spack’s configuration file handling.

Configuration file scopes

When Spack runs, it pulls configuration data from several config directories, each of which contains configuration files. In Spack, there are two configuration scopes: 1. site: Spack loads site-wide configuration options from $(prefix)/etc/spack/. 2. user: Spack next loads per-user configuration options from ~/.spack/. Spack may read configuration files from both of these locations. When configurations conflict, the user config options take precedence over the site configurations. Each configuration directory may contain several configuration files, such as compilers.yaml or mirrors.yaml.

Configuration file format

Configuration files are formatted using YAML syntax. This format is implemented by libyaml (included with Spack as an external module), and it’s easy to read and versatile. Config files are structured as trees, like this compiler section: compilers: chaos_5_x86_64_ib: [email protected]: cc: /usr/bin/gcc cxx: /usr/bin/g++ f77: /usr/bin/gfortran fc: /usr/bin/gfortran bgqos_0: [email protected]: cc: /usr/local/bin/mpixlc ...

In this example, entries like “compilers” and “[email protected]” are used to categorize entries beneath them in the tree. At the root of the tree, entries like “cc” and “cxx” are specified as name/value pairs. config.get_config() returns these trees as nested dicts, but it strips the first level off. So, config.get_config(’compilers’) would return something like this for the above example: { 'chaos_5_x86_64_ib' : { '[email protected]' : { 'cc' : '/usr/bin/gcc', 'cxx' : '/usr/bin/g++' 'f77' : '/usr/bin/gfortran' 'fc' : '/usr/bin/gfortran' } } { 'bgqos_0' : { 'cc' : '/usr/local/bin/mpixlc' } }

Likewise, the mirrors.yaml file’s first line must be mirrors:, but get_config() strips that off too.

390 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Precedence

config.py routines attempt to recursively merge configuration across scopes. So if there are compilers.py files in both the site scope and the user scope, get_config(’compilers’) will return merged dictionaries of all the compilers available. If a user compiler conflicts with a site compiler, Spack will overwrite the site configuration wtih the user configuration. If both the user and site mirrors.yaml files contain lists of mirrors, then get_config() will return a concatenated list of mirrors, with the user config items first. Sometimes, it is useful to completely override a site setting with a user one. To accomplish this, you can use two colons at the end of a key in a configuration file. For example, this: compilers:: chaos_5_x86_64_ib: [email protected]: cc: /usr/bin/gcc cxx: /usr/bin/g++ f77: /usr/bin/gfortran fc: /usr/bin/gfortran bgqos_0: [email protected]: cc: /usr/local/bin/mpixlc ...

Will make Spack take compilers only from the user configuration, and the site configuration will be ignored. exception spack.config.ConfigError(message, long_message=None) Bases: spack.error.SpackError exception spack.config.ConfigFileError(message, long_message=None) Bases: spack.config.ConfigError exception spack.config.ConfigFormatError(validation_error, data) Bases: spack.config.ConfigError Raised when a configuration format does not match its schema. exception spack.config.ConfigSanityError(validation_error, data) Bases: spack.config.ConfigFormatError Same as ConfigFormatError, raised when config is written by Spack. class spack.config.ConfigScope(name, path) Bases: object This class represents a configuration scope. A scope is one directory containing named configuration files. Each file is a config “section” (e.g., mirrors, compilers, etc). clear() Empty cached config information. get_section(section) get_section_filename(section) write_section(section) spack.config.clear_config_caches() Clears the caches for configuration files, which will cause them to be re-read upon the next request spack.config.extend_with_default(validator_class) Add support for the ‘default’ attr for properties and patternProperties.

1.11. spack package 391 Spack Documentation, Release 0.9

jsonschema does not handle this out of the box – it only validates. This allows us to set default values for configs where certain fields are None b/c they’re deleted or commented out. spack.config.get_config(section, scope=None) Get configuration settings for a section. Strips off the top-level section name from the YAML dict. spack.config.get_config_filename(scope, section) For some scope and section, get the name of the configuration file spack.config.get_path(path, data) spack.config.highest_precedence_scope() Get the scope with highest precedence (prefs will override others). spack.config.is_spec_buildable(spec) Return true if the spec pkgspec is configured as buildable spack.config.print_section(section) Print a configuration to stdout. spack.config.section_schemas = {‘mirrors’: {‘additionalProperties’: False, ‘patternProperties’: {‘mirrors:?’: {‘default’: {}, ‘additionalProperties’: False, ‘patternProperties’: {‘\\w[\\w-]*’: {‘type’: ‘string’}}, ‘type’: ‘object’}}, ‘$schema’: ‘http://json-schema.org/schema#’, ‘type’: ‘object’, ‘title’: ‘Spack mirror configuration file schema’}, ‘repos’: {‘additionalProperties’: False, ‘patternProperties’: {‘repos:?’: {‘default’: [], ‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}}, ‘$schema’: ‘http://json-schema.org/schema#’, ‘type’: ‘object’, ‘title’: ‘Spack repository configuration file schema’}, ‘modules’: {‘title’: ‘Spack module file configuration file schema’, ‘patternProperties’: {‘modules:?’: {‘default’: {}, ‘additionalProperties’: False, ‘type’: ‘object’, ‘properties’: {‘tcl’: {‘allOf’: [{‘$ref’: ‘#/definitions/module_type_configuration’}, {}]}, ‘enable’: {‘default’: [], ‘items’: {‘enum’: [’tcl’, ‘dotkit’], ‘type’: ‘string’}, ‘type’: ‘array’}, ‘dotkit’: {‘allOf’: [{‘$ref’: ‘#/definitions/module_type_configuration’}, {}]}, ‘prefix_inspections’: {‘patternProperties’: {‘\\w[\\w-]*’: {‘$ref’: ‘#/definitions/array_of_strings’}}, ‘type’: ‘object’}}}}, ‘additionalProperties’: False, ‘definitions’: {‘dependency_selection’: {‘enum’: [’none’, ‘direct’, ‘all’], ‘type’: ‘string’}, ‘array_of_strings’: {‘default’: [], ‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}, ‘module_file_configuration’: {‘default’: {}, ‘additionalProperties’: False, ‘type’: ‘object’, ‘properties’: {‘load’: {‘$ref’: ‘#/definitions/array_of_strings’}, ‘environment’: {‘default’: {}, ‘additionalProperties’: False, ‘type’: ‘object’, ‘properties’: {‘append_path’: {‘$ref’: ‘#/definitions/dictionary_of_strings’}, ‘set’: {‘$ref’: ‘#/definitions/dictionary_of_strings’}, ‘prepend_path’: {‘$ref’: ‘#/definitions/dictionary_of_strings’}, ‘unset’: {‘$ref’: ‘#/definitions/array_of_strings’}}}, ‘prerequisites’: {‘$ref’: ‘#/definitions/dependency_selection’}, ‘autoload’: {‘$ref’: ‘#/definitions/dependency_selection’}, ‘filter’: {‘default’: {}, ‘additionalProperties’: False, ‘type’: ‘object’, ‘properties’: {‘environment_blacklist’: {‘default’: [], ‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}}}, ‘conflict’: {‘$ref’: ‘#/definitions/array_of_strings’}, ‘suffixes’: {‘$ref’: ‘#/definitions/dictionary_of_strings’}}}, ‘dictionary_of_strings’: {‘patternProperties’: {‘\\w[\\w-]*’: {‘type’: ‘string’}}, ‘type’: ‘object’}, ‘module_type_configuration’: {‘default’: {}, ‘anyOf’: [{‘properties’: {‘blacklist’: {‘$ref’: ‘#/definitions/array_of_strings’}, ‘whitelist’: {‘$ref’: ‘#/definitions/array_of_strings’}, ‘hash_length’: {‘default’: 7, ‘minimum’: 0, ‘type’: ‘integer’}, ‘naming_scheme’: {‘type’: ‘string’}}}, {‘patternProperties’: {‘\\w[\\w-]*’: {‘$ref’: ‘#/definitions/module_file_configuration’}}}], ‘type’: ‘object’}}, ‘$schema’: ‘http://json-schema.org/schema#’, ‘type’: ‘object’}, ‘packages’: {‘additionalProperties’: False, ‘patternProperties’: {‘packages:?’: {‘default’: {}, ‘additionalProperties’: False, ‘patternProperties’: {‘\\w[\\w-]*’: {‘default’: {}, ‘additionalProperties’: False, ‘type’: ‘object’, ‘properties’: {‘paths’: {‘default’: {}, ‘type’: ‘object’}, ‘providers’: {‘default’: {}, ‘additionalProperties’: False, ‘patternProperties’: {‘\\w[\\w-]*’: {‘default’: [], ‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}}, ‘type’: ‘object’}, ‘modules’: {‘default’: {}, ‘type’: ‘object’}, ‘buildable’: {‘default’: True, ‘type’: ‘boolean’}, ‘version’: {‘default’: [], ‘items’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘number’}]}, ‘type’: ‘array’}, ‘variants’: {‘oneOf’: [{‘type’: ‘string’}, {‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}]}, ‘compiler’: {‘default’: [], ‘items’: {‘type’: ‘string’}, ‘type’: ‘array’}}}}, ‘type’: ‘object’}}, ‘$schema’: ‘http://json-schema.org/schema#’, ‘type’: ‘object’, ‘title’: ‘Spack package configuration file schema’}, ‘targets’: {‘additionalProperties’: False, ‘patternProperties’: {‘targets:?’: {‘default’: {}, ‘additionalProperties’: False, ‘patternProperties’: {‘\\w[\\w-]*’: {‘type’: ‘string’}}, ‘type’: ‘object’}}, ‘$schema’: ‘http://json-schema.org/schema#’, ‘type’: ‘object’, ‘title’: ‘Spack target configuration file schema’}, ‘compilers’: {‘additionalProperties’: False, ‘patternProperties’: {‘compilers:?’: {‘items’: {‘compiler’: {‘additionalProperties’: False, ‘required’: [’paths’, ‘spec’, ‘modules’, ‘operating_system’], ‘type’: ‘object’, ‘properties’: {‘paths’: {‘additionalProperties’: False, ‘required’: [’cc’, ‘cxx’, ‘f77’, ‘fc’], ‘type’: ‘object’, ‘properties’: {‘cxxflags’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘cxx’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘fc’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘cppflags’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘ldflags’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘cflags’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘cc’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘fflags’: {‘anyOf’: [{‘type’: ‘string’}, {‘type’: ‘null’}]}, ‘ldlibs’: {‘anyOf’: [{‘type’: ‘ OrderedDict of config scopes keyed by name. Later scopes will override earlier scopes. spack.config.spec_externals(spec) Return a list of external specs (with external directory path filled in), one for each known external installation. spack.config.update_config(section, update_data, scope=None) Update the configuration file for a particular scope. Overwrites contents of a section in a scope with update_data, then writes out the config file. update_data should have the top-level section name stripped off (it will be re-added). Data itself can be a list, dict, or any other yaml-ish structure. spack.config.validate_scope(scope) Ensure that scope is valid, and return a valid scope if it is None. This should be used by routines in config.py to validate scope name arguments, and to determine a default scope where no scope is specified. spack.config.validate_section(data, schema) Validate data read in from a Spack YAML file. This leverages the line information (start_mark, end_mark) stored on Spack YAML structures. spack.config.validate_section_name(section) Exit if the section is not a valid section.

1.11.9 spack.database module

Spack’s installation tracking database. The database serves two purposes: 1. It implements a cache on top of a potentially very large Spack directory hierarchy, speeding up many operations that would otherwise require filesystem access. 2. It will allow us to track external installations as well as lost packages and their dependencies. Prior ot the implementation of this store, a direcotry layout served as the authoritative database of packages in Spack. This module provides a cache and a sanity checking mechanism for what is in the filesystem.

392 Chapter 1. Table of Contents Spack Documentation, Release 0.9 exception spack.database.CorruptDatabaseError(path, msg=’‘) Bases: spack.error.SpackError class spack.database.Database(root, db_dir=None) Bases: object add(spec_like, *args, **kwargs) get_record(spec_like, *args, **kwargs) installed_extensions_for(spec_like, *args, **kwargs) missing(spec) query(query_spec=, known=, installed=True, explicit=) Run a query on the database. query_spec Queries iterate through specs in the database and return those that satisfy the supplied query_spec. If query_spec is any, This will match all specs in the database. If it is a spec, we’ll evaluate spec.satisfies(query_spec). The query can be constrained by two additional attributes: known Possible values: True, False, any Specs that are “known” are those for which Spack can locate a package.py file – i.e., Spack “knows” how to install them. Specs that are unknown may represent packages that existed in a previ- ous version of Spack, but have since either changed their name or been removed. installed Possible values: True, False, any Specs for which a prefix exists are “installed”. A spec that is NOT installed will be in the database if some other spec depends on it but its installation has gone away since Spack installed it. TODO: Specs are a lot like queries. Should there be a wildcard spec object, and should specs have at- tributes like installed and known that can be queried? Or are these really special cases that only belong here? query_one(query_spec, known=, installed=True) Query for exactly one spec that matches the query spec. Raises an assertion error if more than one spec matches the query. Returns None if no installed package matches. read_transaction(timeout=60) Get a read lock context manager for use in a with block. reindex(directory_layout) Build database index from scratch based from a directory layout. Locks the DB if it isn’t locked already. remove(spec_like, *args, **kwargs) write_transaction(timeout=60) Get a write lock context manager for use in a with block. class spack.database.InstallRecord(spec, path, installed, ref_count=0, explicit=False) Bases: object A record represents one installation in the DB. The record keeps track of the spec for the installation, its install path, AND whether or not it is installed. We need the installed flag in case a user either:

1.11. spack package 393 Spack Documentation, Release 0.9

1.blew away a directory, or 2.used spack uninstall -f to get rid of it If, in either case, the package was removed but others still depend on it, we still need to track its spec, so we don’t actually remove from the database until a spec has no installed dependents left. classmethod from_dict(spec, dictionary) to_dict() exception spack.database.InvalidDatabaseVersionError(expected, found) Bases: spack.error.SpackError

1.11.10 spack.directives module

This package contains directives that can be used within a package. Directives are functions that can be called inside a package definition to modify the package, for example: class OpenMpi(Package): depends_on(“hwloc”) provides(“mpi”) ... provides and depends_on are spack directives. The available directives are: • version • depends_on • provides • extends • patch • variant • resource spack.directives.depends_on(*args, **kwargs) Creates a dict of deps with specs defining when they apply. spack.directives.extends(*args, **kwargs) Same as depends_on, but dependency is symlinked into parent prefix. This is for Python and other language modules where the module needs to be installed into the prefix of the Python installation. Spack handles this by installing modules into their own prefix, but allowing ONE module version to be symlinked into a parent Python install at a time. keyword arguments can be passed to extends() so that extension packages can pass parameters to the extendee’s extension mechanism. spack.directives.provides(*args, **kwargs) Allows packages to provide a virtual dependency. If a package provides ‘mpi’, other packages can declare that they depend on “mpi”, and spack can use the providing package to satisfy the dependency. spack.directives.patch(*args, **kwargs) Packages can declare patches to apply to source. You can optionally provide a when spec to indicate that a particular patch should only be applied when the package’s spec meets certain conditions (e.g. a particular version). spack.directives.version(*args, **kwargs) Adds a version and metadata describing how to fetch it. Metadata is just stored as a dict in the package’s versions dictionary. Package must turn it into a valid fetch strategy later.

394 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.directives.variant(*args, **kwargs) Define a variant for the package. Packager can specify a default value (on or off) as well as a text description. spack.directives.resource(*args, **kwargs) Define an external resource to be fetched and staged when building the package. Based on the keywords present in the dictionary the appropriate FetchStrategy will be used for the resource. Resources are fetched and staged in their own folder inside spack stage area, and then moved into the stage area of the package that needs them. List of recognized keywords: •‘when’ : (optional) represents the condition upon which the resource is needed •‘destination’ : (optional) path where to move the resource. This path must be relative to the main package stage area. •‘placement’ : (optional) gives the possibility to fine tune how the resource is moved into the main package stage area.

1.11.11 spack.directory_layout module class spack.directory_layout.DirectoryLayout(root) Bases: object A directory layout is used to associate unique paths with specs. Different installations are going to want differnet layouts for their install, and they can use this to customize the nesting structure of spack installs. add_extension(spec, ext_spec) Add to the list of currently installed extensions. all_specs() To be implemented by subclasses to traverse all specs for which there is a directory within the root. check_activated(spec, ext_spec) Ensure that ext_spec can be removed from spec. If not, raise NoSuchExtensionError. check_extension_conflict(spec, ext_spec) Ensure that ext_spec can be activated in spec. If not, raise ExtensionAlreadyInstalledError or ExtensionConflictError. check_installed(spec) Checks whether a spec is installed. Return the spec’s prefix, if it is installed, None otherwise. Raise an exception if the install is inconsistent or corrupt. create_install_directory(spec) Creates the installation directory for a spec. extension_map(spec) Get a dict of currently installed extension packages for a spec. Dict maps { name : extension_spec } Modifying dict does not affect internals of this layout. hidden_file_paths Return a list of hidden files used by the directory layout. Paths are relative to the root of an install directory. If the directory layout uses no hidden files to maintain state, this should return an empty container, e.g. [] or (,).

1.11. spack package 395 Spack Documentation, Release 0.9

path_for_spec(spec) Return absolute path from the root to a directory for the spec. relative_path_for_spec(spec) Implemented by subclasses to return a relative path from the install root to a unique location for the provided spec. remove_extension(spec, ext_spec) Remove from the list of currently installed extensions. remove_install_directory(spec) Removes a prefix and any empty parent directories from the root. Raised RemoveFailedError if something goes wrong. exception spack.directory_layout.DirectoryLayoutError(message, long_msg=None) Bases: spack.error.SpackError Superclass for directory layout errors. exception spack.directory_layout.ExtensionAlreadyInstalledError(spec, ext_spec) Bases: spack.directory_layout.DirectoryLayoutError Raised when an extension is added to a package that already has it. exception spack.directory_layout.ExtensionConflictError(spec, ext_spec, conflict) Bases: spack.directory_layout.DirectoryLayoutError Raised when an extension is added to a package that already has it. exception spack.directory_layout.InconsistentInstallDirectoryError(message, long_msg=None) Bases: spack.directory_layout.DirectoryLayoutError Raised when a package seems to be installed to the wrong place. exception spack.directory_layout.InstallDirectoryAlreadyExistsError(path) Bases: spack.directory_layout.DirectoryLayoutError Raised when create_install_directory is called unnecessarily. exception spack.directory_layout.InvalidExtensionSpecError(message, long_msg=None) Bases: spack.directory_layout.DirectoryLayoutError Raised when an extension file has a bad spec in it. exception spack.directory_layout.NoSuchExtensionError(spec, ext_spec) Bases: spack.directory_layout.DirectoryLayoutError Raised when an extension isn’t there on deactivate. exception spack.directory_layout.RemoveFailedError(installed_spec, prefix, error) Bases: spack.directory_layout.DirectoryLayoutError Raised when a DirectoryLayout cannot remove an install prefix. exception spack.directory_layout.SpecHashCollisionError(installed_spec, new_spec) Bases: spack.directory_layout.DirectoryLayoutError Raised when there is a hash collision in an install layout. exception spack.directory_layout.SpecReadError(message, long_msg=None) Bases: spack.directory_layout.DirectoryLayoutError Raised when directory layout can’t read a spec.

396 Chapter 1. Table of Contents Spack Documentation, Release 0.9 class spack.directory_layout.YamlDirectoryLayout(root, **kwargs) Bases: spack.directory_layout.DirectoryLayout Lays out installation directories like this:: / / -/ --- The hash here is a SHA-1 hash for the full DAG plus the build spec. TODO: implement the build spec. To avoid special characters (like ~) in the directory name, only enabled variants are included in the install path. Disabled variants are omitted. add_extension(spec, ext_spec) all_specs() build_env_path(spec) build_log_path(spec) build_packages_path(spec) check_activated(spec, ext_spec) check_extension_conflict(spec, ext_spec) check_installed(spec) create_install_directory(spec) extension_file_path(spec) Gets full path to an installed package’s extension file extension_map(spec) Defensive copying version of _extension_map() for external API. hidden_file_paths metadata_path(spec) read_spec(path) Read the contents of a file and parse them as a spec relative_path_for_spec(spec) remove_extension(spec, ext_spec) spec_file_path(spec) Gets full path to spec file specs_by_hash() write_spec(spec, path) Write a spec out to a file.

1.11.12 spack.environment module class spack.environment.AppendPath(name, value, **kwargs) Bases: spack.environment.NameValueModifier execute()

1.11. spack package 397 Spack Documentation, Release 0.9 class spack.environment.EnvironmentModifications(other=None) Bases: object Keeps track of requests to modify the current environment. Each call to a method to modify the environment stores the extra information on the caller in the request: - ‘filename’ : filename of the module where the caller is defined - ‘lineno’: line number where the request occurred - ‘context’ : line of code that issued the request that failed append_path(name, path, **kwargs) Stores in the current object a request to append a path to a path list Args: name: name of the path list in the environment path: path to be appended apply_modifications() Applies the modifications and clears the list clear() Clears the current list of modifications extend(other) static from_sourcing_files(*args, **kwargs) Creates an instance of EnvironmentModifications that, if executed, has the same effect on the environment as sourcing the files passed as parameters Parameters *args – list of files to be sourced Return type instance of EnvironmentModifications group_by_name() Returns a dict of the modifications grouped by variable name Returns: dict mapping the environment variable name to the modifications to be done on it prepend_path(name, path, **kwargs) Same as append_path, but the path is pre-pended Args: name: name of the path list in the environment path: path to be pre-pended remove_path(name, path, **kwargs) Stores in the current object a request to remove a path from a path list Args: name: name of the path list in the environment path: path to be removed set(name, value, **kwargs) Stores in the current object a request to set an environment variable Args: name: name of the environment variable to be set value: value of the environment variable set_path(name, elts, **kwargs) Stores a request to set a path generated from a list. Args: name: name o the environment variable to be set. elts: elements of the path to set. unset(name, **kwargs) Stores in the current object a request to unset an environment variable Args: name: name of the environment variable to be set class spack.environment.NameModifier(name, **kwargs) Bases: object update_args(**kwargs)

398 Chapter 1. Table of Contents Spack Documentation, Release 0.9

class spack.environment.NameValueModifier(name, value, **kwargs) Bases: object update_args(**kwargs) class spack.environment.PrependPath(name, value, **kwargs) Bases: spack.environment.NameValueModifier execute() class spack.environment.RemovePath(name, value, **kwargs) Bases: spack.environment.NameValueModifier execute() class spack.environment.SetEnv(name, value, **kwargs) Bases: spack.environment.NameValueModifier execute() class spack.environment.SetPath(name, value, **kwargs) Bases: spack.environment.NameValueModifier execute() class spack.environment.UnsetEnv(name, **kwargs) Bases: spack.environment.NameModifier execute() spack.environment.concatenate_paths(paths, separator=’:’) Concatenates an iterable of paths into a string of paths separated by separator, defaulting to colon Args: paths: iterable of paths separator: the separator to use, default ‘:’ Returns: string spack.environment.filter_environment_blacklist(env, variables) Generator that filters out any change to environment variables present in the input list Args: env: list of environment modifications variables: list of variable names to be filtered Yields: items in env if they are not in variables spack.environment.set_or_unset_not_first(variable, changes, errstream) Check if we are going to set or unset something after other modifications have already been requested spack.environment.validate(env, errstream) Validates the environment modifications to check for the presence of suspicious patterns. Prompts a warning for everything that was found Current checks: - set or unset variables after other changes on the same variable Args: env: list of environment modifications

1.11.13 spack.error module exception spack.error.NoNetworkConnectionError(message, url) Bases: spack.error.SpackError Raised when an operation needs an internet connection.

1.11. spack package 399 Spack Documentation, Release 0.9

exception spack.error.SpackError(message, long_message=None) Bases: exceptions.Exception This is the superclass for all Spack errors. Subclasses can be found in the modules they have to do with. die() long_message exception spack.error.UnsupportedPlatformError(message) Bases: spack.error.SpackError Raised by packages when a platform is not supported

1.11.14 spack.fetch_strategy module

Fetch strategies are used to download source code into a staging area in order to build it. They need to define the following methods: • fetch() This should attempt to download/check out source from somewhere. • check() Apply a checksum to the downloaded source code, e.g. for an archive. May not do anything if the fetch method was safe to begin with. • expand() Expand (e.g., an archive) downloaded file to source. • reset() Restore original state of downloaded code. Used by clean commands. This may just remove the ex- panded source and re-expand an archive, or it may run something like git reset –hard. • archive() Archive a source directory, e.g. for creating a mirror. class spack.fetch_strategy.CacheURLFetchStrategy(*args, **kwargs) Bases: spack.fetch_strategy.URLFetchStrategy The resource associated with a cache URL may be out of date. fetch(*args, **kwargs) exception spack.fetch_strategy.ChecksumError(message, long_msg=None) Bases: spack.fetch_strategy.FetchError Raised when archive fails to checksum. exception spack.fetch_strategy.FailedDownloadError(url, msg=’‘) Bases: spack.fetch_strategy.FetchError Raised wen a download fails. exception spack.fetch_strategy.FetchError(msg, long_msg=None) Bases: spack.error.SpackError class spack.fetch_strategy.FetchStrategy Bases: object Superclass of all fetch strategies. archive(destination) check() enabled = False expand() fetch()

400 Chapter 1. Table of Contents Spack Documentation, Release 0.9

classmethod matches(args) required_attributes = None reset() set_stage(stage) This is called by Stage before any of the fetching methods are called on the stage. class spack.fetch_strategy.FsCache(root) Bases: object destroy() fetcher(targetPath, digest) store(fetcher, relativeDst) class spack.fetch_strategy.GitFetchStrategy(**kwargs) Bases: spack.fetch_strategy.VCSFetchStrategy Fetch strategy that gets source code from a git repository. Use like this in a package: version(‘name’, git=’https://github.com/project/repo.git‘) Optionally, you can provide a branch, or commit to check out, e.g.: version(‘1.1’, git=’https://github.com/project/repo.git‘, tag=’v1.1’) You can use these three optional attributes in addition to git: •branch: Particular branch to build from (default is master) •tag: Particular tag to check out •commit: Particular commit hash in the repo archive(destination) enabled = True fetch(*args, **kwargs) git git_version required_attributes = (‘git’,) reset(*args, **kwargs) class spack.fetch_strategy.GoFetchStrategy(**kwargs) Bases: spack.fetch_strategy.VCSFetchStrategy Fetch strategy that employs the go get infrastructure Use like this in a package: version(‘name’, go=’github.com/monochromegane/the_platinum_searcher/...’) Go get does not natively support versions, they can be faked with git archive(destination) enabled = True fetch(*args, **kwargs) go go_version

1.11. spack package 401 Spack Documentation, Release 0.9

required_attributes = (‘go’,) reset(*args, **kwargs) class spack.fetch_strategy.HgFetchStrategy(**kwargs) Bases: spack.fetch_strategy.VCSFetchStrategy Fetch strategy that gets source code from a Mercurial repository. Use like this in a package: version(‘name’, hg=’https://jay.grs.rwth-aachen.de/hg/lwm2‘) Optionally, you can provide a branch, or revision to check out, e.g.: version(‘torus’, hg=’https://jay.grs.rwth-aachen.de/hg/lwm2‘, branch=’torus’) You can use the optional ‘revision’ attribute to check out a branch, tag, or particular revision in hg. To prevent non-reproducible builds, using a moving target like a branch is discouraged. •revision: Particular revision, branch, or tag. archive(destination) enabled = True fetch(*args, **kwargs) hg required_attributes = [’hg’] reset(*args, **kwargs) exception spack.fetch_strategy.InvalidArgsError(pkg, version) Bases: spack.fetch_strategy.FetchError exception spack.fetch_strategy.NoArchiveFileError(msg, long_msg) Bases: spack.fetch_strategy.FetchError exception spack.fetch_strategy.NoDigestError(msg, long_msg=None) Bases: spack.fetch_strategy.FetchError exception spack.fetch_strategy.NoStageError(method) Bases: spack.fetch_strategy.FetchError Raised when fetch operations are called before set_stage(). class spack.fetch_strategy.SvnFetchStrategy(**kwargs) Bases: spack.fetch_strategy.VCSFetchStrategy Fetch strategy that gets source code from a subversion repository. Use like this in a package: version(‘name’, svn=’http://www.example.com/svn/trunk‘) Optionally, you can provide a revision for the URL: version(‘name’, svn=’http://www.example.com/svn/trunk‘, revision=‘1641’) archive(destination) enabled = True fetch(*args, **kwargs) required_attributes = [’svn’] reset(*args, **kwargs) svn

402 Chapter 1. Table of Contents Spack Documentation, Release 0.9

class spack.fetch_strategy.URLFetchStrategy(url=None, digest=None, **kwargs) Bases: spack.fetch_strategy.FetchStrategy FetchStrategy that pulls source code from a URL for an archive, checks the archive against a checksum,and decompresses the archive. archive(destination) Just moves this archive to the destination. archive_file Path to the source archive within this stage directory. check(*args, **kwargs) Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a reposi- tory. enabled = True expand(*args, **kwargs) fetch(*args, **kwargs) required_attributes = [’url’] reset(*args, **kwargs) Removes the source path if it exists, then re-expands the archive. class spack.fetch_strategy.VCSFetchStrategy(name, *rev_types, **kwargs) Bases: spack.fetch_strategy.FetchStrategy archive(*args, **kwargs) check(*args, **kwargs) expand(*args, **kwargs) spack.fetch_strategy.args_are_for(args, fetcher) spack.fetch_strategy.for_package_version(pkg, version) Determine a fetch strategy based on the arguments supplied to version() in the package description. spack.fetch_strategy.from_kwargs(**kwargs) Construct the appropriate FetchStrategy from the given keyword arguments. Parameters kwargs – dictionary of keyword arguments Returns fetcher or raise a FetchError exception spack.fetch_strategy.from_url(url) Given a URL, find an appropriate fetch strategy for it. Currently just gives you a URLFetchStrategy that uses curl. TODO: make this return appropriate fetch strategies for other types of URLs.

1.11.15 spack.file_cache module

exception spack.file_cache.CacheError(message, long_message=None) Bases: spack.error.SpackError class spack.file_cache.FileCache(root) Bases: object This class manages cached data in the filesystem.

1.11. spack package 403 Spack Documentation, Release 0.9

•Cache files are fetched and stored by unique keys. Keys can be relative paths, so that thre can be some hierarchy in the cache. •The FileCache handles locking cache files for reading and writing, so client code need not manage locks for cache entries. cache_path(key) Path to the file in the cache for a particular key. destroy() Remove all files under the cache root. init_entry(key) Ensure we can access a cache file. Create a lock for it if needed. Return whether the cache file exists yet or not. mtime(key) Return modification time of cache file, or 0 if it does not exist. Time is in units returned by os.stat in the mtime field, which is platform-dependent. read_transaction(key) Get a read transaction on a file cache item. Returns a ReadTransaction context manager and opens the cache file for reading. You can use it like this: with spack.user_cache.read_transaction(key) as cache_file: cache_file.read() remove(key) write_transaction(key) Get a write transaction on a file cache item. Returns a WriteTransaction context manager that opens a temporary file for writing. Once the context manager finishes, if nothing went wrong, moves the file into place on top of the old file atomically.

1.11.16 spack.graph module

Functions for graphing DAGs of dependencies. This file contains code for graphing DAGs of software packages (i.e. Spack specs). There are two main functions you probably care about: graph_ascii() will output a colored graph of a spec in ascii format, kind of like the graph git shows with “git log –graph”, e.g.: o mpileaks | | | | o | callpath |/| | | |\| | |\ | | |\ | | | | o adept-utils | |_|_|/| |/| | | | o | | | | mpi //// | | o | dyninst | |/| | |/|/| | | | |/ | o | libdwarf |/ /

404 Chapter 1. Table of Contents Spack Documentation, Release 0.9

o | libelf / o boost

graph_dot() will output a graph of a spec (or multiple specs) in dot format. Note that graph_ascii assumes a single spec while graph_dot can take a number of specs as input. spack.graph.topological_sort(spec, **kwargs) Topological sort for specs. Return a list of dependency specs sorted topologically. The spec argument is not modified in the process. spack.graph.graph_ascii(spec, **kwargs) class spack.graph.AsciiGraph Bases: object write(spec, **kwargs) Write out an ascii graph of the provided spec. Arguments: spec – spec to graph. This only handles one spec at a time. Optional arguments: out – file object to write out to (default is sys.stdout) color – whether to write in color. Default is to autodetect based on output file. spack.graph.graph_dot(*specs, **kwargs) Generate a graph in dot format of all provided specs. Print out a dot formatted graph of all the dependencies between package. Output can be passed to graphviz, e.g.: spack graph –dot qt | dot -Tpdf > spack-graph.pdf

1.11.17 spack.mirror module

This file contains code for creating spack mirror directories. A mirror is an organized hierarchy containing specially named archive files. This enabled spack to know where to find files in a mirror if the main server for a particular package is down. Or, if the computer where spack is run is not connected to the internet, it allows spack to download packages directly from a mirror (e.g., on an intranet). exception spack.mirror.MirrorError(msg, long_msg=None) Bases: spack.error.SpackError Superclass of all mirror-creation related errors. spack.mirror.add_single_spec(spec, mirror_root, categories, **kwargs) spack.mirror.create(path, specs, **kwargs) Create a directory to be used as a spack mirror, and fill it with package archives. Arguments: path: Path to create a mirror directory hierarchy in. specs: Any package versions matching these specs will be added to the mirror. Keyword args: no_checksum: If True, do not checkpoint when fetching (default False) num_versions: Max number of versions to fetch per spec, if spec is ambiguous (default is 0 for all of them) Return Value: Returns a tuple of lists: (present, mirrored, error) • present: Package specs that were already present. • mirrored: Package specs that were successfully mirrored.

1.11. spack package 405 Spack Documentation, Release 0.9

• error: Package specs that failed to mirror due to some error. This routine iterates through all known package versions, and it creates specs for those versions. If the version satisfies any spec in the specs list, it is downloaded and added to the mirror. spack.mirror.get_matching_versions(specs, **kwargs) Get a spec for EACH known version matching any spec in the list. spack.mirror.mirror_archive_filename(spec, fetcher) Get the name of the spec’s archive in the mirror. spack.mirror.mirror_archive_path(spec, fetcher) Get the relative path to the spec’s archive within a mirror. spack.mirror.suggest_archive_basename(resource) Return a tentative basename for an archive. Raises an exception if the name is not an allowed archive type. Parameters fetcher – Returns

1.11.18 spack.modules module

This module contains code for creating environment modules, which can include dotkits, tcl modules, lmod, and others. The various types of modules are installed by post-install hooks and removed after an uninstall by post-uninstall hooks. This class consolidates the logic for creating an abstract description of the information that module systems need. This module also includes logic for coming up with unique names for the module files so that they can be found by the various shell-support files in $SPACK/share/spack/setup-env.*. Each hook in hooks/ implements the logic for writing its specific type of module file. class spack.modules.EnvModule(spec=None) Bases: object autoload(spec) blacklisted category file_name Subclasses should implement this to return the name of the file where this module lives. formats = {} header module_specific_content(configuration) name = ‘env_module’ naming_scheme prerequisite(spec) process_environment_command(env) remove() tokens Tokens that can be substituted in environment variable values and naming schemes

406 Chapter 1. Table of Contents Spack Documentation, Release 0.9

upper_tokens Tokens that can be substituted in environment variable names use_name Subclasses should implement this to return the name the module command uses to refer to the package. write(overwrite=False) Writes out a module file for this object. This method employs a template pattern and expects derived classes to: - override the header property - provide formats for autoload, prerequisites and environment changes class spack.modules.Dotkit(spec=None) Bases: spack.modules.EnvModule autoload_format = ‘dk_op {module_file}\n’ default_naming_format = ‘{name}-{version}-{compiler.name}-{compiler.version}’ environment_modifications_formats = {: ‘dk_unalter {name} {value}\n’, : ‘dk_alter {name} {value}\n’, : ‘dk_setenv {name} {value}\n’} file_name header name = ‘dotkit’ path = ‘/home/docs/checkouts/readthedocs.org/user_builds/spack/checkouts/bugfix-rtd-generation/share/spack/dotkit’ prerequisite(spec) class spack.modules.TclModule(spec=None) Bases: spack.modules.EnvModule autoload_format = ‘if ![ is-loaded {module_file} ] {{\n puts stderr “Autoloading {module_file}”\n module load {module_file}\n}}\n\n’ default_naming_format = ‘{name}-{version}-{compiler.name}-{compiler.version}’ file_name header module_specific_content(configuration) name = ‘tcl’ path = ‘/home/docs/checkouts/readthedocs.org/user_builds/spack/checkouts/bugfix-rtd-generation/share/spack/modules’ prerequisite_format = ‘prereq {module_file}\n’ process_environment_command(env)

1.11.19 spack.multimethod module

This module contains utilities for using multi-methods in spack. You can think of multi-methods like overloaded methods – they’re methods with the same name, and we need to select a version of the method based on some criteria. e.g., for overloaded methods, you would select a version of the method to call based on the types of its arguments. In spack, multi-methods are used to ease the life of package authors. They allow methods like install() (or other methods called by install()) to declare multiple versions to be called when the package is instantiated with different specs. e.g., if the package is built with OpenMPI on x86_64„ you might want to call a different install method than if it was built for mpich2 on BlueGene/Q. Likewise, you might want to do a different type of install for different versions of the package.

1.11. spack package 407 Spack Documentation, Release 0.9

Multi-methods provide a simple decorator-based syntax for this that avoids overly complicated rat nests of if state- ments. Obviously, depending on the scenario, regular old conditionals might be clearer, so package authors should use their judgement. exception spack.multimethod.MultiMethodError(message) Bases: spack.error.SpackError Superclass for multimethod dispatch errors exception spack.multimethod.NoSuchMethodError(cls, method_name, spec, possible_specs) Bases: spack.error.SpackError Raised when we can’t find a version of a multi-method. class spack.multimethod.SpecMultiMethod(default=None) Bases: object This implements a multi-method for Spack specs. Packages are instantiated with a particular spec, and you may want to execute different versions of methods based on what the spec looks like. For example, you might want to call a different version of install() for one platform than you call on another. The SpecMultiMethod class implements a callable object that handles method dispatch. When it is called, it looks through registered methods and their associated specs, and it tries to find one that matches the package’s spec. If it finds one (and only one), it will call that method. The package author is responsible for ensuring that only one condition on multi-methods ever evaluates to true. If multiple methods evaluate to true, this will raise an exception. This is intended for use with decorators (see below). The decorator (see docs below) creates SpecMultiMethods and registers method versions with them. To register a method, you can do something like this: mm = SpecMultiMethod() mm.register(“^chaos_5_x86_64_ib”, some_method) The object registered needs to be a Spec or some string that will parse to be a valid spec. When the mm is actually called, it selects a version of the method to call based on the sys_type of the object it is called on. See the docs for decorators below for more details. register(spec, method) Register a version of a method for a particular sys_type. class spack.multimethod.when(spec) Bases: object This annotation lets packages declare multiple versions of methods like install() that depend on the package’s spec. For example: class SomePackage(Package): ...

def install(self, prefix): # Do default install

@when('arch=chaos_5_x86_64_ib') def install(self, prefix): # This will be executed instead of the default install if # the package's platform() is chaos_5_x86_64_ib.

@when('arch=bgqos_0")

408 Chapter 1. Table of Contents Spack Documentation, Release 0.9

def install(self, prefix): # This will be executed if the package's sys_type is bgqos_0

This allows each package to have a default version of install() AND specialized versions for particular platforms. The version that is called depends on the architecutre of the instantiated package. Note that this works for methods other than install, as well. So, if you only have part of the install that is platform specific, you could do this: class SomePackage(Package): ... # virtual dependence on MPI. # could resolve to mpich, mpich2, OpenMPI depends_on('mpi')

def setup(self): # do nothing in the default case pass

@when('^openmpi') def setup(self): # do something special when this is built with OpenMPI for # its MPI implementations.

def install(self, prefix): # Do common install stuff self.setup() # Do more common install stuff

There must be one (and only one) @when clause that matches the package’s spec. If there is more than one, or if none match, then the method will raise an exception when it’s called. Note that the default version of decorated methods must always come first. Otherwise it will override all of the platform-specific versions. There’s not much we can do to get around this because of the way decorators work.

1.11.20 spack.package module

This is where most of the action happens in Spack. See the Package docs for detailed instructions on how the class works and on how to write your own packages. The spack package structure is based strongly on Homebrew (http://wiki.github.com/mxcl/homebrew/), mainly be- cause Homebrew makes it very easy to create packages. For a complete rundown on spack and how it differs from homebrew, look at the README. exception spack.package.ActivationError(msg, long_msg=None) Bases: spack.package.ExtensionError class spack.package.CMakePackage(spec) Bases: spack.package.StagedPackage configure_args() Returns package-specific arguments to be provided to the configure command. configure_env() Returns package-specific environment under which the configure command should be run. install_build() install_configure()

1.11. spack package 409 Spack Documentation, Release 0.9

install_install() install_setup() make_make() transitive_inc_path() exception spack.package.DependencyConflictError(conflict) Bases: spack.error.SpackError Raised when the dependencies cannot be flattened as asked for. exception spack.package.ExtensionConflictError(path) Bases: spack.package.ExtensionError exception spack.package.ExtensionError(message, long_msg=None) Bases: spack.package.PackageError exception spack.package.ExternalPackageError(message, long_msg=None) Bases: spack.package.InstallError Raised by install() when a package is only for external use. exception spack.package.FetchError(message, long_msg=None) Bases: spack.error.SpackError Raised when something goes wrong during fetch. exception spack.package.InstallError(message, long_msg=None) Bases: spack.error.SpackError Raised when something goes wrong during install or uninstall. exception spack.package.NoURLError(cls) Bases: spack.package.PackageError Raised when someone tries to build a URL for a package with no URLs. class spack.package.Package(spec) Bases: object This is the superclass for all spack packages. *The Package class* Package is where the bulk of the work of installing packages is done. A package defines how to fetch, verfiy (via, e.g., md5), build, and install a piece of software. A Package also defines what other packages it depends on, so that dependencies can be installed along with the package itself. Packages are written in pure python. Packages are all submodules of spack.packages. If spack is installed in $prefix, all of its python files are in $prefix/lib/spack. Most of them are in the spack module, so all the packages live in $prefix/lib/spack/spack/packages. All you have to do to create a package is make a new subclass of Package in this directory. Spack automatically scans the python files there and figures out which one to import when you invoke it. An example package Let’s look at the cmake package to start with. This package lives in $prefix/var/spack/repos/builtin/packages/cmake/package.py:

410 Chapter 1. Table of Contents Spack Documentation, Release 0.9

from spack import * class Cmake(Package): homepage='https://www.cmake.org' url='http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz' md5='097278785da7182ec0aea8769d06860c'

def install(self, spec, prefix): configure('--prefix=%s'% prefix, '--parallel=%s'% make_jobs) make() make('install')

Naming conventions There are two names you should care about: 1.The module name, cmake. •User will refers to this name, e.g. ‘spack install cmake’. •It can include _, -, and numbers (it can even start with a number). 2.The class name, “Cmake”. This is formed by converting - or _ in the module name to camel case. If the name starts with a number, we prefix the class name with _. Examples: Module Name Class Name foo_bar FooBar docbook-xml DocbookXml FooBar Foobar 3proxy _3proxy The class name is what spack looks for when it loads a package module. Required Attributes Aside from proper naming, here is the bare minimum set of things you need when you make a package: homepage: informational URL, so that users know what they’re installing. url or url_for_version(self, version): If url, then the URL of the source archive that spack will fetch. If url_for_version(), then a method returning the URL required to fetch a particular version. install(): This function tells spack how to build and install the software it downloaded. Optional Attributes You can also optionally add these attributes, if needed: list_url: Webpage to scrape for available version strings. Default is the directory containing the tarball; use this if the default isn’t correct so that invoking ‘spack versions’ will work for this package. url_version(self, version): When spack downloads packages at particular versions, it just converts version to string with str(version). Override this if your package needs special version formatting in its URL. boost is an example of a package that needs this. *Creating Packages* As a package creator, you can probably ignore most of the preceding information, because you can use the ‘spack create’ command to do it all automatically. You as the package creator generally only have to worry about writing your install function and specifying dependencies.

1.11. spack package 411 Spack Documentation, Release 0.9

spack create Most software comes in nicely packaged tarballs, like this one http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz Taking a page from homebrew, spack deduces pretty much everything it needs to know from the URL above. If you simply type this: spack create http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz

Spack will download the tarball, generate an md5 hash, figure out the version and the name of the package from the URL, and create a new package file for you with all the names and attributes set correctly. Once this skeleton code is generated, spack pops up the new package in your $EDITOR so that you can modify the parts that need changes. Dependencies If your package requires another in order to build, you can specify that like this: class Stackwalker(Package): ... depends_on("libdwarf") ...

This tells spack that before it builds stackwalker, it needs to build the libdwarf package as well. Note that this is the module name, not the class name (The class name is really only used by spack to find your package). Spack will download an install each dependency before it installs your package. In addtion, it will add -L, -I, and rpath arguments to your compiler and linker for each dependency. In most cases, this allows you to avoid specifying any dependencies in your configure or cmake line; you can just run configure or cmake without any additional arguments and it will find the dependencies automatically. The Install Function The install function is designed so that someone not too terribly familiar with Python could write a package in- staller. For example, we put a number of commands in install scope that you can use almost like shell commands. These include make, configure, cmake, rm, rmtree, mkdir, mkdirp, and others. You can see above in the cmake script that these commands are used to run configure and make almost like they’re used on the command line. The only difference is that they are python function calls and not shell commands. It may be puzzling to you where the commands and functions in install live. They are NOT instance variables on the class; this would require us to type ‘self.’ all the time and it makes the install code unnecessarily long. Rather, spack puts these commands and variables in module scope for your Package subclass. Since each package has its own module, this doesn’t pollute other namespaces, and it allows you to more easily implement an install function. For a full list of commands and variables available in module scope, see the add_commands_to_module() func- tion in this class. This is where most of them are created and set on the module. Parallel Builds By default, Spack will run make in parallel when you run make() in your install function. Spack figures out how many cores are available on your system and runs make with -j. If you do not want this behavior, you can explicitly mark a package not to use parallel make: class SomePackage(Package): ... parallel= False ...

412 Chapter 1. Table of Contents Spack Documentation, Release 0.9

This changes thd default behavior so that make is sequential. If you still want to build some parts in parallel, you can do this in your install function: make(parallel=True)

Likewise, if you do not supply parallel = True in your Package, you can keep the default parallel behavior and run make like this when you want a sequential build: make(parallel=False)

Package Lifecycle This section is really only for developers of new spack commands. A package’s lifecycle over a run of Spack looks something like this: p= Package() # Done for you by spack

p.do_fetch() # downloads tarball from a URL p.do_stage() # expands tarball in a temp directory p.do_patch() # applies patches to expanded source p.do_install() # calls package's install() function p.do_uninstall() # removes install directory

There are also some other commands that clean the build area: p.do_clean() # removes the stage directory entirely p.do_restage() # removes the build directory and # re-expands the archive.

The convention used here is that a do_* function is intended to be called internally by Spack commands (in spack.cmd). These aren’t for package writers to override, and doing so may break the functionality of the Package class. Package creators override functions like install() (all of them do this), clean() (some of them do this), and others to provide custom behavior. activate(extension, **kwargs) Symlinks all files from the extension into extendee’s install dir. Package authors can override this method to support other extension mechanisms. Spack internals (com- mands, hooks, etc.) should call do_activate() method so that proper checks are always executed. activated all_urls build_log_path compiler Get the spack.compiler.Compiler object used to build this package deactivate(extension, **kwargs) Unlinks all files from extension out of this package’s install dir. Package authors can override this method to support other extension mechanisms. Spack internals (com- mands, hooks, etc.) should call do_deactivate() method so that proper checks are always executed. dependencies_of_type(*deptypes) Get subset of the dependencies with certain types. do_activate(force=False) Called on an extension to invoke the extendee’s activate method.

1.11. spack package 413 Spack Documentation, Release 0.9

Commands should call this routine, and should not call activate() directly. do_clean() Removes the package’s build stage and source tarball. do_deactivate(**kwargs) Called on the extension to invoke extendee’s deactivate() method. do_fake_install() Make a fake install directory contaiing a ‘fake’ file in bin. do_fetch(mirror_only=False) Creates a stage directory and downloads the tarball for this package. Working directory will be set to the stage directory. do_install(keep_prefix=False, keep_stage=False, ignore_deps=False, skip_patch=False, ver- bose=False, make_jobs=None, run_tests=False, fake=False, explicit=False, dirty=False, install_phases=set([’provenance’, ‘configure’, ‘install’, ‘build’])) Called by commands to install a package and its dependencies. Package implementations should override install() to describe their build process. Parameters • keep_prefix – Keep install prefix on failure. By default, destroys it. • keep_stage – By default, stage is destroyed only if there are no exceptions during build. Set to True to keep the stage even with exceptions. • ignore_deps – Don’t install dependencies before installing this package • fake – Don’t really build; install fake stub files instead. • skip_patch – Skip patch stage of build if True. • verbose – Display verbose build output (by default, suppresses it) • dirty – Don’t clean the build environment before installing. • make_jobs – Number of make jobs to use for install. Default is ncpus • run_tests – Run tests within the package’s install() do_install_dependencies(**kwargs) do_patch() Calls do_stage(), then applied patches to the expanded tarball if they haven’t been applied already. do_restage() Reverts expanded/checked out source to a pristine state. do_stage(mirror_only=False) Unpacks the fetched tarball, then changes into the expanded tarball directory. do_uninstall(force=False) extendable = False List of prefix-relative file paths (or a single path). If these do not exist after install, or if they exist but are not files, sanity checks fail. extendee_args Spec of the extendee of this package, or None if it is not an extension extendee_spec Spec of the extendee of this package, or None if it is not an extension extends(spec)

414 Chapter 1. Table of Contents Spack Documentation, Release 0.9

fetch_remote_versions() Try to find remote versions of this package using the list_url and any other URLs described in the package file. fetcher format_doc(**kwargs) Wrap doc string at 72 characters and format nicely global_license_dir Returns the directory where global license files for all packages are stored. global_license_file Returns the path where a global license file for this particular package should be stored. install(spec, prefix) Package implementations override this with their own configuration install_phases = set([’provenance’, ‘configure’, ‘install’, ‘build’]) installed installed_dependents Return a list of the specs of all installed packages that depend on this one. TODO: move this method to database.py? is_extension make_jobs = None By default do not run tests within package’s install() module Use this to add variables to the class’s module’s scope. This lets us use custom syntax in the install method. namespace nearest_url(version) Finds the URL for the next lowest version with a URL. If there is no lower version with a URL, uses the package url property. If that isn’t there, uses a higher URL, and if that isn’t there raises an error. package_dir Return the directory where the package.py file lives. parallel = True # jobs to use for parallel make. If set, overrides default of ncpus. prefix Get the prefix into which this package should be installed. provides(vpkg_name) True if this package provides a virtual package with the specified name remove_prefix() Removes the prefix for a package along with any empty parent directories rpath Get the rpath this package links with, as a list of paths. rpath_args Get the rpath args as a string, with -Wl,-rpath, for each element run_tests = False Most packages are NOT extendable. Set to True if you want extensions.

1.11. spack package 415 Spack Documentation, Release 0.9

sanity_check_is_dir = [] sanity_check_is_file = [] List of prefix-relative directory paths (or a single path). If these do not exist after install, or if they exist but are not directories, sanity checks will fail. sanity_check_prefix() This function checks whether install succeeded. setup_dependent_environment(spack_env, run_env, dependent_spec) Set up the environment of packages that depend on this one. This is similar to setup_environment, but it is used to modify the compile and runtime environments of packages that depend on this one. This gives packages like Python and others that follow the extension model a way to implement common environment or compile-time settings for dependencies. By default, this delegates to self.setup_environment() Example: 1.Installing python modules generally requires PYTHONPATH to point to the lib/pythonX.Y/site- packages directory in the module’s install prefix. This could set that variable. Args: spack_env (EnvironmentModifications): list of modifications to be applied when the depen- dent package is bulit within Spack. run_env (EnvironmentModifications): list of environment changes to be applied when the dependent package is run outside of Spack. dependent_spec (Spec): The spec of the dependent package about to be built. This allows the extendee (self) to query the dependent’s state. Note that this package’s spec is available as self.spec. This is useful if there are some common steps to installing all extensions for a certain package. setup_dependent_package(module, dependent_spec) Set up Python module-scope variables for dependent packages. Called before the install() method of dependents. Default implementation does nothing, but this can be overridden by an extendable package to set up the module of its extensions. This is useful if there are some common steps to installing all extensions for a certain package. Example : 1.Extensions often need to invoke the python interpreter from the Python installation being extended. This routine can put a ‘python’ Executable object in the module scope for the extension package to simplify extension installs. 2.MPI compilers could set some variables in the dependent’s scope that point to mpicc, mpicxx, etc., allowing them to be called by common names regardless of which MPI is used. 3.BLAS/LAPACK implementations can set some variables indicating the path to their libraries, since these paths differ by BLAS/LAPACK implementation. Args: module (module): The Python module object of the dependent package. Packages can use this to set module-scope variables for the dependent to use.

416 Chapter 1. Table of Contents Spack Documentation, Release 0.9

dependent_spec (Spec): The spec of the dependent package about to be built. This allows the extendee (self) to query the dependent’s state. Note that this package’s spec is available as self.spec. This is useful if there are some common steps to installing all extensions for a certain package. setup_environment(spack_env, run_env) Set up the compile and runtime environments for a package. spack_env and run_env are EnvironmentModifications objects. Package authors can call methods on them to alter the environment within Spack and at runtime. Both spack_env and run_env are applied within the build process, before this package’s install() method is called. Modifications in run_env will also be added to the generated environment modules for this package. Default implementation does nothing, but this can be overridden if the package needs a particular environ- ment. Examples: 1.Qt extensions need QTDIR set.

Args: spack_env (EnvironmentModifications): list of modifications to be applied when this package is built within Spack. run_env (EnvironmentModifications): list of environment changes to be applied when this pack- age is run outside of Spack.

stage url_for_version(version) Returns a URL that you can download a new version of this package from. url_version(version) Given a version, this returns a string that should be substituted into the package’s URL to download that version. By default, this just returns the version string. Subclasses may need to override this, e.g. for boost versions where you need to ensure that there are _’s in the download URL. version version_urls = exception spack.package.PackageError(message, long_msg=None) Bases: spack.error.SpackError Raised when something is wrong with a package definition. exception spack.package.PackageStillNeededError(spec, dependents) Bases: spack.package.InstallError Raised when package is still needed by another on uninstall. exception spack.package.PackageVersionError(version) Bases: spack.package.PackageError Raised when a version URL cannot automatically be determined.

1.11. spack package 417 Spack Documentation, Release 0.9 class spack.package.StagedPackage(spec) Bases: spack.package.Package A Package subclass where the install() is split up into stages. install(spec, prefix) install_build() Runs the build process. install_configure() Runs the configure process. install_install() Runs the install process. install_setup() Creates a spack_setup.py script to configure the package later. exception spack.package.VersionFetchError(cls) Bases: spack.package.PackageError Raised when a version URL cannot automatically be determined. spack.package.dump_packages(spec, path) Dump all package information for a spec and its dependencies. This creates a package repository within path for every namespace in the spec DAG, and fills the repos wtih package files and patch files for every node in the DAG. spack.package.flatten_dependencies(spec, flat_dir) Make each dependency of spec present in dir via symlink. spack.package.install_dependency_symlinks(pkg, spec, prefix) Execute a dummy install and flatten dependencies spack.package.make_executable(path) spack.package.print_pkg(message) Outputs a message with a package . spack.package.use_cray_compiler_names() Compiler names for builds that rely on cray compiler names. spack.package.validate_package_url(url_string) Determine whether spack can handle a particular URL or not.

1.11.21 spack.package_test module spack.package_test.compare_output(current_output, blessed_output) Compare blessed and current output of executables. spack.package_test.compare_output_file(current_output, blessed_output_file) Same as above, but when the blessed output is given as a file. spack.package_test.compile_c_and_execute(source_file, include_flags, link_flags) Compile C @p source_file with @p include_flags and @p link_flags, run and return the output.

418 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.11.22 spack.parse module exception spack.parse.LexError(message, string, pos) Bases: spack.parse.ParseError Raised when we don’t know how to lex something. class spack.parse.Lexer(lexicon) Bases: object Base class for Lexers that keep track of line numbers. lex(text) token(type, value=’‘) exception spack.parse.ParseError(message, string, pos) Bases: spack.error.SpackError Raised when we don’t hit an error while parsing. class spack.parse.Parser(lexer) Bases: object Base class for simple recursive descent parsers. accept(id) Put the next symbol in self.token if accepted, then call gettok() expect(id) Like accept(), but fails if we don’t like the next token. gettok() Puts the next token in the input stream into self.next. last_token_error(message) Raise an error about the previous token in the stream. next_token_error(message) Raise an error about the next token in the stream. parse(text) push_tokens(iterable) Adds all tokens in some iterable to the token stream. setup(text) unexpected_token() class spack.parse.Token(type, value=’‘, start=0, end=0) Represents tokens; generated from input by lexer and fed to parse(). is_a(type)

1.11.23 spack.patch module exception spack.patch.NoSuchPatchFileError(package, path) Bases: spack.error.SpackError Raised when user specifies a patch file that doesn’t exist.

1.11. spack package 419 Spack Documentation, Release 0.9 class spack.patch.Patch(pkg, path_or_url, level) Bases: object This class describes a patch to be applied to some expanded source code. apply(stage) Fetch this patch, if necessary, and apply it to the source code in the supplied stage.

1.11.24 spack.preferred_packages module class spack.preferred_packages.PreferredPackages Bases: object architecture_compare(pkgname, a, b) Return less-than-0, 0, or greater than 0 if architecture a of pkgname is respectively less-than, equal-to, or greater-than architecture b of pkgname. One architecture is less-than another if it is preferred over the other. compiler_compare(pkgname, a, b) Return less-than-0, 0, or greater than 0 if compiler a of pkgname is respecively less-than, equal-to, or greater-than compiler b of pkgname. One compiler is less-than another if it is preferred over the other. provider_compare(pkgname, provider_str, a, b) Return less-than-0, 0, or greater than 0 if a is respecively less-than, equal-to, or greater-than b. A and b are possible implementations of provider_str. One provider is less-than another if it is preferred over the other. For example, provider_compare(‘scorep’, ‘mpi’, ‘mvapich’, ‘openmpi’) would return -1 if mvapich should be preferred over openmpi for scorep. spec_has_preferred_provider(pkgname, provider_str) Return True iff the named package has a list of preferred providers spec_preferred_variants(pkgname) Return a VariantMap of preferred variants and their values variant_compare(pkgname, a, b) Return less-than-0, 0, or greater than 0 if variant a of pkgname is respectively less-than, equal-to, or greater-than variant b of pkgname. One variant is less-than another if it is preferred over the other. version_compare(pkgname, a, b) Return less-than-0, 0, or greater than 0 if version a of pkgname is respectively less-than, equal-to, or greater-than version b of pkgname. One version is less-than another if it is preferred over the other.

1.11.25 spack.provider_index module

The virtual module contains utility classes for virtual dependencies. class spack.provider_index.ProviderIndex(specs=None, restrict=False) Bases: object This is a dict of dicts used for finding providers of particular virtual dependencies. The dict of dicts looks like: { vpkg name : { full vpkg spec : set(packages providing spec) } } Callers can use this to first find which packages provide a vpkg, then find a matching full spec. e.g., in this scenario: { ‘mpi’ : { mpi@:1.1 [set([mpich]),] mpi@:2.3 : set([[email protected]:]) } }

420 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Calling providers_for(spec) will find specs that provide a matching implementation of MPI. copy() Deep copy of this ProviderIndex. static from_yaml(stream) merge(other) Merge other ProviderIndex into this one. providers_for(*vpkg_specs) Gives specs of all packages that provide virtual packages with the supplied specs. remove_provider(pkg_name) Remove a provider from the ProviderIndex. satisfies(other) Check that providers of virtual specs are compatible. to_yaml(stream=None) update(spec) exception spack.provider_index.ProviderIndexError(message, long_message=None) Bases: spack.error.SpackError Raised when there is a problem with a ProviderIndex.

1.11.26 spack.repository module

exception spack.repository.BadRepoError(message, long_message=None) Bases: spack.repository.RepoError Raised when repo layout is invalid. exception spack.repository.DuplicateRepoError(message, long_message=None) Bases: spack.repository.RepoError Raised when duplicate repos are added to a RepoPath. exception spack.repository.FailedConstructorError(name, exc_type, exc_obj, exc_tb) Bases: spack.repository.PackageLoadError Raised when a package’s class constructor fails. exception spack.repository.InvalidNamespaceError(message, long_message=None) Bases: spack.repository.RepoError Raised when an invalid namespace is encountered. exception spack.repository.NoRepoConfiguredError(message, long_message=None) Bases: spack.repository.RepoError Raised when there are no repositories configured. exception spack.repository.PackageLoadError(message, long_message=None) Bases: spack.error.SpackError Superclass for errors related to loading packages. class spack.repository.Repo(root, namespace=’spack.pkg’) Bases: object Class representing a package repository in the filesystem.

1.11. spack package 421 Spack Documentation, Release 0.9

Each package repository must have a top-level configuration file called repo.yaml. Currently, repo.yaml this must define: namespace: A Python namespace where the repository’s packages should live. all_package_names() Returns a sorted list of all package names in the Repo. all_packages() Iterator over all packages in the repository. Use this with care, because loading packages is slow. dirname_for_package_name(spec_like, *args, **kwargs) dump_provenance(spec_like, *args, **kwargs) exists(pkg_name) Whether a package with the supplied name exists. extensions_for(spec_like, *args, **kwargs) filename_for_package_name(spec_like, *args, **kwargs) find_module(fullname, path=None) Python find_module import hook. Returns this Repo if it can load the module; None if not. get(spec_like, *args, **kwargs) get_pkg_class(pkg_name) Get the class for the package out of its module. First loads (or fetches from cache) a module for the package. Then extracts the package class from the module according to Spack’s naming convention. is_prefix(fullname) True if fullname is a prefix of this Repo’s namespace. load_module(fullname) Python importer load hook. Tries to load the module; raises an ImportError if it can’t. provider_index A provider index with names specific to this repo. providers_for(spec_like, *args, **kwargs) purge() Clear entire package instance cache. real_name(import_name) Allow users to import Spack packages using Python identifiers. A python identifier might map to many different Spack package names due to hyphen/underscore ambigu- ity. Easy example: num3proxy -> 3proxy Ambiguous: foo_bar -> foo_bar, foo-bar More ambiguous: foo_bar_baz -> foo_bar_baz, foo-bar-baz, foo_bar-baz, foo-bar_baz

422 Chapter 1. Table of Contents Spack Documentation, Release 0.9 exception spack.repository.RepoError(message, long_message=None) Bases: spack.error.SpackError Superclass for repository-related errors. class spack.repository.RepoPath(*repo_dirs, **kwargs) Bases: object A RepoPath is a list of repos that function as one. It functions exactly like a Repo, but it operates on the combined results of the Repos in its list instead of on a single package repository. all_package_names() Return all unique package names in all repositories. all_packages() dirname_for_package_name(pkg_name) dump_provenance(spec_like, *args, **kwargs) exists(pkg_name) extensions_for(spec_like, *args, **kwargs) filename_for_package_name(pkg_name) find_module(fullname, path=None) Implements precedence for overlaid namespaces. Loop checks each namespace in self.repos for packages, and also handles loading empty containing names- paces. first_repo() Get the first repo in precedence order. get(spec_like, *args, **kwargs) get_pkg_class(pkg_name) Find a class for the spec’s package and return the class object. get_repo(namespace, default=) Get a repository by namespace. Arguments: namespace: Look up this namespace in the RepoPath, and return it if found. Optional Arguments: default: If default is provided, return it when the namespace isn’t found. If not, raise an Un- knownNamespaceError. load_module(fullname) Handles loading container namespaces when necessary. See Repo for how actual package modules are loaded. provider_index Merged ProviderIndex from all Repos in the RepoPath. providers_for(spec_like, *args, **kwargs)

1.11. spack package 423 Spack Documentation, Release 0.9

put_first(repo) Add repo first in the search path. put_last(repo) Add repo last in the search path. remove(repo) Remove a repo from the search path. repo_for_pkg(spec_like, *args, **kwargs) swap(other) Convenience function to make swapping repostiories easier. This is currently used by mock tests. TODO: Maybe there is a cleaner way. class spack.repository.SpackNamespace(namespace) Bases: module Allow lazy loading of modules. exception spack.repository.UnknownNamespaceError(namespace) Bases: spack.repository.PackageLoadError Raised when we encounter an unknown namespace exception spack.repository.UnknownPackageError(name, repo=None) Bases: spack.repository.PackageLoadError Raised when we encounter a package spack doesn’t have. spack.repository.canonicalize_path(path) Substitute $spack, expand user home, take abspath. spack.repository.create_repo(root, namespace=None) Create a new repository in root with the specified namespace. If the namespace is not provided, use basename of root. Return the canonicalized path and namespace of the created repository. spack.repository.substitute_spack_prefix(path) Replaces instances of $spack with Spack’s prefix.

1.11.27 spack.resource module

Describes an optional resource needed for a build. Typically a bunch of sources that can be built in-tree within another package to enable optional features. class spack.resource.Resource(name, fetcher, destination, placement) Bases: object Represents an optional resource to be fetched by a package. Aggregates a name, a fetcher, a destination and a placement.

1.11.28 spack.spec module

Spack allows very fine-grained control over how packages are installed and over how they are built and configured. To make this easy, it has its own syntax for declaring a dependence. We call a descriptor of a particular package configuration a “spec”.

424 Chapter 1. Table of Contents Spack Documentation, Release 0.9

The syntax looks like this: $ spack install mpileaks ^openmpi @1.2:1.4 +debug %intel @12.1=bgqos_0 0123456

The first part of this is the command, ‘spack install’. The rest of the line is a spec for a particular installation of the mpileaks package. 0. The package to install 1. A dependency of the package, prefixed by ^ 2. A version descriptor for the package. This can either be a specific version, like “1.2”, or it can be a range of versions, e.g. “1.2:1.4”. If multiple specific versions or multiple ranges are acceptable, they can be separated by commas, e.g. if a package will only build with versions 1.0, 1.2-1.4, and 1.6-1.8 of mavpich, you could say: depends_on(“[email protected],1.2:1.4,1.6:1.8”) 3. A compile-time variant of the package. If you need openmpi to be built in debug mode for your package to work, you can require it by adding +debug to the openmpi spec when you depend on it. If you do NOT want the debug option to be enabled, then replace this with -debug. 4. The name of the compiler to build with. 5. The versions of the compiler to build with. Note that the identifier for a compiler version is the same ‘@’ that is used for a package version. A version list denoted by ‘@’ is associated with the compiler only if if it comes immediately after the compiler name. Otherwise it will be associated with the current package spec. 6. The architecture to build with. This is needed on machines where cross-compilation is required Here is the EBNF grammar for a spec: spec-list = { spec [ dep-list ] } dep_list = { ^ spec } spec = id [ options ] options = { @version-list | +variant | -variant | ~variant | %compiler | arch=architecture | [ flag ]=value} flag = { cflags | cxxflags | fcflags | fflags | cppflags | ldflags | ldlibs } variant = id architecture = id compiler = id [ version-list ] version-list = version [ { , version } ] version = id | id: | :id | id:id id = [A-Za-z0-9_][A-Za-z0-9_.-]*

Identifiers using the = command, such as architectures and compiler flags, require a space before the name. There is one context-sensitive part: ids in versions may contain ‘.’, while other ids may not. There is one ambiguity: since ‘-‘ is allowed in an id, you need to put whitespace space before -variant for it to be tokenized properly. You can either use whitespace, or you can just use ~variant since it means the same thing. Spack uses ~variant in directory names and in the canonical form of specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. exception spack.spec.AmbiguousHashError(msg, *specs) Bases: spack.spec.SpecError class spack.spec.CompilerSpec(*args) Bases: object

1.11. spack package 425 Spack Documentation, Release 0.9

The CompilerSpec field represents the compiler or range of compiler versions that a package should be built with. CompilerSpecs have a name and a version list. concrete A CompilerSpec is concrete if its versions are concrete and there is an available compiler with the right version. constrain(other) Intersect self’s versions with other. Return whether the CompilerSpec changed. copy() static from_dict(d) satisfies(other, strict=False) to_dict() version class spack.spec.DependencyMap Bases: llnl.util.lang.HashableMap Each spec has a DependencyMap containing specs for its dependencies. The DependencyMap is keyed by name.

concrete class spack.spec.DependencySpec(spec, deptypes) Bases: object Dependencies can be one (or more) of several types: •build: needs to be in the PATH at build time. •link: is linked to and added to compiler flags. •run: needs to be in the PATH for the package to run. Fields: - spec: the spack.spec.Spec description of a dependency. - deptypes: strings representing the type of dependency this is. copy() exception spack.spec.DuplicateArchitectureError(message) Bases: spack.spec.SpecError Raised when the same architecture occurs in a spec twice. exception spack.spec.DuplicateCompilerSpecError(message) Bases: spack.spec.SpecError Raised when the same compiler occurs in a spec twice. exception spack.spec.DuplicateDependencyError(message) Bases: spack.spec.SpecError Raised when the same dependency occurs in a spec twice. exception spack.spec.DuplicateVariantError(message) Bases: spack.spec.SpecError Raised when the same variant occurs in a spec twice.

426 Chapter 1. Table of Contents Spack Documentation, Release 0.9 class spack.spec.FlagMap(spec) Bases: llnl.util.lang.HashableMap concrete constrain(other) Add all flags in other that aren’t in self to self. Return whether the spec changed. copy() satisfies(other, strict=False) static valid_compiler_flags() exception spack.spec.InconsistentSpecError(message) Bases: spack.spec.SpecError Raised when two nodes in the same spec DAG have inconsistent constraints. exception spack.spec.InvalidDependencyException(message) Bases: spack.spec.SpecError Raised when a dependency in a spec is not actually a dependency of the package. exception spack.spec.MultipleProviderError(vpkg, providers) Bases: spack.spec.SpecError Raised when there is no package that provides a particular virtual dependency. exception spack.spec.NoProviderError(vpkg) Bases: spack.spec.SpecError Raised when there is no package that provides a particular virtual dependency. exception spack.spec.SpackYAMLError(msg, yaml_error) Bases: spack.error.SpackError class spack.spec.Spec(spec_like, *dep_like, **kwargs) Bases: object colorized() common_dependencies(other) Return names of dependencies that self an other have in common. concrete A spec is concrete if it can describe only ONE build of a package. If any of the name, version, architecture, compiler, variants, or depdenencies are ambiguous,then it is not concrete. concretize() A spec is concrete if it describes one build of a package uniquely. This will ensure that this spec is concrete. If this spec could describe more than one version, variant, or build of a package, this will add constraints to make it concrete. Some rigorous validation and checks are also performed on the spec. Concretizing ensures that it is self- consistent and that it’s consistent with requirements of its pacakges. See flatten() and normalize() for more details on this. concretized() This is a non-destructive version of concretize(). First clones, then returns a concrete version of this package without modifying this package.

1.11. spack package 427 Spack Documentation, Release 0.9

constrain(other, deps=True) Merge the constraints of other with self. Returns True if the spec changed as a result, False if not. constrained(other, deps=True) Return a constrained copy without modifying this spec. copy(**kwargs) Return a copy of this spec. By default, returns a deep copy. Supply dependencies=False to get a shallow copy. cshort_spec Returns a version of the spec with the dependencies hashed instead of completely enumerated. dag_hash(length=None) Return a hash of the entire spec DAG, including connectivity. dep_difference(other) Returns dependencies in self that are not in other. dep_string() dependencies(deptype=None) dependencies_dict(deptype=None) dependents(deptype=None) dependents_dict(deptype=None) eq_dag(other) True if the full dependency DAGs of specs are equal eq_node(other) Equality with another spec, not including dependencies. flat_dependencies(**kwargs) flat_dependencies_with_deptype(**kwargs) Return a DependencyMap containing all of this spec’s dependencies with their constraints merged. If copy is True, returns merged copies of its dependencies without modifying the spec it’s called on. If copy is False, clears this spec’s dependencies and returns them. format(format_string=’$_$@$%@+$+$=’, **kwargs) Prints out particular pieces of a spec, depending on what is in the format string. The format strings you can provide are: $_ Package name $. Full package name (with namespace) $@ Version with '@' prefix $% Compiler with '%' prefix $%@ Compiler with '%' prefix & compiler version with '@' prefix $%+ Compiler with '%' prefix & compiler flags prefixed by name $%@+ Compiler, compiler version, and compiler flags with same prefixes as above $+ Options $= Architecture prefixed by 'arch=' $# 7-char prefix of DAG hash with '-' prefix $$ $

You can also use full-string versions, which elide the prefixes:

428 Chapter 1. Table of Contents Spack Documentation, Release 0.9

${PACKAGE} Package name ${VERSION} Version ${COMPILER} Full compiler string ${COMPILERNAME} Compiler name ${COMPILERVER} Compiler version ${COMPILERFLAGS} Compiler flags ${OPTIONS} Options ${ARCHITECTURE} Architecture ${SHA1} Dependencies 8-char sha1 prefix

${SPACK_ROOT} The spack root directory ${SPACK_INSTALL} The default spack install directory, ${SPACK_PREFIX}/opt

Optionally you can provide a width, e.g. $20_ for a 20-wide name. Like printf, you can provide ‘-‘ for left justification, e.g. $-20_ for a left-justified name. Anything else is copied verbatim into the output stream. Example: $_$@$+ translates to the name, version, and options of the package, but no dependencies, arch, or compiler. TODO: allow, e.g., $6# to customize short hash length TODO: allow, e.g., $## for full hash. static from_node_dict(node) static from_yaml(stream) Construct a spec from YAML. Parameters: stream – string or file object to read from. TODO: currently discards hashes. Include hashes when they represent more than the DAG does. fullname get_dependency(name) index() Return DependencyMap that points to all the dependencies in this spec. static is_virtual(name) Test if a name is virtual without requiring a Spec. ne_dag(other) True if the full dependency DAGs of specs are not equal ne_node(other) Inequality with another spec, not including dependencies. normalize(force=False) When specs are parsed, any dependencies specified are hanging off the root, and ONLY the ones that were explicitly provided are there. Normalization turns a partial flat spec into a DAG, where: 1.Known dependencies of the root package are in the DAG. 2.Each node’s dependencies dict only contains its known direct deps. 3.There is only ONE unique spec for each package in the DAG. •This includes virtual packages. If there a non-virtual package that provides a virtual package that is in the spec, then we replace the virtual package with the non-virtual one. TODO: normalize should probably implement some form of cycle detection, to ensure that the spec is actually a DAG.

1.11. spack package 429 Spack Documentation, Release 0.9

normalized() Return a normalized copy of this spec without modifying this spec. package package_class Internal package call gets only the class object for a package. Use this to just get package metadata. prefix static read_yaml_dep_specs(dependency_dict) Read the DependencySpec portion of a YAML-formatted Spec. This needs to be backward-compatible with older spack spec formats so that reindex will work on old specs/databases. root Follow dependent links and find the root of this spec’s DAG. In spack specs, there should be a single root (the package being installed). This will throw an assertion error if that is not the case. satisfies(other, deps=True, strict=False) Determine if this spec satisfies all constraints of another. There are two senses for satisfies: •loose (default): the absence of a constraint in self implies that it could be satisfied by other, so we only check that there are no conflicts with other for constraints that this spec actually has. •strict: strict means that we must meet all the constraints specified on other. satisfies_dependencies(other, strict=False) This checks constraints on common dependencies against each other. short_spec Returns a version of the spec with the dependencies hashed instead of completely enumerated. sorted_deps() Return a list of all dependencies sorted by name. to_node_dict() to_yaml(stream=None) traverse(visited=None, deptype=None, **kwargs) traverse_with_deptype(visited=None, d=0, deptype=None, deptype_query=None, _self_deptype=None, **kwargs) Generic traversal of the DAG represented by this spec. This will yield each node in the spec. Options: order [=pre|post] Order to traverse spec nodes. Defaults to preorder traversal. Options are: ‘pre’: Pre-order traversal; each node is yielded before its children in the dependency DAG. ‘post’: Post-order traversal; each node is yielded after its children in the dependency DAG. cover [=nodes|edges|paths] Determines how extensively to cover the dag. Possible vlaues: ‘nodes’: Visit each node in the dag only once. Every node yielded by this function will be unique. ‘edges’: If a node has been visited once but is reached along a new path from the root, yield it but do not descend into it. This traverses each ‘edge’ in the DAG once. ‘paths’: Explore every unique path reachable from the root. This descends into visited subtrees and will yield nodes twice if they’re reachable by multiple paths. depth [=False] Defaults to False. When True, yields not just nodes in the spec, but also their depth from the root in a (depth, node) tuple.

430 Chapter 1. Table of Contents Spack Documentation, Release 0.9

key [=id] Allow a custom key function to track the identity of nodes in the traversal. root [=True] If False, this won’t yield the root node, just its descendents. direction [=children|parents] If ‘children’, does a traversal of this spec’s children. If ‘parents’, traverses upwards in the DAG towards the root. tree(**kwargs) Prints out this spec and its dependencies, tree-formatted with indentation. validate_names() This checks that names of packages and compilers in this spec are real. If they’re not, it will raise either UnknownPackageError or UnsupportedCompilerError. version virtual Right now, a spec is virtual if no package exists with its name. TODO: revisit this – might need to use a separate namespace and be more explicit about this. Possible idea: just use conventin and make virtual deps all caps, e.g., MPI vs mpi. virtual_dependencies() Return list of any virtual deps in this spec. exception spack.spec.SpecError(message) Bases: spack.error.SpackError Superclass for all errors that occur while constructing specs. class spack.spec.SpecLexer Bases: spack.parse.Lexer Parses tokens that make up spack specs. exception spack.spec.SpecParseError(parse_error) Bases: spack.spec.SpecError Wrapper for ParseError for when we’re parsing specs. class spack.spec.SpecParser Bases: spack.parse.Parser check_identifier(id=None) The only identifiers that can contain ‘.’ are versions, but version ids are context-sensitive so we have to check on a case-by-case basis. Call this if we detect a version id where it shouldn’t be. compiler() do_parse() parse_compiler(text) spec(name, check_valid_token=False) Parse a spec out of the input. If a spec is supplied, then initialize and return it instead of creating a new one. spec_by_hash() variant(name=None) version() version_list()

1.11. spack package 431 Spack Documentation, Release 0.9 exception spack.spec.UnknownVariantError(pkg, variant) Bases: spack.spec.SpecError Raised when the same variant occurs in a spec twice. exception spack.spec.UnsatisfiableArchitectureSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a spec architecture conflicts with package constraints. exception spack.spec.UnsatisfiableCompilerFlagSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a spec variant conflicts with package constraints. exception spack.spec.UnsatisfiableCompilerSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a spec comiler conflicts with package constraints. exception spack.spec.UnsatisfiableDependencySpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when some dependency of constrained specs are incompatible exception spack.spec.UnsatisfiableProviderSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a provider is supplied but constraints don’t match a vpkg requirement exception spack.spec.UnsatisfiableSpecError(provided, required, constraint_type) Bases: spack.spec.SpecError Raised when a spec conflicts with package constraints. Provide the requirement that was violated when raising. exception spack.spec.UnsatisfiableSpecNameError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when two specs aren’t even for the same package. exception spack.spec.UnsatisfiableVariantSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a spec variant conflicts with package constraints. exception spack.spec.UnsatisfiableVersionSpecError(provided, required) Bases: spack.spec.UnsatisfiableSpecError Raised when a spec version conflicts with package constraints. exception spack.spec.UnsupportedCompilerError(compiler_name) Bases: spack.spec.SpecError Raised when the user asks for a compiler spack doesn’t know about. class spack.spec.VariantMap(spec) Bases: llnl.util.lang.HashableMap concrete constrain(other) Add all variants in other that aren’t in self to self. Raises an error if any common variants don’t match. Return whether the spec changed. copy()

432 Chapter 1. Table of Contents Spack Documentation, Release 0.9

satisfies(other, strict=False) class spack.spec.VariantSpec(name, value) Bases: object Variants are named, build-time options for a package. Names depend on the particular package being built, and each named variant can be enabled or disabled. copy() spack.spec.color_formats = {‘@’: ‘@c’, ‘#’: ‘@K’, ‘%’: ‘@g’, ‘+’: ‘@B’, ‘~’: ‘@r’, ‘=’: ‘@m’, ‘^’: ‘@.’} Regex used for splitting by spec field separators. spack.spec.colorize_spec(spec) Returns a spec colorized according to the colors specified in color_formats. spack.spec.hash_color = ‘@K’ This map determines the coloring of specs when using color output. We make the fields different colors to enhance readability. See spack.color for descriptions of the color codes. spack.spec.parse(string) Returns a list of specs from an input string. For creating one spec, see Spec() constructor. spack.spec.parse_anonymous_spec(spec_like, pkg_name) Allow the user to omit the package name part of a spec if they know what it has to be already. e.g., provides(‘mpi@2’, when=’@1.9:’) says that this package provides MPI-3 when its version is higher than 1.9.

1.11.29 spack.stage module

exception spack.stage.ChdirError(message, long_message=None) Bases: spack.stage.StageError Raised when Spack can’t change directories. class spack.stage.DIYStage(path) Bases: object Simple class that allows any directory to be a spack stage. cache_local() chdir() chdir_to_source() check() destroy() expand_archive() fetch(mirror_only) restage() class spack.stage.ResourceStage(url_or_fetch_strategy, root, resource, **kwargs) Bases: spack.stage.Stage expand_archive()

1.11. spack package 433 Spack Documentation, Release 0.9

exception spack.stage.RestageError(message, long_message=None) Bases: spack.stage.StageError “Error encountered during restaging. class spack.stage.Stage(url_or_fetch_strategy, name=None, mirror_path=None, keep=False, path=None) Bases: object Manages a temporary stage directory for building. A Stage object is a context manager that handles a directory where some source code is downloaded and built before being installed. It handles fetching the source code, either as an archive to be expanded or by checking it out of a repository. A stage’s lifecycle looks like this: with Stage() as stage: # Context manager creates and destroys the # stage directory stage.fetch() # Fetch a source archive into the stage. stage.expand_archive() # Expand the source archive. # Build and install the archive. # (handled by user of Stage)

When used as a context manager, the stage is automatically destroyed if no exception is raised by the context. If an excpetion is raised, the stage is left in the filesystem and NOT destroyed, for potential reuse later. You can also use the stage’s create/destroy functions manually, like this: stage = Stage() try: stage.create() # Explicitly create the stage directory. stage.fetch() # Fetch a source archive into the stage. stage.expand_archive() # Expand the source archive. # Build and install the archive. # (handled by user of Stage) finally: stage.destroy() # Explicitly destroy the stage directory.

If spack.use_tmp_stage is True, spack will attempt to create stages in a tmp directory. Otherwise, stages are created directly in spack.stage_path. There are two kinds of stages: named and unnamed. Named stages can persist between runs of spack, e.g. if you fetched a tarball but didn’t finish building it, you won’t have to fetch it again. Unnamed stages are created using standard mkdtemp mechanisms or similar, and are intended to persist for only one run of spack. archive_file Path to the source archive within this stage directory. cache_local() chdir() Changes directory to the stage path. Or dies if it is not set up. chdir_to_source() Changes directory to the expanded archive directory. Dies with an error if there was no expanded archive. check() Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a reposi- tory. create() Creates the stage directory

434 Chapter 1. Table of Contents Spack Documentation, Release 0.9

If self.tmp_root evaluates to False, the stage directory is created directly under spack.stage_path, otherwise this will attempt to create a stage in a temporary directory and link it into spack.stage_path. Spack will use the first writable location in spack.tmp_dirs to create a stage. If there is no valid location in tmp_dirs, fall back to making the stage inside spack.stage_path. destroy() Removes this stage directory. expand_archive() Changes to the stage directory and attempt to expand the downloaded archive. Fail if the stage is not set up or if the archive is not yet downloaded. expected_archive_files Possible archive file paths. fetch(mirror_only=False) Downloads an archive or checks out code from a repository. restage() Removes the expanded archive path if it exists, then re-expands the archive. source_path Returns the path to the expanded/checked out source code. To find the source code, this method searches for the first subdirectory of the stage that it can find, and returns it. This assumes nothing besides the archive file will be in the stage path, but it has the advantage that we don’t need to know the name of the archive or its contents. If the fetch strategy is not supposed to expand the downloaded file, it will just return the stage path. If the archive needs to be expanded, it will return None when no archive is found. exception spack.stage.StageError(message, long_message=None) Bases: spack.error.SpackError “Superclass for all errors encountered during staging. spack.stage.ensure_access(file=’/home/docs/checkouts/readthedocs.org/user_builds/spack/checkouts/bugfix- rtd-generation/var/spack/stage’) Ensure we can access a directory and die with an error if we can’t. spack.stage.find_tmp_root() spack.stage.purge() Remove all build directories in the top-level stage path.

1.11.30 spack.url module

This module has methods for parsing names and versions of packages from URLs. The idea is to allow package cre- ators to supply nothing more than the download location of the package, and figure out version and name information from there. Example: when spack is given the following URL: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz It can figure out that the package name is ruby, and that it is at version 1.9.1-p243. This is useful for making the creation of packages simple: a user just supplies a URL and skeleton code is generated automatically. Spack can also figure out that it can most likely download 1.8.1 at this URL: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.8.1.tar.gz

1.11. spack package 435 Spack Documentation, Release 0.9

This is useful if a user asks for a package at a particular version number; spack doesn’t need anyone to tell it where to get the tarball even though it’s never been told about that version before. exception spack.url.UndetectableNameError(path) Bases: spack.url.UrlParseError Raised when we can’t parse a package name from a string. exception spack.url.UndetectableVersionError(path) Bases: spack.url.UrlParseError Raised when we can’t parse a version from a string. exception spack.url.UrlParseError(msg, path) Bases: spack.error.SpackError Raised when the URL module can’t parse something correctly. spack.url.color_url(path, **kwargs) Color the parts of the url according to Spack’s parsing. Colors are: Cyan: The version found by parse_version_offset(). Red: The name found by parse_name_offset(). Green: Instances of version string from substitute_version(). Magenta: Instances of the name (protected from substitution). Optional args: errors=True Append parse errors at end of string. subs=True Color substitutions as well as parsed name/version. spack.url.cumsum(elts, init=0, fn=>) Return cumulative sum of result of fn on each element in elts. spack.url.downloaded_file_extension(path) This returns the type of archive a URL refers to. This is sometimes confusing because of URLs like: 1.https://github.com/petdance/ack/tarball/1.93_02 Where the URL doesn’t actually contain the filename. We need to know what type it is so that we can appropri- ately name files in mirrors. spack.url.find_list_url(url) Finds a good list URL for the supplied URL. This depends on the site. By default, just assumes that a good list URL is the dirname of an archive path. For github URLs, this returns the URL of the project’s releases page. spack.url.insensitize(string) Change upper and lowercase letters to be case insensitive in the provided string. e.g., ‘a’ because ‘[Aa]’, ‘B’ becomes ‘[bB]’, etc. Use for building regexes. spack.url.parse_name(path, ver=None) spack.url.parse_name_and_version(path) spack.url.parse_name_offset(path, v=None) spack.url.parse_version(path) Given a URL or archive name, extract a version from it and return a version object. spack.url.parse_version_offset(path) Try to extract a version string from a filename or URL. This is taken largely from Homebrew’s Version class. spack.url.split_url_extension(path) Some URLs have a query string, e.g.: 1.https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7.tgz?raw=true 2.http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin.tar.gz

436 Chapter 1. Table of Contents Spack Documentation, Release 0.9

In (1), the query string needs to be stripped to get at the extension, but in (2), the filename is IN a single final query argument. This strips the URL into three pieces: prefix, ext, and suffix. The suffix contains anything that was stripped off the URL to get at the file extension. In (1), it will be ‘?raw=true’, but in (2), it will be empty. e.g.: 1.(‘https://github.com/losalamos/CLAMR/blob/packages/PowerParser_v2.0.7‘, ‘.tgz’, ‘?raw=true’) 2.(‘http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.0/apache-cassandra-1.2.0-rc2-bin‘, ‘.tar.gz’, None) spack.url.strip_query_and_fragment(path) spack.url.substitute_version(path, new_version) Given a URL or archive name, find the version in the path and substitute the new version for it. Replace all occurrences of the version if they don’t overlap with the package name. Simple example:: substitute_version(‘http://www.mr511.de/software/libelf-0.8.13.tar.gz‘, ‘2.9.3’) - >’http://www.mr511.de/software/libelf-2.9.3.tar.gz‘ Complex examples:: substitute_version(‘http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2- 2.0.tar.gz‘, 2.1) -> ‘http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.1.tar.gz‘ # In this string, the “2” in mvapich2 is NOT replaced. substitute_version(‘http://mvapich.cse.ohio- state.edu/download/mvapich/mv2/mvapich2-2.tar.gz‘, 2.1) -> ‘http://mvapich.cse.ohio- state.edu/download/mvapich/mv2/mvapich2-2.1.tar.gz‘ spack.url.substitution_offsets(path) This returns offsets for substituting versions and names in the provided path. It is a helper for substi- tute_version(). spack.url.wildcard_version(path) Find the version in the supplied path, and return a regular expression that will match this path with any version in its place.

1.11.31 spack.variant module

Variant is a class describing flags on builds, or “variants”. Could be generalized later to describe aribitrary parameters, but currently variants are just flags. class spack.variant.Variant(default, description) Bases: object Represents a variant on a build. Can be either on or off.

1.11.32 spack.version module

This module implements Version and version-ish objects. These are: Version A single version of a package. VersionRange A range of versions of a package. VersionList A list of Versions and VersionRanges. All of these types support the following operations, which can be called on any of the types:

1.11. spack package 437 Spack Documentation, Release 0.9

__eq__, __ne__, __lt__, __gt__, __ge__, __le__, __hash__ __contains__ satisfies overlaps union intersection concrete

class spack.version.Version(string) Bases: object Class to represent versions concrete dashed dotted highest() intersection(a, b, *args, **kwargs) is_predecessor(other) True if the other version is the immediate predecessor of this one. That is, NO versions v exist such that: (self < v < other and v not in self). is_successor(other) lowest() overlaps(a, b, *args, **kwargs) satisfies(a, b, *args, **kwargs) A Version ‘satisfies’ another if it is at least as specific and has a common prefix. e.g., we want [email protected] to satisfy a request for [email protected] so that when a user asks to build with [email protected], we can find a suitable compiler. underscored union(a, b, *args, **kwargs) up_to(index) Return a version string up to the specified component, exclusive. e.g., if this is 10.8.2, self.up_to(2) will return ‘10.8’. wildcard() Create a regex that will match variants of this version string. class spack.version.VersionRange(start, end) Bases: object concrete highest() intersection(a, b, *args, **kwargs) lowest() overlaps(a, b, *args, **kwargs) satisfies(a, b, *args, **kwargs) A VersionRange satisfies another if some version in this range would satisfy some version in the other range. To do this it must either:

438 Chapter 1. Table of Contents Spack Documentation, Release 0.9

1.Overlap with the other range 2.The start of this range satisfies the end of the other range. This is essentially the same as overlaps(), but overlaps assumes that its arguments are specific. That is, 4.7 is interpreted as 4.7.0.0.0.0... . This funciton assumes that 4.7 woudl be satisfied by 4.7.3.5, etc. Rationale: If a user asks for [email protected]:4.7, and a package is only compatible with [email protected]:4.8, then that package should be able to build under the constraints. Just using overlaps() would not work here. Note that we don’t need to check whether the end of this range would satisfy the start of the other range, because overlaps() already covers that case. Note further that overlaps() is a symmetric operation, while satisfies() is not. union(a, b, *args, **kwargs) class spack.version.VersionList(vlist=None) Bases: object Sorted, non-redundant list of Versions and VersionRanges. add(version) concrete copy() static from_dict(dictionary) Parse dict from to_dict. highest() Get the highest version in the list. intersect(a, b, *args, **kwargs) Intersect this spec’s list with other. Return True if the spec changed as a result; False otherwise intersection(a, b, *args, **kwargs) lowest() Get the lowest version in the list. overlaps(a, b, *args, **kwargs) satisfies(a, b, *args, **kwargs) A VersionList satisfies another if some version in the list would satisfy some version in the other list. This uses essentially the same algorithm as overlaps() does for VersionList, but it calls satisfies() on member Versions and VersionRanges. If strict is specified, this version list must lie entirely within the other in order to satisfy it. to_dict() Generate human-readable dict for YAML. union(a, b, *args, **kwargs) update(a, b, *args, **kwargs) spack.version.ver(obj) Parses a Version, VersionRange, or VersionList from a string or list of strings.

1.11. spack package 439 Spack Documentation, Release 0.9

1.11.33 spack.yaml_version_check module

Yaml Version Check is a module for ensuring that config file formats are compatible with the current version of Spack. spack.yaml_version_check.check_compiler_yaml_version() spack.yaml_version_check.check_yaml_versions()

1.11.34 Module contents class spack.Package(spec) Bases: object This is the superclass for all spack packages. *The Package class* Package is where the bulk of the work of installing packages is done. A package defines how to fetch, verfiy (via, e.g., md5), build, and install a piece of software. A Package also defines what other packages it depends on, so that dependencies can be installed along with the package itself. Packages are written in pure python. Packages are all submodules of spack.packages. If spack is installed in $prefix, all of its python files are in $prefix/lib/spack. Most of them are in the spack module, so all the packages live in $prefix/lib/spack/spack/packages. All you have to do to create a package is make a new subclass of Package in this directory. Spack automatically scans the python files there and figures out which one to import when you invoke it. An example package Let’s look at the cmake package to start with. This package lives in $prefix/var/spack/repos/builtin/packages/cmake/package.py:

from spack import * class Cmake(Package): homepage='https://www.cmake.org' url='http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz' md5='097278785da7182ec0aea8769d06860c'

def install(self, spec, prefix): configure('--prefix=%s'% prefix, '--parallel=%s'% make_jobs) make() make('install')

Naming conventions There are two names you should care about: 1.The module name, cmake. •User will refers to this name, e.g. ‘spack install cmake’. •It can include _, -, and numbers (it can even start with a number). 2.The class name, “Cmake”. This is formed by converting - or _ in the module name to camel case. If the name starts with a number, we prefix the class name with _. Examples:

440 Chapter 1. Table of Contents Spack Documentation, Release 0.9

Module Name Class Name foo_bar FooBar docbook-xml DocbookXml FooBar Foobar 3proxy _3proxy The class name is what spack looks for when it loads a package module. Required Attributes Aside from proper naming, here is the bare minimum set of things you need when you make a package: homepage: informational URL, so that users know what they’re installing. url or url_for_version(self, version): If url, then the URL of the source archive that spack will fetch. If url_for_version(), then a method returning the URL required to fetch a particular version. install(): This function tells spack how to build and install the software it downloaded. Optional Attributes You can also optionally add these attributes, if needed: list_url: Webpage to scrape for available version strings. Default is the directory containing the tarball; use this if the default isn’t correct so that invoking ‘spack versions’ will work for this package. url_version(self, version): When spack downloads packages at particular versions, it just converts version to string with str(version). Override this if your package needs special version formatting in its URL. boost is an example of a package that needs this. *Creating Packages* As a package creator, you can probably ignore most of the preceding information, because you can use the ‘spack create’ command to do it all automatically. You as the package creator generally only have to worry about writing your install function and specifying dependencies. spack create Most software comes in nicely packaged tarballs, like this one http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz Taking a page from homebrew, spack deduces pretty much everything it needs to know from the URL above. If you simply type this: spack create http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz

Spack will download the tarball, generate an md5 hash, figure out the version and the name of the package from the URL, and create a new package file for you with all the names and attributes set correctly. Once this skeleton code is generated, spack pops up the new package in your $EDITOR so that you can modify the parts that need changes. Dependencies If your package requires another in order to build, you can specify that like this: class Stackwalker(Package): ... depends_on("libdwarf") ...

1.11. spack package 441 Spack Documentation, Release 0.9

This tells spack that before it builds stackwalker, it needs to build the libdwarf package as well. Note that this is the module name, not the class name (The class name is really only used by spack to find your package). Spack will download an install each dependency before it installs your package. In addtion, it will add -L, -I, and rpath arguments to your compiler and linker for each dependency. In most cases, this allows you to avoid specifying any dependencies in your configure or cmake line; you can just run configure or cmake without any additional arguments and it will find the dependencies automatically. The Install Function The install function is designed so that someone not too terribly familiar with Python could write a package in- staller. For example, we put a number of commands in install scope that you can use almost like shell commands. These include make, configure, cmake, rm, rmtree, mkdir, mkdirp, and others. You can see above in the cmake script that these commands are used to run configure and make almost like they’re used on the command line. The only difference is that they are python function calls and not shell commands. It may be puzzling to you where the commands and functions in install live. They are NOT instance variables on the class; this would require us to type ‘self.’ all the time and it makes the install code unnecessarily long. Rather, spack puts these commands and variables in module scope for your Package subclass. Since each package has its own module, this doesn’t pollute other namespaces, and it allows you to more easily implement an install function. For a full list of commands and variables available in module scope, see the add_commands_to_module() func- tion in this class. This is where most of them are created and set on the module. Parallel Builds By default, Spack will run make in parallel when you run make() in your install function. Spack figures out how many cores are available on your system and runs make with -j. If you do not want this behavior, you can explicitly mark a package not to use parallel make: class SomePackage(Package): ... parallel= False ...

This changes thd default behavior so that make is sequential. If you still want to build some parts in parallel, you can do this in your install function: make(parallel=True)

Likewise, if you do not supply parallel = True in your Package, you can keep the default parallel behavior and run make like this when you want a sequential build: make(parallel=False)

Package Lifecycle This section is really only for developers of new spack commands. A package’s lifecycle over a run of Spack looks something like this: p= Package() # Done for you by spack

p.do_fetch() # downloads tarball from a URL p.do_stage() # expands tarball in a temp directory p.do_patch() # applies patches to expanded source p.do_install() # calls package's install() function p.do_uninstall() # removes install directory

442 Chapter 1. Table of Contents Spack Documentation, Release 0.9

There are also some other commands that clean the build area: p.do_clean() # removes the stage directory entirely p.do_restage() # removes the build directory and # re-expands the archive.

The convention used here is that a do_* function is intended to be called internally by Spack commands (in spack.cmd). These aren’t for package writers to override, and doing so may break the functionality of the Package class. Package creators override functions like install() (all of them do this), clean() (some of them do this), and others to provide custom behavior. activate(extension, **kwargs) Symlinks all files from the extension into extendee’s install dir. Package authors can override this method to support other extension mechanisms. Spack internals (com- mands, hooks, etc.) should call do_activate() method so that proper checks are always executed. activated all_urls build_log_path compiler Get the spack.compiler.Compiler object used to build this package deactivate(extension, **kwargs) Unlinks all files from extension out of this package’s install dir. Package authors can override this method to support other extension mechanisms. Spack internals (com- mands, hooks, etc.) should call do_deactivate() method so that proper checks are always executed. dependencies_of_type(*deptypes) Get subset of the dependencies with certain types. do_activate(force=False) Called on an extension to invoke the extendee’s activate method. Commands should call this routine, and should not call activate() directly. do_clean() Removes the package’s build stage and source tarball. do_deactivate(**kwargs) Called on the extension to invoke extendee’s deactivate() method. do_fake_install() Make a fake install directory contaiing a ‘fake’ file in bin. do_fetch(mirror_only=False) Creates a stage directory and downloads the tarball for this package. Working directory will be set to the stage directory. do_install(keep_prefix=False, keep_stage=False, ignore_deps=False, skip_patch=False, ver- bose=False, make_jobs=None, run_tests=False, fake=False, explicit=False, dirty=False, install_phases=set([’provenance’, ‘configure’, ‘install’, ‘build’])) Called by commands to install a package and its dependencies. Package implementations should override install() to describe their build process. Parameters • keep_prefix – Keep install prefix on failure. By default, destroys it.

1.11. spack package 443 Spack Documentation, Release 0.9

• keep_stage – By default, stage is destroyed only if there are no exceptions during build. Set to True to keep the stage even with exceptions. • ignore_deps – Don’t install dependencies before installing this package • fake – Don’t really build; install fake stub files instead. • skip_patch – Skip patch stage of build if True. • verbose – Display verbose build output (by default, suppresses it) • dirty – Don’t clean the build environment before installing. • make_jobs – Number of make jobs to use for install. Default is ncpus • run_tests – Run tests within the package’s install() do_install_dependencies(**kwargs) do_patch() Calls do_stage(), then applied patches to the expanded tarball if they haven’t been applied already. do_restage() Reverts expanded/checked out source to a pristine state. do_stage(mirror_only=False) Unpacks the fetched tarball, then changes into the expanded tarball directory. do_uninstall(force=False) extendable = False extendee_args Spec of the extendee of this package, or None if it is not an extension extendee_spec Spec of the extendee of this package, or None if it is not an extension extends(spec) fetch_remote_versions() Try to find remote versions of this package using the list_url and any other URLs described in the package file. fetcher format_doc(**kwargs) Wrap doc string at 72 characters and format nicely global_license_dir Returns the directory where global license files for all packages are stored. global_license_file Returns the path where a global license file for this particular package should be stored. install(spec, prefix) Package implementations override this with their own configuration install_phases = set([’provenance’, ‘configure’, ‘install’, ‘build’]) installed installed_dependents Return a list of the specs of all installed packages that depend on this one. TODO: move this method to database.py?

444 Chapter 1. Table of Contents Spack Documentation, Release 0.9

is_extension make_jobs = None module Use this to add variables to the class’s module’s scope. This lets us use custom syntax in the install method. namespace nearest_url(version) Finds the URL for the next lowest version with a URL. If there is no lower version with a URL, uses the package url property. If that isn’t there, uses a higher URL, and if that isn’t there raises an error. package_dir Return the directory where the package.py file lives. parallel = True prefix Get the prefix into which this package should be installed. provides(vpkg_name) True if this package provides a virtual package with the specified name remove_prefix() Removes the prefix for a package along with any empty parent directories rpath Get the rpath this package links with, as a list of paths. rpath_args Get the rpath args as a string, with -Wl,-rpath, for each element run_tests = False sanity_check_is_dir = [] sanity_check_is_file = [] sanity_check_prefix() This function checks whether install succeeded. setup_dependent_environment(spack_env, run_env, dependent_spec) Set up the environment of packages that depend on this one. This is similar to setup_environment, but it is used to modify the compile and runtime environments of packages that depend on this one. This gives packages like Python and others that follow the extension model a way to implement common environment or compile-time settings for dependencies. By default, this delegates to self.setup_environment() Example: 1.Installing python modules generally requires PYTHONPATH to point to the lib/pythonX.Y/site- packages directory in the module’s install prefix. This could set that variable. Args: spack_env (EnvironmentModifications): list of modifications to be applied when the depen- dent package is bulit within Spack. run_env (EnvironmentModifications): list of environment changes to be applied when the dependent package is run outside of Spack.

1.11. spack package 445 Spack Documentation, Release 0.9

dependent_spec (Spec): The spec of the dependent package about to be built. This allows the extendee (self) to query the dependent’s state. Note that this package’s spec is available as self.spec. This is useful if there are some common steps to installing all extensions for a certain package. setup_dependent_package(module, dependent_spec) Set up Python module-scope variables for dependent packages. Called before the install() method of dependents. Default implementation does nothing, but this can be overridden by an extendable package to set up the module of its extensions. This is useful if there are some common steps to installing all extensions for a certain package. Example : 1.Extensions often need to invoke the python interpreter from the Python installation being extended. This routine can put a ‘python’ Executable object in the module scope for the extension package to simplify extension installs. 2.MPI compilers could set some variables in the dependent’s scope that point to mpicc, mpicxx, etc., allowing them to be called by common names regardless of which MPI is used. 3.BLAS/LAPACK implementations can set some variables indicating the path to their libraries, since these paths differ by BLAS/LAPACK implementation. Args: module (module): The Python module object of the dependent package. Packages can use this to set module-scope variables for the dependent to use. dependent_spec (Spec): The spec of the dependent package about to be built. This allows the extendee (self) to query the dependent’s state. Note that this package’s spec is available as self.spec. This is useful if there are some common steps to installing all extensions for a certain package. setup_environment(spack_env, run_env) Set up the compile and runtime environments for a package. spack_env and run_env are EnvironmentModifications objects. Package authors can call methods on them to alter the environment within Spack and at runtime. Both spack_env and run_env are applied within the build process, before this package’s install() method is called. Modifications in run_env will also be added to the generated environment modules for this package. Default implementation does nothing, but this can be overridden if the package needs a particular environ- ment. Examples: 1.Qt extensions need QTDIR set.

Args: spack_env (EnvironmentModifications): list of modifications to be applied when this package is built within Spack. run_env (EnvironmentModifications): list of environment changes to be applied when this pack- age is run outside of Spack. stage

446 Chapter 1. Table of Contents Spack Documentation, Release 0.9

url_for_version(version) Returns a URL that you can download a new version of this package from. url_version(version) Given a version, this returns a string that should be substituted into the package’s URL to download that version. By default, this just returns the version string. Subclasses may need to override this, e.g. for boost versions where you need to ensure that there are _’s in the download URL. version version_urls = class spack.StagedPackage(spec) Bases: spack.package.Package A Package subclass where the install() is split up into stages. install(spec, prefix) install_build() Runs the build process. install_configure() Runs the configure process. install_install() Runs the install process. install_setup() Creates a spack_setup.py script to configure the package later. class spack.CMakePackage(spec) Bases: spack.package.StagedPackage configure_args() Returns package-specific arguments to be provided to the configure command. configure_env() Returns package-specific environment under which the configure command should be run. install_build() install_configure() install_install() install_setup() make_make() transitive_inc_path() class spack.Version(string) Bases: object Class to represent versions concrete dashed dotted highest()

1.11. spack package 447 Spack Documentation, Release 0.9

intersection(a, b, *args, **kwargs) is_predecessor(other) True if the other version is the immediate predecessor of this one. That is, NO versions v exist such that: (self < v < other and v not in self). is_successor(other) lowest() overlaps(a, b, *args, **kwargs) satisfies(a, b, *args, **kwargs) A Version ‘satisfies’ another if it is at least as specific and has a common prefix. e.g., we want [email protected] to satisfy a request for [email protected] so that when a user asks to build with [email protected], we can find a suitable compiler. underscored union(a, b, *args, **kwargs) up_to(index) Return a version string up to the specified component, exclusive. e.g., if this is 10.8.2, self.up_to(2) will return ‘10.8’. wildcard() Create a regex that will match variants of this version string. class spack.when(spec) Bases: object This annotation lets packages declare multiple versions of methods like install() that depend on the package’s spec. For example: class SomePackage(Package): ...

def install(self, prefix): # Do default install

@when('arch=chaos_5_x86_64_ib') def install(self, prefix): # This will be executed instead of the default install if # the package's platform() is chaos_5_x86_64_ib.

@when('arch=bgqos_0") def install(self, prefix): # This will be executed if the package's sys_type is bgqos_0

This allows each package to have a default version of install() AND specialized versions for particular platforms. The version that is called depends on the architecutre of the instantiated package. Note that this works for methods other than install, as well. So, if you only have part of the install that is platform specific, you could do this: class SomePackage(Package): ... # virtual dependence on MPI. # could resolve to mpich, mpich2, OpenMPI depends_on('mpi')

def setup(self):

448 Chapter 1. Table of Contents Spack Documentation, Release 0.9

# do nothing in the default case pass

@when('^openmpi') def setup(self): # do something special when this is built with OpenMPI for # its MPI implementations.

def install(self, prefix): # Do common install stuff self.setup() # Do more common install stuff

There must be one (and only one) @when clause that matches the package’s spec. If there is more than one, or if none match, then the method will raise an exception when it’s called. Note that the default version of decorated methods must always come first. Otherwise it will override all of the platform-specific versions. There’s not much we can do to get around this because of the way decorators work. spack.ver(obj) Parses a Version, VersionRange, or VersionList from a string or list of strings. spack.set_install_permissions(path) Set appropriate permissions on the installed file. spack.install(src, dest) Manually install a file to a particular location. spack.install_tree(src, dest, **kwargs) Manually install a directory tree to a particular location. spack.traverse_tree(source_root, dest_root, rel_path=’‘, **kwargs) Traverse two filesystem trees simultaneously. Walks the LinkTree directory in pre or post order. Yields each file in the source directory with a matching path from the dest directory, along with whether the file is a directory. e.g., for this tree: root/ a/ file1 file2 b/ file3

When called on dest, this yields: ('root','dest') ('root/a','dest/a') ('root/a/file1','dest/a/file1') ('root/a/file2','dest/a/file2') ('root/b','dest/b') ('root/b/file3','dest/b/file3')

Optional args: order=[pre|post] – Whether to do pre- or post-order traversal. ignore= – Predicate indicating which files to ignore. follow_nonexisting – Whether to descend into directories in src that do not exit in dest. Default True. follow_links – Whether to descend into symlinks in src.

1.11. spack package 449 Spack Documentation, Release 0.9

spack.expand_user(path) Find instances of ‘%u’ in a path and replace with the current user’s username. spack.working_dir(*args, **kwds) spack.touch(path) Creates an empty file at the specified path. spack.touchp(path) Like touch, but creates any parent directories needed for the file. spack.mkdirp(*paths) Creates a directory, as well as parent directories if needed. spack.force_remove(*paths) Remove files without printing errors. Like rm -f, does NOT remove directories. spack.join_path(prefix, *args) spack.ancestor(dir, n=1) Get the nth ancestor of a directory. spack.can_access(file_name) True if we have read/write access to the file. spack.filter_file(regex, repl, *filenames, **kwargs) Like sed, but uses python regular expressions. Filters every line of each file through regex and replaces the file with a filtered version. Preserves mode of filtered files. As with re.sub, repl can be either a string or a callable. If it is a callable, it is passed the match object and should return a suitable replacement string. If it is a string, it can contain , , etc. to represent back-substitution as sed would allow. Keyword Options: string[=False] If True, treat regex as a plain string. backup[=True] Make backup file(s) suffixed with ~ ignore_absent[=False] Ignore any files that don’t exist. class spack.FileFilter(*filenames) Bases: object Convenience class for calling filter_file a lot. filter(regex, repl, **kwargs) spack.change_sed_delimiter(old_delim, new_delim, *filenames) Find all sed search/replace commands and change the delimiter. e.g., if the file contains seds that look like ‘s///’, you can call change_sed_delimiter(‘/’, ‘@’, file) to change the delimiter to ‘@’. NOTE that this routine will fail if the delimiter is ‘ or ”. Handling those is left for future work. spack.is_exe(path) True if path is an executable file. spack.force_symlink(src, dest) spack.set_executable(path) spack.copy_mode(src, dest) spack.unset_executable_mode(path) spack.remove_dead_links(root) Removes any dead link that is present in root Args: root: path where to search for dead links

450 Chapter 1. Table of Contents Spack Documentation, Release 0.9

spack.remove_linked_tree(path) Removes a directory and its contents. If the directory is a symlink, follows the link and removes the real directory before removing the link. Args: path: directory to be removed spack.find_library_path(libname, *paths) Searches for a file called in each path. Return: directory where the library was found, if found. None otherwise. spack.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. Args: path: directory in which .dylib files are located spack.to_link_flags(library) Transforms a path to a into linking flags -L

-l. Return: A string of linking flags. spack.to_lib_name(library) Transforms a path to the library /path/to/lib.xyz into spack.depends_on(*args, **kwargs) Creates a dict of deps with specs defining when they apply. spack.extends(*args, **kwargs) Same as depends_on, but dependency is symlinked into parent prefix. This is for Python and other language modules where the module needs to be installed into the prefix of the Python installation. Spack handles this by installing modules into their own prefix, but allowing ONE module version to be symlinked into a parent Python install at a time. keyword arguments can be passed to extends() so that extension packages can pass parameters to the extendee’s extension mechanism. spack.provides(*args, **kwargs) Allows packages to provide a virtual dependency. If a package provides ‘mpi’, other packages can declare that they depend on “mpi”, and spack can use the providing package to satisfy the dependency. spack.patch(*args, **kwargs) Packages can declare patches to apply to source. You can optionally provide a when spec to indicate that a particular patch should only be applied when the package’s spec meets certain conditions (e.g. a particular version). spack.version(*args, **kwargs) Adds a version and metadata describing how to fetch it. Metadata is just stored as a dict in the package’s versions dictionary. Package must turn it into a valid fetch strategy later. spack.variant(*args, **kwargs) Define a variant for the package. Packager can specify a default value (on or off) as well as a text description. spack.resource(*args, **kwargs) Define an external resource to be fetched and staged when building the package. Based on the keywords present in the dictionary the appropriate FetchStrategy will be used for the resource. Resources are fetched and staged in their own folder inside spack stage area, and then moved into the stage area of the package that needs them. List of recognized keywords:

1.11. spack package 451 Spack Documentation, Release 0.9

•‘when’ : (optional) represents the condition upon which the resource is needed •‘destination’ : (optional) path where to move the resource. This path must be relative to the main package stage area. •‘placement’ : (optional) gives the possibility to fine tune how the resource is moved into the main package stage area. class spack.Executable(name) Bases: object Class representing a program that can be run on the command line. add_default_arg(arg) command spack.which(name, **kwargs) Finds an executable in the path like command-line which. exception spack.ProcessError(msg, long_message=None) Bases: spack.error.SpackError long_message spack.install_dependency_symlinks(pkg, spec, prefix) Execute a dummy install and flatten dependencies spack.flatten_dependencies(spec, flat_dir) Make each dependency of spec present in dir via symlink. exception spack.DependencyConflictError(conflict) Bases: spack.error.SpackError Raised when the dependencies cannot be flattened as asked for. exception spack.InstallError(message, long_msg=None) Bases: spack.error.SpackError Raised when something goes wrong during install or uninstall. exception spack.ExternalPackageError(message, long_msg=None) Bases: spack.package.InstallError Raised by install() when a package is only for external use.

452 Chapter 1. Table of Contents CHAPTER 2

Indices and tables

• genindex • modindex • search

453 Spack Documentation, Release 0.9

454 Chapter 2. Indices and tables Python Module Index

s spack.cmd.purge, 341 spack.abi, 384 spack.cmd.python, 341 spack.architecture, 384 spack.cmd.reindex, 341 spack.build_environment, 386 spack.cmd.repo, 341 spack.cmd, 345 spack.cmd.restage, 341 spack.cmd.activate, 335 spack.cmd.setup, 341 spack.cmd.arch, 335 spack.cmd.spec, 342 spack.cmd.bootstrap, 335 spack.cmd.stage, 342 spack.cmd.cd, 335 spack.cmd.test, 342 spack.cmd.checksum, 336 spack.cmd.test_install, 342 spack.cmd.clean, 336 spack.cmd.uninstall, 343 spack.cmd.common, 335 spack.cmd.unload, 343 spack.cmd.common.arguments, 335 spack.cmd.unuse, 343 spack.cmd.compiler, 336 spack.cmd.url_parse, 343 spack.cmd.compilers, 336 spack.cmd.urls, 344 spack.cmd.config, 336 spack.cmd.use, 344 spack.cmd.create, 336 spack.cmd.versions, 344 spack.cmd.deactivate, 337 spack.cmd.view, 344 spack.cmd.dependents, 337 spack.compiler, 388 spack.cmd.diy, 337 spack.compilers, 350 spack.cmd.doc, 337 spack.compilers.cce, 346 spack.cmd.edit, 337 spack.compilers.clang, 346 spack.cmd.env, 337 spack.compilers.gcc, 347 spack.cmd.extensions, 337 spack.compilers.intel, 347 spack.cmd.fetch, 338 spack.compilers.nag, 348 spack.cmd.find, 338 spack.compilers.pgi, 348 spack.cmd.graph, 338 spack.compilers.xl, 349 spack.cmd.help, 338 spack.concretize, 388 spack.cmd.info, 338 spack.config, 390 spack.cmd.install, 338 spack.database, 392 spack.cmd.list, 338 spack.directives, 394 spack.cmd.load, 339 spack.directory_layout, 395 spack.cmd.location, 339 spack.environment, 397 spack.cmd.md5, 339 spack.error, 399 spack.cmd.mirror, 339 spack.fetch_strategy, 400 spack.cmd.module, 339 spack.file_cache, 403 spack.cmd.package_list, 340 spack.graph, 404 spack.cmd.patch, 340 spack.hooks, 352 spack.cmd.pkg, 340 spack.hooks.dotkit, 351 spack.cmd.providers, 341 spack.hooks.extensions, 351 spack.hooks.licensing, 351

455 Spack Documentation, Release 0.9

spack.hooks.sbang, 351 spack.test.lock, 364 spack.hooks.tclmodule, 352 spack.test.make_executable, 364 spack.mirror, 405 spack.test.mirror, 365 spack.modules, 406 spack.test.mock_database, 365 spack.multimethod, 407 spack.test.mock_packages_test, 365 spack.operating_systems, 353 spack.test.mock_repo, 366 spack.operating_systems.cnl, 352 spack.test.modules, 366 spack.operating_systems.linux_distro, spack.test.multimethod, 367 352 spack.test.namespace_trie, 367 spack.operating_systems.mac_os, 353 spack.test.optional_deps, 368 spack.package, 409 spack.test.package_sanity, 368 spack.package_test, 418 spack.test.packages, 368 spack.parse, 419 spack.test.pattern, 369 spack.patch, 419 spack.test.provider_index, 369 spack.platforms, 354 spack.test.python_version, 369 spack.platforms.bgq, 353 spack.test.sbang, 370 spack.platforms.cray, 353 spack.test.spec_dag, 370 spack.platforms.darwin, 353 spack.test.spec_semantics, 371 spack.platforms.linux, 354 spack.test.spec_syntax, 372 spack.platforms.test, 354 spack.test.spec_yaml, 373 spack.preferred_packages, 420 spack.test.stage, 373 spack.provider_index, 420 spack.test.svn_fetch, 374 spack.repository, 421 spack.test.tally_plugin, 375 spack.resource, 424 spack.test.url_extrapolate, 375 spack.schema, 355 spack.test.url_parse, 375 spack.schema.compilers, 354 spack.test.url_substitution, 377 spack.schema.mirrors, 354 spack.test.versions, 377 spack.schema.modules, 354 spack.test.yaml, 379 spack.schema.packages, 354 spack.url, 435 spack.schema.repos, 355 spack.util, 384 spack.schema.targets, 355 spack.util.compression, 379 spack.spec, 424 spack.util.crypto, 379 spack.stage, 433 spack.util.debug, 380 spack.test, 379 spack.util.environment, 380 spack.test.architecture, 356 spack.util.executable, 380 spack.test.build_system_guess, 357 spack.util.multiproc, 381 spack.test.cc, 357 spack.util.naming, 381 spack.test.cmd, 356 spack.util.pattern, 382 spack.test.cmd.find, 355 spack.util.prefix, 382 spack.test.cmd.module, 355 spack.util.spack_yaml, 383 spack.test.cmd.test_compiler_cmd, 355 spack.util.string, 383 spack.test.cmd.test_install, 356 spack.util.web, 383 spack.test.cmd.uninstall, 356 spack.variant, 437 spack.test.concretize, 358 spack.version, 437 spack.test.concretize_preferences, 359 spack.yaml_version_check, 440 spack.test.config, 360 spack.test.database, 360 spack.test.directory_layout, 361 spack.test.environment, 361 spack.test.file_cache, 361 spack.test.git_fetch, 362 spack.test.hg_fetch, 362 spack.test.install, 363 spack.test.link_tree, 363

456 Python Module Index Index

A all_specs() (spack.directory_layout.YamlDirectoryLayout ABI (class in spack.abi), 384 method), 397 accept() (spack.parse.Parser method), 419 all_urls (spack.package.Package attribute), 413 acquire_read() (spack.test.lock.LockTest method), 364 allowed_archive() (in module spack.util.compression), acquire_write() (spack.test.lock.LockTest method), 364 379 activate() (in module spack.cmd.activate), 335 AmbiguousHashError, 425 activate() (spack.package.Package method), 413 append() (spack.cmd.test_install.TestSuite method), 342 activated (spack.package.Package attribute), 413 append_path() (spack.environment.EnvironmentModifications ActivationError, 409 method), 398 add() (spack.database.Database method), 393 AppendPath (class in spack.environment), 397 add() (spack.version.VersionList method), 439 apply() (spack.patch.Patch method), 420 add_common_arguments() (in module apply_modifications() (spack.environment.EnvironmentModifications spack.cmd.common.arguments), 335 method), 398 add_compilers_to_config() (in module spack.compilers), Arch (class in spack.architecture), 385 350 arch() (in module spack.cmd.arch), 335 add_default_arg() (spack.util.executable.Executable arch_from_dict() (in module spack.architecture), 386 method), 380 architecture_compare() (spack.preferred_packages.PreferredPackages add_extension() (spack.directory_layout.DirectoryLayout method), 420 method), 395 architecture_compatible() (spack.abi.ABI method), 384 add_extension() (spack.directory_layout.YamlDirectoryLayoutArchitectureTest (class in spack.test.architecture), 356 method), 397 archive() (spack.fetch_strategy.FetchStrategy method), add_operating_system() (spack.architecture.Platform 400 method), 385 archive() (spack.fetch_strategy.GitFetchStrategy add_single_spec() (in module spack.mirror), 405 method), 401 add_target() (spack.architecture.Platform method), 385 archive() (spack.fetch_strategy.GoFetchStrategy addError() (spack.test.tally_plugin.Tally method), 375 method), 401 addFailure() (spack.test.tally_plugin.Tally method), 375 archive() (spack.fetch_strategy.HgFetchStrategy addSuccess() (spack.test.tally_plugin.Tally method), 375 method), 402 all_compiler_types() (in module spack.compilers), 350 archive() (spack.fetch_strategy.SvnFetchStrategy all_compilers() (in module spack.compilers), 350 method), 402 all_compilers_config() (in module spack.compilers), 350 archive() (spack.fetch_strategy.URLFetchStrategy all_os_classes() (in module spack.compilers), 350 method), 403 all_package_names() (spack.repository.Repo method), archive() (spack.fetch_strategy.VCSFetchStrategy 422 method), 403 all_package_names() (spack.repository.RepoPath archive_file (spack.fetch_strategy.URLFetchStrategy at- method), 423 tribute), 403 all_packages() (spack.repository.Repo method), 422 archive_file (spack.stage.Stage attribute), 434 all_packages() (spack.repository.RepoPath method), 423 args_are_for() (in module spack.fetch_strategy), 403 all_specs() (spack.directory_layout.DirectoryLayout AsciiGraph (class in spack.graph), 405 method), 395 ask_for_confirmation() (in module spack.cmd), 345

457 Spack Documentation, Release 0.9 assert_canonical() (spack.test.versions.VersionsTest BuildSystemGuesser (class in spack.cmd.create), 336 method), 377 Bunch (class in spack.util.pattern), 382 assert_does_not_satisfy() (spack.test.versions.VersionsTest method), C 377 cache_local() (spack.stage.DIYStage method), 433 assert_in() (spack.test.versions.VersionsTest method), cache_local() (spack.stage.Stage method), 434 377 cache_path() (spack.file_cache.FileCache method), 404 assert_no_overlap() (spack.test.versions.VersionsTest CacheError, 403 method), 378 CacheURLFetchStrategy (class in spack.fetch_strategy), assert_not_detected() (spack.test.url_parse.UrlParseTest 400 method), 376 canonicalize_path() (in module spack.repository), 424 assert_not_in() (spack.test.versions.VersionsTest category (spack.modules.EnvModule attribute), 406 method), 378 cc_names (spack.compiler.Compiler attribute), 388 assert_overlaps() (spack.test.versions.VersionsTest cc_names (spack.compilers.cce.Cce attribute), 346 method), 378 cc_names (spack.compilers.clang.Clang attribute), 346 assert_rev() (spack.test.git_fetch.GitFetchTest method), cc_names (spack.compilers.gcc.Gcc attribute), 347 362 cc_names (spack.compilers.intel.Intel attribute), 347 assert_rev() (spack.test.svn_fetch.SvnFetchTest method), cc_names (spack.compilers.nag.Nag attribute), 348 374 cc_names (spack.compilers.pgi.Pgi attribute), 348 assert_satisfies() (spack.test.versions.VersionsTest cc_names (spack.compilers.xl.Xl attribute), 349 method), 378 cc_rpath_arg (spack.compiler.Compiler attribute), 388 assert_variant_values() (spack.test.concretize_preferences.ConcretizePreferencesTestcc_version() (spack.compiler.Compiler class method), method), 359 388 assert_ver_eq() (spack.test.versions.VersionsTest Cce (class in spack.compilers.cce), 346 method), 378 cd() (in module spack.cmd.cd), 335 assert_ver_gt() (spack.test.versions.VersionsTest chdir() (spack.stage.DIYStage method), 433 method), 378 chdir() (spack.stage.Stage method), 434 assert_ver_lt() (spack.test.versions.VersionsTest method), chdir_to_source() (spack.stage.DIYStage method), 433 378 chdir_to_source() (spack.stage.Stage method), 434 assuredir() (in module spack.cmd.view), 344 ChdirError, 433 autoload() (spack.modules.EnvModule method), 406 check() (spack.fetch_strategy.FetchStrategy method), 400 autoload_format (spack.modules.Dotkit attribute), 407 check() (spack.fetch_strategy.URLFetchStrategy autoload_format (spack.modules.TclModule attribute), method), 403 407 check() (spack.fetch_strategy.VCSFetchStrategy method), 403 B check() (spack.stage.DIYStage method), 433 back_end (spack.architecture.Platform attribute), 385 check() (spack.stage.Stage method), 434 back_end (spack.platforms.bgq.Bgq attribute), 353 check() (spack.test.url_parse.UrlParseTest method), 376 back_end (spack.platforms.darwin.Darwin attribute), 353 check() (spack.util.crypto.Checker method), 380 back_end (spack.platforms.test.Test attribute), 354 check_activated() (spack.directory_layout.DirectoryLayout back_os (spack.architecture.Platform attribute), 385 method), 395 back_os (spack.platforms.test.Test attribute), 354 check_activated() (spack.directory_layout.YamlDirectoryLayout BadRepoError, 421 method), 397 Barrier (class in spack.util.multiproc), 381 check_archive() (spack.test.build_system_guess.InstallTest Bgq (class in spack.platforms.bgq), 353 method), 357 blacklisted (spack.modules.EnvModule attribute), 406 check_cc() (spack.test.cc.CompilerTest method), 357 bootstrap() (in module spack.cmd.bootstrap), 335 check_chdir() (spack.test.stage.StageTest method), 373 build_env_path() (spack.directory_layout.YamlDirectoryLayoutcheck_chdir_to_source() (spack.test.stage.StageTest method), 397 method), 373 build_log_path (spack.package.Package attribute), 413 check_compiler_yaml_version() (in module build_log_path() (spack.directory_layout.YamlDirectoryLayout spack.yaml_version_check), 440 method), 397 check_concretize() (spack.test.concretize.ConcretizeTest build_packages_path() (spack.directory_layout.YamlDirectoryLayout method), 358 method), 397

458 Index Spack Documentation, Release 0.9 check_config() (spack.test.config.ConfigTest method), check_satisfies() (spack.test.spec_semantics.SpecSematicsTest 360 method), 371 check_constrain() (spack.test.spec_semantics.SpecSematicsTestcheck_setup() (spack.test.stage.StageTest method), 373 method), 371 check_spec() (spack.test.concretize.ConcretizeTest check_constrain_changed() method), 358 (spack.test.spec_semantics.SpecSematicsTest check_union() (spack.test.versions.VersionsTest method), method), 371 378 check_constrain_not_changed() check_unsatisfiable() (spack.test.spec_semantics.SpecSematicsTest (spack.test.spec_semantics.SpecSematicsTest method), 371 method), 371 check_url() (spack.test.url_extrapolate.UrlExtrapolateTest check_cpp() (spack.test.cc.CompilerTest method), 357 method), 375 check_cxx() (spack.test.cc.CompilerTest method), 357 check_yaml_round_trip() check_db() (spack.test.package_sanity.PackageSanityTest (spack.test.spec_yaml.SpecYamlTest method), method), 368 373 check_destroy() (spack.test.stage.StageTest method), 373 check_yaml_versions() (in module check_dir() (spack.test.link_tree.LinkTreeTest method), spack.yaml_version_check), 440 363 Checker (class in spack.util.crypto), 379 check_expand_archive() (spack.test.stage.StageTest checksum() (in module spack.cmd.checksum), 336 method), 373 checksum() (in module spack.util.crypto), 380 check_extension_conflict() ChecksumError, 400 (spack.directory_layout.DirectoryLayout choose_virtual_or_external() method), 395 (spack.concretize.DefaultConcretizer method), check_extension_conflict() 389 (spack.directory_layout.YamlDirectoryLayout Clang (class in spack.compilers.clang), 346 method), 397 class_for_compiler_name() (in module spack.compilers), check_fc() (spack.test.cc.CompilerTest method), 357 350 check_fetch() (spack.test.stage.StageTest method), 373 clean() (in module spack.cmd.clean), 336 check_file_link() (spack.test.link_tree.LinkTreeTest cleanmock() (spack.test.mock_packages_test.MockPackagesTest method), 363 method), 365 check_identifier() (spack.spec.SpecParser method), 431 clear() (spack.config.ConfigScope method), 391 check_installed() (spack.directory_layout.DirectoryLayout clear() (spack.environment.EnvironmentModifications method), 395 method), 398 check_installed() (spack.directory_layout.YamlDirectoryLayoutclear_config_caches() (in module spack.config), 391 method), 397 CMakePackage (class in spack.package), 409 check_intersection() (spack.test.versions.VersionsTest cmp_specs() (in module spack.concretize), 389 method), 378 Cnl (class in spack.operating_systems.cnl), 352 check_invalid_constraint() color_formats (in module spack.spec), 433 (spack.test.spec_semantics.SpecSematicsTest color_url() (in module spack.url), 436 method), 371 colorize_spec() (in module spack.spec), 433 check_ld() (spack.test.cc.CompilerTest method), 357 colorized() (spack.spec.Spec method), 427 check_lex() (spack.test.spec_syntax.SpecSyntaxTest comma_and() (in module spack.util.string), 383 method), 372 comma_list() (in module spack.util.string), 383 check_links() (spack.test.spec_dag.SpecDagTest comma_or() (in module spack.util.string), 383 method), 370 command (spack.util.executable.Executable attribute), check_mirror() (spack.test.mirror.MirrorTest method), 381 365 common_dependencies() (spack.spec.Spec method), 427 check_normalize() (spack.test.optional_deps.ConcretizeTestcompare_output() (in module spack.package_test), 418 method), 368 compare_output_file() (in module spack.package_test), check_one() (in module spack.cmd.view), 344 418 check_parse() (spack.test.spec_syntax.SpecSyntaxTest compatible() (spack.abi.ABI method), 384 method), 372 compile_c_and_execute() (in module check_python_versions() spack.package_test), 418 (spack.test.python_version.PythonVersionTest Compiler (class in spack.compiler), 388 method), 369 compiler (spack.package.Package attribute), 413

Index 459 Spack Documentation, Release 0.9 compiler() (in module spack.cmd.compiler), 336 config_get() (in module spack.cmd.config), 336 compiler() (spack.spec.SpecParser method), 431 ConfigError, 391 compiler_compare() (spack.preferred_packages.PreferredPackagesConfigFileError, 391 method), 420 ConfigFormatError, 391 compiler_compatible() (spack.abi.ABI method), 384 ConfigSanityError, 391 compiler_find() (in module spack.cmd.compiler), 336 ConfigScope (class in spack.config), 391 compiler_for_spec() (in module spack.compilers), 350 ConfigTest (class in spack.test.config), 360 compiler_info() (in module spack.cmd.compiler), 336 configure() (spack.test.tally_plugin.Tally method), 375 compiler_list() (in module spack.cmd.compiler), 336 configure_args() (spack.package.CMakePackage compiler_remove() (in module spack.cmd.compiler), 336 method), 409 CompilerCmdTest (class in configure_env() (spack.package.CMakePackage method), spack.test.cmd.test_compiler_cmd), 355 409 compilers() (in module spack.cmd.compilers), 336 constrain() (spack.spec.CompilerSpec method), 426 compilers_for_spec() (in module spack.compilers), 350 constrain() (spack.spec.FlagMap method), 427 CompilerSpec (class in spack.spec), 425 constrain() (spack.spec.Spec method), 427 CompilerSpecInsufficientlySpecificError, 350 constrain() (spack.spec.VariantMap method), 432 CompilerTest (class in spack.test.cc), 357 constrained() (spack.spec.Spec method), 428 composite() (in module spack.util.pattern), 382 copy() (spack.provider_index.ProviderIndex method), CompositeTest (class in spack.test.pattern), 369 421 compute_md5_checksum() (in module spack.cmd.md5), copy() (spack.spec.CompilerSpec method), 426 339 copy() (spack.spec.DependencySpec method), 426 concatenate_paths() (in module spack.environment), 399 copy() (spack.spec.FlagMap method), 427 concrete (spack.architecture.Arch attribute), 385 copy() (spack.spec.Spec method), 428 concrete (spack.spec.CompilerSpec attribute), 426 copy() (spack.spec.VariantMap method), 432 concrete (spack.spec.DependencyMap attribute), 426 copy() (spack.spec.VariantSpec method), 433 concrete (spack.spec.FlagMap attribute), 427 copy() (spack.version.VersionList method), 439 concrete (spack.spec.Spec attribute), 427 CorruptDatabaseError, 392 concrete (spack.spec.VariantMap attribute), 432 Cray (class in spack.platforms.cray), 353 concrete (spack.version.Version attribute), 438 create() (in module spack.cmd.create), 336 concrete (spack.version.VersionList attribute), 439 create() (in module spack.mirror), 405 concrete (spack.version.VersionRange attribute), 438 create() (spack.stage.Stage method), 434 concretize() (spack.spec.Spec method), 427 create_install_directory() concretize() (spack.test.concretize_preferences.ConcretizePreferencesTest(spack.directory_layout.DirectoryLayout method), 359 method), 395 concretize_architecture() create_install_directory() (spack.concretize.DefaultConcretizer method), (spack.directory_layout.YamlDirectoryLayout 389 method), 397 concretize_compiler() (spack.concretize.DefaultConcretizercreate_repo() (in module spack.repository), 424 method), 389 cshort_spec (spack.spec.Spec attribute), 428 concretize_compiler_flags() cumsum() (in module spack.url), 436 (spack.concretize.DefaultConcretizer method), cxx11_flag (spack.compiler.Compiler attribute), 388 389 cxx11_flag (spack.compilers.clang.Clang attribute), 346 concretize_specs() (in module spack.cmd.uninstall), 343 cxx11_flag (spack.compilers.gcc.Gcc attribute), 347 concretize_variants() (spack.concretize.DefaultConcretizer cxx11_flag (spack.compilers.intel.Intel attribute), 347 method), 389 cxx11_flag (spack.compilers.nag.Nag attribute), 348 concretize_version() (spack.concretize.DefaultConcretizer cxx11_flag (spack.compilers.pgi.Pgi attribute), 348 method), 389 cxx11_flag (spack.compilers.xl.Xl attribute), 349 concretized() (spack.spec.Spec method), 427 cxx14_flag (spack.compiler.Compiler attribute), 388 ConcretizePreferencesTest (class in cxx14_flag (spack.compilers.gcc.Gcc attribute), 347 spack.test.concretize_preferences), 359 cxx_names (spack.compiler.Compiler attribute), 388 ConcretizeTest (class in spack.test.concretize), 358 cxx_names (spack.compilers.cce.Cce attribute), 346 ConcretizeTest (class in spack.test.optional_deps), 368 cxx_names (spack.compilers.clang.Clang attribute), 346 config() (in module spack.cmd.config), 336 cxx_names (spack.compilers.gcc.Gcc attribute), 347 config_edit() (in module spack.cmd.config), 336 cxx_names (spack.compilers.intel.Intel attribute), 347

460 Index Spack Documentation, Release 0.9 cxx_names (spack.compilers.nag.Nag attribute), 348 DependencyConflictError, 410 cxx_names (spack.compilers.pgi.Pgi attribute), 348 DependencyMap (class in spack.spec), 426 cxx_names (spack.compilers.xl.Xl attribute), 349 DependencySpec (class in spack.spec), 426 cxx_rpath_arg (spack.compiler.Compiler attribute), 388 dependents() (in module spack.cmd.dependents), 337 cxx_version() (spack.compiler.Compiler class method), dependents() (spack.spec.Spec method), 428 388 dependents() (spack.test.cmd.test_install.MockSpec method), 356 D dependents_dict() (spack.spec.Spec method), 428 dag_hash() (spack.spec.Spec method), 428 depends_on() (in module spack.directives), 394 dag_hash() (spack.test.cmd.test_install.MockSpec destroy() (spack.fetch_strategy.FsCache method), 401 method), 356 destroy() (spack.file_cache.FileCache method), 404 Darwin (class in spack.platforms.darwin), 353 destroy() (spack.stage.DIYStage method), 433 dashed (spack.version.Version attribute), 438 destroy() (spack.stage.Stage method), 435 Database (class in spack.database), 393 destroy() (spack.test.mock_repo.MockRepo method), 366 DatabaseTest (class in spack.test.database), 360 detect() (spack.architecture.Platform class method), 385 deactivate() (in module spack.cmd.deactivate), 337 detect() (spack.platforms.bgq.Bgq class method), 353 deactivate() (spack.package.Package method), 413 detect() (spack.platforms.cray.Cray class method), 353 debug_handler() (in module spack.util.debug), 380 detect() (spack.platforms.darwin.Darwin class method), decompressor_for() (in module spack.util.compression), 353 379 detect() (spack.platforms.linux.Linux class method), 354 default (spack.architecture.Platform attribute), 385 detect() (spack.platforms.test.Test class method), 354 default (spack.platforms.bgq.Bgq attribute), 353 die() (spack.error.SpackError method), 400 default (spack.platforms.darwin.Darwin attribute), 353 diff_packages() (in module spack.cmd.pkg), 340 default (spack.platforms.test.Test attribute), 354 DirectoryLayout (class in spack.directory_layout), 395 default_compiler() (in module spack.compilers), 350 DirectoryLayoutError, 396 default_naming_format (spack.modules.Dotkit attribute), DirectoryLayoutTest (class in 407 spack.test.directory_layout), 361 default_naming_format (spack.modules.TclModule at- dirname_for_package_name() (spack.repository.Repo tribute), 407 method), 422 default_os (spack.architecture.Platform attribute), 385 dirname_for_package_name() default_os (spack.platforms.test.Test attribute), 354 (spack.repository.RepoPath method), 423 default_version() (spack.compiler.Compiler class disambiguate_spec() (in module spack.cmd), 345 method), 388 display_specs() (in module spack.cmd), 345 default_version() (spack.compilers.cce.Cce class diy() (in module spack.cmd.diy), 337 method), 346 DIYStage (class in spack.stage), 433 default_version() (spack.compilers.clang.Clang class do_activate() (spack.package.Package method), 413 method), 346 do_clean() (spack.package.Package method), 414 default_version() (spack.compilers.intel.Intel class do_deactivate() (spack.package.Package method), 414 method), 347 do_fake_install() (spack.package.Package method), 414 default_version() (spack.compilers.nag.Nag class do_fetch() (spack.package.Package method), 414 method), 348 do_install() (spack.package.Package method), 414 default_version() (spack.compilers.pgi.Pgi class method), do_install() (spack.test.cmd.test_install.MockPackage 348 method), 356 default_version() (spack.compilers.xl.Xl class method), do_install_dependencies() (spack.package.Package 349 method), 414 DefaultConcretizer (class in spack.concretize), 388 do_parse() (spack.spec.SpecParser method), 431 dep_difference() (spack.spec.Spec method), 428 do_patch() (spack.package.Package method), 414 dep_string() (spack.spec.Spec method), 428 do_restage() (spack.package.Package method), 414 dependencies() (spack.spec.Spec method), 428 do_stage() (spack.package.Package method), 414 dependencies() (spack.test.cmd.test_install.MockSpec do_uninstall() (in module spack.cmd.uninstall), 343 method), 356 do_uninstall() (spack.package.Package method), 414 dependencies_dict() (spack.spec.Spec method), 428 doc() (in module spack.cmd.doc), 337 dependencies_of_type() (spack.package.Package Dotkit (class in spack.modules), 407 method), 413 DotkitTests (class in spack.test.modules), 366

Index 461 Spack Documentation, Release 0.9 dotted (spack.version.Version attribute), 438 expand() (spack.fetch_strategy.FetchStrategy method), downloaded_file_extension() (in module spack.url), 436 400 dump() (in module spack.util.spack_yaml), 383 expand() (spack.fetch_strategy.URLFetchStrategy dump_environment() (in module spack.util.environment), method), 403 380 expand() (spack.fetch_strategy.VCSFetchStrategy dump_packages() (in module spack.package), 418 method), 403 dump_provenance() (spack.repository.Repo method), 422 expand_archive() (spack.stage.DIYStage method), 433 dump_provenance() (spack.repository.RepoPath method), expand_archive() (spack.stage.ResourceStage method), 423 433 DuplicateArchitectureError, 426 expand_archive() (spack.stage.Stage method), 435 DuplicateCompilerSpecError, 426 expect() (spack.parse.Parser method), 419 DuplicateDependencyError, 426 expected_archive_files (spack.stage.Stage attribute), 435 DuplicateRepoError, 421 extend() (spack.environment.EnvironmentModifications DuplicateVariantError, 426 method), 398 extend_with_default() (in module spack.config), 391 E extendable (spack.package.Package attribute), 414 edit() (in module spack.cmd.edit), 337 extendee_args (spack.package.Package attribute), 414 edit_package() (in module spack.cmd.edit), 337 extendee_spec (spack.package.Package attribute), 414 elide_list() (in module spack.cmd), 345 extends() (in module spack.directives), 394 enabled (spack.fetch_strategy.FetchStrategy attribute), extends() (spack.package.Package method), 414 400 extension() (in module spack.util.compression), 379 enabled (spack.fetch_strategy.GitFetchStrategy attribute), extension_file_path() (spack.directory_layout.YamlDirectoryLayout 401 method), 397 enabled (spack.fetch_strategy.GoFetchStrategy attribute), extension_map() (spack.directory_layout.DirectoryLayout 401 method), 395 enabled (spack.fetch_strategy.HgFetchStrategy attribute), extension_map() (spack.directory_layout.YamlDirectoryLayout 402 method), 397 enabled (spack.fetch_strategy.SvnFetchStrategy at- ExtensionAlreadyInstalledError, 396 tribute), 402 ExtensionConflictError, 396, 410 enabled (spack.fetch_strategy.URLFetchStrategy at- ExtensionError, 410 tribute), 403 extensions() (in module spack.cmd.extensions), 337 ensure_access() (in module spack.stage), 435 extensions_for() (spack.repository.Repo method), 422 env() (in module spack.cmd.env), 337 extensions_for() (spack.repository.RepoPath method), env_flag() (in module spack.util.environment), 380 423 environment_modifications_formats ExternalPackageError, 410 (spack.modules.Dotkit attribute), 407 EnvironmentModifications (class in spack.environment), F 397 f77_names (spack.compiler.Compiler attribute), 388 EnvironmentTest (class in spack.test.environment), 361 f77_names (spack.compilers.cce.Cce attribute), 346 EnvModule (class in spack.modules), 406 f77_names (spack.compilers.clang.Clang attribute), 347 eq_dag() (spack.spec.Spec method), 428 f77_names (spack.compilers.gcc.Gcc attribute), 347 eq_node() (spack.spec.Spec method), 428 f77_names (spack.compilers.intel.Intel attribute), 348 ERRORED (spack.cmd.test_install.TestResult attribute), f77_names (spack.compilers.nag.Nag attribute), 348 342 f77_names (spack.compilers.pgi.Pgi attribute), 349 Executable (class in spack.util.executable), 380 f77_names (spack.compilers.xl.Xl attribute), 349 execute() (spack.environment.AppendPath method), 397 f77_rpath_arg (spack.compiler.Compiler attribute), 388 execute() (spack.environment.PrependPath method), 399 f77_rpath_arg (spack.compilers.nag.Nag attribute), 348 execute() (spack.environment.RemovePath method), 399 f77_version() (spack.compiler.Compiler class method), execute() (spack.environment.SetEnv method), 399 388 execute() (spack.environment.SetPath method), 399 f77_version() (spack.compilers.gcc.Gcc class method), execute() (spack.environment.UnsetEnv method), 399 347 exists() (spack.repository.Repo method), 422 f77_version() (spack.compilers.xl.Xl class method), 349 exists() (spack.repository.RepoPath method), 423 FAILED (spack.cmd.test_install.TestResult attribute), 342

462 Index Spack Documentation, Release 0.9 failed_dependencies() (in module spack.cmd.test_install), filter_environment_blacklist() (in module 342 spack.environment), 399 FailedConstructorError, 421 filter_exclude() (in module spack.cmd.view), 344 FailedDownloadError, 400 filter_shebang() (in module spack.hooks.sbang), 351 fake_fetchify() (spack.test.install.InstallTest method), 363 filter_shebangs_in_directory() (in module fc_names (spack.compiler.Compiler attribute), 388 spack.hooks.sbang), 351 fc_names (spack.compilers.cce.Cce attribute), 346 finalize() (spack.test.tally_plugin.Tally method), 375 fc_names (spack.compilers.clang.Clang attribute), 347 find() (in module spack.cmd.find), 338 fc_names (spack.compilers.gcc.Gcc attribute), 347 find() (in module spack.cmd.module), 339 fc_names (spack.compilers.intel.Intel attribute), 348 find() (in module spack.compilers), 350 fc_names (spack.compilers.nag.Nag attribute), 348 find_compiler() (spack.architecture.OperatingSystem fc_names (spack.compilers.pgi.Pgi attribute), 349 method), 385 fc_names (spack.compilers.xl.Xl attribute), 349 find_compiler() (spack.operating_systems.cnl.Cnl fc_rpath_arg (spack.compiler.Compiler attribute), 388 method), 352 fc_rpath_arg (spack.compilers.nag.Nag attribute), 348 find_compilers() (in module spack.compilers), 350 fc_version() (spack.compiler.Compiler class method), find_compilers() (spack.architecture.OperatingSystem 388 method), 385 fc_version() (spack.compilers.gcc.Gcc class method), 347 find_compilers() (spack.operating_systems.cnl.Cnl fc_version() (spack.compilers.xl.Xl class method), 349 method), 352 fetch() (in module spack.cmd.fetch), 338 find_list_url() (in module spack.url), 436 fetch() (spack.cmd.test.MockCacheFetcher method), 342 find_module() (spack.repository.Repo method), 422 fetch() (spack.fetch_strategy.CacheURLFetchStrategy find_module() (spack.repository.RepoPath method), 423 method), 400 find_repository() (in module spack.cmd.create), 336 fetch() (spack.fetch_strategy.FetchStrategy method), 400 find_spec() (in module spack.concretize), 389 fetch() (spack.fetch_strategy.GitFetchStrategy method), find_tmp_root() (in module spack.stage), 435 401 find_versions_of_archive() (in module spack.util.web), fetch() (spack.fetch_strategy.GoFetchStrategy method), 383 401 FindTest (class in spack.test.cmd.find), 355 fetch() (spack.fetch_strategy.HgFetchStrategy method), first_repo() (spack.repository.RepoPath method), 423 402 FlagMap (class in spack.spec), 426 fetch() (spack.fetch_strategy.SvnFetchStrategy method), flat_dependencies() (spack.spec.Spec method), 428 402 flat_dependencies_with_deptype() (spack.spec.Spec fetch() (spack.fetch_strategy.URLFetchStrategy method), method), 428 403 flatten() (in module spack.cmd.view), 344 fetch() (spack.stage.DIYStage method), 433 flatten_dependencies() (in module spack.package), 418 fetch() (spack.stage.Stage method), 435 for_package_version() (in module spack.fetch_strategy), fetch_log() (in module spack.cmd.test_install), 342 403 fetch_remote_versions() (spack.package.Package fork() (in module spack.build_environment), 387 method), 415 format() (spack.spec.Spec method), 428 fetch_tarballs() (in module spack.cmd.create), 336 format_doc() (spack.package.Package method), 415 fetcher (spack.package.Package attribute), 415 formats (spack.modules.EnvModule attribute), 406 fetcher() (spack.cmd.test.MockCache method), 342 from_dict() (spack.database.InstallRecord class method), fetcher() (spack.fetch_strategy.FsCache method), 401 394 FetchError, 400, 410 from_dict() (spack.spec.CompilerSpec static method), FetchStrategy (class in spack.fetch_strategy), 400 426 file_name (spack.modules.Dotkit attribute), 407 from_dict() (spack.version.VersionList static method), file_name (spack.modules.EnvModule attribute), 406 439 file_name (spack.modules.TclModule attribute), 407 from_kwargs() (in module spack.fetch_strategy), 403 FileCache (class in spack.file_cache), 403 from_node_dict() (spack.spec.Spec static method), 429 FileCacheTest (class in spack.test.file_cache), 361 from_sourcing_files() (spack.environment.EnvironmentModifications filename_for_package_name() (spack.repository.Repo static method), 398 method), 422 from_url() (in module spack.fetch_strategy), 403 filename_for_package_name() from_yaml() (spack.provider_index.ProviderIndex static (spack.repository.RepoPath method), 423 method), 421

Index 463 Spack Documentation, Release 0.9 from_yaml() (spack.spec.Spec static method), 429 git_version (spack.fetch_strategy.GitFetchStrategy front_end (spack.architecture.Platform attribute), 386 attribute), 401 front_end (spack.platforms.bgq.Bgq attribute), 353 GitFetchStrategy (class in spack.fetch_strategy), 401 front_end (spack.platforms.darwin.Darwin attribute), 353 GitFetchTest (class in spack.test.git_fetch), 362 front_end (spack.platforms.test.Test attribute), 354 github_url() (in module spack.cmd.package_list), 340 front_os (spack.architecture.Platform attribute), 386 global_license_dir (spack.package.Package attribute), FsCache (class in spack.fetch_strategy), 401 415 fullname (spack.spec.Spec attribute), 429 global_license_file (spack.package.Package attribute), 415 G go (spack.fetch_strategy.GoFetchStrategy attribute), 401 Gcc (class in spack.compilers.gcc), 347 go_version (spack.fetch_strategy.GoFetchStrategy get() (spack.repository.Repo method), 422 attribute), 401 get() (spack.repository.RepoPath method), 423 GoFetchStrategy (class in spack.fetch_strategy), 401 get() (spack.test.cmd.test_install.MockPackageDb graph() (in module spack.cmd.graph), 338 method), 356 graph_ascii() (in module spack.graph), 405 get_checksums() (in module spack.cmd.checksum), 336 graph_dot() (in module spack.graph), 405 get_cmd_function_name() (in module spack.cmd), 345 gray_hash() (in module spack.cmd), 346 get_command() (in module spack.cmd), 345 group_by_name() (spack.environment.EnvironmentModifications get_compiler_config() (in module spack.compilers), 350 method), 398 get_compiler_version() (in module spack.compiler), 388 guess_name_and_version() (in module get_config() (in module spack.config), 392 spack.cmd.create), 337 get_config_filename() (in module spack.config), 392 get_dependency() (spack.spec.Spec method), 429 H get_filename() (in module spack.cmd.test_install), 342 handle_starttag() (spack.util.web.LinkParser method), get_git() (in module spack.cmd.pkg), 340 383 get_matching_versions() (in module spack.mirror), 406 has_value() (spack.util.naming.NamespaceTrie method), get_module() (in module spack.cmd), 346 382 get_modulefile_content() hash_color (in module spack.spec), 433 (spack.test.modules.DotkitTests method), hash_name (spack.util.crypto.Checker attribute), 380 366 header (spack.modules.Dotkit attribute), 407 get_modulefile_content() (spack.test.modules.TclTests header (spack.modules.EnvModule attribute), 406 method), 367 header (spack.modules.TclModule attribute), 407 get_origin_info() (in module spack.cmd.bootstrap), 335 help() (in module spack.cmd.help), 338 get_path() (in module spack.config), 392 HelperFunctionsTests (class in spack.test.modules), 366 get_path() (in module spack.util.environment), 380 hg (spack.fetch_strategy.HgFetchStrategy attribute), 402 get_path_from_module() (in module HgFetchStrategy (class in spack.fetch_strategy), 402 spack.build_environment), 387 HgFetchTest (class in spack.test.hg_fetch), 362 get_pkg_class() (spack.repository.Repo method), 422 hidden_file_paths (spack.directory_layout.DirectoryLayout get_pkg_class() (spack.repository.RepoPath method), 423 attribute), 395 get_record() (spack.database.Database method), 393 hidden_file_paths (spack.directory_layout.YamlDirectoryLayout get_repo() (spack.repository.RepoPath method), 423 attribute), 397 get_rev() (spack.test.mock_repo.MockHgRepo method), highest() (spack.version.Version method), 438 366 highest() (spack.version.VersionList method), 439 get_rpaths() (in module spack.build_environment), 387 highest() (spack.version.VersionRange method), 438 get_section() (spack.config.ConfigScope method), 391 highest_precedence_scope() (in module spack.config), get_section_filename() (spack.config.ConfigScope 392 method), 391 HookRunner (class in spack.hooks), 352 get_stage_path() (spack.test.stage.StageTest method), 373 I get_top_spec_or_die() (in module InconsistentInstallDirectoryError, 396 spack.cmd.test_install), 343 InconsistentSpecError, 427 gettok() (spack.parse.Parser method), 419 index() (spack.spec.Spec method), 429 git (spack.fetch_strategy.GitFetchStrategy attribute), 401 info() (in module spack.cmd.info), 338 init_entry() (spack.file_cache.FileCache method), 404

464 Index Spack Documentation, Release 0.9 initmock() (spack.test.mock_packages_test.MockPackagesTestis_predecessor() (spack.version.Version method), 438 method), 366 is_prefix() (spack.repository.Repo method), 422 insensitize() (in module spack.url), 436 is_prefix() (spack.util.naming.NamespaceTrie method), install() (in module spack.cmd.install), 338 382 install() (spack.package.Package method), 415 is_spec_buildable() (in module spack.config), 392 install() (spack.package.StagedPackage method), 418 is_successor() (spack.version.Version method), 438 install_build() (spack.package.CMakePackage method), is_virtual() (spack.spec.Spec static method), 429 409 install_build() (spack.package.StagedPackage method), L 418 last_token_error() (spack.parse.Parser method), 419 install_configure() (spack.package.CMakePackage lex() (spack.parse.Lexer method), 419 method), 409 Lexer (class in spack.parse), 419 install_configure() (spack.package.StagedPackage LexError, 419 method), 418 link_one() (in module spack.cmd.view), 344 install_dependency_symlinks() (in module link_paths (spack.compilers.cce.Cce attribute), 346 spack.package), 418 link_paths (spack.compilers.clang.Clang attribute), 347 install_install() (spack.package.CMakePackage method), link_paths (spack.compilers.gcc.Gcc attribute), 347 409 link_paths (spack.compilers.intel.Intel attribute), 348 install_install() (spack.package.StagedPackage method), link_paths (spack.compilers.nag.Nag attribute), 348 418 link_paths (spack.compilers.pgi.Pgi attribute), 349 install_phases (spack.package.Package attribute), 415 link_paths (spack.compilers.xl.Xl attribute), 349 install_setup() (spack.package.CMakePackage method), LinkParser (class in spack.util.web), 383 410 LinkTreeTest (class in spack.test.link_tree), 363 install_setup() (spack.package.StagedPackage method), Linux (class in spack.platforms.linux), 354 418 LinuxDistro (class in spack.operating_systems.linux_distro), install_single_spec() (in module spack.cmd.test_install), 352 343 list() (in module spack.cmd.list), 338 InstallDirectoryAlreadyExistsError, 396 list_packages() (in module spack.cmd.pkg), 340 installed (spack.package.Package attribute), 415 list_tests() (in module spack.test), 379 installed_dependents (spack.package.Package attribute), load() (in module spack.cmd.load), 339 415 load() (in module spack.util.spack_yaml), 383 installed_dependents() (in module spack.cmd.uninstall), load_external_modules() (in module 343 spack.build_environment), 387 installed_extensions_for() (spack.database.Database load_module() (in module spack.build_environment), 387 method), 393 load_module() (spack.repository.Repo method), 422 InstallError, 386, 410 load_module() (spack.repository.RepoPath method), 423 InstallRecord (class in spack.database), 393 loads() (in module spack.cmd.module), 339 InstallTest (class in spack.test.build_system_guess), 357 location() (in module spack.cmd.location), 339 InstallTest (class in spack.test.install), 363 LockTest (class in spack.test.lock), 364 Intel (class in spack.compilers.intel), 347 long_message (spack.error.SpackError attribute), 400 intersect() (spack.version.VersionList method), 439 long_message (spack.util.executable.ProcessError at- intersection() (spack.version.Version method), 438 tribute), 381 intersection() (spack.version.VersionList method), 439 lowest() (spack.version.Version method), 438 intersection() (spack.version.VersionRange method), 438 lowest() (spack.version.VersionList method), 439 InvalidArgsError, 402 lowest() (spack.version.VersionRange method), 438 InvalidCompilerConfigurationError, 350 InvalidDatabaseVersionError, 394 M InvalidDependencyException, 427 MacOs (class in spack.operating_systems.mac_os), 353 InvalidExtensionSpecError, 396 make_executable() (in module spack.package), 418 InvalidNamespaceError, 421 make_jobs (spack.package.Package attribute), 415 is_a() (spack.parse.Token method), 419 make_make() (spack.package.CMakePackage method), is_apple (spack.compilers.clang.Clang attribute), 347 410 is_extension (spack.package.Package attribute), 415 make_mock_compiler() (in module is_leaf() (spack.util.naming.NamespaceTrie method), 382 spack.test.cmd.test_compiler_cmd), 355

Index 465 Spack Documentation, Release 0.9 make_version_calls() (in module spack.cmd.create), 337 MultipleMatches, 339 MakeExecutable (class in spack.build_environment), 386 MultipleProviderError, 427 MakeExecutableTest (class in multiproc_test() (spack.test.lock.LockTest method), 364 spack.test.make_executable), 364 matches() (spack.fetch_strategy.FetchStrategy class N method), 400 Nag (class in spack.compilers.nag), 348 md5() (in module spack.cmd.md5), 339 name (spack.modules.Dotkit attribute), 407 merge() (spack.provider_index.ProviderIndex method), name (spack.modules.EnvModule attribute), 406 421 name (spack.modules.TclModule attribute), 407 metadata_path() (spack.directory_layout.YamlDirectoryLayoutname (spack.test.tally_plugin.Tally attribute), 375 method), 397 NameModifier (class in spack.environment), 398 mirror() (in module spack.cmd.mirror), 339 namespace (spack.package.Package attribute), 415 mirror_add() (in module spack.cmd.mirror), 339 NamespaceTrie (class in spack.util.naming), 382 mirror_archive_filename() (in module spack.mirror), 406 NamespaceTrie.Element (class in spack.util.naming), 382 mirror_archive_path() (in module spack.mirror), 406 NamespaceTrieTest (class in spack.test.namespace_trie), mirror_create() (in module spack.cmd.mirror), 339 367 mirror_list() (in module spack.cmd.mirror), 339 NameValueModifier (class in spack.environment), 398 mirror_remove() (in module spack.cmd.mirror), 339 naming_scheme (spack.modules.EnvModule attribute), MirrorError, 405 406 MirrorTest (class in spack.test.mirror), 365 ne_dag() (spack.spec.Spec method), 429 missing() (spack.database.Database method), 393 ne_node() (spack.spec.Spec method), 429 mock_fetch_log() (in module spack.test.cmd.test_install), nearest_url() (spack.package.Package method), 415 356 next_token_error() (spack.parse.Parser method), 419 mock_open() (in module spack.test.cmd.test_install), 356 NoArchiveFileError, 402 mock_open() (in module spack.test.modules), 367 NoBuildError, 389 MockArchive (class in spack.test.mock_repo), 366 NoCompilerForSpecError, 350 MockArgs (class in spack.test.cmd.test_compiler_cmd), NoCompilersError, 350 355 NoDigestError, 402 MockArgs (class in spack.test.cmd.test_install), 356 NoMatch, 339 MockArgs (class in spack.test.cmd.uninstall), 356 NoNetworkConnectionError, 399 MockCache (class in spack.cmd.test), 342 NoPlatformError, 385 MockCacheFetcher (class in spack.cmd.test), 342 NoProviderError, 427 MockDatabase (class in spack.test.mock_database), 365 NoRepoConfiguredError, 421 MockGitRepo (class in spack.test.mock_repo), 366 normalize() (spack.spec.Spec method), 429 MockHgRepo (class in spack.test.mock_repo), 366 normalized() (spack.spec.Spec method), 429 MockPackage (class in spack.test.cmd.test_install), 356 NoStageError, 402 MockPackageDb (class in spack.test.cmd.test_install), NoSuchExtensionError, 396 356 NoSuchMethodError, 408 MockPackagesTest (class in NoSuchPatchFileError, 419 spack.test.mock_packages_test), 365 NoURLError, 410 MockRepo (class in spack.test.mock_repo), 366 NoValidVersionError, 389 MockSpec (class in spack.test.cmd.test_install), 356 numberOfTestsRun (spack.test.tally_plugin.Tally at- MockSvnRepo (class in spack.test.mock_repo), 366 tribute), 375 MockVCSRepo (class in spack.test.mock_repo), 366 mod_to_class() (in module spack.util.naming), 381 O module (spack.package.Package attribute), 415 openmp_flag (spack.compiler.Compiler attribute), 388 module() (in module spack.cmd.module), 339 openmp_flag (spack.compilers.clang.Clang attribute), module_specific_content() (spack.modules.EnvModule 347 method), 406 openmp_flag (spack.compilers.gcc.Gcc attribute), 347 module_specific_content() (spack.modules.TclModule openmp_flag (spack.compilers.intel.Intel attribute), 348 method), 407 openmp_flag (spack.compilers.nag.Nag attribute), 348 mtime() (spack.file_cache.FileCache method), 404 openmp_flag (spack.compilers.pgi.Pgi attribute), 349 MultiMethodError, 408 openmp_flag (spack.compilers.xl.Xl attribute), 349 MultiMethodTest (class in spack.test.multimethod), 367

466 Index Spack Documentation, Release 0.9 operating_system() (spack.architecture.Platform pkg() (in module spack.cmd.pkg), 340 method), 386 pkg_add() (in module spack.cmd.pkg), 340 OperatingSystem (class in spack.architecture), 385 pkg_added() (in module spack.cmd.pkg), 340 options() (spack.test.tally_plugin.Tally method), 375 pkg_diff() (in module spack.cmd.pkg), 340 overlaps() (spack.version.Version method), 438 pkg_list() (in module spack.cmd.pkg), 340 overlaps() (spack.version.VersionList method), 439 pkg_removed() (in module spack.cmd.pkg), 340 overlaps() (spack.version.VersionRange method), 438 Platform (class in spack.architecture), 385 possible_spack_module_names() (in module P spack.util.naming), 382 Package (class in spack.package), 410 post_install() (in module spack.hooks.dotkit), 351 package (spack.spec.Spec attribute), 430 post_install() (in module spack.hooks.licensing), 351 package_class (spack.spec.Spec attribute), 430 post_install() (in module spack.hooks.sbang), 351 package_dir (spack.package.Package attribute), 415 post_install() (in module spack.hooks.tclmodule), 352 package_list() (in module spack.cmd.package_list), 340 post_uninstall() (in module spack.hooks.dotkit), 351 package_py_files() (spack.test.python_version.PythonVersionTestpost_uninstall() (in module spack.hooks.tclmodule), 352 method), 369 pre_install() (in module spack.hooks.licensing), 351 PackageError, 417 pre_uninstall() (in module spack.hooks.extensions), 351 PackageLoadError, 421 PreferredPackages (class in spack.preferred_packages), PackageSanityTest (class in spack.test.package_sanity), 420 368 Prefix (class in spack.util.prefix), 382 PackageSanityTest (class in spack.test.url_substitution), prefix (spack.package.Package attribute), 415 377 prefix (spack.spec.Spec attribute), 430 PackagesTest (class in spack.test.packages), 368 prefixes (spack.compiler.Compiler attribute), 388 PackageStillNeededError, 417 prepend_path() (spack.environment.EnvironmentModifications PackageVersionError, 417 method), 398 padder() (in module spack.cmd.info), 338 PrependPath (class in spack.environment), 399 parallel (spack.package.Package attribute), 415 prerequisite() (spack.modules.Dotkit method), 407 parent_class_modules() (in module prerequisite() (spack.modules.EnvModule method), 406 spack.build_environment), 387 prerequisite_format (spack.modules.TclModule at- parmap() (in module spack.util.multiproc), 381 tribute), 407 parse() (in module spack.spec), 433 PrgEnv (spack.compiler.Compiler attribute), 388 parse() (spack.parse.Parser method), 419 PrgEnv (spack.compilers.cce.Cce attribute), 346 parse_anonymous_spec() (in module spack.spec), 433 PrgEnv (spack.compilers.gcc.Gcc attribute), 347 parse_compiler() (spack.spec.SpecParser method), 431 PrgEnv (spack.compilers.intel.Intel attribute), 347 parse_name() (in module spack.url), 436 PrgEnv (spack.compilers.pgi.Pgi attribute), 348 parse_name_and_version() (in module spack.url), 436 PrgEnv_compiler (spack.compiler.Compiler attribute), parse_name_offset() (in module spack.url), 436 388 parse_specs() (in module spack.cmd), 346 PrgEnv_compiler (spack.compilers.cce.Cce attribute), parse_version() (in module spack.url), 436 346 parse_version_offset() (in module spack.url), 436 PrgEnv_compiler (spack.compilers.gcc.Gcc attribute), ParseError, 419 347 Parser (class in spack.parse), 419 PrgEnv_compiler (spack.compilers.intel.Intel attribute), PASSED (spack.cmd.test_install.TestResult attribute), 347 342 PrgEnv_compiler (spack.compilers.pgi.Pgi attribute), 348 Patch (class in spack.patch), 419 print_name_and_version() (in module patch() (in module spack.cmd.patch), 340 spack.cmd.url_parse), 343 patch() (in module spack.directives), 394 print_pkg() (in module spack.package), 418 path (spack.modules.Dotkit attribute), 407 print_rst_package_list() (in module path (spack.modules.TclModule attribute), 407 spack.cmd.package_list), 340 path_for_spec() (spack.directory_layout.DirectoryLayout print_section() (in module spack.config), 392 method), 396 print_text_info() (in module spack.cmd.info), 338 path_put_first() (in module spack.util.environment), 380 priority (spack.architecture.Platform attribute), 386 path_set() (in module spack.util.environment), 380 priority (spack.platforms.bgq.Bgq attribute), 353 Pgi (class in spack.compilers.pgi), 348 priority (spack.platforms.cray.Cray attribute), 353

Index 467 Spack Documentation, Release 0.9 priority (spack.platforms.darwin.Darwin attribute), 353 register() (spack.multimethod.SpecMultiMethod priority (spack.platforms.linux.Linux attribute), 354 method), 408 priority (spack.platforms.test.Test attribute), 354 register_interrupt_handler() (in module spack.util.debug), process_environment_command() 380 (spack.modules.EnvModule method), 406 reindex() (in module spack.cmd.reindex), 341 process_environment_command() reindex() (spack.database.Database method), 393 (spack.modules.TclModule method), 407 relative_path_for_spec() (spack.directory_layout.DirectoryLayout ProcessError, 381 method), 396 provider_compare() (spack.preferred_packages.PreferredPackagesrelative_path_for_spec() (spack.directory_layout.YamlDirectoryLayout method), 420 method), 397 provider_index (spack.repository.Repo attribute), 422 relative_to() (in module spack.cmd.view), 344 provider_index (spack.repository.RepoPath attribute), remove() (spack.database.Database method), 393 423 remove() (spack.file_cache.FileCache method), 404 ProviderIndex (class in spack.provider_index), 420 remove() (spack.modules.EnvModule method), 406 ProviderIndexError, 421 remove() (spack.repository.RepoPath method), 424 ProviderIndexTest (class in spack.test.provider_index), remove_compiler_from_config() (in module 369 spack.compilers), 350 providers() (in module spack.cmd.providers), 341 remove_extension() (spack.directory_layout.DirectoryLayout providers_for() (spack.provider_index.ProviderIndex method), 396 method), 421 remove_extension() (spack.directory_layout.YamlDirectoryLayout providers_for() (spack.repository.Repo method), 422 method), 397 providers_for() (spack.repository.RepoPath method), 423 remove_install_directory() provides() (in module spack.directives), 394 (spack.directory_layout.DirectoryLayout provides() (spack.package.Package method), 415 method), 396 purge() (in module spack.cmd.purge), 341 remove_one() (in module spack.cmd.view), 345 purge() (in module spack.stage), 435 remove_path() (spack.environment.EnvironmentModifications purge() (spack.repository.Repo method), 422 method), 398 purge_empty_directories() (in module spack.cmd.view), remove_prefix() (spack.package.Package method), 415 344 remove_provider() (spack.provider_index.ProviderIndex push_tokens() (spack.parse.Parser method), 419 method), 421 put_first() (spack.repository.RepoPath method), 423 RemoveFailedError, 396 put_last() (spack.repository.RepoPath method), 424 RemovePath (class in spack.environment), 399 pyfiles() (spack.test.python_version.PythonVersionTest Repo (class in spack.repository), 421 method), 369 repo() (in module spack.cmd.repo), 341 python() (in module spack.cmd.python), 341 repo_add() (in module spack.cmd.repo), 341 PythonVersionTest (class in spack.test.python_version), repo_create() (in module spack.cmd.repo), 341 369 repo_for_pkg() (spack.repository.RepoPath method), 424 repo_list() (in module spack.cmd.repo), 341 Q repo_remove() (in module spack.cmd.repo), 341 query() (spack.database.Database method), 393 RepoError, 422 query_arguments() (in module spack.cmd.find), 338 RepoPath (class in spack.repository), 423 query_one() (spack.database.Database method), 393 required_attributes (spack.fetch_strategy.FetchStrategy attribute), 401 R required_attributes (spack.fetch_strategy.GitFetchStrategy read_spec() (spack.directory_layout.YamlDirectoryLayout attribute), 401 method), 397 required_attributes (spack.fetch_strategy.GoFetchStrategy read_transaction() (spack.database.Database method), attribute), 401 393 required_attributes (spack.fetch_strategy.HgFetchStrategy read_transaction() (spack.file_cache.FileCache method), attribute), 402 404 required_attributes (spack.fetch_strategy.SvnFetchStrategy read_yaml_dep_specs() (spack.spec.Spec static method), attribute), 402 430 required_attributes (spack.fetch_strategy.URLFetchStrategy real_name() (spack.repository.Repo method), 422 attribute), 403 refresh() (in module spack.cmd.module), 339 reset() (spack.fetch_strategy.FetchStrategy method), 401

468 Index Spack Documentation, Release 0.9 reset() (spack.fetch_strategy.GitFetchStrategy method), set_module_variables_for_package() (in module 401 spack.build_environment), 387 reset() (spack.fetch_strategy.GoFetchStrategy method), set_or_unset_not_first() (in module spack.environment), 402 399 reset() (spack.fetch_strategy.HgFetchStrategy method), set_path() (spack.environment.EnvironmentModifications 402 method), 398 reset() (spack.fetch_strategy.SvnFetchStrategy method), set_pkg_dep() (spack.test.mock_packages_test.MockPackagesTest 402 method), 366 reset() (spack.fetch_strategy.URLFetchStrategy method), set_result() (spack.cmd.test_install.TestCase method), 403 342 Resource (class in spack.resource), 424 set_stage() (spack.cmd.test.MockCacheFetcher method), resource() (in module spack.directives), 395 342 ResourceStage (class in spack.stage), 433 set_stage() (spack.fetch_strategy.FetchStrategy method), restage() (in module spack.cmd.restage), 341 401 restage() (spack.stage.DIYStage method), 433 set_up_license() (in module spack.hooks.licensing), 351 restage() (spack.stage.Stage method), 435 set_up_package() (spack.test.mirror.MirrorTest method), RestageError, 433 365 results (spack.cmd.test_install.TestCase attribute), 342 SetEnv (class in spack.environment), 399 rev_hash() (spack.test.mock_repo.MockGitRepo SetPath (class in spack.environment), 399 method), 366 setup() (in module spack.cmd.setup), 341 rm() (in module spack.cmd.module), 340 setup() (spack.parse.Parser method), 419 root (spack.spec.Spec attribute), 430 setUp() (spack.test.architecture.ArchitectureTest rpath (spack.package.Package attribute), 415 method), 357 rpath_args (spack.package.Package attribute), 415 setUp() (spack.test.build_system_guess.InstallTest rst_table() (in module spack.cmd.package_list), 340 method), 357 run() (in module spack.test), 379 setUp() (spack.test.cc.CompilerTest method), 357 run_tests (spack.package.Package attribute), 415 setUp() (spack.test.cmd.test_install.TestInstallTest method), 356 S setUp() (spack.test.concretize_preferences.ConcretizePreferencesTest sanity_check_is_dir (spack.package.Package attribute), method), 359 415 setUp() (spack.test.config.ConfigTest method), 360 sanity_check_is_file (spack.package.Package attribute), setUp() (spack.test.directory_layout.DirectoryLayoutTest 416 method), 361 sanity_check_prefix() (spack.package.Package method), setUp() (spack.test.environment.EnvironmentTest 416 method), 361 satisfies() (spack.provider_index.ProviderIndex method), setUp() (spack.test.file_cache.FileCacheTest method), 421 361 satisfies() (spack.spec.CompilerSpec method), 426 setUp() (spack.test.git_fetch.GitFetchTest method), 362 satisfies() (spack.spec.FlagMap method), 427 setUp() (spack.test.hg_fetch.HgFetchTest method), 362 satisfies() (spack.spec.Spec method), 430 setUp() (spack.test.install.InstallTest method), 363 satisfies() (spack.spec.VariantMap method), 432 setUp() (spack.test.link_tree.LinkTreeTest method), 363 satisfies() (spack.version.Version method), 438 setUp() (spack.test.lock.LockTest method), 364 satisfies() (spack.version.VersionList method), 439 setUp() (spack.test.make_executable.MakeExecutableTest satisfies() (spack.version.VersionRange method), 438 method), 364 satisfies_dependencies() (spack.spec.Spec method), 430 setUp() (spack.test.mirror.MirrorTest method), 365 SbangTest (class in spack.test.sbang), 370 setUp() (spack.test.mock_database.MockDatabase section_schemas (in module spack.config), 392 method), 365 set() (spack.environment.EnvironmentModifications setUp() (spack.test.mock_packages_test.MockPackagesTest method), 398 method), 366 set_build_environment_variables() (in module setUp() (spack.test.modules.DotkitTests method), 366 spack.build_environment), 387 setUp() (spack.test.modules.TclTests method), 367 set_compiler_environment_variables() (in module setUp() (spack.test.namespace_trie.NamespaceTrieTest spack.build_environment), 387 method), 367 setUp() (spack.test.pattern.CompositeTest method), 369

Index 469 Spack Documentation, Release 0.9 setUp() (spack.test.sbang.SbangTest method), 370 setup_parser() (in module spack.cmd.unuse), 343 setUp() (spack.test.stage.StageTest method), 373 setup_parser() (in module spack.cmd.url_parse), 343 setUp() (spack.test.svn_fetch.SvnFetchTest method), 374 setup_parser() (in module spack.cmd.urls), 344 setUp() (spack.test.yaml.YamlTest method), 379 setup_parser() (in module spack.cmd.use), 344 setup_dependent_environment() (spack.package.Package setup_parser() (in module spack.cmd.versions), 344 method), 416 setup_parser() (in module spack.cmd.view), 345 setup_dependent_package() (spack.package.Package setup_platform_environment() method), 416 (spack.architecture.Platform class method), setup_environment() (spack.package.Package method), 386 417 setup_platform_environment() setup_package() (in module spack.build_environment), (spack.platforms.cray.Cray class method), 387 353 setup_parser() (in module spack.cmd.activate), 335 shebang_too_long() (in module spack.hooks.sbang), 351 setup_parser() (in module spack.cmd.bootstrap), 335 short_spec (spack.spec.Spec attribute), 430 setup_parser() (in module spack.cmd.cd), 335 short_spec (spack.test.cmd.test_install.MockSpec at- setup_parser() (in module spack.cmd.checksum), 336 tribute), 356 setup_parser() (in module spack.cmd.clean), 336 SKIPPED (spack.cmd.test_install.TestResult attribute), setup_parser() (in module spack.cmd.compiler), 336 342 setup_parser() (in module spack.cmd.compilers), 336 sorted_deps() (spack.spec.Spec method), 430 setup_parser() (in module spack.cmd.config), 336 source_path (spack.stage.Stage attribute), 435 setup_parser() (in module spack.cmd.create), 337 spack.abi (module), 384 setup_parser() (in module spack.cmd.deactivate), 337 spack.architecture (module), 384 setup_parser() (in module spack.cmd.dependents), 337 spack.build_environment (module), 386 setup_parser() (in module spack.cmd.diy), 337 spack.cmd (module), 345 setup_parser() (in module spack.cmd.doc), 337 spack.cmd.activate (module), 335 setup_parser() (in module spack.cmd.edit), 337 spack.cmd.arch (module), 335 setup_parser() (in module spack.cmd.env), 337 spack.cmd.bootstrap (module), 335 setup_parser() (in module spack.cmd.extensions), 337 spack.cmd.cd (module), 335 setup_parser() (in module spack.cmd.fetch), 338 spack.cmd.checksum (module), 336 setup_parser() (in module spack.cmd.find), 338 spack.cmd.clean (module), 336 setup_parser() (in module spack.cmd.graph), 338 spack.cmd.common (module), 335 setup_parser() (in module spack.cmd.help), 338 spack.cmd.common.arguments (module), 335 setup_parser() (in module spack.cmd.info), 338 spack.cmd.compiler (module), 336 setup_parser() (in module spack.cmd.install), 338 spack.cmd.compilers (module), 336 setup_parser() (in module spack.cmd.list), 338 spack.cmd.config (module), 336 setup_parser() (in module spack.cmd.load), 339 spack.cmd.create (module), 336 setup_parser() (in module spack.cmd.location), 339 spack.cmd.deactivate (module), 337 setup_parser() (in module spack.cmd.md5), 339 spack.cmd.dependents (module), 337 setup_parser() (in module spack.cmd.mirror), 339 spack.cmd.diy (module), 337 setup_parser() (in module spack.cmd.module), 340 spack.cmd.doc (module), 337 setup_parser() (in module spack.cmd.patch), 340 spack.cmd.edit (module), 337 setup_parser() (in module spack.cmd.pkg), 340 spack.cmd.env (module), 337 setup_parser() (in module spack.cmd.providers), 341 spack.cmd.extensions (module), 337 setup_parser() (in module spack.cmd.purge), 341 spack.cmd.fetch (module), 338 setup_parser() (in module spack.cmd.python), 341 spack.cmd.find (module), 338 setup_parser() (in module spack.cmd.repo), 341 spack.cmd.graph (module), 338 setup_parser() (in module spack.cmd.restage), 341 spack.cmd.help (module), 338 setup_parser() (in module spack.cmd.setup), 341 spack.cmd.info (module), 338 setup_parser() (in module spack.cmd.spec), 342 spack.cmd.install (module), 338 setup_parser() (in module spack.cmd.stage), 342 spack.cmd.list (module), 338 setup_parser() (in module spack.cmd.test), 342 spack.cmd.load (module), 339 setup_parser() (in module spack.cmd.test_install), 343 spack.cmd.location (module), 339 setup_parser() (in module spack.cmd.uninstall), 343 spack.cmd.md5 (module), 339 setup_parser() (in module spack.cmd.unload), 343 spack.cmd.mirror (module), 339

470 Index Spack Documentation, Release 0.9 spack.cmd.module (module), 339 spack.operating_systems.mac_os (module), 353 spack.cmd.package_list (module), 340 spack.package (module), 409 spack.cmd.patch (module), 340 spack.package_test (module), 418 spack.cmd.pkg (module), 340 spack.parse (module), 419 spack.cmd.providers (module), 341 spack.patch (module), 419 spack.cmd.purge (module), 341 spack.platforms (module), 354 spack.cmd.python (module), 341 spack.platforms.bgq (module), 353 spack.cmd.reindex (module), 341 spack.platforms.cray (module), 353 spack.cmd.repo (module), 341 spack.platforms.darwin (module), 353 spack.cmd.restage (module), 341 spack.platforms.linux (module), 354 spack.cmd.setup (module), 341 spack.platforms.test (module), 354 spack.cmd.spec (module), 342 spack.preferred_packages (module), 420 spack.cmd.stage (module), 342 spack.provider_index (module), 420 spack.cmd.test (module), 342 spack.repository (module), 421 spack.cmd.test_install (module), 342 spack.resource (module), 424 spack.cmd.uninstall (module), 343 spack.schema (module), 355 spack.cmd.unload (module), 343 spack.schema.compilers (module), 354 spack.cmd.unuse (module), 343 spack.schema.mirrors (module), 354 spack.cmd.url_parse (module), 343 spack.schema.modules (module), 354 spack.cmd.urls (module), 344 spack.schema.packages (module), 354 spack.cmd.use (module), 344 spack.schema.repos (module), 355 spack.cmd.versions (module), 344 spack.schema.targets (module), 355 spack.cmd.view (module), 344 spack.spec (module), 424 spack.compiler (module), 388 spack.stage (module), 433 spack.compilers (module), 350 spack.test (module), 379 spack.compilers.cce (module), 346 spack.test.architecture (module), 356 spack.compilers.clang (module), 346 spack.test.build_system_guess (module), 357 spack.compilers.gcc (module), 347 spack.test.cc (module), 357 spack.compilers.intel (module), 347 spack.test.cmd (module), 356 spack.compilers.nag (module), 348 spack.test.cmd.find (module), 355 spack.compilers.pgi (module), 348 spack.test.cmd.module (module), 355 spack.compilers.xl (module), 349 spack.test.cmd.test_compiler_cmd (module), 355 spack.concretize (module), 388 spack.test.cmd.test_install (module), 356 spack.config (module), 390 spack.test.cmd.uninstall (module), 356 spack.database (module), 392 spack.test.concretize (module), 358 spack.directives (module), 394 spack.test.concretize_preferences (module), 359 spack.directory_layout (module), 395 spack.test.config (module), 360 spack.environment (module), 397 spack.test.database (module), 360 spack.error (module), 399 spack.test.directory_layout (module), 361 spack.fetch_strategy (module), 400 spack.test.environment (module), 361 spack.file_cache (module), 403 spack.test.file_cache (module), 361 spack.graph (module), 404 spack.test.git_fetch (module), 362 spack.hooks (module), 352 spack.test.hg_fetch (module), 362 spack.hooks.dotkit (module), 351 spack.test.install (module), 363 spack.hooks.extensions (module), 351 spack.test.link_tree (module), 363 spack.hooks.licensing (module), 351 spack.test.lock (module), 364 spack.hooks.sbang (module), 351 spack.test.make_executable (module), 364 spack.hooks.tclmodule (module), 352 spack.test.mirror (module), 365 spack.mirror (module), 405 spack.test.mock_database (module), 365 spack.modules (module), 406 spack.test.mock_packages_test (module), 365 spack.multimethod (module), 407 spack.test.mock_repo (module), 366 spack.operating_systems (module), 353 spack.test.modules (module), 366 spack.operating_systems.cnl (module), 352 spack.test.multimethod (module), 367 spack.operating_systems.linux_distro (module), 352 spack.test.namespace_trie (module), 367

Index 471 Spack Documentation, Release 0.9 spack.test.optional_deps (module), 368 method), 420 spack.test.package_sanity (module), 368 SpecDagTest (class in spack.test.spec_dag), 370 spack.test.packages (module), 368 SpecError, 431 spack.test.pattern (module), 369 SpecHashCollisionError, 396 spack.test.provider_index (module), 369 SpecLexer (class in spack.spec), 431 spack.test.python_version (module), 369 SpecMultiMethod (class in spack.multimethod), 408 spack.test.sbang (module), 370 SpecParseError, 431 spack.test.spec_dag (module), 370 SpecParser (class in spack.spec), 431 spack.test.spec_semantics (module), 371 SpecReadError, 396 spack.test.spec_syntax (module), 372 specs_by_hash() (spack.directory_layout.YamlDirectoryLayout spack.test.spec_yaml (module), 373 method), 397 spack.test.stage (module), 373 SpecSematicsTest (class in spack.test.spec_semantics), spack.test.svn_fetch (module), 374 371 spack.test.tally_plugin (module), 375 SpecSyntaxTest (class in spack.test.spec_syntax), 372 spack.test.url_extrapolate (module), 375 SpecYamlTest (class in spack.test.spec_yaml), 373 spack.test.url_parse (module), 375 spider() (in module spack.util.web), 383 spack.test.url_substitution (module), 377 split_url_extension() (in module spack.url), 436 spack.test.versions (module), 377 Stage (class in spack.stage), 434 spack.test.yaml (module), 379 stage (spack.package.Package attribute), 417 spack.url (module), 435 stage() (in module spack.cmd.stage), 342 spack.util (module), 384 StagedPackage (class in spack.package), 417 spack.util.compression (module), 379 StageError, 435 spack.util.crypto (module), 379 StageTest (class in spack.test.stage), 373 spack.util.debug (module), 380 store() (spack.cmd.test.MockCache method), 342 spack.util.environment (module), 380 store() (spack.fetch_strategy.FsCache method), 401 spack.util.executable (module), 380 strip_extension() (in module spack.util.compression), 379 spack.util.multiproc (module), 381 strip_query_and_fragment() (in module spack.url), 437 spack.util.naming (module), 381 subcommand() (in module spack.cmd.module), 340 spack.util.pattern (module), 382 substitute_spack_prefix() (in module spack.repository), spack.util.prefix (module), 382 424 spack.util.spack_yaml (module), 383 substitute_version() (in module spack.url), 437 spack.util.string (module), 383 substitution_offsets() (in module spack.url), 437 spack.util.web (module), 383 suffixes (spack.compiler.Compiler attribute), 388 spack.variant (module), 437 suffixes (spack.compilers.cce.Cce attribute), 346 spack.version (module), 437 suffixes (spack.compilers.gcc.Gcc attribute), 347 spack.yaml_version_check (module), 440 suggest_archive_basename() (in module spack.mirror), spack_module_to_python_module() (in module 406 spack.util.naming), 381 supported() (in module spack.compilers), 350 SpackError, 399 supported_compilers() (in module spack.compilers), 350 SpackNamespace (class in spack.repository), 424 svn (spack.fetch_strategy.SvnFetchStrategy attribute), SpackYAMLError, 427 402 spawn() (in module spack.util.multiproc), 381 SvnFetchStrategy (class in spack.fetch_strategy), 402 Spec (class in spack.spec), 427 SvnFetchTest (class in spack.test.svn_fetch), 374 spec() (in module spack.cmd.spec), 342 swap() (spack.repository.RepoPath method), 424 spec() (spack.spec.SpecParser method), 431 symlink_license() (in module spack.hooks.licensing), 351 spec_by_hash() (spack.spec.SpecParser method), 431 spec_externals() (in module spack.config), 392 T spec_file_path() (spack.directory_layout.YamlDirectoryLayoutTally (class in spack.test.tally_plugin), 375 method), 397 Target (class in spack.architecture), 386 spec_has_preferred_provider() target() (spack.architecture.Platform method), 386 (spack.preferred_packages.PreferredPackages TclModule (class in spack.modules), 407 method), 420 TclTests (class in spack.test.modules), 367 spec_preferred_variants() tearDown() (spack.test.architecture.ArchitectureTest (spack.preferred_packages.PreferredPackages method), 357

472 Index Spack Documentation, Release 0.9 tearDown() (spack.test.build_system_guess.InstallTest test_060_remove_and_add_root_package() method), 357 (spack.test.database.DatabaseTest method), tearDown() (spack.test.cc.CompilerTest method), 358 360 tearDown() (spack.test.cmd.test_install.TestInstallTest test_070_remove_and_add_dependency_package() method), 356 (spack.test.database.DatabaseTest method), tearDown() (spack.test.concretize_preferences.ConcretizePreferencesTest360 method), 359 test_080_root_ref_counts() tearDown() (spack.test.config.ConfigTest method), 360 (spack.test.database.DatabaseTest method), tearDown() (spack.test.directory_layout.DirectoryLayoutTest 360 method), 361 test_090_non_root_ref_counts() tearDown() (spack.test.environment.EnvironmentTest (spack.test.database.DatabaseTest method), method), 361 360 tearDown() (spack.test.file_cache.FileCacheTest test_100_no_write_with_exception_on_remove() method), 361 (spack.test.database.DatabaseTest method), tearDown() (spack.test.git_fetch.GitFetchTest method), 360 362 test_110_no_write_with_exception_on_install() tearDown() (spack.test.hg_fetch.HgFetchTest method), (spack.test.database.DatabaseTest method), 362 360 tearDown() (spack.test.install.InstallTest method), 363 test_add_multiple() (spack.test.namespace_trie.NamespaceTrieTest tearDown() (spack.test.link_tree.LinkTreeTest method), method), 367 363 test_add_none_multiple() tearDown() (spack.test.lock.LockTest method), 364 (spack.test.namespace_trie.NamespaceTrieTest tearDown() (spack.test.make_executable.MakeExecutableTest method), 367 method), 365 test_add_none_single() (spack.test.namespace_trie.NamespaceTrieTest tearDown() (spack.test.mirror.MirrorTest method), 365 method), 367 tearDown() (spack.test.mock_database.MockDatabase test_add_single() (spack.test.namespace_trie.NamespaceTrieTest method), 365 method), 367 tearDown() (spack.test.mock_packages_test.MockPackagesTesttest_add_three() (spack.test.namespace_trie.NamespaceTrieTest method), 366 method), 368 tearDown() (spack.test.modules.DotkitTests method), 366 test_all_deps() (spack.test.cc.CompilerTest method), 358 tearDown() (spack.test.modules.TclTests method), 367 test_all_mirror() (spack.test.mirror.MirrorTest method), tearDown() (spack.test.sbang.SbangTest method), 370 365 tearDown() (spack.test.stage.StageTest method), 373 test_alpha() (spack.test.versions.VersionsTest method), tearDown() (spack.test.svn_fetch.SvnFetchTest method), 378 374 test_alpha_beta() (spack.test.versions.VersionsTest Test (class in spack.platforms.test), 354 method), 378 test() (in module spack.cmd.test), 342 test_alpha_with_dots() (spack.test.versions.VersionsTest test_005_db_exists() (spack.test.database.DatabaseTest method), 378 method), 360 test_alter_environment() (spack.test.modules.TclTests test_010_all_install_sanity() method), 367 (spack.test.database.DatabaseTest method), test_ambiguous() (spack.test.spec_syntax.SpecSyntaxTest 360 method), 372 test_015_write_and_read() test_ambiguous_version_spec() (spack.test.database.DatabaseTest method), (spack.test.spec_yaml.SpecYamlTest method), 360 373 test_020_db_sanity() (spack.test.database.DatabaseTest test_angband_version_style() method), 360 (spack.test.url_parse.UrlParseTest method), test_030_db_sanity_from_another_process() 376 (spack.test.database.DatabaseTest method), test_another_erlang_version_style() 360 (spack.test.url_parse.UrlParseTest method), test_040_ref_counts() (spack.test.database.DatabaseTest 376 method), 360 test_apache_version_style() test_050_basic_query() (spack.test.database.DatabaseTest (spack.test.url_parse.UrlParseTest method), method), 360 376

Index 473 Spack Documentation, Release 0.9 test_as_mode() (spack.test.cc.CompilerTest method), 358 test_concretize_dag() (spack.test.concretize.ConcretizeTest test_astyle_verson_style() method), 358 (spack.test.url_parse.UrlParseTest method), test_concretize_no_deps() 376 (spack.test.concretize.ConcretizeTest method), test_autoload() (spack.test.modules.TclTests method), 358 367 test_concretize_preferred_version() test_autotools() (spack.test.build_system_guess.InstallTest (spack.test.concretize.ConcretizeTest method), method), 357 358 test_basic_version_satisfaction() test_concretize_two_virtuals() (spack.test.versions.VersionsTest method), (spack.test.concretize.ConcretizeTest method), 378 358 test_basic_version_satisfaction_in_lists() test_concretize_two_virtuals_with_dual_provider() (spack.test.versions.VersionsTest method), (spack.test.concretize.ConcretizeTest method), 378 358 test_blacklist() (spack.test.modules.TclTests method), test_concretize_two_virtuals_with_dual_provider_and_a_conflict() 367 (spack.test.concretize.ConcretizeTest method), test_boolness() (spack.test.architecture.ArchitectureTest 358 method), 357 test_concretize_two_virtuals_with_one_bound() test_boost_version_style() (spack.test.concretize.ConcretizeTest method), (spack.test.url_parse.UrlParseTest method), 358 376 test_concretize_two_virtuals_with_two_bound() test_canonicalize() (spack.test.spec_syntax.SpecSyntaxTest (spack.test.concretize.ConcretizeTest method), method), 372 358 test_canonicalize_list() (spack.test.versions.VersionsTest test_concretize_variant() (spack.test.concretize.ConcretizeTest method), 378 method), 359 test_ccld_mode() (spack.test.cc.CompilerTest method), test_concretize_with_provides_when() 358 (spack.test.concretize.ConcretizeTest method), test_chained_mpi() (spack.test.optional_deps.ConcretizeTest 359 method), 368 test_concretize_with_restricted_virtual() test_chdir() (spack.test.stage.StageTest method), 373 (spack.test.concretize.ConcretizeTest method), test_close_numbers() (spack.test.versions.VersionsTest 359 method), 378 test_concretize_with_virtual() test_cmake() (spack.test.build_system_guess.InstallTest (spack.test.concretize.ConcretizeTest method), method), 357 359 test_compiler_add() (spack.test.cmd.test_compiler_cmd.CompilerCmdTesttest_conflicting_package_constraints() method), 355 (spack.test.spec_dag.SpecDagTest method), test_compiler_child() (spack.test.concretize.ConcretizeTest 370 method), 358 test_conflicting_spec_constraints() test_compiler_inheritance() (spack.test.spec_dag.SpecDagTest method), (spack.test.concretize.ConcretizeTest method), 370 358 test_conflicts() (spack.test.modules.TclTests method), test_compiler_remove() (spack.test.cmd.test_compiler_cmd.CompilerCmdTest367 method), 355 test_conretize_compiler_flags() test_complex_acquire_and_release_chain() (spack.test.concretize.ConcretizeTest method), (spack.test.lock.LockTest method), 364 359 test_composite_from_interface() test_constrain_architecture() (spack.test.pattern.CompositeTest method), (spack.test.spec_semantics.SpecSematicsTest 369 method), 371 test_composite_from_method_list() test_constrain_changed() (spack.test.pattern.CompositeTest method), (spack.test.spec_semantics.SpecSematicsTest 369 method), 371 test_concrete_spec() (spack.test.spec_yaml.SpecYamlTest test_constrain_compiler() method), 373 (spack.test.spec_semantics.SpecSematicsTest method), 371

474 Index Spack Documentation, Release 0.9 test_constrain_compiler_flags() test_dependencies_with_versions() (spack.test.spec_semantics.SpecSematicsTest (spack.test.spec_syntax.SpecSyntaxTest method), 371 method), 372 test_constrain_dependency_changed() test_dependency_already_installed() (spack.test.spec_semantics.SpecSematicsTest (spack.test.cmd.test_install.TestInstallTest method), 371 method), 356 test_constrain_dependency_not_changed() test_dependency_match() (spack.test.spec_semantics.SpecSematicsTest (spack.test.multimethod.MultiMethodTest method), 371 method), 367 test_constrain_not_changed() test_dependents_and_dependencies_are_correct() (spack.test.spec_semantics.SpecSematicsTest (spack.test.spec_dag.SpecDagTest method), method), 371 370 test_constrain_variants() (spack.test.spec_semantics.SpecSematicsTesttest_deptype_traversal() (spack.test.spec_dag.SpecDagTest method), 371 method), 370 test_contains() (spack.test.spec_dag.SpecDagTest test_deptype_traversal_full() method), 370 (spack.test.spec_dag.SpecDagTest method), test_contains() (spack.test.versions.VersionsTest 370 method), 378 test_deptype_traversal_run() test_copy() (spack.test.provider_index.ProviderIndexTest (spack.test.spec_dag.SpecDagTest method), method), 369 370 test_copy_concretized() (spack.test.spec_dag.SpecDagTest test_deptype_traversal_with_builddeps() method), 370 (spack.test.spec_dag.SpecDagTest method), test_copy_normalized() (spack.test.spec_dag.SpecDagTest 370 method), 370 test_dict_functions_for_architecture() test_copy_simple() (spack.test.spec_dag.SpecDagTest (spack.test.architecture.ArchitectureTest method), 370 method), 357 test_core_module_compatibility() test_dict_order() (spack.test.yaml.YamlTest method), 379 (spack.test.python_version.PythonVersionTest test_dotkit() (spack.test.modules.DotkitTests method), method), 369 366 test_cpp_mode() (spack.test.cc.CompilerTest method), test_double_alpha() (spack.test.versions.VersionsTest 358 method), 378 test_dash_rc_style() (spack.test.url_parse.UrlParseTest test_duplicate_compiler() method), 376 (spack.test.spec_syntax.SpecSyntaxTest test_dash_version_dash_style() method), 372 (spack.test.url_parse.UrlParseTest method), test_duplicate_depdendence() 376 (spack.test.spec_syntax.SpecSyntaxTest test_date_stamps() (spack.test.versions.VersionsTest method), 372 method), 378 test_duplicate_variant() (spack.test.spec_syntax.SpecSyntaxTest test_debian_style_1() (spack.test.url_parse.UrlParseTest method), 372 method), 376 test_dyninst_version() (spack.test.url_extrapolate.UrlExtrapolateTest test_debian_style_2() (spack.test.url_parse.UrlParseTest method), 375 method), 376 test_equal() (spack.test.provider_index.ProviderIndexTest test_default_variant() (spack.test.optional_deps.ConcretizeTest method), 369 method), 368 test_equal() (spack.test.spec_dag.SpecDagTest method), test_default_works() (spack.test.multimethod.MultiMethodTest 370 method), 367 test_erlang_version_style() test_dep_include() (spack.test.cc.CompilerTest method), (spack.test.url_parse.UrlParseTest method), 358 376 test_dep_index() (spack.test.spec_semantics.SpecSematicsTesttest_error_conditions() (spack.test.pattern.CompositeTest method), 371 method), 369 test_dep_lib() (spack.test.cc.CompilerTest method), 358 test_expand_archive() (spack.test.stage.StageTest test_dep_rpath() (spack.test.cc.CompilerTest method), method), 374 358 test_expand_archive_with_chdir() (spack.test.stage.StageTest method), 374

Index 475 Spack Documentation, Release 0.9 test_extend() (spack.test.environment.EnvironmentTest test_gcc_version_precedence() method), 361 (spack.test.url_parse.UrlParseTest method), test_external_and_virtual() 376 (spack.test.concretize.ConcretizeTest method), test_get_all_mock_packages() 359 (spack.test.package_sanity.PackageSanityTest test_external_package() (spack.test.concretize.ConcretizeTest method), 368 method), 359 test_get_all_packages() (spack.test.package_sanity.PackageSanityTest test_external_package_module() method), 368 (spack.test.concretize.ConcretizeTest method), test_get_item() (spack.test.versions.VersionsTest 359 method), 378 test_extra_arguments() (spack.test.environment.EnvironmentTesttest_git_mirror() (spack.test.mirror.MirrorTest method), method), 361 365 test_fann_version() (spack.test.url_parse.UrlParseTest test_github_raw() (spack.test.url_extrapolate.UrlExtrapolateTest method), 376 method), 375 test_fetch() (spack.test.stage.StageTest method), 374 test_github_raw_url() (spack.test.url_parse.UrlParseTest test_fetch_branch() (spack.test.git_fetch.GitFetchTest method), 376 method), 362 test_gloox_beta_style() (spack.test.url_parse.UrlParseTest test_fetch_commit() (spack.test.git_fetch.GitFetchTest method), 376 method), 362 test_handle_unknown_package() test_fetch_default() (spack.test.hg_fetch.HgFetchTest (spack.test.directory_layout.DirectoryLayoutTest method), 363 method), 361 test_fetch_default() (spack.test.svn_fetch.SvnFetchTest test_haxe_version() (spack.test.url_parse.UrlParseTest method), 374 method), 376 test_fetch_master() (spack.test.git_fetch.GitFetchTest test_hdf5_version() (spack.test.url_parse.UrlParseTest method), 362 method), 376 test_fetch_r1() (spack.test.svn_fetch.SvnFetchTest test_hg_mirror() (spack.test.mirror.MirrorTest method), method), 374 365 test_fetch_rev0() (spack.test.hg_fetch.HgFetchTest test_hypre_url_substitution() method), 363 (spack.test.url_substitution.PackageSanityTest test_fetch_tag() (spack.test.git_fetch.GitFetchTest method), 377 method), 362 test_iges_version() (spack.test.url_parse.UrlParseTest test_find() (spack.test.directory_layout.DirectoryLayoutTest method), 376 method), 361 test_ignore() (spack.test.link_tree.LinkTreeTest method), test_find_spec_children() 363 (spack.test.concretize.ConcretizeTest method), test_imagemagick_style() 359 (spack.test.url_parse.UrlParseTest method), test_find_spec_none() (spack.test.concretize.ConcretizeTest 376 method), 359 test_imap_version() (spack.test.url_parse.UrlParseTest test_find_spec_parents() (spack.test.concretize.ConcretizeTest method), 376 method), 359 test_import_class_from_package() test_find_spec_self() (spack.test.concretize.ConcretizeTest (spack.test.packages.PackagesTest method), method), 359 368 test_find_spec_sibling() (spack.test.concretize.ConcretizeTesttest_import_module_from_package() method), 359 (spack.test.packages.PackagesTest method), test_flags() (spack.test.cc.CompilerTest method), 358 368 test_formatted_strings() (spack.test.versions.VersionsTest test_import_namespace_container_modules() method), 378 (spack.test.packages.PackagesTest method), test_full_specs() (spack.test.spec_syntax.SpecSyntaxTest 368 method), 372 test_import_package() (spack.test.packages.PackagesTest test_gcc() (spack.test.url_extrapolate.UrlExtrapolateTest method), 368 method), 375 test_import_package_as() test_gcc_version() (spack.test.url_parse.UrlParseTest (spack.test.packages.PackagesTest method), method), 376 368

476 Index Spack Documentation, Release 0.9 test_in_list() (spack.test.versions.VersionsTest method), method), 365 378 test_make_parallel_precedence() test_inspect_path() (spack.test.modules.HelperFunctionsTests (spack.test.make_executable.MakeExecutableTest method), 366 method), 365 test_install() (in module spack.cmd.test_install), 343 test_merge_to_existing_directory() test_install_and_uninstall() (spack.test.install.InstallTest (spack.test.link_tree.LinkTreeTest method), method), 363 363 test_install_environment() (spack.test.install.InstallTest test_merge_to_new_directory() method), 363 (spack.test.link_tree.LinkTreeTest method), test_installing_both() (spack.test.cmd.test_install.TestInstallTest 363 method), 356 test_merge_with_empty_directories() test_intersect_with_containment() (spack.test.link_tree.LinkTreeTest method), (spack.test.versions.VersionsTest method), 363 378 test_minimal_spaces() (spack.test.spec_syntax.SpecSyntaxTest test_intersection() (spack.test.versions.VersionsTest method), 372 method), 378 test_module_common_operations() test_invalid_constraint() (spack.test.spec_semantics.SpecSematicsTest(spack.test.cmd.module.TestModule method), method), 371 355 test_invalid_dep() (spack.test.spec_dag.SpecDagTest test_mpi_providers() (spack.test.provider_index.ProviderIndexTest method), 370 method), 369 test_jpeg_style() (spack.test.url_parse.UrlParseTest test_mpi_version() (spack.test.multimethod.MultiMethodTest method), 376 method), 367 test_keep_exceptions() (spack.test.stage.StageTest test_mpileaks_version() (spack.test.url_extrapolate.UrlExtrapolateTest method), 374 method), 375 test_keep_without_exceptions() test_mpileaks_version() (spack.test.url_parse.UrlParseTest (spack.test.stage.StageTest method), 374 method), 376 test_lame_version_style() test_multiple_conditionals() (spack.test.url_parse.UrlParseTest method), (spack.test.optional_deps.ConcretizeTest 376 method), 368 test_ld_deps() (spack.test.cc.CompilerTest method), 358 test_mvapich2_19_version() test_ld_deps_reentrant() (spack.test.cc.CompilerTest (spack.test.url_parse.UrlParseTest method), method), 358 376 test_ld_mode() (spack.test.cc.CompilerTest method), 358 test_mvapich2_20_version() test_libdwarf_version() (spack.test.url_extrapolate.UrlExtrapolateTest(spack.test.url_parse.UrlParseTest method), method), 375 376 test_libelf_version() (spack.test.url_extrapolate.UrlExtrapolateTesttest_my_dep_depends_on_provider_of_my_virtual_dep() method), 375 (spack.test.concretize.ConcretizeTest method), test_line_numbers() (spack.test.yaml.YamlTest method), 359 379 test_new_github_style() (spack.test.url_parse.UrlParseTest test_lists_overlap() (spack.test.versions.VersionsTest method), 376 method), 378 test_no_keep_with_exceptions() test_load_package() (spack.test.packages.PackagesTest (spack.test.stage.StageTest method), 374 method), 368 test_no_keep_without_exceptions() test_make_explicit() (spack.test.make_executable.MakeExecutableTest(spack.test.stage.StageTest method), 374 method), 365 test_no_version() (spack.test.url_parse.UrlParseTest test_make_normal() (spack.test.make_executable.MakeExecutableTestmethod), 376 method), 365 test_no_version_match() (spack.test.multimethod.MultiMethodTest test_make_one_job() (spack.test.make_executable.MakeExecutableTestmethod), 367 method), 365 test_nobuild_package() (spack.test.concretize.ConcretizeTest test_make_parallel_disabled() method), 359 (spack.test.make_executable.MakeExecutableTesttest_nonexisting_package_filename() method), 365 (spack.test.packages.PackagesTest method), test_make_parallel_false() 368 (spack.test.make_executable.MakeExecutableTest

Index 477 Spack Documentation, Release 0.9 test_normal_spec() (spack.test.spec_yaml.SpecYamlTest test_package_names() (spack.test.spec_syntax.SpecSyntaxTest method), 373 method), 372 test_normalize_a_lot() (spack.test.spec_dag.SpecDagTest test_padded_numbers() (spack.test.versions.VersionsTest method), 370 method), 378 test_normalize_mpileaks() test_parse() (spack.test.yaml.YamlTest method), 379 (spack.test.spec_dag.SpecDagTest method), test_parse_errors() (spack.test.spec_syntax.SpecSyntaxTest 370 method), 373 test_normalize_simple_conditionals() test_partial_version_prefix() (spack.test.optional_deps.ConcretizeTest (spack.test.url_extrapolate.UrlExtrapolateTest method), 368 method), 375 test_normalize_twice() (spack.test.spec_dag.SpecDagTest test_patch() (spack.test.versions.VersionsTest method), method), 370 378 test_normalize_with_virtual_package() test_path_manipulation() (spack.test.spec_dag.SpecDagTest method), (spack.test.environment.EnvironmentTest 370 method), 361 test_normalize_with_virtual_spec() test_platform() (spack.test.architecture.ArchitectureTest (spack.test.spec_dag.SpecDagTest method), method), 357 370 test_postorder_edge_traversal() test_noseparator_single_digit() (spack.test.spec_dag.SpecDagTest method), (spack.test.url_parse.UrlParseTest method), 370 376 test_postorder_node_traversal() test_num_alpha_with_no_separator() (spack.test.spec_dag.SpecDagTest method), (spack.test.versions.VersionsTest method), 370 378 test_postorder_path_traversal() test_nums_and_patch() (spack.test.versions.VersionsTest (spack.test.spec_dag.SpecDagTest method), method), 378 370 test_omega_version_style() test_preferred_compilers() (spack.test.url_parse.UrlParseTest method), (spack.test.concretize_preferences.ConcretizePreferencesTest 376 method), 359 test_one_version_match() test_preferred_providers() (spack.test.multimethod.MultiMethodTest (spack.test.concretize_preferences.ConcretizePreferencesTest method), 367 method), 359 test_openssl_version() (spack.test.url_parse.UrlParseTest test_preferred_variants() (spack.test.concretize_preferences.ConcretizePreferencesTest method), 376 method), 359 test_otf2_url_substitution() test_preferred_versions() (spack.test.url_substitution.PackageSanityTest (spack.test.concretize_preferences.ConcretizePreferencesTest method), 377 method), 359 test_overlap_with_containment() test_preorder_edge_traversal() (spack.test.versions.VersionsTest method), (spack.test.spec_dag.SpecDagTest method), 378 371 test_p7zip_version_style() test_preorder_node_traversal() (spack.test.url_parse.UrlParseTest method), (spack.test.spec_dag.SpecDagTest method), 376 371 test_package_class_names() test_preorder_path_traversal() (spack.test.packages.PackagesTest method), (spack.test.spec_dag.SpecDagTest method), 368 371 test_package_filename() (spack.test.packages.PackagesTest test_prerequisites() (spack.test.modules.TclTests method), 368 method), 367 test_package_module_compatibility() test_providers_for_simple() (spack.test.python_version.PythonVersionTest (spack.test.provider_index.ProviderIndexTest method), 369 method), 369 test_package_name() (spack.test.packages.PackagesTest test_pypy_version() (spack.test.url_parse.UrlParseTest method), 368 method), 376

478 Index Spack Documentation, Release 0.9 test_python() (spack.test.build_system_guess.InstallTest test_satisfies_matching_variant() method), 357 (spack.test.spec_semantics.SpecSematicsTest test_query_arguments() (spack.test.cmd.find.FindTest method), 371 method), 355 test_satisfies_namespace() test_R() (spack.test.build_system_guess.InstallTest (spack.test.spec_semantics.SpecSematicsTest method), 357 method), 372 test_ranges_overlap() (spack.test.versions.VersionsTest test_satisfies_namespaced_dep() method), 378 (spack.test.spec_semantics.SpecSematicsTest test_rc_style() (spack.test.url_parse.UrlParseTest method), 372 method), 376 test_satisfies_unconstrained_compiler_flag() test_rc_versions() (spack.test.versions.VersionsTest (spack.test.spec_semantics.SpecSematicsTest method), 378 method), 372 test_read_and_write_spec() test_satisfies_unconstrained_variant() (spack.test.directory_layout.DirectoryLayoutTest (spack.test.spec_semantics.SpecSematicsTest method), 361 method), 372 test_read_lock_timeout_on_write() test_satisfies_virtual() (spack.test.spec_semantics.SpecSematicsTest (spack.test.lock.LockTest method), 364 method), 372 test_read_lock_timeout_on_write_2() test_satisfies_virtual_dep_with_virtual_constraint() (spack.test.lock.LockTest method), 364 (spack.test.spec_semantics.SpecSematicsTest test_read_lock_timeout_on_write_3() method), 372 (spack.test.lock.LockTest method), 364 test_satisfies_virtual_dependencies() test_remove() (spack.test.file_cache.FileCacheTest (spack.test.spec_semantics.SpecSematicsTest method), 362 method), 372 test_repr_and_str() (spack.test.versions.VersionsTest test_satisfies_virtual_dependency_versions() method), 378 (spack.test.spec_semantics.SpecSematicsTest test_restage() (spack.test.stage.StageTest method), 374 method), 372 test_rpm_oddities() (spack.test.versions.VersionsTest test_scalasca_partial_version() method), 378 (spack.test.url_extrapolate.UrlExtrapolateTest test_ruby_version_style() method), 375 (spack.test.url_parse.UrlParseTest method), test_scalasca_version() (spack.test.url_parse.UrlParseTest 377 method), 377 test_satisfaction_with_lists() test_scons() (spack.test.build_system_guess.InstallTest (spack.test.versions.VersionsTest method), method), 357 378 test_self_index() (spack.test.spec_semantics.SpecSematicsTest test_satisfies() (spack.test.spec_semantics.SpecSematicsTest method), 372 method), 371 test_set() (spack.test.environment.EnvironmentTest test_satisfies_architecture() method), 361 (spack.test.spec_semantics.SpecSematicsTest test_set_path() (spack.test.environment.EnvironmentTest method), 371 method), 361 test_satisfies_compiler() (spack.test.spec_semantics.SpecSematicsTesttest_setup_and_destroy_name_with_tmp() method), 371 (spack.test.stage.StageTest method), 374 test_satisfies_compiler_version() test_setup_and_destroy_name_without_tmp() (spack.test.spec_semantics.SpecSematicsTest (spack.test.stage.StageTest method), 374 method), 371 test_setup_and_destroy_no_name_with_tmp() test_satisfies_dependencies() (spack.test.stage.StageTest method), 374 (spack.test.spec_semantics.SpecSematicsTest test_setup_and_destroy_no_name_without_tmp() method), 371 (spack.test.stage.StageTest method), 374 test_satisfies_dependency_versions() test_shebang_handles_non_writable_files() (spack.test.spec_semantics.SpecSematicsTest (spack.test.sbang.SbangTest method), 370 method), 371 test_shebang_handling() (spack.test.sbang.SbangTest test_satisfies_matching_compiler_flag() method), 370 (spack.test.spec_semantics.SpecSematicsTest test_simple_case() (spack.test.modules.TclTests method), method), 371 367

Index 479 Spack Documentation, Release 0.9 test_simple_dependence() test_unsatisfiable_architecture() (spack.test.spec_syntax.SpecSyntaxTest (spack.test.spec_dag.SpecDagTest method), method), 373 371 test_simple_spec() (spack.test.spec_yaml.SpecYamlTest test_unsatisfiable_compiler() method), 373 (spack.test.spec_dag.SpecDagTest method), test_source_files() (spack.test.environment.EnvironmentTest 371 method), 361 test_unsatisfiable_compiler_flag() test_spaces_between_dependences() (spack.test.spec_semantics.SpecSematicsTest (spack.test.spec_syntax.SpecSyntaxTest method), 372 method), 373 test_unsatisfiable_compiler_flag_mismatch() test_spaces_between_options() (spack.test.spec_semantics.SpecSematicsTest (spack.test.spec_syntax.SpecSyntaxTest method), 372 method), 373 test_unsatisfiable_compiler_version() test_spec_contains_deps() (spack.test.spec_dag.SpecDagTest method), (spack.test.spec_semantics.SpecSematicsTest 371 method), 372 test_unsatisfiable_variant_mismatch() test_sphinx_beta_style() (spack.test.url_parse.UrlParseTest (spack.test.spec_semantics.SpecSematicsTest method), 377 method), 372 test_stable_suffix() (spack.test.url_parse.UrlParseTest test_unsatisfiable_variants() method), 377 (spack.test.spec_semantics.SpecSematicsTest test_suffixes() (spack.test.modules.TclTests method), 367 method), 372 test_suite3270_version() (spack.test.url_parse.UrlParseTest test_unsatisfiable_version() method), 377 (spack.test.spec_dag.SpecDagTest method), test_svn_mirror() (spack.test.mirror.MirrorTest method), 371 365 test_unset() (spack.test.environment.EnvironmentTest test_synergy_version() (spack.test.url_parse.UrlParseTest method), 361 method), 377 test_update_dictionary_extending_list() test_target_match() (spack.test.multimethod.MultiMethodTest (spack.test.modules.HelperFunctionsTests method), 367 method), 366 test_three_segments() (spack.test.versions.VersionsTest test_url_mirror() (spack.test.mirror.MirrorTest method), method), 378 365 test_transaction() (spack.test.lock.LockTest method), 364 test_url_versions() (spack.test.package_sanity.PackageSanityTest test_transaction_with_context_manager() method), 368 (spack.test.lock.LockTest method), 364 test_user_back_end_input() test_transaction_with_context_manager_and_exception() (spack.test.architecture.ArchitectureTest (spack.test.lock.LockTest method), 364 method), 357 test_transaction_with_exception() test_user_defaults() (spack.test.architecture.ArchitectureTest (spack.test.lock.LockTest method), 364 method), 357 test_transitive_chain() (spack.test.optional_deps.ConcretizeTesttest_user_front_end_input() method), 368 (spack.test.architecture.ArchitectureTest test_two_segments() (spack.test.versions.VersionsTest method), 357 method), 378 test_user_input_combination() test_undefined_mpi_version() (spack.test.architecture.ArchitectureTest (spack.test.multimethod.MultiMethodTest method), 357 method), 367 test_vcheck_mode() (spack.test.cc.CompilerTest test_underscores() (spack.test.versions.VersionsTest method), 358 method), 379 test_version_all_dots() (spack.test.url_parse.UrlParseTest test_uninstall() (spack.test.cmd.uninstall.TestUninstall method), 377 method), 356 test_version_developer_that_hates_us_format() test_union_with_containment() (spack.test.url_parse.UrlParseTest method), (spack.test.versions.VersionsTest method), 377 379 test_version_dos2unix() (spack.test.url_parse.UrlParseTest test_unknown() (spack.test.build_system_guess.InstallTest method), 377 method), 357

480 Index Spack Documentation, Release 0.9 test_version_github() (spack.test.url_parse.UrlParseTest test_write_list_in_memory() method), 377 (spack.test.config.ConfigTest method), 360 test_version_github_with_high_patch_number() test_write_lock_timeout_on_read() (spack.test.url_parse.UrlParseTest method), (spack.test.lock.LockTest method), 364 377 test_write_lock_timeout_on_read_2() test_version_internal_dash() (spack.test.lock.LockTest method), 364 (spack.test.url_parse.UrlParseTest method), test_write_lock_timeout_on_read_3() 377 (spack.test.lock.LockTest method), 364 test_version_overlap() (spack.test.multimethod.MultiMethodTesttest_write_lock_timeout_on_write() method), 367 (spack.test.lock.LockTest method), 364 test_version_range_satisfaction() test_write_lock_timeout_on_write_2() (spack.test.versions.VersionsTest method), (spack.test.lock.LockTest method), 364 379 test_write_lock_timeout_on_write_3() test_version_range_satisfaction_in_lists() (spack.test.lock.LockTest method), 364 (spack.test.versions.VersionsTest method), test_write_lock_timeout_with_multiple_readers_2_1() 379 (spack.test.lock.LockTest method), 364 test_version_ranges() (spack.test.versions.VersionsTest test_write_lock_timeout_with_multiple_readers_2_2() method), 379 (spack.test.lock.LockTest method), 364 test_version_regular() (spack.test.url_parse.UrlParseTest test_write_lock_timeout_with_multiple_readers_3_1() method), 377 (spack.test.lock.LockTest method), 364 test_version_single_digit() test_write_lock_timeout_with_multiple_readers_3_2() (spack.test.url_parse.UrlParseTest method), (spack.test.lock.LockTest method), 364 377 test_write_to_same_priority_file() test_version_sourceforge_download() (spack.test.config.ConfigTest method), 360 (spack.test.url_parse.UrlParseTest method), test_wwwoffle_version() (spack.test.url_parse.UrlParseTest 377 method), 377 test_version_underscore_separator() test_xaw3d_version() (spack.test.url_parse.UrlParseTest (spack.test.url_parse.UrlParseTest method), method), 377 377 test_yaml_round_trip() (spack.test.provider_index.ProviderIndexTest test_virtual_dep_match() method), 369 (spack.test.multimethod.MultiMethodTest test_yaml_subdag() (spack.test.spec_yaml.SpecYamlTest method), 367 method), 373 test_virtual_index() (spack.test.spec_semantics.SpecSematicsTesttest_yet_another_erlang_version_style() method), 372 (spack.test.url_parse.UrlParseTest method), test_virtual_is_fully_expanded_for_callpath() 377 (spack.test.concretize.ConcretizeTest method), test_yet_another_version() 359 (spack.test.url_parse.UrlParseTest method), test_virtual_is_fully_expanded_for_mpileaks() 377 (spack.test.concretize.ConcretizeTest method), TestCase (class in spack.cmd.test_install), 342 359 TestInstallTest (class in spack.test.cmd.test_install), 356 test_way_too_many_spaces() TestModule (class in spack.test.cmd.module), 355 (spack.test.spec_syntax.SpecSyntaxTest TestResult (class in spack.cmd.test_install), 342 method), 373 TestSuite (class in spack.cmd.test_install), 342 test_write_and_read_cache_file() TestUninstall (class in spack.test.cmd.uninstall), 356 (spack.test.file_cache.FileCacheTest method), timeout_read() (spack.test.lock.LockTest method), 364 362 timeout_write() (spack.test.lock.LockTest method), 364 test_write_and_write_cache_file() to_dict() (spack.architecture.Arch method), 385 (spack.test.file_cache.FileCacheTest method), to_dict() (spack.architecture.OperatingSystem method), 362 385 test_write_key_in_memory() to_dict() (spack.database.InstallRecord method), 394 (spack.test.config.ConfigTest method), 360 to_dict() (spack.spec.CompilerSpec method), 426 test_write_key_to_disk() (spack.test.config.ConfigTest to_dict() (spack.version.VersionList method), 439 method), 360 to_node_dict() (spack.spec.Spec method), 430

Index 481 Spack Documentation, Release 0.9 to_yaml() (spack.provider_index.ProviderIndex method), update() (spack.version.VersionList method), 439 421 update_args() (spack.environment.NameModifier to_yaml() (spack.spec.Spec method), 430 method), 398 Token (class in spack.parse), 419 update_args() (spack.environment.NameValueModifier token() (spack.parse.Lexer method), 419 method), 399 tokens (spack.modules.EnvModule attribute), 406 update_config() (in module spack.config), 392 topological_sort() (in module spack.graph), 405 update_packages() (spack.test.concretize_preferences.ConcretizePreferencesTest transform_path() (in module spack.cmd.view), 345 method), 359 transitive_inc_path() (spack.package.CMakePackage upper_tokens (spack.modules.EnvModule attribute), 407 method), 410 url_for_version() (spack.package.Package method), 417 traverse() (spack.spec.Spec method), 430 url_parse() (in module spack.cmd.url_parse), 343 traverse() (spack.test.cmd.test_install.MockSpec url_version() (spack.package.Package method), 417 method), 356 UrlExtrapolateTest (class in spack.test.url_extrapolate), traverse_with_deptype() (spack.spec.Spec method), 430 375 tree() (spack.spec.Spec method), 431 URLFetchStrategy (class in spack.fetch_strategy), 402 try_fetch() (spack.test.git_fetch.GitFetchTest method), UrlParseError, 436 362 UrlParseTest (class in spack.test.url_parse), 375 try_fetch() (spack.test.hg_fetch.HgFetchTest method), urls() (in module spack.cmd.urls), 344 363 use() (in module spack.cmd.use), 344 try_fetch() (spack.test.svn_fetch.SvnFetchTest method), use_cray_compiler_names() (in module spack.package), 374 418 use_name (spack.modules.EnvModule attribute), 407 U use_tmp() (in module spack.test.stage), 374 UnavailableCompilerVersionError, 389 underscored (spack.version.Version attribute), 438 V UndetectableNameError, 436 valid_compiler_flags() (spack.spec.FlagMap static UndetectableVersionError, 436 method), 427 unexpected_token() (spack.parse.Parser method), 419 valid_fully_qualified_module_name() (in module uninstall() (in module spack.cmd.uninstall), 343 spack.util.naming), 381 union() (spack.version.Version method), 438 valid_module_name() (in module spack.util.naming), 381 union() (spack.version.VersionList method), 439 validate() (in module spack.environment), 399 union() (spack.version.VersionRange method), 439 validate_fully_qualified_module_name() (in module UnknownNamespaceError, 424 spack.util.naming), 381 UnknownPackageError, 424 validate_module_name() (in module spack.util.naming), UnknownVariantError, 431 381 unload() (in module spack.cmd.unload), 343 validate_names() (spack.spec.Spec method), 431 UnsatisfiableArchitectureSpecError, 432 validate_package_url() (in module spack.package), 418 UnsatisfiableCompilerFlagSpecError, 432 validate_scope() (in module spack.config), 392 UnsatisfiableCompilerSpecError, 432 validate_section() (in module spack.config), 392 UnsatisfiableDependencySpecError, 432 validate_section_name() (in module spack.config), 392 UnsatisfiableProviderSpecError, 432 Variant (class in spack.variant), 437 UnsatisfiableSpecError, 432 variant() (in module spack.directives), 395 UnsatisfiableSpecNameError, 432 variant() (spack.spec.SpecParser method), 431 UnsatisfiableVariantSpecError, 432 variant_compare() (spack.preferred_packages.PreferredPackages UnsatisfiableVersionSpecError, 432 method), 420 unset() (spack.environment.EnvironmentModifications VariantMap (class in spack.spec), 432 method), 398 VariantSpec (class in spack.spec), 433 UnsetEnv (class in spack.environment), 399 VCSFetchStrategy (class in spack.fetch_strategy), 403 UnsupportedCompilerError, 432 ver() (in module spack.version), 439 UnsupportedPlatformError, 400 Version (class in spack.version), 438 unuse() (in module spack.cmd.unuse), 343 version (spack.compiler.Compiler attribute), 388 up_to() (spack.version.Version method), 438 version (spack.package.Package attribute), 417 update() (spack.provider_index.ProviderIndex method), version (spack.spec.CompilerSpec attribute), 426 421 version (spack.spec.Spec attribute), 431

482 Index Spack Documentation, Release 0.9 version() (in module spack.directives), 394 version() (spack.spec.SpecParser method), 431 version_compare() (spack.preferred_packages.PreferredPackages method), 420 version_list() (spack.spec.SpecParser method), 431 version_urls (spack.package.Package attribute), 417 VersionFetchError, 418 VersionList (class in spack.version), 439 VersionRange (class in spack.version), 438 versions() (in module spack.cmd.versions), 344 VersionsTest (class in spack.test.versions), 377 view() (in module spack.cmd.view), 345 virtual (spack.spec.Spec attribute), 431 virtual_dependencies() (spack.spec.Spec method), 431 visitor_add() (in module spack.cmd.view), 345 visitor_check() (in module spack.cmd.view), 345 visitor_hard() (in module spack.cmd.view), 345 visitor_hardlink() (in module spack.cmd.view), 345 visitor_remove() (in module spack.cmd.view), 345 visitor_rm() (in module spack.cmd.view), 345 visitor_soft() (in module spack.cmd.view), 345 visitor_statlink() (in module spack.cmd.view), 345 visitor_status() (in module spack.cmd.view), 345 visitor_symlink() (in module spack.cmd.view), 345 W wait() (spack.util.multiproc.Barrier method), 381 when (class in spack.multimethod), 408 which() (in module spack.util.executable), 381 wildcard() (spack.version.Version method), 438 wildcard_version() (in module spack.url), 437 write() (spack.graph.AsciiGraph method), 405 write() (spack.modules.EnvModule method), 407 write_license_file() (in module spack.hooks.licensing), 351 write_section() (spack.config.ConfigScope method), 391 write_spec() (spack.directory_layout.YamlDirectoryLayout method), 397 write_transaction() (spack.database.Database method), 393 write_transaction() (spack.file_cache.FileCache method), 404 X Xl (class in spack.compilers.xl), 349 Y YamlDirectoryLayout (class in spack.directory_layout), 396 YamlTest (class in spack.test.yaml), 379

Index 483