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 -R should be used with Spack to maintain this colorization. E.g.:

$ spack find | less -R

It is recommended that the following be put in your .bashrc file:

alias less='less -R'

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
abinit                           mxnet                                  r-catools
abyss                            nag                                    r-cdcfluview
accfft                           nalu                                   r-cellranger
ack                              nalu-wind                              r-cghflasso
activeharmony                    namd                                   r-checkmate
adept-utils                      nano                                   r-checkpoint
adios                            nanoflann                              r-chemometrics
adios2                           nanopb                                 r-chron
adlbx                            nasm                                   r-circlize
adol-c                           nauty                                  r-class
aegean                           ncbi-magicblast                        r-classint
albany                           ncbi-rmblastn                          r-cli
albert                           ncbi-toolkit                           r-clipr
alglib                           nccl                                   r-cluster
allinea-forge                    nccmp                                  r-clusterprofiler
allinea-reports                  ncdu                                   r-cner
allpaths-lg                      ncftp                                  r-coda
alquimia                         ncl                                    r-codetools
alsa-lib                         nco                                    r-coin
amg                              ncurses                                r-colorspace
amg2013                          ncview                                 r-complexheatmap
amp                              ndiff                                  r-corpcor
ampliconnoise                    nek5000                                r-corrplot
amrex                            nekbone                                r-covr
amrvis                           nekcem                                 r-cowplot
andi                             nektar                                 r-crayon
angsd                            neovim                                 r-crosstalk
ant                              netcdf                                 r-ctc
antlr                            netcdf-cxx                             r-cubature
ants                             netcdf-cxx4                            r-cubist
ape                              netcdf-fortran                         r-curl
apex                             netgauge                               r-data-table
apple-libunwind                  netgen                                 r-dbi
applewmproto                     netlib-lapack                          r-dbplyr
appres                           netlib-scalapack                       r-delayedarray
apr                              netlib-xblas                           r-deldir
apr-util                         nettle                                 r-dendextend
aragorn                          neuron                                 r-deoptim
archer                           nextflow                               r-deoptimr
argp-standalone                  nfft                                   r-deseq
argtable                         nghttp2                                r-deseq2
arlecore                         nginx                                  r-desolve
armadillo                        ngmlr                                  r-devtools
arpack-ng                        ninja                                  r-diagrammer
arrow                            ninja-fortran                          r-dicekriging
ascent                           nlohmann-json                          r-dichromat
asciidoc                         nlopt                                  r-diffusionmap
aspa                             nmap                                   r-digest
aspcud                           nnvm                                   r-diptest
aspect                           node-js                                r-dirichletmultinomial
aspell                           notmuch                                r-dismo
aspell6-de                       npb                                    r-dnacopy
aspell6-en                       npm                                    r-do-db
aspell6-es                       npth                                   r-domc
aspera-cli                       nspr                                   r-doparallel
assimp                           numactl                                r-dorng
astra                            numdiff                                r-dose
astral                           nut                                    r-downloader
astyle                           nwchem                                 r-dplyr
atk                              ocaml                                  r-dt
atlas                            occa                                   r-dtw
atom-dft                         oce                                    r-dygraphs
atompaw                          oclint                                 r-e1071
atop                             oclock                                 r-edger
augustus                         octave                                 r-ellipse
autoconf                         octave-optim                           r-ensembldb
autodock-vina                    octave-splines                         r-ergm
autogen                          octave-struct                          r-evaluate
automaded                        octopus                                r-expm
automake                         of-adios-write                         r-factoextra
axel                             of-precice                             r-factominer
axl                              omega-h                                r-fastcluster
bamtools                         ompss                                  r-fastmatch
bamutil                          ompt-openmp                            r-ff
barrnap                          oniguruma                              r-fftwtools
bash                             ont-albacore                           r-fgsea
bash-completion                  opa-psm2                               r-filehash
bats                             opam                                   r-findpython
bazel                            opari2                                 r-fit-models
bbcp                             openbabel                              r-flashclust
bbmap                            openblas                               r-flexclust
bc                               opencoarrays                           r-flexmix
bcftools                         opencv                                 r-fnn
bcl2fastq2                       openexr                                r-forcats
bdftopcf                         openfast                               r-foreach
bdw-gc                           openfoam-com                           r-forecast
bear                             openfoam-org                           r-foreign
beast1                           openfst                                r-formatr
beast2                           opengl                                 r-formula
bedops                           openglu                                r-fpc
bedtools2                        openjpeg                               r-fracdiff
beforelight                      openmc                                 r-futile-logger
benchmark                        openmpi                                r-futile-options
berkeley-db                      opennurbs                              r-gbm
bertini                          openpmd-api                            r-gcrma
bib2xhtml                        openscenegraph                         r-gdata
bigreqsproto                     openslide                              r-gdsfmt
binutils                         openspeedshop                          r-geiger
bioawk                           openspeedshop-utils                    r-genefilter
biopieces                        openssh                                r-genelendatabase
bismark                          openssl                                r-geneplotter
bison                            opium                                  r-genie3
bitmap                           opus                                   r-genomeinfodb
blasr                            orfm                                   r-genomeinfodbdata
blasr-libcpp                     orthofinder                            r-genomicalignments
blast-plus                       orthomcl                               r-genomicfeatures
blat                             osu-micro-benchmarks                   r-genomicranges
blaze                            otf                                    r-geomorph
bliss                            otf2                                   r-geoquery
blitz                            p4est                                  r-geosphere
bmake                            p7zip                                  r-getopt
bml                              pacbio-daligner                        r-getoptlong
bohrium                          pacbio-damasker                        r-ggally
bookleaf-cpp                     pacbio-dazz-db                         r-ggbio
boost                            pacbio-dextractor                      r-ggdendro
boostmplcartesianproduct         pagit                                  r-ggjoy
bowtie                           pagmo                                  r-ggmap
bowtie2                          paml                                   r-ggplot2
boxlib                           panda                                  r-ggpubr
bpp-core                         pandaseq                               r-ggrepel
bpp-phyl                         pango                                  r-ggridges
bpp-seq                          pangomm                                r-ggsci
bpp-suite                        papi                                   r-ggvis
bracken                          papyrus                                r-gistr
braker                           paradiseo                              r-git2r
branson                          parallel                               r-glimma
breakdancer                      parallel-netcdf                        r-glmnet
breseq                           paraver                                r-globaloptions
brigand                          paraview                               r-glue
bsseeker2                        parmetis                               r-gmodels
bucky                            parmgridgen                            r-gmp
bumpversion                      parquet                                r-go-db
busco                            parsimonator                           r-googlevis
butter                           parsplice                              r-goplot
bwa                              partitionfinder                        r-gosemsim
bwtool                           patch                                  r-gostats
byobu                            patchelf                               r-gplots
bzip2                            pathfinder                             r-graph
c-blosc                          pax-utils                              r-gridbase
c-lime                           pbbam                                  r-gridextra
caffe                            pbmpi                                  r-gseabase
cairo                            pcma                                   r-gss
cairomm                          pcre                                   r-gsubfn
caliper                          pcre2                                  r-gtable
callpath                         pdf2svg                                r-gtools
camellia                         pdftk                                  r-gtrellis
candle-benchmarks                pdsh                                   r-gviz
cantera                          pdt                                    r-haven
canu                             pegtl                                  r-hexbin
cap3                             pennant                                r-highr
cares                            percept                                r-hmisc
cask                             perl                                   r-hms
casper                           perl-algorithm-diff                    r-htmltable
catalyst                         perl-app-cmd                           r-htmltools
catch                            perl-array-utils                       r-htmlwidgets
cbench                           perl-b-hooks-endofscope                r-httpuv
cblas                            perl-bio-perl                          r-httr
cbtf                             perl-bit-vector                        r-hwriter
cbtf-argonavis                   perl-cairo                             r-hypergraph
cbtf-argonavis-gui               perl-capture-tiny                      r-ica
cbtf-krell                       perl-carp-clan                         r-igraph
cbtf-lanl                        perl-class-data-inheritable            r-illuminaio
ccache                           perl-class-inspector                   r-impute
cctools                          perl-class-load                        r-influencer
cdbfasta                         perl-class-load-xs                     r-inline
cdd                              perl-compress-raw-bzip2                r-interactivedisplaybase
cddlib                           perl-compress-raw-zlib                 r-ipred
cdhit                            perl-contextual-return                 r-iranges
cdo                              perl-cpan-meta-check                   r-irdisplay
ceed                             perl-data-optlist                      r-irkernel
cereal                           perl-data-stag                         r-irlba
ceres-solver                     perl-dbd-mysql                         r-iso
cfitsio                          perl-dbfile                            r-iterators
cgal                             perl-dbi                               r-janitor
cgm                              perl-devel-cycle                       r-jaspar2018
cgns                             perl-devel-globaldestruction           r-jomo
charliecloud                     perl-devel-overloadinfo                r-jpeg
charm                            perl-devel-stacktrace                  r-jsonlite
check                            perl-digest-md5                        r-kegg-db
chlorop                          perl-dist-checkconflicts               r-kegggraph
chombo                           perl-encode-locale                     r-keggrest
cistem                           perl-eval-closure                      r-kernlab
cityhash                         perl-exception-class                   r-kernsmooth
clamr                            perl-exporter-tiny                     r-kknn
clapack                          perl-extutils-depends                  r-knitr
cleaveland4                      perl-extutils-makemaker                r-labeling
cleverleaf                       perl-extutils-pkgconfig                r-lambda-r
clfft                            perl-file-copy-recursive               r-laplacesdemon
clhep                            perl-file-listing                      r-lars
clingo                           perl-file-pushd                        r-lattice
cloc                             perl-file-sharedir-install             r-latticeextra
cloog                            perl-file-slurp-tiny                   r-lava
cloverleaf                       perl-file-slurper                      r-lazyeval
cloverleaf3d                     perl-file-which                        r-leaflet
clustalo                         perl-font-ttf                          r-leaps
clustalw                         perl-gd                                r-learnbayes
cmake                            perl-gd-graph                          r-lhs
cmocka                           perl-gd-text                           r-limma
cmor                             perl-graph                             r-lme4
cnmem                            perl-graph-readwrite                   r-lmtest
cnpy                             perl-html-parser                       r-locfit
cntk                             perl-html-tagset                       r-log4r
cntk1bitsgd                      perl-http-cookies                      r-lpsolve
codar-cheetah                    perl-http-daemon                       r-lsei
coevp                            perl-http-date                         r-lubridate
cohmm                            perl-http-message                      r-magic
coinhsl                          perl-http-negotiate                    r-magrittr
colm                             perl-inline                            r-makecdfenv
colordiff                        perl-inline-c                          r-maldiquant
comd                             perl-intervaltree                      r-mapproj
compiz                           perl-io-compress                       r-maps
compositeproto                   perl-io-html                           r-maptools
conduit                          perl-io-sessiondata                    r-markdown
constype                         perl-io-socket-ssl                     r-mass
converge                         perl-io-string                         r-matr
coreutils                        perl-json                              r-matrix
corset                           perl-libwww-perl                       r-matrixmodels
cosmomc                          perl-list-moreutils                    r-matrixstats
cosp2                            perl-log-log4perl                      r-mclust
cp2k                             perl-lwp                               r-mcmcglmm
cppad                            perl-lwp-mediatypes                    r-mco
cppcheck                         perl-lwp-protocol-https                r-mda
cpprestsdk                       perl-math-cdf                          r-memoise
cppunit                          perl-math-cephes                       r-mergemaid
cppzmq                           perl-math-matrixreal                   r-methodss3
cpu-features                     perl-module-build                      r-mgcv
cpuinfo                          perl-module-implementation             r-mgraster
cram                             perl-module-runtime                    r-mice
cryptopp                         perl-module-runtime-conflicts          r-mime
cscope                           perl-moose                             r-minfi
csdp                             perl-mozilla-ca                        r-minqa
ctffind                          perl-mro-compat                        r-misc3d
cub                              perl-namespace-clean                   r-mitml
cube                             perl-net-http                          r-mixtools
cuda                             perl-net-scp-expect                    r-mlbench
cuda-memtest                     perl-net-ssleay                        r-mlinterfaces
cudnn                            perl-package-deprecationmanager        r-mlr
cufflinks                        perl-package-stash                     r-mlrmbo
cups                             perl-package-stash-xs                  r-mmwrweek
curl                             perl-padwalker                         r-mnormt
cvs                              perl-parallel-forkmanager              r-modelmetrics
czmq                             perl-params-util                       r-modelr
dakota                           perl-parse-recdescent                  r-modeltools
daligner                         perl-pdf-api2                          r-mpm
damageproto                      perl-pegex                             r-msnbase
damselfly                        perl-perl6-slurp                       r-multcomp
darshan-runtime                  perl-perlio-gzip                       r-multtest
darshan-util                     perl-perlio-utf8-strict                r-munsell
dash                             perl-soap-lite                         r-mvtnorm
datamash                         perl-star-fusion                       r-mzid
dataspaces                       perl-statistics-descriptive            r-mzr
davix                            perl-statistics-pca                    r-nanotime
dbus                             perl-sub-exporter                      r-ncbit
dealii                           perl-sub-exporter-progressive          r-ncdf4
dealii-parameter-gui             perl-sub-identify                      r-network
deconseq-standalone              perl-sub-install                       r-networkd3
dejagnu                          perl-sub-name                          r-nlme
delly2                           perl-sub-uplevel                       r-nloptr
denovogear                       perl-svg                               r-nmf
dia                              perl-swissknife                        r-nnet
dialign-tx                       perl-task-weaken                       r-nnls
diamond                          perl-term-readkey                      r-nor1mix
diffsplice                       perl-test-cleannamespaces              r-np
direnv                           perl-test-deep                         r-numderiv
discovar                         perl-test-differences                  r-oligoclasses
discovardenovo                   perl-test-exception                    r-oo
dislin                           perl-test-fatal                        r-openssl
dlpack                           perl-test-memory-cycle                 r-org-hs-eg-db
dmd                              perl-test-most                         r-organismdbi
dmlc-core                        perl-test-needs                        r-packrat
dmtcp                            perl-test-requires                     r-pacman
dmxproto                         perl-test-requiresinternet             r-pamr
docbook-xml                      perl-test-warn                         r-pan
docbook-xsl                      perl-test-warnings                     r-parallelmap
dos2unix                         perl-text-csv                          r-paramhelpers
double-conversion                perl-text-diff                         r-party
doxygen                          perl-text-simpletable                  r-partykit
dri2proto                        perl-text-soundex                      r-pathview
dri3proto                        perl-text-unidecode                    r-pbapply
dsdp                             perl-time-hires                        r-pbdzmq
dsrc                             perl-time-piece                        r-pbkrtest
dtcmp                            perl-try-tiny                          r-pcamethods
dyninst                          perl-uri                               r-pcapp
ea-utils                         perl-uri-escape                        r-permute
easybuild                        perl-version                           r-pfam-db
ebms                             perl-want                              r-phangorn
eccodes                          perl-www-robotrules                    r-phantompeakqualtools
eclipse-gcj-parser               perl-xml-libxml                        r-phyloseq
ecp-proxy-apps                   perl-xml-parser                        r-picante
ed                               perl-xml-parser-lite                   r-pkgconfig
editres                          perl-xml-simple                        r-pkgmaker
eigen                            perl-yaml-libyaml                      r-plogr
elasticsearch                    petsc                                  r-plot3d
elemental                        pexsi                                  r-plotly
elfutils                         pfft                                   r-plotrix
elk                              pflotran                               r-pls
elpa                             pfunit                                 r-plyr
emacs                            pgdspider                              r-pmcmr
emboss                           pgi                                    r-png
encodings                        pgmath                                 r-powerlaw
environment-modules              phantompeakqualtools                   r-prabclus
eospac                           phast                                  r-praise
er                               phasta                                 r-preprocesscore
es                               phist                                  r-prettyunits
esmf                             phylip                                 r-proc
essl                             picard                                 r-prodlim
ethminer                         pidx                                   r-progress
etsf-io                          pigz                                   r-protgenerics
everytrace                       pilon                                  r-proto
everytrace-example               pindel                                 r-proxy
evieext                          piranha                                r-pryr
exabayes                         pism                                   r-psych
examinimd                        pixman                                 r-ptw
exampm                           pkg-config                             r-purrr
exasp2                           pkgconf                                r-quadprog
exmcutils                        planck-likelihood                      r-quantmod
exodusii                         plasma                                 r-quantreg
exonerate                        platypus                               r-quantro
expat                            plink                                  r-qvalue
expect                           plplot                                 r-r6
express                          plumed                                 r-randomforest
extrae                           pmgr-collective                        r-ranger
exuberant-ctags                  pmix                                   r-rappdirs
f90cache                         pnfft                                  r-raster
fabtests                         pngwriter                              r-rbgl
falcon                           pnmpi                                  r-rbokeh
farmhash                         poamsa                                 r-rcolorbrewer
fast-gbs                         pocl                                   r-rcpp
fast-global-file-status          polymake                               r-rcpparmadillo
fasta                            poppler                                r-rcppblaze
fastjar                          poppler-data                           r-rcppcctz
fastmath                         porta                                  r-rcppcnpy
fastme                           portage                                r-rcppeigen
fastphase                        postgresql                             r-rcppprogress
fastq-screen                     ppl                                    r-rcurl
fastqc                           prank                                  r-rda
fastqvalidator                   precice                                r-readr
fasttree                         presentproto                           r-readxl
fastx-toolkit                    preseq                                 r-registry
fenics                           price                                  r-rematch
fermi                            primer3                                r-reordercluster
fermikit                         prinseq-lite                           r-reportingtools
fermisciencetools                printproto                             r-repr
ferret                           prng                                   r-reprex
ffmpeg                           probconsrna                            r-reshape
fftw                             prodigal                               r-reshape2
fimpute                          proj                                   r-rex
findutils                        protobuf                               r-rgdal
fio                              proxymngr                              r-rgenoud
fish                             pruners-ninja                          r-rgeos
fixesproto                       ps-lite                                r-rgl
flac                             psi4                                   r-rgooglemaps
flang                            pslib                                  r-rgraphviz
flann                            psm                                    r-rhdf5
flash                            psmc                                   r-rhtslib
flatbuffers                      pstreams                               r-rinside
flecsale                         pugixml                                r-rjags
flecsi                           pumi                                   r-rjava
flex                             pv                                     r-rjson
flint                            pvm                                    r-rjsonio
flit                             pxz                                    r-rlang
fltk                             py-3to2                                r-rmarkdown
flux-core                        py-4suite-xml                          r-rminer
flux-sched                       py-abipy                               r-rmpfr
fluxbox                          py-adios                               r-rmpi
fmt                              py-affine                              r-rmysql
foam-extend                      py-alabaster                           r-rngtools
folly                            py-apache-libcloud                     r-robustbase
font-adobe-100dpi                py-apipkg                              r-rocr
font-adobe-75dpi                 py-appdirs                             r-rodbc
font-adobe-utopia-100dpi         py-appnope                             r-rots
font-adobe-utopia-75dpi          py-apscheduler                         r-roxygen2
font-adobe-utopia-type1          py-argcomplete                         r-rpart
font-alias                       py-argparse                            r-rpart-plot
font-arabic-misc                 py-ase                                 r-rpostgresql
font-bh-100dpi                   py-asn1crypto                          r-rprojroot
font-bh-75dpi                    py-astroid                             r-rsamtools
font-bh-lucidatypewriter-100dpi  py-astropy                             r-rsnns
font-bh-lucidatypewriter-75dpi   py-attrs                               r-rsolnp
font-bh-ttf                      py-autopep8                            r-rsqlite
font-bh-type1                    py-avro                                r-rstan
font-bitstream-100dpi            py-avro-json-serializer                r-rstudioapi
font-bitstream-75dpi             py-babel                               r-rtracklayer
font-bitstream-speedo            py-backcall                            r-rtsne
font-bitstream-type1             py-backports-abc                       r-rvcheck
font-cronyx-cyrillic             py-backports-functools-lru-cache       r-rvest
font-cursor-misc                 py-backports-shutil-get-terminal-size  r-rzmq
font-daewoo-misc                 py-backports-ssl-match-hostname        r-s4vectors
font-dec-misc                    py-basemap                             r-samr
font-ibm-type1                   py-bcbio-gff                           r-sandwich
font-isas-misc                   py-beautifulsoup4                      r-scales
font-jis-misc                    py-binwalk                             r-scatterplot3d
font-micro-misc                  py-biom-format                         r-sdmtools
font-misc-cyrillic               py-biopython                           r-segmented
font-misc-ethiopic               py-bitarray                            r-selectr
font-misc-meltho                 py-bitstring                           r-seqinr
font-misc-misc                   py-bleach                              r-seqlogo
font-mutt-misc                   py-blessings                           r-seurat
font-schumacher-misc             py-bokeh                               r-sf
font-screen-cyrillic             py-boltons                             r-sfsmisc
font-sony-misc                   py-bottleneck                          r-shape
font-sun-misc                    py-breakseq2                           r-shiny
font-util                        py-brian                               r-shinydashboard
font-winitzki-cyrillic           py-brian2                              r-shortread
font-xfree86-type1               py-bsddb3                              r-siggenes
fontcacheproto                   py-bx-python                           r-simpleaffy
fontconfig                       py-cartopy                             r-sm
fontsproto                       py-cclib                               r-smoof
fonttosfnt                       py-cdat-lite                           r-sn
fp16                             py-cdo                                 r-snow
fpc                              py-certifi                             r-snowfall
fr-hit                           py-cffi                                r-snprelate
freebayes                        py-chardet                             r-som
freeglut                         py-checkm-genome                       r-somaticsignatures
freetype                         py-cheetah                             r-sourcetools
fseq                             py-click                               r-sp
fsl                              py-cligj                               r-sparsem
fslsfonts                        py-cloudpickle                         r-spatial
fstobdf                          py-cnvkit                              r-spdep
ftgl                             py-cogent                              r-speedglm
funhpc                           py-colorama                            r-spem
fyba                             py-colormath                           r-splitstackshape
gapbs                            py-configparser                        r-sqldf
gapcloser                        py-counter                             r-squash
gapfiller                        py-coverage                            r-stanheaders
gasnet                           py-cpuinfo                             r-statmod
gatk                             py-crispresso                          r-statnet-common
gaussian                         py-crossmap                            r-stringi
gawk                             py-cryptography                        r-stringr
gblocks                          py-csvkit                              r-strucchange
gcc                              py-current                             r-subplex
gccmakedep                       py-cutadapt                            r-summarizedexperiment
gccxml                           py-cvxopt                              r-survey
gconf                            py-cycler                              r-survival
gcta                             py-cython                              r-sva
gdal                             py-dask                                r-tarifx
gdb                              py-dateutil                            r-tclust
gdbm                             py-dbf                                 r-tensora
gdk-pixbuf                       py-decorator                           r-testit
gdl                              py-deeptools                           r-testthat
geant4                           py-dendropy                            r-tfbstools
gearshifft                       py-dill                                r-tfmpvalue
gemmlowp                         py-discover                            r-th-data
genemark-et                      py-dlcpar                              r-threejs
genomefinisher                   py-docopt                              r-tibble
genometools                      py-docutils                            r-tidycensus
geopm                            py-doxypy                              r-tidyr
geos                             py-doxypypy                            r-tidyselect
gettext                          py-dryscrape                           r-tidyverse
gflags                           py-dxchange                            r-tiff
ghost                            py-dxfile                              r-tigris
ghostscript                      py-easybuild-easyblocks                r-timedate
ghostscript-fonts                py-easybuild-easyconfigs               r-tmixclust
giflib                           py-easybuild-framework                 r-topgo
git                              py-edffile                             r-trimcluster
git-imerge                       py-editdistance                        r-truncnorm
git-lfs                          py-elasticsearch                       r-trust
gl2ps                            py-elephant                            r-tseries
glew                             py-emcee                               r-tsne
glfmultiples                     py-entrypoints                         r-ttr
glib                             py-enum34                              r-udunits2
glibmm                           py-epydoc                              r-units
glimmer                          py-espresso                            r-utf8
glm                              py-espressopp                          r-utils
global                           py-et-xmlfile                          r-uuid
globalarrays                     py-eventlet                            r-variantannotation
globus-toolkit                   py-execnet                             r-varselrf
glog                             py-fastaindex                          r-vcd
gloo                             py-fasteners                           r-vegan
glpk                             py-faststructure                       r-vgam
glproto                          py-fiscalyear                          r-vipor
glvis                            py-flake8                              r-viridis
gmake                            py-flake8-polyfill                     r-viridislite
gmap-gsnap                       py-flask                               r-visnetwork
gmime                            py-flask-compress                      r-vsn
gmp                              py-flask-socketio                      r-whisker
gmsh                             py-flexx                               r-withr
gnat                             py-fn                                  r-xde
gnu-prolog                       py-fparser                             r-xgboost
gnupg                            py-funcsigs                            r-xlconnect
gnuplot                          py-functools32                         r-xlconnectjars
gnutls                           py-future                              r-xlsx
go                               py-futures                             r-xlsxjars
go-bootstrap                     py-gdbgui                              r-xmapbridge
gobject-introspection            py-genders                             r-xml
googletest                       py-genshi                              r-xml2
gotcha                           py-gevent                              r-xtable
gource                           py-git-review                          r-xts
gperf                            py-git2                                r-xvector
gperftools                       py-gnuplot                             r-yaml
gplates                          py-goatools                            r-yapsa
grackle                          py-gpaw                                r-yaqcaffy
gradle                           py-greenlet                            r-yarn
grandr                           py-griddataformats                     r-zlibbioc
graph500                         py-guidata                             r-zoo
graphicsmagick                   py-guiqwt                              racon
graphlib                         py-h5py                                raft
graphmap                         py-html2text                           ragel
graphviz                         py-html5lib                            raja
grass                            py-htseq                               randfold
grib-api                         py-httpbin                             random123
grnboost                         py-hypothesis                          randrproto
groff                            py-idna                                rankstr
gromacs                          py-igraph                              rapidjson
gsl                              py-illumina-utils                      ravel
gslib                            py-imageio                             raxml
gtkmm                            py-imagesize                           ray
gtkorvo-atl                      py-iminuit                             rdma-core
gtkorvo-cercs-env                py-importlib                           rdp-classifier
gtkorvo-dill                     py-ipaddress                           re2c
gtkorvo-enet                     py-ipdb                                readfq
gtkplus                          py-ipykernel                           readline
gts                              py-ipython                             recordproto
guidance                         py-ipython-genutils                    redset
guile                            py-ipywidgets                          redundans
gurobi                           py-isort                               relion
h5hut                            py-itsdangerous                        rempi
h5part                           py-jdcal                               rename
h5utils                          py-jedi                                rendercheck
h5z-zfp                          py-jinja2                              renderproto
hacckernels                      py-joblib                              repeatmasker
hadoop                           py-jpype                               resourceproto
halc                             py-jsonschema                          revbayes
hapcut2                          py-junit-xml                           rgb
hapdip                           py-jupyter-client                      rhash
haploview                        py-jupyter-console                     rlwrap
harfbuzz                         py-jupyter-core                        rmlab
harminv                          py-jupyter-notebook                    rna-seqc
hdf                              py-keras                               rngstreams
hdf5                             py-kiwisolver                          rockstar
hdf5-blosc                       py-lark-parser                         root
help2man                         py-latexcodec                          rose
hepmc                            py-lazy                                rr
heppdt                           py-lazy-object-proxy                   rsbench
hic-pro                          py-lazy-property                       rsem
highfive                         py-lazyarray                           rstart
highwayhash                      py-libconf                             rsync
hiop                             py-libensemble                         rtags
hisat2                           py-line-profiler                       rtax
hisea                            py-linecache2                          ruby
hmmer                            py-lit                                 ruby-gnuplot
hoomd-blue                       py-llvmlite                            ruby-narray
hpccg                            py-lmfit                               ruby-ronn
hpctoolkit                       py-localcider                          ruby-rubyinline
hpctoolkit-externals             py-locket                              ruby-svn2git
hpgmg                            py-lockfile                            ruby-terminal-table
hpl                              py-logilab-common                      rust
hpx                              py-lrudict                             rust-bindgen
hpx5                             py-lxml                                sabre
hsakmt                           py-lzstring                            sailfish
hstr                             py-macholib                            salmon
htop                             py-machotools                          sambamba
htslib                           py-macs2                               samblaster
httpie                           py-maestrowf                           samrai
hub                              py-mako                                samtools
hunspell                         py-mappy                               sandbox
hwloc                            py-markdown                            sas
hybpiper                         py-markupsafe                          satsuma2
hydra                            py-matplotlib                          savanna
hydrogen                         py-mccabe                              saws
hypre                            py-mdanalysis                          sbt
i3                               py-meep                                scala
ibmisc                           py-memory-profiler                     scalasca
iceauth                          py-methylcode                          scalpel
icedtea                          py-mg-rast-tools                       scan-for-matches
icet                             py-misopy                              scons
ico                              py-mistune                             scorec-core
icu4c                            py-mock                                scorep
id3lib                           py-moltemplate                         scotch
idba                             py-mongo                               scr
igraph                           py-monotonic                           screen
igv                              py-monty                               scripts
igvtools                         py-more-itertools                      scrnsaverproto
ilmbase                          py-mpi4py                              sctk
image-magick                     py-mpmath                              sdl2
imake                            py-multiprocess                        sdl2-image
imp                              py-multiqc                             sed
impute2                          py-mx                                  seqan
infernal                         py-mxnet                               seqprep
inputproto                       py-myhdl                               seqtk
intel                            py-mysqldb1                            serf
intel-daal                       py-natsort                             sessreg
intel-gpu-tools                  py-nbconvert                           setxkbmap
intel-ipp                        py-nbformat                            sga
intel-mkl                        py-neo                                 shapeit
intel-mkl-dnn                    py-nestle                              shared-mime-info
intel-mpi                        py-netcdf4                             shiny-server
intel-parallel-studio            py-netifaces                           shocklibs
intel-tbb                        py-networkx                            shoremap
intel-xed                        py-nose                                shortbred
intltool                         py-nosexcover                          shortstack
ior                              py-numba                               showfont
iozone                           py-numexpr                             shuffile
iperf2                           py-numexpr3                            sickle
iperf3                           py-numpy                               siesta
ipopt                            py-numpydoc                            signalp
isaac                            py-olefile                             signify
isaac-server                     py-ont-fast5-api                       silo
isl                              py-openpmd-validator                   simplemoc
itstool                          py-openpyxl                            simul
itsx                             py-openslide-python                    simulationio
jags                             py-opentuner                           singularity
jansson                          py-ordereddict                         sleef
jasper                           py-oset                                slepc
jbigkit                          py-owslib                              slurm
jchronoss                        py-packaging                           smalt
jdk                              py-palettable                          smproxy
jellyfish                        py-pandas                              snakemake
jemalloc                         py-paramiko                            snap
jmol                             py-partd                               snap-berkeley
jq                               py-pathlib2                            snap-korf
json-c                           py-pathos                              snappy
json-cwx                         py-pathspec                            snbone
json-glib                        py-patsy                               sniffles
jsoncpp                          py-pbr                                 snpeff
judy                             py-pep8-naming                         snphylo
julia                            py-perf                                snptest
k8                               py-performance                         soap2
kahip                            py-periodictable                       soapdenovo-trans
kaiju                            py-petsc4py                            soapdenovo2
kaks-calculator                  py-pexpect                             soapindel
kaldi                            py-phonopy                             soapsnp
kallisto                         py-pickleshare                         sofa-c
kbproto                          py-pil                                 somatic-sniper
kdiff3                           py-pillow                              sortmerna
kealib                           py-pip                                 sosflow
kentutils                        py-pipits                              sowing
kim-api                          py-pkgconfig                           sox
kmergenie                        py-plotly                              spades
kokkos                           py-pluggy                              spark
kraken                           py-ply                                 sparsehash
krb5                             py-pmw                                 sparta
krims                            py-poster                              spdlog
kripke                           py-pox                                 spectrum-mpi
kvasir-mpl                       py-ppft                                speex
kvtree                           py-prettytable                         spglib
laghos                           py-proj                                sph2pipe
lammps                           py-projectq                            spherepack
last                             py-prompt-toolkit                      spindle
latte                            py-protobuf                            spot
launchmon                        py-psutil                              sqlite
lazyten                          py-psyclone                            sqlitebrowser
lbann                            py-ptyprocess                          squid
lbxproxy                         py-pudb                                sra-toolkit
lcals                            py-py                                  sspace-longread
lcms                             py-py2bit                              sspace-standard
ldc                              py-py2cairo                            sst-dumpi
ldc-bootstrap                    py-py2neo                              sst-macro
legion                           py-py4j                                stacks
leveldb                          py-pyani                               staden-io-lib
lftp                             py-pyasn1                              star
libaec                           py-pybedtools                          star-ccm-plus
libaio                           py-pybigwig                            startup-notification
libapplewm                       py-pybind11                            stat
libarchive                       py-pybtex                              stc
libassuan                        py-pybtex-docutils                     stow
libatomic-ops                    py-pychecker                           strace
libbeagle                        py-pycodestyle                         stream
libbeato                         py-pycparser                           strelka
libbsd                           py-pycrypto                            stress
libbson                          py-pycurl                              stringtie
libcanberra                      py-pydatalog                           structure
libcap                           py-pydispatcher                        sublime-text
libceed                          py-pydot                               subread
libcerf                          py-pyelftools                          subversion
libcheck                         py-pyepsg                              suite-sparse
libcint                          py-pyfaidx                             sumaclust
libcircle                        py-pyfasta                             sundials
libconfig                        py-pyfftw                              superlu
libcroco                         py-pyflakes                            superlu-dist
libctl                           py-pygdbmi                             superlu-mt
libdivsufsort                    py-pygments                            supernova
libdmx                           py-pygobject                           sw4lite
libdrm                           py-pygpu                               swap-assembler
libdwarf                         py-pygtk                               swarm
libedit                          py-pylint                              swfft
libelf                           py-pymatgen                            swiftsim
libemos                          py-pyminifier                          swig
libepoxy                         py-pymol                               symengine
libev                            py-pympler                             sympol
libevent                         py-pynn                                sz
libevpath                        py-pypar                               tabix
libfabric                        py-pyparsing                           talloc
libffi                           py-pypeflow                            tantan
libffs                           py-pyprof2html                         tar
libfontenc                       py-pyqi                                targetp
libfs                            py-pyqt                                task
libgcrypt                        py-pyrad                               taskd
libgd                            py-pysam                               tasmanian
libgeotiff                       py-pyscaf                              tassel
libgit2                          py-pyserial                            tau
libgpg-error                     py-pyshp                               tcl
libgpuarray                      py-pyside                              tcl-itcl
libgridxc                        py-pysocks                             tcl-tcllib
libgtextutils                    py-pysqlite                            tcl-tclxml
libharu                          py-pytables                            tclap
libhio                           py-pytest                              tcoffee
libiberty                        py-pytest-cov                          tcptrace
libice                           py-pytest-flake8                       tcsh
libiconv                         py-pytest-httpbin                      tealeaf
libint                           py-pytest-mock                         templight
libjpeg                          py-pytest-runner                       templight-tools
libjpeg-turbo                    py-pytest-xdist                        tetgen
libksba                          py-python-daemon                       tethex
liblbxutil                       py-python-engineio                     texinfo
liblockfile                      py-python-gitlab                       texlive
libmatheval                      py-python-levenshtein                  the-platinum-searcher
libmaxminddb                     py-python-socketio                     the-silver-searcher
libmesh                          py-pythonqwt                           thrift
libmng                           py-pytorch                             thrust
libmongoc                        py-pytz                                tig
libmonitor                       py-pyutilib                            tinyxml
libnbc                           py-pyvcf                               tinyxml2
libnl                            py-pywavelets                          tioga
libnova                          py-pyyaml                              tk
libogg                           py-qtawesome                           tmalign
liboldx                          py-qtconsole                           tmhmm
libpcap                          py-qtpy                                tmux
libpciaccess                     py-quantities                          tmuxinator
libpfm4                          py-quast                               tophat
libpipeline                      py-radical-utils                       tppred
libpng                           py-ranger                              transabyss
libpsl                           py-rasterio                            transdecoder
libpthread-stubs                 py-readme-renderer                     transposome
libquo                           py-regex                               transset
librom                           py-reportlab                           trapproto
libshm                           py-requests                            tree
libsigcpp                        py-requests-toolbelt                   trf
libsigsegv                       py-restview                            triangle
libsm                            py-rope                                trilinos
libsodium                        py-rpy2                                trimgalore
libspatialindex                  py-rsa                                 trimmomatic
libsplash                        py-rseqc                               trinity
libssh                           py-rtree                               trnascan-se
libssh2                          py-saga-python                         turbine
libsvm                           py-scandir                             turbomole
libszip                          py-scientificpython                    tut
libtermkey                       py-scikit-image                        twm
libtiff                          py-scikit-learn                        tycho2
libtool                          py-scipy                               typhon
libunistring                     py-seaborn                             typhonio
libunwind                        py-setuptools                          uberftp
libuuid                          py-setuptools-git                      ucx
libuv                            py-setuptools-scm                      udunits2
libvorbis                        py-sfepy                               ufo-core
libvterm                         py-sh                                  ufo-filters
libwebsockets                    py-shapely                             umpire
libwindowswm                     py-shiboken                            unblur
libx11                           py-simplegeneric                       uncrustify
libxau                           py-simplejson                          unibilium
libxaw                           py-singledispatch                      unison
libxaw3d                         py-sip                                 units
libxc                            py-six                                 unixodbc
libxcb                           py-slepc4py                            unuran
libxcomposite                    py-slurm-pipeline                      unzip
libxcursor                       py-sncosmo                             usearch
libxdamage                       py-snowballstemmer                     util-linux
libxdmcp                         py-snuggs                              util-macros
libxevie                         py-spectra                             uuid
libxext                          py-spefile                             valgrind
libxfixes                        py-spglib                              vampirtrace
libxfont                         py-sphinx                              vardictjava
libxfont2                        py-sphinx-bootstrap-theme              varscan
libxfontcache                    py-sphinx-rtd-theme                    vc
libxft                           py-sphinxcontrib-bibtex                vcftools
libxi                            py-sphinxcontrib-programoutput         vcsh
libxinerama                      py-sphinxcontrib-websupport            vdt
libxkbcommon                     py-spyder                              vecgeom
libxkbfile                       py-spykeutils                          veclibfort
libxkbui                         py-sqlalchemy                          vegas2
libxml2                          py-statsmodels                         veloc
libxmu                           py-stevedore                           velvet
libxp                            py-storm                               verilator
libxpm                           py-subprocess32                        verrou
libxpresent                      py-symengine                           videoproto
libxprintapputil                 py-symfit                              viennarna
libxprintutil                    py-sympy                               viewres
libxrandr                        py-tabulate                            vim
libxrender                       py-tappy                               virtualgl
libxres                          py-terminado                           visit
libxscrnsaver                    py-testinfra                           vizglow
libxshmfence                     py-tetoolkit                           vmatch
libxslt                          py-theano                              voropp
libxsmm                          py-tifffile                            votca-csg
libxstream                       py-toml                                votca-ctp
libxt                            py-tomopy                              votca-tools
libxtrap                         py-toolz                               votca-xtp
libxtst                          py-tornado                             vpfft
libxv                            py-tqdm                                vpic
libxvmc                          py-traceback2                          vsearch
libxxf86dga                      py-traitlets                           vt
libxxf86misc                     py-tuiview                             vtk
libxxf86vm                       py-twisted                             vtkh
libyogrt                         py-typing                              vtkm
libzip                           py-tzlocal                             wannier90
likwid                           py-udunits                             wcslib
linkphase3                       py-umi-tools                           wget
linux-headers                    py-unittest2                           wgsim
listres                          py-unittest2py3k                       windowswmproto
llvm                             py-urllib3                             wireshark
llvm-openmp-ompt                 py-urwid                               workrave
lmdb                             py-vcversioner                         wt
lmod                             py-virtualenv                          wx
lndir                            py-virtualenv-clone                    wxpropgrid
log4cplus                        py-virtualenvwrapper                   x11perf
log4cxx                          py-vmd-python                          xapian-core
loki                             py-vsc-base                            xauth
lordec                           py-vsc-install                         xbacklight
lrslib                           py-wcsaxes                             xbiff
lrzip                            py-wcwidth                             xbitmaps
lsof                             py-webkit-server                       xbraid
ltrace                           py-weblogo                             xcalc
lua                              py-werkzeug                            xcb-demo
lua-bitlib                       py-wheel                               xcb-proto
lua-jit                          py-widgetsnbextension                  xcb-util
lua-lpeg                         py-wrapt                               xcb-util-cursor
lua-luafilesystem                py-xarray                              xcb-util-errors
lua-luaposix                     py-xattr                               xcb-util-image
lua-mpack                        py-xlrd                                xcb-util-keysyms
luit                             py-xlsxwriter                          xcb-util-renderutil
lulesh                           py-xmlrunner                           xcb-util-wm
lumpy-sv                         py-xopen                               xcb-util-xrm
lwgrp                            py-xpyb                                xclip
lwm2                             py-xvfbwrapper                         xclipboard
lz4                              py-yamlreader                          xclock
lzma                             py-yapf                                xcmiscproto
lzo                              py-yt                                  xcmsdb
m4                               py-zmq                                 xcompmgr
macsio                           py-zope-event                          xconsole
mad-numdiff                      py-zope-interface                      xcursor-themes
mafft                            python                                 xcursorgen
magics                           qbank                                  xdbedizzy
magma                            qbox                                   xditview
makedepend                       qhull                                  xdm
mallocmc                         qmcpack                                xdpyinfo
man-db                           qmd-progress                           xdriinfo
manta                            qorts                                  xedit
maq                              qrupdate                               xerces-c
mariadb                          qt                                     xev
masa                             qt-creator                             xextproto
masurca                          qtgraph                                xeyes
matio                            qthreads                               xf86bigfontproto
matlab                           quantum-espresso                       xf86dga
maven                            quinoa                                 xf86dgaproto
maverick                         qwt                                    xf86driproto
mawk                             r                                      xf86miscproto
mbedtls                          r-a4                                   xf86rushproto
mc                               r-a4base                               xf86vidmodeproto
mcl                              r-a4classif                            xfd
mdtest                           r-a4core                               xfindproxy
med                              r-a4preproc                            xfontsel
meep                             r-a4reporting                          xfs
mefit                            r-abadata                              xfsinfo
megahit                          r-abaenrichment                        xfwp
memaxes                          r-abind                                xgamma
meme                             r-absseq                               xgc
memkind                          r-acde                                 xhmm
meraculous                       r-acepack                              xhost
mercurial                        r-acgh                                 xineramaproto
mesa                             r-acme                                 xinit
mesa-glu                         r-ada                                  xinput
meshkit                          r-adabag                               xios
meson                            r-ade4                                 xkbcomp
mesquite                         r-adegenet                             xkbdata
metabat                          r-adsplit                              xkbevd
metaphysicl                      r-aer                                  xkbprint
metasv                           r-affxparser                           xkbutils
metis                            r-affy                                 xkeyboard-config
mfem                             r-affycomp                             xkill
microbiomeutil                   r-affycompatible                       xload
minced                           r-affycontam                           xlogo
mindthegap                       r-affycoretools                        xlsatoms
miniaero                         r-affydata                             xlsclients
miniamr                          r-affyexpress                          xlsfonts
miniasm                          r-affyilm                              xmag
miniconda2                       r-affyio                               xman
miniconda3                       r-affypdnn                             xmessage
minife                           r-affyplm                              xmh
minighost                        r-affyqcreport                         xmlf90
minigmg                          r-affyrnadegradation                   xmlto
minimap2                         r-agdex                                xmodmap
minimd                           r-agilp                                xmore
miniqmc                          r-agimicrorna                          xorg-cf-files
minisign                         r-aims                                 xorg-docs
minismac2d                       r-aldex2                               xorg-gtest
minitri                          r-allelicimbalance                     xorg-server
minixyce                         r-alpine                               xorg-sgml-doctools
minuit                           r-als                                  xphelloworld
mira                             r-alsace                               xplor-nih
mirdeep2                         r-altcdfenvs                           xplsprinters
mitofates                        r-amap                                 xpr
mitos                            r-ampliqueso                           xprehashprinterlist
mkfontdir                        r-analysispageserver                   xprop
mkfontscale                      r-anaquin                              xproto
mlhka                            r-aneufinder                           xproxymanagementprotocol
moab                             r-aneufinderdata                       xqilla
modern-wheel                     r-annaffy                              xrandr
mofem-cephas                     r-annotate                             xrdb
mofem-fracture-module            r-annotationdbi                        xrefresh
mofem-minimal-surface-equation   r-annotationfilter                     xrootd
mofem-users-modules              r-annotationforge                      xrx
molcas                           r-annotationhub                        xsbench
mono                             r-ape                                  xscope
mosh                             r-argparse                             xsd
mothur                           r-assertthat                           xsdk
motif                            r-backports                            xsdktrilinos
motioncor2                       r-bamsignals                           xset
mount-point-attributes           r-base64                               xsetmode
mozjs                            r-base64enc                            xsetpointer
mpark-variant                    r-bbmisc                               xsetroot
mpc                              r-beanplot                             xsimd
mpe2                             r-bh                                   xsm
mpest                            r-biasedurn                            xstdcmap
mpfr                             r-bindr                                xtensor
mpibash                          r-bindrcpp                             xtensor-python
mpiblast                         r-biobase                              xterm
mpich                            r-biocgenerics                         xtl
mpifileutils                     r-biocinstaller                        xtrans
mpilander                        r-biocparallel                         xtrap
mpileaks                         r-biocstyle                            xts
mpip                             r-biom-utils                           xvidtune
mpir                             r-biomart                              xvinfo
mpix-launch-swift                r-biomformat                           xwd
mrbayes                          r-biostrings                           xwininfo
mrnet                            r-biovizbase                           xwud
mrtrix3                          r-bit                                  xxhash
mscgen                           r-bit64                                xz
msgpack-c                        r-bitops                               yajl
mshadow                          r-blob                                 yambo
multitail                        r-bookdown                             yaml-cpp
multiverso                       r-boot                                 yasm
mummer                           r-brew                                 yorick
mumps                            r-broom                                z3
munge                            r-bsgenome                             zeromq
muparser                         r-bumphunter                           zfp
muscle                           r-c50                                  zip
muse                             r-callr                                zlib
muster                           r-car                                  zoltan
mvapich2                         r-caret                                zsh
mxml                             r-category                             zstd

The packages are listed by name in alphabetical order. A pattern to match with no wildcards, * or ?, will be treated as though it started and ended with *, so util is equivalent to *util*. All patterns will be treated as case-insensitive. You can also add the -d to search the description of the package in addition to the name. Some examples:

All packages whose names contain “sql”:

$ spack list sql
perl-dbd-mysql  py-mysqldb1  py-sqlalchemy  r-rpostgresql  r-sqldf  sqlitebrowser
postgresql      py-pysqlite  r-rmysql       r-rsqlite      sqlite

All packages whose names or descriptions contain documentation:

$ spack list --search-description documentation
compositeproto     libxfixes     py-docutils                  r-ggplot2   r-stanheaders
damageproto        libxpresent   py-epydoc                    r-quadprog  sowing
double-conversion  man-db        py-markdown                  r-rcpp      texinfo
doxygen            perl-dbfile   py-sphinx                    r-rinside   xorg-docs
gflags             py-alabaster  py-sphinxcontrib-websupport  r-roxygen2  xorg-sgml-doctools

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
AutotoolsPackage:   mpich

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



Preferred version:  

Safe versions:  

    Name [Default]    Allowed values        Description

    device [ch3]      ch3, ch4              Abstract Device Interface
                                            (ADI) implementation. The ch4
                                            device is currently in
                                            experimental state
    hydra [on]        True, False           Build the hydra process
    netmod [tcp]      tcp, mxm, ofi, ucx    Network module. Only single
                                            netmod builds are supported.
                                            For ch3 device configurations,
                                            this presumes the ch3:nemesis
                                            communication channel.
                                            ch3:sock is not supported by
                                            this spack package at this
    pmi [on]          True, False           Build with PMI support
    romio [on]        True, False           Enable ROMIO MPI I/O
    verbs [off]       True, False           Build support for OpenFabrics

Installation Phases:
    autoreconf    configure    build    install

Build Dependencies:

Link Dependencies:

Run Dependencies:

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

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):
  0.8.13  0.8.12
==> Remote versions (not yet checksummed):
  0.8.11  0.8.10  0.8.9  0.8.8  0.8.7  0.8.6  0.8.5  0.8.4  0.8.3  0.8.2  0.8.0  0.7.0  0.6.4  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.

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 ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpich@3.0.4.
==> callpath is already installed in ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/callpath@1.0.2-5dce4318.
==> adept-utils is already installed in ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/adept-utils@1.0-5adef8da.
==> Trying to fetch from
######################################################################## 100.0%
==> Staging archive: ~/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 arch=linux-debian7-x86_64-59f6ad23/mpileaks-1.0.tar.gz
==> Created stage in ~/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 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.
[+] ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpileaks@1.0-59f6ad23

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 mpich@3.0.4

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.

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 mpileaks@3.0.4 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 <package>. This will ask the user for confirmation before completely removing 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 mpich@3.0.2 and mpich@3.1 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.

Non-Downloadable Tarballs

The tarballs for some packages cannot be automatically downloaded by Spack. This could be for a number of reasons:

  1. The author requires users to manually accept a license agreement before downloading (jdk and galahad).
  2. The software is proprietary and cannot be downloaded on the open Internet.

To install these packages, one must create a mirror and manually add the tarballs in question to it (see Mirrors):

  1. Create a directory for the mirror. You can create this directory anywhere you like, it does not have to be inside ~/.spack:

    $ mkdir ~/.spack/manual_mirror
  2. Register the mirror with Spack by creating ~/.spack/mirrors.yaml:

      manual: file://~/.spack/manual_mirror
  3. Put your tarballs in it. Tarballs should be named <package>/<package>-<version>.tar.gz. For example:

    $ ls -l manual_mirror/galahad
    -rw-------. 1 me me 11657206 Jun 21 19:25 galahad-2.60003.tar.gz
  4. Install as usual:

    $ spack install galahad

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:

$ spack find
==> 74 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
ImageMagick@6.8.9-10  libdwarf@20130729  py-dateutil@2.4.0
adept-utils@1.0       libdwarf@20130729  py-ipython@2.3.1
atk@2.14.0            libelf@0.8.12      py-matplotlib@1.4.2
boost@1.55.0          libelf@0.8.13      py-nose@1.3.4
bzip2@1.0.6           libffi@3.1         py-numpy@1.9.1
cairo@1.14.0          libmng@2.0.2       py-pygments@2.0.1
callpath@1.0.2        libpng@1.6.16      py-pyparsing@2.0.3
cmake@3.0.2           libtiff@4.0.3      py-pyside@1.2.2
dbus@1.8.6            libtool@2.4.2      py-pytz@2014.10
dbus@1.9.0            libxcb@1.11        py-setuptools@11.3.1
dyninst@8.1.2         libxml2@2.9.2      py-six@1.9.0
fontconfig@2.11.1     libxml2@2.9.2      python@2.7.8
freetype@2.5.3        llvm@3.0           qhull@1.0
gdk-pixbuf@2.31.2     memaxes@0.5        qt@4.8.6
glib@2.42.1           mesa@8.0.5         qt@5.4.0
graphlib@2.0.0        mpich@3.0.4        readline@6.3
gtkplus@2.24.25       mpileaks@1.0       sqlite@3.8.5
harfbuzz@0.9.37       mrnet@4.1.0        stat@2.1.0
hdf5@1.8.13           ncurses@5.9        tcl@8.6.3
icu@54.1              netcdf@4.3.3       tk@src
jpeg@9a               openssl@1.0.1h     vtk@6.1.0
launchmon@1.0.1       pango@1.36.8       xcb-proto@1.11
lcms@2.6              pixman@0.32.6      xz@5.2.0
libdrm@2.4.33         py-dateutil@2.4.0  zlib@1.2.8

-- linux-debian7-x86_64 / gcc@4.9.2 --------------------------------
libelf@0.8.10  mpich@3.0.4

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 installation status. For example, missing dependencies of a spec can be shown with --missing, packages which were explicitly installed with spack install <package> 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 / gcc@4.4.7 --------------------------------

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 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962  libdwarf@20130729-b52fac98

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 / gcc@4.4.7 --------------------------------
    ImageMagick@6.8.9-10  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/ImageMagick@6.8.9-10-4df950dd
    adept-utils@1.0       ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/adept-utils@1.0-5adef8da
    atk@2.14.0            ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/atk@2.14.0-3d09ac09
    boost@1.55.0          ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/boost@1.55.0
    bzip2@1.0.6           ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/bzip2@1.0.6
    cairo@1.14.0          ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/cairo@1.14.0-fcc2ab44
    callpath@1.0.2        ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/callpath@1.0.2-5dce4318

And, finally, you can restrict your search to a particular package by supplying its name:

$ spack find --paths libelf
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
    libelf@0.8.11  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.11
    libelf@0.8.12  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.12
    libelf@0.8.13  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.13

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 libelf@0.8.12:
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
    libelf@0.8.12  libelf@0.8.13

Finding just the versions of libdwarf built with a particular version of libelf would look like this:

$ spack find --long libdwarf ^libelf@0.8.12
==> 1 installed packages.
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------

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.

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:

mpileaks @1.2:1.4 %gcc@4.7.5 +debug -qt arch=bgq_os ^callpath @1.1 %gcc@4.7.2

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 gcc@4.7.3)
  • + or - or ~ Optional variant specifiers (+debug, -qt, or ~qt) for boolean variants
  • name=<value> Optional variant specifiers that are not restricted to boolean variants
  • name=<value> Optional compiler flag specifiers. Valid flag names are cflags, cxxflags, fflags, cppflags, ldflags, and ldlibs.
  • target=<value> os=<value> Optional architecture specifier (target=haswell os=CNL10)
  • ^ Dependency specs (^callpath@1.1)

There are two things 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:

digraph { mpileaks -> mpich mpileaks -> callpath -> mpich callpath -> dyninst dyninst -> libdwarf -> libelf 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 ^emacs@23.3).

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 ^dyninst@8.1. 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 ^callpath@1.0 ^libelf@0.8.3
mpileaks ^libelf@0.8.3 ^callpath@1.0

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 %gcc@4.7.2 associates with the callpath package, while @1.2:1.4, %gcc@4.7.5, +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 mpich@1.2: 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.

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


Variants are named options associated with a particular package. They are optional, as each package must provide default values for each variant it makes available. Variants can be specified using a flexible parameter syntax name=<value>. 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 <package> 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. The - and spaces on the command line are 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 quoted if it contains any spaces. Any of cppflags=-O3, cppflags="-O3", cppflags='-O3', and cppflags="-O3 -fPIC" are acceptable, but cppflags=-O3 -fPIC is not. Additionally, if they value of the compiler flags is not the last thing on the line, it must be followed by a space. The commmand spack install libelf cppflags="-O3"%intel will be interpreted as an attempt to set cppflags=”-O3%intel”`.

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 <command> $ldlibs for C and C++ and $fflags $cppflags $ldflags <command> $ldlibs for Fortran.

Compiler environment variables and additional RPATHs

In the exceptional case a compiler requires setting special environment variables, like an explicit library load path. These can bet set in an extra section in the compiler configuration. The user can also specify additional RPATHs that the compiler will add to all executables generated by that compiler. This is useful for forcing certain compilers to RPATH their own runtime libraries, so that executables will run without the need to set LD_LIBRARY_PATH.

  - compiler:
      spec: gcc@4.9.3
        cc: /opt/gcc/bin/gcc
        c++: /opt/gcc/bin/g++
        f77: /opt/gcc/bin/gfortran
        fc: /opt/gcc/bin/gfortran
          LD_LIBRARY_PATH : /opt/gcc/lib
      - /path/to/some/compiler/runtime/directory
      - /path/to/some/other/compiler/runtime/directory

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

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:

digraph { mpi [color=red] mpileaks -> mpi mpileaks -> callpath -> mpi callpath -> dyninst dyninst -> libdwarf -> libelf 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
AutotoolsPackage:   mpich

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



Preferred version:  

Safe versions:  

    Name [Default]    Allowed values        Description

    device [ch3]      ch3, ch4              Abstract Device Interface
                                            (ADI) implementation. The ch4
                                            device is currently in
                                            experimental state
    hydra [on]        True, False           Build the hydra process
    netmod [tcp]      tcp, mxm, ofi, ucx    Network module. Only single
                                            netmod builds are supported.
                                            For ch3 device configurations,
                                            this presumes the ch3:nemesis
                                            communication channel.
                                            ch3:sock is not supported by
                                            this spack package at this
    pmi [on]          True, False           Build with PMI support
    romio [on]        True, False           Enable ROMIO MPI I/O
    verbs [off]       True, False           Build support for OpenFabrics

Installation Phases:
    autoreconf    configure    build    install

Build Dependencies:

Link Dependencies:

Run Dependencies:

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

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. 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 /<hash> where <hash> is any amount from the beginning of a spec hash.

For example, lets say that you accidentally installed two different mvapich2 installations. If you want to uninstall one of them but don’t know what the difference is, you can run:

$ spack find --long mvapich2
==> 2 installed packages.
-- linux-centos7-x86_64 / gcc@6.3.0 ----------
qmt35td mvapich2@2.2%gcc
er3die3 mvapich2@2.2%gcc

You can then uninstall the latter installation using:

$ spack uninstall /er3die3

Or, if you want to build with a specific installation as a dependency, you can use:

$ spack install trilinos ^/er3die3

If the given spec hash is sufficiently long as to be unique, Spack will replace the reference with the spec to which it refers. Otherwise, it will prompt for a more qualified hash.

Note that this will not work to reinstall a dependency 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
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  charm@6.7.1:           mpich      mvapich2        openmpi@2.0.0:
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  charm@6.7.1:           mpich@1:   openmpi         spectrum-mpi
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  intel-mpi              mpich@3:   openmpi@1.6.5
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  intel-parallel-studio  mpilander  openmpi@1.7.5:

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
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  charm@6.7.1:           mpich      openmpi         spectrum-mpi
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  charm@6.7.1:           mpich@3:   openmpi@1.6.5
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  intel-mpi              mpilander  openmpi@1.7.5:
charm@6.7.1:  charm@6.7.1:  charm@6.7.1:  intel-parallel-studio  mvapich2   openmpi@2.0.0:

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

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 / gcc@4.4.7 --------------------------------

spack extensions

You can find extensions for your Python installation like this:

$ spack extensions python
==> python@2.7.8%gcc@4.4.7 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 / gcc@4.4.7 --------------------------------
py-dateutil@2.4.0    py-nose@1.3.4       py-pyside@1.2.2
py-dateutil@2.4.0    py-numpy@1.9.1      py-pytz@2014.10
py-ipython@2.3.1     py-pygments@2.0.1   py-setuptools@11.3.1
py-matplotlib@1.4.2  py-pyparsing@2.0.3  py-six@1.9.0

==> 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 / gcc@4.4.7 --------------------------------
    py-numpy@1.9.1  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/py-numpy@1.9.1-66733244

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 "<stdin>", line 1, in <module>
ImportError: No module named numpy

Using Extensions

There are three ways to get numpy working in Python. The first is to use Using module files via Spack. 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:

$ spack use python
$ spack use py-numpy

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

Activating Extensions in a View

The second way to use extensions is to create a view, which merges the python installation along with the extensions into a single prefix. See Filesystem Views for a more in-depth description of views and spack view for usage of the spack view command.

Activating Extensions Globally

As an alternative to creating a merged prefix with Python and its extensions, and prior to support for views, Spack has provided a means to install the extension into the Spack installation prefix for the extendee. This has typically been useful since extendable packages typically search their own installation path for addons by default.

Global activations are performed with the spack activate command:

spack activate

$ spack activate py-numpy
==> Activated extension py-setuptools@11.3.1%gcc@4.4.7 arch=linux-debian7-x86_64-3c74eb69 for python@2.7.8%gcc@4.4.7.
==> Activated extension py-nose@1.3.4%gcc@4.4.7 arch=linux-debian7-x86_64-5f70f816 for python@2.7.8%gcc@4.4.7.
==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=linux-debian7-x86_64-66733244 for python@2.7.8%gcc@4.4.7.

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
==> python@2.7.8%gcc@4.4.7  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 / gcc@4.4.7 --------------------------------
py-dateutil@2.4.0    py-nose@1.3.4       py-pyside@1.2.2
py-dateutil@2.4.0    py-numpy@1.9.1      py-pytz@2014.10
py-ipython@2.3.1     py-pygments@2.0.1   py-setuptools@11.3.1
py-matplotlib@1.4.2  py-pyparsing@2.0.3  py-six@1.9.0

==> 3 currently activated:
-- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-nose@1.3.4  py-numpy@1.9.1  py-setuptools@11.3.1

Now, when a user runs python, numpy will be available for import without the user having to explicitly loaded. python@2.7.8 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 global 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 want a different version of a package can still get it by using environment modules or views, but they will have to explicitly load their preferred version.

spack activate --force

If, for some reason, you want to activate a package without its dependencies, you can use spack activate --force:

$ spack activate --force py-numpy
==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=linux-debian7-x86_64-66733244 for python@2.7.8%gcc@4.4.7.

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 <extension> will deactivate a single extension. If another activated extension depends on this one, Spack will warn you and exit with an error.

  • spack deactivate --force <extension> deactivates an extension regardless of packages that depend on it.

  • spack deactivate --all <extension> deactivates an extension and all of its dependencies. Use --force to disregard dependents.

  • spack deactivate --all <extendee> deactivates all activated extensions of a package. For example, to deactivate all python extensions, use:

    $ spack deactivate --all python

Filesystem requirements

By default, Spack 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 or NFS volumes may be configured without flock support enabled. You can determine how your filesystems are mounted with mount. The output for a Lustre filesystem might look like this:

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

Note the flock option on both Lustre mounts.

If you do not see this or a similar option for your filesystem, you have a few options. First, you can move your Spack installation to a filesystem that supports locking. Second, you could ask your system administrator to enable flock for your filesystem.

If none of those work, you can disable locking in one of two ways:

  1. Run Spack with the -L or --disable-locks option to disable locks on a call-by-call basis.
  2. Edit config.yaml and set the locks option to false to always disable locking.


If you disable locking, concurrent instances of Spack will have no way to avoid stepping on each other. You must ensure that there is only one instance of Spack running at a time. Otherwise, Spack may end up with a corrupted database file, or you may not be able to see all installed packages in commands like spack find.

If you are unfortunate enough to run into this situation, you may be able to fix it by running spack reindex.

This issue typically manifests with the error below:

$ ./spack find
Traceback (most recent call last):
File "./spack", line 176, in <module>
File "./spack", line 154,' in main
  return_val = command(parser, args)
File "./spack/lib/spack/spack/cmd/", line 170, in find
  specs = set(spack.installed_db.query(\**q_args))
File "./spack/lib/spack/spack/", line 551, in query
  with self.read_transaction():
File "./spack/lib/spack/spack/", line 598, in __enter__
  if self._enter() and self._acquire_fn:
File "./spack/lib/spack/spack/", line 608, in _enter
  return self._db.lock.acquire_read(self._timeout)
File "./spack/lib/spack/llnl/util/", line 103, in acquire_read
  self._lock(fcntl.LOCK_SH, timeout)   # can raise LockError.
File "./spack/lib/spack/llnl/util/", 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.

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 [-hkV] [--color {always,never,auto}] COMMAND ...

A flexible package manager that supports multiple versions,
configurations, platforms, and compilers.

These are common spack commands:

query packages:
  list                  list and search available packages
  info                  get detailed information on a particular package
  find                  list and search installed packages

build packages:
  install               build and install packages
  uninstall             remove installed packages
  spec                  show what would be installed, given a spec

  load                  add package to environment using `module load`
  module                manipulate module files
  unload                remove package from environment using `module unload`
  view                  produce a single-rooted directory view of packages

create packages:
  create                create a new package file
  edit                  open package files in $EDITOR

  arch                  print architecture information about this machine
  compilers             list available compilers

optional arguments:
  -h, --help            show this help message and exit
  -k, --insecure        do not check ssl certificates when downloading
  -V, --version         show version number and exit
  --color {always,never,auto}
                        when to colorize output (default: auto)

more help:
  spack help --all       list all commands and options
  spack help <command>   help on a specific command
  spack help --spec      help on the spec syntax
  spack docs             open in a browser

Adding an argument, e.g. spack help <subcommand>, will print out usage information for a particular subcommand:

$ spack help install
usage: spack install [-hnvy] [--only {package,dependencies}] [-j JOBS] [--overwrite] [--keep-prefix] [--keep-stage]
                     [--dont-restage] [--use-cache] [--show-log-on-error] [--source] [--fake] [-f SPEC_YAML_FILE]
                     [--clean | --dirty] [--test {root,all} | --run-tests] [--log-format {cdash,None,junit}]
                     [--log-file LOG_FILE] [--cdash-upload-url CDASH_UPLOAD_URL]

build and install packages

positional arguments:
  package               spec of the package to install

optional arguments:
  -h, --help            show this help message and exit
  --only {package,dependencies}
                        select the mode of installation.
                        the default is to install the package along with all its dependencies.
                        alternatively one can decide to install only the package or only
                        the dependencies
  -j JOBS, --jobs JOBS  explicitely set number of make jobs. default is #cpus
  --overwrite           reinstall an existing spec, even if it has dependents
  --keep-prefix         don't remove the install prefix if installation fails
  --keep-stage          don't remove the build stage if installation succeeds
  --dont-restage        if a partial install is detected, don't delete prior state
  --use-cache           check for pre-built Spack packages in mirrors
  --show-log-on-error   print full build log to stderr if build fails
  --source              install source files in prefix
  -n, --no-checksum     do not use checksums to verify downloadeded files (unsafe)
  -v, --verbose         display verbose build output while installing
  --fake                fake install for debug purposes.
                        install from file. Read specs to install from .yaml files
  --clean               unset harmful variables in the build environment (default)
  --dirty               preserve user environment in the spack build environment (danger!)
  --test {root,all}     If 'root' is chosen, run package tests during
                        installation for top-level packages (but skip tests for dependencies).
                        if 'all' is chosen, run package tests during installation for all
                        packages. If neither are chosen, don't run tests for any packages.
  --run-tests           run package tests during installation (same as --test=all)
  --log-format {cdash,None,junit}
                        format to be used for log files
  --log-file LOG_FILE   filename for the log file. if not passed a default will be used
  --cdash-upload-url CDASH_UPLOAD_URL
                        CDash URL where reports will be uploaded
  -y, --yes-to-all      assume "yes" is the answer to every confirmation request

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