Command Reference¶
This is a reference for all commands in the Spack command line interface. The same information is available through spack help.
Commands that also have sections in the main documentation have a link to “More documentation”.
Category |
Commands |
---|---|
Administration |
|
Query packages |
|
Build packages |
|
Configuration |
|
Container |
|
Developer |
|
Environments |
|
Extensions |
|
More help |
|
Create packages |
|
System |
|
User environment |
spack¶
A flexible package manager that supports multiple versions, configurations, platforms, and compilers.
spack [-hHdklLmbpvV] [--color {always,never,auto}] [-c CONFIG_VARS] [-C DIR] [--timestamp] [--pdb]
[-e ENV | -D DIR | -E] [--use-env-repo] [--sorted-profile STAT] [--lines LINES] [--stacktrace] [--backtrace]
[--print-shell-vars PRINT_SHELL_VARS]
COMMAND ...
Optional arguments
-h, --help
show this help message and exit
-H, --all-help
show help for all commands (same as spack help –all)
--color {always,never,auto}
when to colorize output (default: auto)
-c CONFIG_VARS, --config CONFIG_VARS
add one or more custom, one off config settings.
-C DIR, --config-scope DIR
add a custom configuration scope
-d, --debug
write out debug messages (more d’s for more verbosity: -d, -dd, -ddd, etc.)
--timestamp
Add a timestamp to tty output
--pdb
run spack under the pdb debugger
-e ENV, --env ENV
run with a specific environment (see spack env)
-D DIR, --env-dir DIR
run with an environment directory (ignore managed environments)
-E, --no-env
run without any environments activated (see spack env)
--use-env-repo
when running in an environment, use its package repository
-k, --insecure
do not check ssl certificates when downloading
-l, --enable-locks
use filesystem locking (default)
-L, --disable-locks
do not use filesystem locking (unsafe)
-m, --mock
use mock packages instead of real ones
-b, --bootstrap
use bootstrap configuration (bootstrap store, config, externals)
-p, --profile
profile execution using cProfile
--sorted-profile STAT
profile and sort by one or more of: [calls, ncalls, cumtime, cumulative, filename, line, module]
--lines LINES
lines of profile output or ‘all’ (default: 20)
-v, --verbose
print additional output during builds
--stacktrace
add stacktraces to all printed statements
--backtrace
always show backtraces for exceptions
-V, --version
show version number and exit
--print-shell-vars PRINT_SHELL_VARS
print info needed by setup-env.[c]sh
Subcommands
spack add¶
add a spec to an environment
spack add [-h] [-l LIST_NAME] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-l LIST_NAME, --list-name LIST_NAME
name of the list to add specs to
spack arch¶
print architecture information about this machine
spack arch [-hg] [--known-targets] [-p | -o | -t] [-f | -b]
Optional arguments
-h, --help
show this help message and exit
-g, --generic-target
show the best generic target
--known-targets
show a list of all known targets and exit
-p, --platform
print only the platform
-o, --operating-system
print only the operating system
-t, --target
print only the target
-f, --frontend
print frontend
-b, --backend
print backend
spack audit¶
audit configuration files, packages, etc.
spack audit [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack audit configs¶
spack audit configs [-h]
Optional arguments
-h, --help
show this help message and exit
spack audit packages-https¶
spack audit packages-https [-h] [--all] [PKG [PKG ...]]
Positional arguments
- PKG
package to be analyzed (if none all packages will be processed)
Optional arguments
-h, --help
show this help message and exit
--all
audit all packages
spack audit packages¶
spack audit packages [-h] [PKG [PKG ...]]
Positional arguments
- PKG
package to be analyzed (if none all packages will be processed)
Optional arguments
-h, --help
show this help message and exit
spack audit list¶
spack audit list [-h]
Optional arguments
-h, --help
show this help message and exit
spack blame¶
show contributors to packages
spack blame [-h] [-t | -p | -g] [--json] package_or_file
Positional arguments
- package_or_file
name of package to show contributions for, or path to a file in the spack repo
Optional arguments
-h, --help
show this help message and exit
-t, --time
sort by last modification date (default)
-p, --percent
sort by percent of code
-g, --git
show git blame output instead of summary
--json
output blame as machine-readable json records
spack bootstrap¶
manage bootstrap configuration
spack bootstrap [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack bootstrap now¶
spack bootstrap now [-h] [--dev]
Optional arguments
-h, --help
show this help message and exit
--dev
bootstrap dev dependencies too
spack bootstrap status¶
spack bootstrap status [-h] [--optional] [--dev]
Optional arguments
-h, --help
show this help message and exit
--optional
show the status of rarely used optional dependencies
--dev
show the status of dependencies needed to develop Spack
spack bootstrap enable¶
spack bootstrap enable [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] [name]
Positional arguments
- name
name of the source to be enabled
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
spack bootstrap disable¶
spack bootstrap disable [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] [name]
Positional arguments
- name
name of the source to be disabled
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
spack bootstrap reset¶
spack bootstrap reset [-hy]
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack bootstrap root¶
spack bootstrap root [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] [path]
Positional arguments
- path
set the bootstrap directory to this value
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
spack bootstrap list¶
spack bootstrap list [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
spack bootstrap add¶
spack bootstrap add [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] [--trust]
name metadata_dir
Positional arguments
- name
name of the new source of software
- metadata_dir
directory where to find metadata files
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
--trust
enable the source immediately upon addition
spack bootstrap remove¶
spack bootstrap remove [-h] name
Positional arguments
- name
name of the source to be removed
Optional arguments
-h, --help
show this help message and exit
spack bootstrap mirror¶
spack bootstrap mirror [-h] [--binary-packages] [--dev] DIRECTORY
Positional arguments
- DIRECTORY
root directory in which to create the mirror and metadata
Optional arguments
-h, --help
show this help message and exit
--binary-packages
download public binaries in the mirror
--dev
download dev dependencies too
spack build-env¶
run a command in a spec’s install environment, or dump its environment to screen or file
spack build-env [-hU] [--clean] [--dirty] [--reuse] [--reuse-deps] [--dump FILE] [--pickle FILE] ...
Positional arguments
- spec [–] [cmd]…
specs of package environment to emulate
Optional arguments
-h, --help
show this help message and exit
--clean
unset harmful variables in the build environment (default)
--dirty
preserve user environment in spack’s build environment (danger!)
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
--dump FILE
dump a source-able environment to FILE
--pickle FILE
dump a pickled source-able environment to FILE
spack buildcache¶
create, download and install binary packages
spack buildcache [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack buildcache push¶
spack buildcache push [-hrfua] [-k key] [-d directory | -m mirror-name | --mirror-url mirror-url] [--update-index]
[--spec-file SPEC_FILE] [--only {package,dependencies}]
[mirror] ...
Positional arguments
- mirror
Mirror name, path, or URL.
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-r, --rel
make all rpaths relative before creating tarballs. (deprecated)
-f, --force
overwrite tarball if it exists.
-u, --unsigned
push unsigned buildcache tarballs
-a, --allow-root
allow install root string in binary files after RPATH substitution
-k key, --key key
Key for signing.
-d directory, --directory directory
local directory where buildcaches will be written. (deprecated)
-m mirror-name, --mirror-name mirror-name
name of the mirror where buildcaches will be written. (deprecated)
--mirror-url mirror-url
URL of the mirror where buildcaches will be written. (deprecated)
--update-index, --rebuild-index
Regenerate buildcache index after building package(s)
--spec-file SPEC_FILE
Create buildcache entry for spec from json or yaml file
--only {package,dependencies}
Select the buildcache mode. the default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies
spack buildcache install¶
spack buildcache install [-hfmauo] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-f, --force
overwrite install directory if it exists.
-m, --multiple
allow all matching packages
-a, --allow-root
allow install root string in binary files after RPATH substitution. (deprecated)
-u, --unsigned
install unsigned buildcache tarballs for testing
-o, --otherarch
install specs from other architectures instead of default platform and OS
spack buildcache list¶
spack buildcache list [-hlLva] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-v, --variants
show variants in output (can be long)
-a, --allarch
list specs for all available architectures instead of default platform and OS
spack buildcache keys¶
spack buildcache keys [-hitf]
Optional arguments
-h, --help
show this help message and exit
-i, --install
install Keys pulled from mirror
-t, --trust
trust all downloaded keys
-f, --force
force new download of keys
spack buildcache preview¶
spack buildcache preview [-h] ...
Positional arguments
- installed_specs
one or more installed package specs
Optional arguments
-h, --help
show this help message and exit
spack buildcache check¶
spack buildcache check [-h] [-m MIRROR_URL] [-o OUTPUT_FILE] [--scope {defaults,system,site,user}[/PLATFORM] or
env:ENVIRONMENT] [-s SPEC] [--spec-file SPEC_FILE]
Optional arguments
-h, --help
show this help message and exit
-m MIRROR_URL, --mirror-url MIRROR_URL
Override any configured mirrors with this mirror URL
-o OUTPUT_FILE, --output-file OUTPUT_FILE
File where rebuild info should be written
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope containing mirrors to check
-s SPEC, --spec SPEC
Check single spec instead of release specs file
--spec-file SPEC_FILE
Check single spec from json or yaml file instead of release specs file
spack buildcache download¶
spack buildcache download [-h] [-s SPEC] [--spec-file SPEC_FILE] [-p PATH]
Optional arguments
-h, --help
show this help message and exit
-s SPEC, --spec SPEC
Download built tarball for spec from mirror
--spec-file SPEC_FILE
Download built tarball for spec (from json or yaml file) from mirror
-p PATH, --path PATH
Path to directory where tarball should be downloaded
spack buildcache get-buildcache-name¶
spack buildcache get-buildcache-name [-h] [-s SPEC] [--spec-file SPEC_FILE]
Optional arguments
-h, --help
show this help message and exit
-s SPEC, --spec SPEC
Spec string for which buildcache name is desired
--spec-file SPEC_FILE
Path to spec json or yaml file for which buildcache name is desired
spack buildcache save-specfile¶
spack buildcache save-specfile [-h] [--root-spec ROOT_SPEC] [--root-specfile ROOT_SPECFILE] [-s SPECS]
[--specfile-dir SPECFILE_DIR]
Optional arguments
-h, --help
show this help message and exit
--root-spec ROOT_SPEC
Root spec of dependent spec
--root-specfile ROOT_SPECFILE
Path to json or yaml file containing root spec of dependent spec
-s SPECS, --specs SPECS
List of dependent specs for which saved yaml is desired
--specfile-dir SPECFILE_DIR
Path to directory where spec yamls should be saved
spack buildcache sync¶
spack buildcache sync [-h] [--manifest-glob MANIFEST_GLOB] [--src-directory DIRECTORY] [--src-mirror-name MIRROR_NAME]
[--src-mirror-url MIRROR_URL] [--dest-directory DIRECTORY] [--dest-mirror-name MIRROR_NAME]
[--dest-mirror-url MIRROR_URL]
[source mirror] [destination mirror]
Positional arguments
- source mirror
Source mirror name, path, or URL
- destination mirror
Destination mirror name, path, or URL
Optional arguments
-h, --help
show this help message and exit
--manifest-glob MANIFEST_GLOB
A quoted glob pattern identifying copy manifest files
--src-directory DIRECTORY
Source mirror as a local file path (deprecated)
--src-mirror-name MIRROR_NAME
Name of the source mirror (deprecated)
--src-mirror-url MIRROR_URL
URL of the source mirror (deprecated)
--dest-directory DIRECTORY
Destination mirror as a local file path (deprecated)
--dest-mirror-name MIRROR_NAME
Name of the destination mirror (deprecated)
--dest-mirror-url MIRROR_URL
URL of the destination mirror (deprecated)
spack buildcache update-index¶
spack buildcache update-index [-hk] [-d directory] [-m mirror-name] [--mirror-url mirror-url] [mirror]
Positional arguments
- mirror
Destination mirror name, path, or URL
Optional arguments
-h, --help
show this help message and exit
-d directory, --directory directory
local directory where buildcaches will be written (deprecated)
-m mirror-name, --mirror-name mirror-name
name of the mirror where buildcaches will be written (deprecated)
--mirror-url mirror-url
URL of the mirror where buildcaches will be written (deprecated)
-k, --keys
If provided, key index will be updated as well as package index
spack cd¶
cd to spack directories in the shell
spack cd [-h] [-m | -r | -i | -p | -P | -s | -S | --source-dir | -b | -e [name]] [--first] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-m, --module-dir
spack python module directory
-r, --spack-root
spack installation root
-i, --install-dir
install prefix for spec (spec need not be installed)
-p, --package-dir
directory enclosing a spec’s package.py file
-P, --packages
top-level packages directory for Spack
-s, --stage-dir
stage directory for a spec
-S, --stages
top level stage directory
--source-dir
source directory for a spec (requires it to be staged first)
-b, --build-dir
build directory for a spec (requires it to be staged first)
-e [name], --env [name]
location of the named or current environment
--first
use the first match if multiple packages match the spec
spack change¶
change an existing spec in an environment
spack change [-ha] [-l LIST_NAME] [--match-spec MATCH_SPEC] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-l LIST_NAME, --list-name LIST_NAME
name of the list to remove specs from
--match-spec MATCH_SPEC
if name is ambiguous, supply a spec to match
-a, --all
change all matching specs (allow changing more than one spec)
spack checksum¶
checksum available versions of a package
spack checksum [-ha] [--keep-stage] [-b | -l | -p] package ...
Positional arguments
- package
package name
- versions
versions to generate checksums for
Optional arguments
-h, --help
show this help message and exit
--keep-stage
don’t clean up staging area when command completes
-b, --batch
don’t ask which versions to checksum
-l, --latest
checksum the latest available version only
-p, --preferred
checksum the preferred version only
-a, --add-to-package
add new versions to package
spack ci¶
manage continuous integration pipelines
spack ci [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack ci generate¶
Generate jobs file from a CI-aware spack file.
If you want to report the results on CDash, you will need to set the SPACK_CDASH_AUTH_TOKEN before invoking this command. The value must be the CDash authorization token needed to create a build group and register all generated jobs under it.
spack ci generate [-h] [--output-file OUTPUT_FILE] [--copy-to COPY_TO] [--optimize] [--dependencies]
[--buildcache-destination BUILDCACHE_DESTINATION] [--prune-dag | --no-prune-dag]
[--check-index-only] [--artifacts-root ARTIFACTS_ROOT]
Optional arguments
-h, --help
show this help message and exit
--output-file OUTPUT_FILE
pathname for the generated gitlab ci yaml file Path to the file where generated jobs file should be written. Default is .gitlab-ci.yml in the root of the repository.
--copy-to COPY_TO
path to additional directory for job files This option provides an absolute path to a directory where the generated jobs yaml file should be copied. Default is not to copy.
--optimize
(Experimental) optimize the gitlab yaml file for size Run the generated document through a series of optimization passes designed to reduce the size of the generated file.
--dependencies
(Experimental) disable DAG scheduling; use “plain” dependencies.
--buildcache-destination BUILDCACHE_DESTINATION
Override the mirror configured in the environment (spack.yaml) in order to push binaries from the generated pipeline to a different location.
--prune-dag
skip up-to-date specs Do not generate jobs for specs that are up-to-date on the mirror.
--no-prune-dag
process up-to-date specs Generate jobs for specs even when they are up-to-date on the mirror.
--check-index-only
only check spec state from buildcache indices Spack always checks specs against configured binary mirrors, regardless of the DAG pruning option. If enabled, Spack will assume all remote buildcache indices are up-to-date when assessing whether the spec on the mirror, if present, is up-to-date. This has the benefit of reducing pipeline generation time but at the potential cost of needlessly rebuilding specs when the indices are outdated. If not enabled, Spack will fetch remote spec files directly to assess whether the spec on the mirror is up-to-date.
--artifacts-root ARTIFACTS_ROOT
path to the root of the artifacts directory If provided, concrete environment files (spack.yaml, spack.lock) will be generated under this directory. Their location will be passed to generated child jobs through the SPACK_CONCRETE_ENVIRONMENT_PATH variable.
spack ci rebuild-index¶
Rebuild the buildcache index for the remote mirror.
Use the active, gitlab-enabled environment to rebuild the buildcache index for the associated mirror.
spack ci rebuild-index [-h]
Optional arguments
-h, --help
show this help message and exit
spack ci rebuild¶
Rebuild a spec if it is not on the remote mirror.
Check a single spec against the remote mirror, and rebuild it from source if the mirror does not contain the hash.
spack ci rebuild [-ht] [--fail-fast]
Optional arguments
-h, --help
show this help message and exit
-t, --tests
run stand-alone tests after the build
--fail-fast
stop stand-alone tests after the first failure
spack ci reproduce-build¶
Generate instructions for reproducing the spec rebuild job.
Artifacts of the provided gitlab pipeline rebuild job’s URL will be used to derive instructions for reproducing the build locally.
spack ci reproduce-build [-h] [--working-dir WORKING_DIR] job_url
Positional arguments
- job_url
Url of job artifacts bundle
Optional arguments
-h, --help
show this help message and exit
--working-dir WORKING_DIR
Where to unpack artifacts
spack clean¶
remove temporary build files and/or downloaded archives
spack clean [-hsdfmpba] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-s, --stage
remove all temporary build stages (default)
-d, --downloads
remove cached downloads
-f, --failures
force removal of all install failure tracking markers
-m, --misc-cache
remove long-lived caches, like the virtual package index
-p, --python-cache
remove .pyc, .pyo files and __pycache__ folders
-b, --bootstrap
remove software and configuration needed to bootstrap Spack
-a, --all
equivalent to -sdfmp (does not include –bootstrap)
spack clone¶
create a new installation of spack in another prefix
spack clone [-h] [-r REMOTE] prefix
Positional arguments
- prefix
name of prefix where we should install spack
Optional arguments
-h, --help
show this help message and exit
-r REMOTE, --remote REMOTE
name of the remote to clone from
spack commands¶
list available spack commands
spack commands [-ha] [--update-completion] [--format {subcommands,rst,names,bash}] [--header FILE] [--update FILE] ...
Positional arguments
- rst_files
list of rst files to search for _cmd-spack-<cmd> cross-refs
Optional arguments
-h, --help
show this help message and exit
--update-completion
regenerate spack’s tab completion scripts
-a, --aliases
include command aliases
--format {subcommands,rst,names,bash}
format to be used to print the output (default: names)
--header FILE
prepend contents of FILE to the output (useful for rst format)
--update FILE
write output to the specified file, if any command is newer
spack compiler¶
manage compilers
spack compiler [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack compiler find¶
spack compiler find [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] ...
Positional arguments
add_paths
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
spack compiler remove¶
spack compiler remove [-ha] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] compiler_spec
Positional arguments
compiler_spec
Optional arguments
-h, --help
show this help message and exit
-a, --all
remove ALL compilers that match spec
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
spack compiler list¶
spack compiler list [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read from
spack compiler info¶
spack compiler info [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] compiler_spec
Positional arguments
compiler_spec
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read from
spack compilers¶
list available compilers
spack compilers [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
spack concretize¶
concretize an environment and write a lockfile
spack concretize [-hfqU] [--test {root,all}] [--reuse] [--reuse-deps] [-j JOBS]
Optional arguments
-h, --help
show this help message and exit
-f, --force
Re-concretize even if already concretized.
--test {root,all}
Concretize with test dependencies. When ‘root’ is chosen, test dependencies are only added for the environment’s root specs. When ‘all’ is chosen, test dependencies are enabled for all packages in the environment.
-q, --quiet
Don’t print concretized specs
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
-j JOBS, --jobs JOBS
explicitly set number of parallel jobs
spack config¶
get and set configuration options
spack config [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read/modify
Subcommands
spack config get¶
spack config get [-h] [section]
Positional arguments
- section
configuration section to print. options: compilers, concretizer, mirrors, repos, packages, modules, config, upstreams, bootstrap, ci, cdash
Optional arguments
-h, --help
show this help message and exit
spack config blame¶
spack config blame [-h] section
Positional arguments
- section
configuration section to print. options: compilers, concretizer, mirrors, repos, packages, modules, config, upstreams, bootstrap, ci, cdash
Optional arguments
-h, --help
show this help message and exit
spack config edit¶
spack config edit [-h] [--print-file] [section]
Positional arguments
- section
configuration section to edit. options: compilers, concretizer, mirrors, repos, packages, modules, config, upstreams, bootstrap, ci, cdash
Optional arguments
-h, --help
show this help message and exit
--print-file
print the file name that would be edited
spack config list¶
spack config list [-h]
Optional arguments
-h, --help
show this help message and exit
spack config add¶
spack config add [-h] [-f FILE] [path]
Positional arguments
- path
colon-separated path to config that should be added, e.g. ‘config:default:true’
Optional arguments
-h, --help
show this help message and exit
-f FILE, --file FILE
file from which to set all config values
spack config prefer-upstream¶
spack config prefer-upstream [-h] [--local]
Optional arguments
-h, --help
show this help message and exit
--local
Set packages preferences based on local installs, rather than upstream.
spack config remove¶
spack config remove [-h] path
Positional arguments
- path
colon-separated path to config that should be removed, e.g. ‘config:default:true’
Optional arguments
-h, --help
show this help message and exit
spack config update¶
spack config update [-hy] section
Positional arguments
- section
section to update
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack config revert¶
spack config revert [-hy] section
Positional arguments
- section
section to update
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack containerize¶
creates recipes to build images for different container runtimes
spack containerize [-h] [--list-os] [--last-stage {bootstrap,build,final}]
Optional arguments
-h, --help
show this help message and exit
--list-os
list all the OS that can be used in the bootstrap phase and exit
--last-stage {bootstrap,build,final}
last stage in the container recipe
spack create¶
create a new package file
spack create [-hfb] [--keep-stage] [-n NAME] [-t TEMPLATE] [-r REPO] [-N NAMESPACE] [--skip-editor] [url]
Positional arguments
- url
url of package archive
Optional arguments
-h, --help
show this help message and exit
--keep-stage
don’t clean up staging area when command completes
-n NAME, --name NAME
name of the package to create
-t TEMPLATE, --template TEMPLATE
build system template to use. options: autoreconf, autotools, bazel, bundle, cmake, generic, intel, lua, makefile, maven, meson, octave, perlbuild, perlmake, python, qmake, r, racket, ruby, scons, sip, waf
-r REPO, --repo REPO
path to a repository where the package should be created
-N NAMESPACE, --namespace NAMESPACE
specify a namespace for the package. must be the namespace of a repository registered with Spack
-f, --force
overwrite any existing package file with the same name
--skip-editor
skip the edit session for the package (e.g., automation)
-b, --batch
don’t ask which versions to checksum
spack debug¶
debugging commands for troubleshooting Spack
spack debug [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack debug create-db-tarball¶
spack debug create-db-tarball [-h]
Optional arguments
-h, --help
show this help message and exit
spack debug report¶
spack debug report [-h]
Optional arguments
-h, --help
show this help message and exit
spack dependencies¶
show dependencies of a package
spack dependencies [-hitV] [--deptype DEPTYPE] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-i, --installed
List installed dependencies of an installed spec, instead of possible dependencies of a package.
-t, --transitive
show all transitive dependencies
--deptype DEPTYPE
comma-separated list of deptypes to traverse default=build,link,run,test
-V, --no-expand-virtuals
do not expand virtual dependencies
spack dependents¶
show packages that depend on another
spack dependents [-hit] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-i, --installed
List installed dependents of an installed spec, instead of possible dependents of a package.
-t, --transitive
Show all transitive dependents.
spack deprecate¶
Replace one package with another via symlinks
spack deprecate [-hy] [-d | -D] [-i | -I] [-l {soft,hard}] ...
Positional arguments
- specs
spec to deprecate and spec to use as deprecator
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
-d, --dependencies
Deprecate dependencies (default)
-D, --no-dependencies
Do not deprecate dependencies
-i, --install-deprecator
Concretize and install deprecator spec
-I, --no-install-deprecator
Deprecator spec must already be installed (default)
-l {soft,hard}, --link-type {soft,hard}
Type of filesystem link to use for deprecation (default soft)
spack dev-build¶
developer build: build from code in current working directory
spack dev-build [-hinqU] [-j JOBS] [-d SOURCE_PATH] [--deprecated] [--keep-prefix] [--skip-patch] [--drop-in SHELL]
[--test {root,all}] [-b BEFORE | -u UNTIL] [--clean | --dirty] [--reuse] [--reuse-deps]
...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-j JOBS, --jobs JOBS
explicitly set number of parallel jobs
-d SOURCE_PATH, --source-path SOURCE_PATH
path to source directory. defaults to the current directory
-i, --ignore-dependencies
don’t try to install dependencies of requested packages
-n, --no-checksum
do not use checksums to verify downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
--keep-prefix
do not remove the install prefix if installation fails
--skip-patch
skip patching for the developer build
-q, --quiet
do not display verbose build output while installing
--drop-in SHELL
drop into a build environment in a new shell, e.g. bash, zsh
--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.
-b BEFORE, --before BEFORE
phase to stop before when installing (default None)
-u UNTIL, --until UNTIL
phase to stop after when installing (default None)
--clean
unset harmful variables in the build environment (default)
--dirty
preserve user environment in spack’s build environment (danger!)
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack develop¶
add a spec to an environment’s dev-build information
spack develop [-h] [-p PATH] [--no-clone | --clone] [-f FORCE] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-p PATH, --path PATH
Source location of package
--no-clone
Do not clone. The package already exists at the source path
--clone
Clone the package even if the path already exists
-f FORCE, --force FORCE
Remove any files or directories that block cloning source code
spack diff¶
compare two specs
spack diff [-h] [--json] [--first] [-a ATTRIBUTE] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
--json
Dump json output instead of pretty printing.
--first
load the first match if multiple packages match the spec
-a ATTRIBUTE, --attribute ATTRIBUTE
select the attributes to show (defaults to all)
spack docs¶
open spack documentation in a web browser
spack docs [-h]
Optional arguments
-h, --help
show this help message and exit
spack edit¶
open package files in $EDITOR
spack edit [-h] [-b | -c | -d | -t | -m | -r REPO | -N NAMESPACE] [package]
Positional arguments
- package
package name
Optional arguments
-h, --help
show this help message and exit
-b, --build-system
Edit the build system with the supplied name.
-c, --command
edit the command with the supplied name
-d, --docs
edit the docs with the supplied name
-t, --test
edit the test with the supplied name
-m, --module
edit the main spack module with the supplied name
-r REPO, --repo REPO
path to repo to edit package in
-N NAMESPACE, --namespace NAMESPACE
namespace of package to edit
spack env¶
manage virtual environments
spack env [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack env activate¶
spack env activate [-hp] [--sh | --csh | --fish | --bat] [-v | -V] [--temp | -d DIR | env]
Positional arguments
- env
name of environment to activate
Optional arguments
-h, --help
show this help message and exit
--sh
print sh commands to activate the environment
--csh
print csh commands to activate the environment
--fish
print fish commands to activate the environment
--bat
print bat commands to activate the environment
-v, --with-view
update PATH etc. with associated view
-V, --without-view
do not update PATH etc. with associated view
-p, --prompt
decorate the command line prompt when activating
--temp
create and activate an environment in a temporary directory
-d DIR, --dir DIR
activate the environment in this directory
spack env deactivate¶
spack env deactivate [-h] [--sh | --csh | --fish | --bat]
Optional arguments
-h, --help
show this help message and exit
--sh
print sh commands to deactivate the environment
--csh
print csh commands to deactivate the environment
--fish
print fish commands to activate the environment
--bat
print bat commands to activate the environment
spack env create¶
spack env create [-hd] [--keep-relative] [--without-view | --with-view WITH_VIEW] env [envfile]
Positional arguments
- env
name of environment to create
- envfile
either a lockfile (must end with ‘.json’ or ‘.lock’) or a manifest file.
Optional arguments
-h, --help
show this help message and exit
-d, --dir
create an environment in a specific directory
--keep-relative
copy relative develop paths verbatim into the new environment when initializing from envfile
--without-view
do not maintain a view for this environment
--with-view WITH_VIEW
specify that this environment should maintain a view at the specified path (by default the view is maintained in the environment directory)
spack env remove¶
spack env remove [-hy] env [env ...]
Positional arguments
- env
environment(s) to remove
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack env status¶
spack env status [-h]
Optional arguments
-h, --help
show this help message and exit
spack env loads¶
spack env loads [-hr] [-n MODULE_SET_NAME] [-m {tcl,lmod}] [--input-only] [-p PREFIX] [-x EXCLUDE]
Optional arguments
-h, --help
show this help message and exit
-n MODULE_SET_NAME, --module-set-name MODULE_SET_NAME
module set for which to generate load operations
-m {tcl,lmod}, --module-type {tcl,lmod}
type of module system to generate loads for
--input-only
generate input for module command (instead of a shell script)
-p PREFIX, --prefix PREFIX
prepend to module names when issuing module load commands
-x EXCLUDE, --exclude EXCLUDE
exclude package from output; may be specified multiple times
-r, --dependencies
recursively traverse spec dependencies
spack env view¶
spack env view [-h] {regenerate,enable,disable} [view_path]
Positional arguments
- {regenerate,enable,disable}
action to take for the environment’s view
- view_path
when enabling a view, optionally set the path manually
Optional arguments
-h, --help
show this help message and exit
spack env update¶
spack env update [-hy] env
Positional arguments
- env
name or directory of the environment to activate
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack env revert¶
spack env revert [-hy] env
Positional arguments
- env
name or directory of the environment to activate
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack env depfile¶
spack env depfile [-h] [--make-prefix TARGET] [--make-disable-jobserver]
[--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]]
[-o FILE] [-G {make}]
...
Positional arguments
- specs
generate a depfile only for matching specs in the environment
Optional arguments
-h, --help
show this help message and exit
--make-prefix TARGET, --make-target-prefix TARGET
prefix Makefile targets (and variables) with <TARGET>/<name>. By default the absolute path to the directory makedeps under the environment metadata dir is used. Can be set to an empty string –make-prefix ‘’.
--make-disable-jobserver
disable POSIX jobserver support.
--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]
When using only, redundant build dependencies are pruned from the DAG. This flag is passed on to the generated spack install commands.
-o FILE, --output FILE
write the depfile to FILE rather than to stdout
-G {make}, --generator {make}
specify the depfile type. Currently only make is supported.
spack extensions¶
list extensions for package
spack extensions [-hlLdp] [-s {packages,installed,all}] ...
Positional arguments
- extendable
spec of package to list extensions for
Optional arguments
-h, --help
show this help message and exit
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-d, --deps
output dependencies along with found specs
-p, --paths
show paths to package install directories
-s {packages,installed,all}, --show {packages,installed,all}
show only part of output
spack external¶
manage external packages in Spack configuration
spack external [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack external find¶
spack external find [-h] [--not-buildable] [--exclude EXCLUDE] [-p PATH]
[--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] [--all] [-t TAG]
...
Positional arguments
packages
Optional arguments
-h, --help
show this help message and exit
--not-buildable
packages with detected externals won’t be built with Spack
--exclude EXCLUDE
packages to exclude from search
-p PATH, --path PATH
Alternative search paths for finding externals. May be repeated
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
--all
search for all packages that Spack knows about
-t TAG, --tag TAG
filter a package query by tag (multiple use allowed)
spack external list¶
spack external list [-h]
Optional arguments
-h, --help
show this help message and exit
spack external read-cray-manifest¶
spack external read-cray-manifest [-h] [--file FILE] [--directory DIRECTORY] [--dry-run] [--fail-on-error]
Optional arguments
-h, --help
show this help message and exit
--file FILE
specify a location other than the default
--directory DIRECTORY
specify a directory storing a group of manifest files
--dry-run
don’t modify DB with files that are read
--fail-on-error
if a manifest file cannot be parsed, fail and report the full stack trace
spack fetch¶
fetch archives for packages
spack fetch [-hnmD] [--deprecated] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-n, --no-checksum
do not use checksums to verify downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
-m, --missing
fetch only missing (not yet installed) dependencies
-D, --dependencies
also fetch all dependencies
spack find¶
list and search installed packages
spack find [-hdplLcfumvMN] [--format FORMAT | --json] [--groups] [--no-groups] [-t TAG] [--show-full-compiler]
[-x | -X] [--loaded] [--deprecated] [--only-deprecated] [--start-date START_DATE] [--end-date END_DATE]
...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--format FORMAT
output specs with the specified format string
--json
output specs as machine-readable json records
-d, --deps
output dependencies along with found specs
-p, --paths
show paths to package install directories
--groups
display specs in arch/compiler groups (default on)
--no-groups
do not group specs by arch/compiler
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-t TAG, --tag TAG
filter a package query by tag (multiple use allowed)
-c, --show-concretized
show concretized specs in an environment
-f, --show-flags
show spec compiler flags
--show-full-compiler
show full compiler specs
-x, --explicit
show only specs that were installed explicitly
-X, --implicit
show only specs that were installed as dependencies
-u, --unknown
show only specs Spack does not have a package for
-m, --missing
show missing dependencies as well as installed specs
-v, --variants
show variants in output (can be long)
--loaded
show only packages loaded in the user environment
-M, --only-missing
show only missing dependencies
--deprecated
show deprecated packages as well as installed specs
--only-deprecated
show only deprecated packages
-N, --namespace
show fully qualified package names
--start-date START_DATE
earliest date of installation [YYYY-MM-DD]
--end-date END_DATE
latest date of installation [YYYY-MM-DD]
spack gc¶
remove specs that are now no longer needed
spack gc [-hy]
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack gpg¶
handle GPG actions for spack
spack gpg [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack gpg verify¶
spack gpg verify [-h] ... [signature]
Positional arguments
- installed_spec
installed package spec
- signature
the signature file
Optional arguments
-h, --help
show this help message and exit
spack gpg trust¶
spack gpg trust [-h] keyfile
Positional arguments
- keyfile
add a key to the trust store
Optional arguments
-h, --help
show this help message and exit
spack gpg untrust¶
spack gpg untrust [-h] [--signing] keys [keys ...]
Positional arguments
- keys
remove keys from the trust store
Optional arguments
-h, --help
show this help message and exit
--signing
allow untrusting signing keys
spack gpg sign¶
spack gpg sign [-h] [--output DEST] [--key KEY] [--clearsign] ...
Positional arguments
- installed_spec
installed package spec
Optional arguments
-h, --help
show this help message and exit
--output DEST
the directory to place signatures
--key KEY
the key to use for signing
--clearsign
if specified, create a clearsign signature
spack gpg create¶
spack gpg create [-h] [--comment COMMENT] [--expires EXPIRATION] [--export DEST] [--export-secret DEST] name email
Positional arguments
- name
the name to use for the new key
the email address to use for the new key
Optional arguments
-h, --help
show this help message and exit
--comment COMMENT
a description for the intended use of the key
--expires EXPIRATION
when the key should expire
--export DEST
export the public key to a file
--export-secret DEST
export the private key to a file.
spack gpg list¶
spack gpg list [-h] [--trusted] [--signing]
Optional arguments
-h, --help
show this help message and exit
--trusted
list trusted keys
--signing
list keys which may be used for signing
spack gpg init¶
spack gpg init [-h]
Optional arguments
-h, --help
show this help message and exit
--from DIR
==SUPPRESS==
spack gpg export¶
spack gpg export [-h] [--secret] location [keys [keys ...]]
Positional arguments
- location
where to export keys
- keys
the keys to export; all public keys if unspecified
Optional arguments
-h, --help
show this help message and exit
--secret
export secret keys
spack gpg publish¶
spack gpg publish [-h] (-d directory | -m mirror-name | --mirror-url mirror-url) [--rebuild-index] [keys [keys ...]]
Positional arguments
- keys
the keys to publish; all public keys if unspecified
Optional arguments
-h, --help
show this help message and exit
-d directory, --directory directory
local directory where keys will be published.
-m mirror-name, --mirror-name mirror-name
name of the mirror where keys will be published.
--mirror-url mirror-url
URL of the mirror where keys will be published.
--rebuild-index
Regenerate buildcache key index after publishing key(s)
spack graph¶
generate graphs of package dependency relationships
spack graph [-hsci] [-a | -d] [--deptype DEPTYPE] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-a, --ascii
draw graph as ascii to stdout (default)
-d, --dot
generate graph in dot format and print to stdout
-s, --static
graph static (possible) deps, don’t concretize (implies –dot)
-c, --color
use different colors for different dependency types
-i, --installed
graph installed specs, or specs in the active env (implies –dot)
--deptype DEPTYPE
comma-separated list of deptypes to traverse default=build,link,run,test
spack help¶
get help on spack and its commands
spack help [-ha] [--spec help_command]
Positional arguments
- help_command
command to get help on
Optional arguments
-h, --help
show this help message and exit
-a, --all
list all available commands and options
--spec
help on the package specification syntax
spack info¶
get detailed information on a particular package
spack info [-ha] [--detectable] [--maintainers] [--no-dependencies] [--no-variants] [--no-versions] [--phases]
[--tags] [--tests] [--virtuals]
package
Positional arguments
- package
package name
Optional arguments
-h, --help
show this help message and exit
-a, --all
output all package information
--detectable
output information on external detection
--maintainers
output package maintainers
--no-dependencies
do not output build, link, and run package dependencies
--no-variants
do not output variants
--no-versions
do not output versions
--phases
output installation phases
--tags
output package tags
--tests
output relevant build-time and stand-alone tests
--virtuals
output virtual packages
spack install¶
build and install packages
spack install [-hnvyU] [--only {package,dependencies}] [-u UNTIL] [-j JOBS] [--overwrite] [--fail-fast]
[--keep-prefix] [--keep-stage] [--dont-restage]
[--use-cache | --no-cache | --cache-only | --use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]]
[--include-build-deps] [--no-check-signature] [--show-log-on-error] [--source] [--deprecated] [--fake]
[--only-concrete] [--add | --no-add] [-f SPEC_YAML_FILE] [--clean | --dirty] [--test {root,all}]
[--log-format {junit,cdash}] [--log-file LOG_FILE] [--help-cdash] [--reuse] [--reuse-deps]
...
Positional arguments
- spec
package spec
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
-u UNTIL, --until UNTIL
phase to stop after when installing (default None)
-j JOBS, --jobs JOBS
explicitly set number of parallel jobs
--overwrite
reinstall an existing spec, even if it has dependents
--fail-fast
stop all builds if any build fails (default is best effort)
--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 (default)
--no-cache
do not check for pre-built Spack packages in mirrors
--cache-only
only install package from binary mirrors
--use-buildcache [{auto,only,never},][package:{auto,only,never},][dependencies:{auto,only,never}]
select the mode of buildcache for the ‘package’ and ‘dependencies’. Default: package:auto,dependencies:auto - auto behaves like –use-cache - only behaves like –cache-only - never behaves like –no-cache
--include-build-deps
include build deps when installing from cache, which is useful for CI pipeline troubleshooting
--no-check-signature
do not check signatures of binary packages
--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 downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
-v, --verbose
display verbose build output while installing
--fake
fake install for debug purposes.
--only-concrete
(with environment) only install already concretized specs
--add
(with environment) add spec to the environment as a root.
--no-add
(with environment) do not add spec to the environment as a root (the default behavior).
-f SPEC_YAML_FILE, --file SPEC_YAML_FILE
install from file. Read specs to install from .yaml files
--clean
unset harmful variables in the build environment (default)
--dirty
preserve user environment in spack’s 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.
--log-format {junit,cdash}
format to be used for log files
--log-file LOG_FILE
filename for the log file. if not passed a default will be used
--help-cdash
Show usage instructions for CDash reporting
--cdash-upload-url CDASH_UPLOAD_URL
==SUPPRESS==
--cdash-build CDASH_BUILD
==SUPPRESS==
--cdash-site CDASH_SITE
==SUPPRESS==
--cdash-track CDASH_TRACK
==SUPPRESS==
--cdash-buildstamp CDASH_BUILDSTAMP
==SUPPRESS==
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack license¶
list and check license headers on files in spack
spack license [-h] [--root ROOT] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
--root ROOT
scan a different prefix for license issues
Subcommands
spack license list-files¶
spack license list-files [-h]
Optional arguments
-h, --help
show this help message and exit
spack license verify¶
spack license verify [-h]
Optional arguments
-h, --help
show this help message and exit
spack license update-copyright-year¶
spack license update-copyright-year [-h]
Optional arguments
-h, --help
show this help message and exit
spack list¶
list and search available packages
spack list [-hdv] [--format {name_only,version_json,html}] [-t TAG] [--count | --update FILE] ...
Positional arguments
- filter
optional case-insensitive glob patterns to filter results
Optional arguments
-h, --help
show this help message and exit
-d, --search-description
filtering will also search the description for a match
--format {name_only,version_json,html}
format to be used to print the output [default: name_only]
-v, --virtuals
include virtual packages in list
-t TAG, --tag TAG
filter a package query by tag (multiple use allowed)
--count
display the number of packages that would be listed
--update FILE
write output to the specified file, if any package is newer
spack load¶
add package to the user environment
spack load [-h] [--sh | --csh | --fish | --bat] [--first] [--only {package,dependencies}] [--list] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--sh
print sh commands to load the package
--csh
print csh commands to load the package
--fish
print fish commands to load the package
--bat
print bat commands to load the package
--first
load the first match if multiple packages match the spec
--only {package,dependencies}
select whether to load the package and its dependencies the default is to load the package and all dependencies alternatively one can decide to load only the package or only the dependencies
--list
show loaded packages: same as spack find –loaded
spack location¶
print out locations of packages and spack directories
spack location [-h] [-m | -r | -i | -p | -P | -s | -S | --source-dir | -b | -e [name]] [--first] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-m, --module-dir
spack python module directory
-r, --spack-root
spack installation root
-i, --install-dir
install prefix for spec (spec need not be installed)
-p, --package-dir
directory enclosing a spec’s package.py file
-P, --packages
top-level packages directory for Spack
-s, --stage-dir
stage directory for a spec
-S, --stages
top level stage directory
--source-dir
source directory for a spec (requires it to be staged first)
-b, --build-dir
build directory for a spec (requires it to be staged first)
-e [name], --env [name]
location of the named or current environment
--first
use the first match if multiple packages match the spec
spack log-parse¶
filter errors and warnings from build logs
spack log-parse [-hp] [--show SHOW] [-c CONTEXT] [-w WIDTH] [-j JOBS] file
Positional arguments
- file
a log file containing build output, or - for stdin
Optional arguments
-h, --help
show this help message and exit
--show SHOW
comma-separated list of what to show; options: errors, warnings
-c CONTEXT, --context CONTEXT
lines of context to show around lines of interest
-p, --profile
print out a profile of time spent in regexes during parse
-w WIDTH, --width WIDTH
wrap width: auto-size to terminal by default; 0 for no wrap
-j JOBS, --jobs JOBS
number of jobs to parse log file (default: 1 for short logs, ncpus for long logs)
spack maintainers¶
get information about package maintainers
spack maintainers [-ha] [--maintained | --unmaintained] [--by-user] ...
Positional arguments
- package_or_user
names of packages or users to get info for
Optional arguments
-h, --help
show this help message and exit
--maintained
show names of maintained packages
--unmaintained
show names of unmaintained packages
-a, --all
show maintainers for all packages
--by-user
show packages for users instead of users for packages
spack make-installer¶
generate Windows installer
spack make-installer [-h] (-v SPACK_VERSION | -s SPACK_SOURCE) [-g {VERYSILENT,SILENT}] output_dir
Positional arguments
- output_dir
output directory
Optional arguments
-h, --help
show this help message and exit
-v SPACK_VERSION, --spack-version SPACK_VERSION
download given spack version e.g. 0.16.0
-s SPACK_SOURCE, --spack-source SPACK_SOURCE
full path to spack source
-g {VERYSILENT,SILENT}, --git-installer-verbosity {VERYSILENT,SILENT}
Level of verbosity provided by bundled Git Installer. Default is fully verbose
spack mark¶
mark packages as explicitly or implicitly installed
spack mark [-ha] (-e | -i) ...
Positional arguments
- installed_specs
one or more installed package specs
Optional arguments
-h, --help
show this help message and exit
-a, --all
Mark ALL installed packages that match each supplied spec. If you mark –all libelf, ALL versions of libelf are marked. If no spec is supplied, all installed packages will be marked.
-e, --explicit
Mark packages as explicitly installed.
-i, --implicit
Mark packages as implicitly installed.
spack mirror¶
manage mirrors (source and binary)
spack mirror [-hn] [--deprecated] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
-n, --no-checksum
do not use checksums to verify downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
Subcommands
spack mirror create¶
spack mirror create [-haD] [-d DIRECTORY] [-f FILE] [--exclude-file EXCLUDE_FILE] [--exclude-specs EXCLUDE_SPECS]
[--skip-unstable-versions] [-n VERSIONS_PER_SPEC]
...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-d DIRECTORY, --directory DIRECTORY
directory in which to create mirror
-a, --all
mirror all versions of all packages in Spack, or all packages in the current environment if there is an active environment (this requires significant time and space)
-f FILE, --file FILE
file with specs of packages to put in mirror
--exclude-file EXCLUDE_FILE
specs which Spack should not try to add to a mirror (listed in a file, one per line)
--exclude-specs EXCLUDE_SPECS
specs which Spack should not try to add to a mirror (specified on command line)
--skip-unstable-versions
don’t cache versions unless they identify a stable (unchanging) source code
-D, --dependencies
also fetch all dependencies
-n VERSIONS_PER_SPEC, --versions-per-spec VERSIONS_PER_SPEC
the number of versions to fetch for each spec, choose ‘all’ to retrieve all versions of each package
spack mirror destroy¶
spack mirror destroy [-h] (-m mirror_name | --mirror-url mirror_url)
Optional arguments
-h, --help
show this help message and exit
-m mirror_name, --mirror-name mirror_name
find mirror to destroy by name
--mirror-url mirror_url
find mirror to destroy by url
spack mirror add¶
spack mirror add [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
[--s3-access-key-id S3_ACCESS_KEY_ID] [--s3-access-key-secret S3_ACCESS_KEY_SECRET]
[--s3-access-token S3_ACCESS_TOKEN] [--s3-profile S3_PROFILE] [--s3-endpoint-url S3_ENDPOINT_URL]
mirror url
Positional arguments
- mirror
mnemonic name for mirror
- url
url of mirror directory from ‘spack mirror create’
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
--s3-access-key-id S3_ACCESS_KEY_ID
ID string to use to connect to this S3 mirror
--s3-access-key-secret S3_ACCESS_KEY_SECRET
Secret string to use to connect to this S3 mirror
--s3-access-token S3_ACCESS_TOKEN
Access Token to use to connect to this S3 mirror
--s3-profile S3_PROFILE
S3 profile name to use to connect to this S3 mirror
--s3-endpoint-url S3_ENDPOINT_URL
Endpoint URL to use to connect to this S3 mirror
spack mirror remove¶
spack mirror remove [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] mirror
Positional arguments
- mirror
mnemonic name for mirror
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
spack mirror set-url¶
spack mirror set-url [-h] [--push] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
[--s3-access-key-id S3_ACCESS_KEY_ID] [--s3-access-key-secret S3_ACCESS_KEY_SECRET]
[--s3-access-token S3_ACCESS_TOKEN] [--s3-profile S3_PROFILE] [--s3-endpoint-url S3_ENDPOINT_URL]
mirror url
Positional arguments
- mirror
mnemonic name for mirror
- url
url of mirror directory from ‘spack mirror create’
Optional arguments
-h, --help
show this help message and exit
--push
set only the URL used for uploading new packages
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
--s3-access-key-id S3_ACCESS_KEY_ID
ID string to use to connect to this S3 mirror
--s3-access-key-secret S3_ACCESS_KEY_SECRET
Secret string to use to connect to this S3 mirror
--s3-access-token S3_ACCESS_TOKEN
Access Token to use to connect to this S3 mirror
--s3-profile S3_PROFILE
S3 profile name to use to connect to this S3 mirror
--s3-endpoint-url S3_ENDPOINT_URL
Endpoint URL to use to connect to this S3 mirror
spack mirror list¶
spack mirror list [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read from
spack module¶
generate/manage module files
spack module [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack module lmod¶
spack module lmod [-h] [-n MODULE_SET_NAME] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
-n MODULE_SET_NAME, --name MODULE_SET_NAME
Named module set to use from modules configuration.
Subcommands
spack module lmod refresh¶
spack module lmod refresh [-hy] [--delete-tree] [--upstream-modules] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--delete-tree
delete the module file tree before refresh
--upstream-modules
generate modules for packages installed upstream
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack module lmod find¶
spack module lmod find [-hr] [--full-path] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--full-path
display full path to module file
-r, --dependencies
recursively traverse spec dependencies
spack module lmod rm¶
spack module lmod rm [-hy] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack module lmod loads¶
spack module lmod loads [-hr] [--input-only] [-p PREFIX] [-x EXCLUDE] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--input-only
generate input for module command (instead of a shell script)
-p PREFIX, --prefix PREFIX
prepend to module names when issuing module load commands
-x EXCLUDE, --exclude EXCLUDE
exclude package from output; may be specified multiple times
-r, --dependencies
recursively traverse spec dependencies
spack module lmod setdefault¶
spack module lmod setdefault [-h] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
spack module tcl¶
spack module tcl [-h] [-n MODULE_SET_NAME] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
-n MODULE_SET_NAME, --name MODULE_SET_NAME
Named module set to use from modules configuration.
Subcommands
spack module tcl refresh¶
spack module tcl refresh [-hy] [--delete-tree] [--upstream-modules] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--delete-tree
delete the module file tree before refresh
--upstream-modules
generate modules for packages installed upstream
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack module tcl find¶
spack module tcl find [-hr] [--full-path] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--full-path
display full path to module file
-r, --dependencies
recursively traverse spec dependencies
spack module tcl rm¶
spack module tcl rm [-hy] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack module tcl loads¶
spack module tcl loads [-hr] [--input-only] [-p PREFIX] [-x EXCLUDE] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
--input-only
generate input for module command (instead of a shell script)
-p PREFIX, --prefix PREFIX
prepend to module names when issuing module load commands
-x EXCLUDE, --exclude EXCLUDE
exclude package from output; may be specified multiple times
-r, --dependencies
recursively traverse spec dependencies
spack module tcl setdefault¶
spack module tcl setdefault [-h] ...
Positional arguments
- installed_specs
constraint to select a subset of installed packages
Optional arguments
-h, --help
show this help message and exit
spack patch¶
patch expanded archive sources in preparation for install
spack patch [-hnU] [--deprecated] [--reuse] [--reuse-deps] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-n, --no-checksum
do not use checksums to verify downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack pkg¶
query packages associated with particular git revisions
spack pkg [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack pkg add¶
spack pkg add [-h] package [package ...]
Positional arguments
- package
one or more package names
Optional arguments
-h, --help
show this help message and exit
spack pkg list¶
spack pkg list [-h] [rev]
Positional arguments
- rev
revision to list packages for
Optional arguments
-h, --help
show this help message and exit
spack pkg diff¶
spack pkg diff [-h] [rev1] [rev2]
Positional arguments
- rev1
revision to compare against
- rev2
revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --help
show this help message and exit
spack pkg added¶
spack pkg added [-h] [rev1] [rev2]
Positional arguments
- rev1
revision to compare against
- rev2
revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --help
show this help message and exit
spack pkg changed¶
spack pkg changed [-h] [-t TYPE] [rev1] [rev2]
Positional arguments
- rev1
revision to compare against
- rev2
revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --help
show this help message and exit
-t TYPE, --type TYPE
Types of changes to show (A: added, R: removed, C: changed); default is ‘C’
spack pkg removed¶
spack pkg removed [-h] [rev1] [rev2]
Positional arguments
- rev1
revision to compare against
- rev2
revision to compare to rev1 (default is HEAD)
Optional arguments
-h, --help
show this help message and exit
spack pkg grep¶
spack pkg grep [--help] ...
Positional arguments
- grep_args
arguments for grep
Optional arguments
--help
show this help message and exit
spack pkg source¶
spack pkg source [-hc] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
-c, --canonical
dump canonical source as used by package hash.
spack pkg hash¶
spack pkg hash [-h] ...
Positional arguments
- spec
package spec
Optional arguments
-h, --help
show this help message and exit
spack providers¶
list packages that provide a particular virtual package
spack providers [-h] [virtual_package [virtual_package ...]]
Positional arguments
- virtual_package
find packages that provide this virtual package
Optional arguments
-h, --help
show this help message and exit
spack pydoc¶
run pydoc from within spack
spack pydoc [-h] entity
Positional arguments
- entity
run pydoc help on entity
Optional arguments
-h, --help
show this help message and exit
spack python¶
launch an interpreter as spack would launch a command
spack python [-hVu] [-c PYTHON_COMMAND] [-i {python,ipython}] [-m MODULE] [--path] ...
Positional arguments
- python_args
file to run plus arguments
Optional arguments
-h, --help
show this help message and exit
-V, --version
print the Python version number and exit
-c PYTHON_COMMAND
command to execute
-u
for compatibility with xdist, do not use without adding -u to the interpreter
-i {python,ipython}
python interpreter
-m MODULE
run library module as a script
--path
show path to python interpreter that spack uses
spack reindex¶
rebuild Spack’s package database
spack reindex [-h]
Optional arguments
-h, --help
show this help message and exit
spack remove¶
remove specs from an environment
spack remove [-haf] [-l LIST_NAME] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-a, --all
remove all specs from (clear) the environment
-l LIST_NAME, --list-name LIST_NAME
name of the list to remove specs from
-f, --force
remove concretized spec (if any) immediately
spack repo¶
manage package source repositories
spack repo [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack repo create¶
spack repo create [-h] [-d SUBDIR] directory [namespace]
Positional arguments
- directory
directory to create the repo in
- namespace
namespace to identify packages in the repository. defaults to the directory name
Optional arguments
-h, --help
show this help message and exit
-d SUBDIR, --subdirectory SUBDIR
subdirectory to store packages in the repository. Default ‘packages’. Use an empty string for no subdirectory.
spack repo list¶
spack repo list [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT]
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to read from
spack repo add¶
spack repo add [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] path
Positional arguments
- path
path to a Spack package repository directory
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
spack repo remove¶
spack repo remove [-h] [--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT] namespace_or_path
Positional arguments
- namespace_or_path
namespace or path of a Spack package repository
Optional arguments
-h, --help
show this help message and exit
--scope {defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT
configuration scope to modify
spack resource¶
list downloadable resources (tarballs, repos, patches, etc.)
spack resource [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack resource list¶
spack resource list [-h] [--only-hashes]
Optional arguments
-h, --help
show this help message and exit
--only-hashes
only print sha256 hashes of resources
spack resource show¶
spack resource show [-h] hash
Positional arguments
hash
Optional arguments
-h, --help
show this help message and exit
spack restage¶
revert checked out package source code
spack restage [-h] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
spack solve¶
concretize a specs using an ASP solver
spack solve [-hlLIyjNtU] [--show SHOW] [-c {nodes,edges,paths}] [--timers] [--stats] [--reuse] [--reuse-deps] ...
Positional arguments
- specs
specs of packages
Optional arguments
-h, --help
show this help message and exit
--show SHOW
select outputs: comma-separated list of: asp asp program text opt optimization criteria for best model output raw clingo output solutions models found by asp program all all of the above
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-I, --install-status
show install status of packages. packages can be: installed [+], missing and needed by an installed package [-], installed in and upstream instance [^], or not installed (no annotation)
-y, --yaml
print concrete spec as yaml
-j, --json
print concrete spec as json
-c {nodes,edges,paths}, --cover {nodes,edges,paths}
how extensively to traverse the DAG (default: nodes)
-N, --namespaces
show fully qualified package names
-t, --types
show dependency types
--timers
print out timers for different solve phases
--stats
print out statistics from clingo
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack spec¶
show what would be installed, given a spec
spack spec [-hlLINtU] [-y | -j | --format FORMAT] [-c {nodes,edges,paths}] [--reuse] [--reuse-deps] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-l, --long
show dependency hashes as well as versions
-L, --very-long
show full dependency hashes as well as versions
-I, --install-status
show install status of packages. packages can be: installed [+], missing and needed by an installed package [-], installed in and upstream instance [^], or not installed (no annotation)
-y, --yaml
print concrete spec as YAML
-j, --json
print concrete spec as JSON
--format FORMAT
print concrete spec with the specified format string
-c {nodes,edges,paths}, --cover {nodes,edges,paths}
how extensively to traverse the DAG (default: nodes)
-N, --namespaces
show fully qualified package names
-t, --types
show dependency types
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack stage¶
expand downloaded archive in preparation for install
spack stage [-hnU] [--deprecated] [-p PATH] [--reuse] [--reuse-deps] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-n, --no-checksum
do not use checksums to verify downloaded files (unsafe)
--deprecated
fetch deprecated versions without warning
-p PATH, --path PATH
path to stage package, does not add to spack tree
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
spack style¶
runs source code style checks on spack
spack style [-harUf] [-b BASE] [--root ROOT] [-t TOOL | -s TOOL] ...
Positional arguments
- files
specific files to check
Optional arguments
-h, --help
show this help message and exit
-b BASE, --base BASE
branch to compare against to determine changed files (default: develop)
-a, --all
check all files, not just changed files
-r, --root-relative
print root-relative paths (default: cwd-relative)
-U, --no-untracked
exclude untracked files from checks
-f, --fix
format automatically if possible (e.g., with isort, black)
--root ROOT
style check a different spack instance
-t TOOL, --tool TOOL
specify which tools to run (default: isort,black,flake8,mypy)
-s TOOL, --skip TOOL
specify tools to skip (choose from isort,black,flake8,mypy)
spack tags¶
Show package tags and associated packages
spack tags [-hia] [tag [tag ...]]
Positional arguments
- tag
show packages with the specified tag
Optional arguments
-h, --help
show this help message and exit
-i, --installed
show information for installed packages only
-a, --all
show packages for all available tags
spack test¶
run spack’s tests for an install
spack test [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack test run¶
Run tests for the specified installed packages.
If no specs are listed, run tests for all packages in the current environment or all installed packages if there is no active environment.
spack test run [-hx] [--alias ALIAS] [--fail-fast] [--fail-first] [--externals] [--keep-stage]
[--log-format {junit,cdash}] [--log-file LOG_FILE] [--help-cdash] [--clean | --dirty]
...
Positional arguments
- installed_specs
one or more installed package specs
Optional arguments
-h, --help
show this help message and exit
--alias ALIAS
Provide an alias for this test-suite for subsequent access.
--fail-fast
Stop tests for each package after the first failure.
--fail-first
Stop after the first failed package.
--externals
Test packages that are externally installed.
-x, --explicit
Only test packages that are explicitly installed.
--keep-stage
Keep testing directory for debugging
--log-format {junit,cdash}
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
==SUPPRESS==
--cdash-build CDASH_BUILD
==SUPPRESS==
--cdash-site CDASH_SITE
==SUPPRESS==
--cdash-track CDASH_TRACK
==SUPPRESS==
--cdash-buildstamp CDASH_BUILDSTAMP
==SUPPRESS==
--help-cdash
Show usage instructions for CDash reporting
--clean
unset harmful variables in the build environment (default)
--dirty
preserve user environment in spack’s build environment (danger!)
spack test list¶
List installed packages with available tests.
spack test list [-ha] [tag [tag ...]]
Positional arguments
- tag
limit packages to those with all listed tags
Optional arguments
-h, --help
show this help message and exit
-a, --all
list all packages with tests (not just installed)
spack test find¶
Find tests that are running or have available results.
Displays aliases for tests that have them, otherwise test suite content hashes.
spack test find [-h] ...
Positional arguments
- filter
optional case-insensitive glob patterns to filter results.
Optional arguments
-h, --help
show this help message and exit
spack test status¶
Get the current status for the specified Spack test suite(s).
spack test status [-h] ...
Positional arguments
- names
Test suites for which to print status
Optional arguments
-h, --help
show this help message and exit
spack test results¶
Get the results from Spack test suite(s) (default all).
spack test results [-hlf] ...
Positional arguments
- [name(s)] [– installed_specs]…
suite names and installed package constraints
Optional arguments
-h, --help
show this help message and exit
-l, --logs
print the test log for each matching package
-f, --failed
only show results for failed tests of matching packages
spack test remove¶
Remove results from Spack test suite(s) (default all).
If no test suite is listed, remove results for all suites.
Removed tests can no longer be accessed for results or status, and will not appear in spack test list results.
spack test remove [-hy] ...
Positional arguments
- names
Test suites to remove from test stage
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack test-env¶
run a command in a spec’s test environment, or dump its environment to screen or file
spack test-env [-hU] [--clean] [--dirty] [--reuse] [--reuse-deps] [--dump FILE] [--pickle FILE] ...
Positional arguments
- spec [–] [cmd]…
specs of package environment to emulate
Optional arguments
-h, --help
show this help message and exit
--clean
unset harmful variables in the build environment (default)
--dirty
preserve user environment in spack’s build environment (danger!)
-U, --fresh
do not reuse installed deps; build newest configuration
--reuse
reuse installed packages/buildcaches when possible
--reuse-deps
reuse installed dependencies only
--dump FILE
dump a source-able environment to FILE
--pickle FILE
dump a pickled source-able environment to FILE
spack tutorial¶
set up spack for our tutorial (WARNING: modifies config!)
spack tutorial [-hy]
Optional arguments
-h, --help
show this help message and exit
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
spack undevelop¶
remove specs from an environment
spack undevelop [-ha] ...
Positional arguments
- specs
one or more package specs
Optional arguments
-h, --help
show this help message and exit
-a, --all
remove all specs from (clear) the environment
spack uninstall¶
remove installed packages
spack uninstall [-hfRya] [--remove] [--origin ORIGIN] ...
Positional arguments
- installed_specs
one or more installed package specs
Optional arguments
-h, --help
show this help message and exit
-f, --force
remove regardless of whether other packages or environments depend on this one
--remove
if in an environment, then the spec should also be removed from the environment description
-R, --dependents
also uninstall any packages that depend on the ones given via command line
-y, --yes-to-all
assume “yes” is the answer to every confirmation request
-a, --all
remove ALL installed packages that match each supplied spec
--origin ORIGIN
only remove DB records with the specified origin
spack unit-test¶
run spack’s unit tests (wrapper around pytest)
spack unit-test [-hHs] [-l | -L | -N] [--extension EXTENSION] [-k EXPRESSION] [--showlocals] ...
Positional arguments
- pytest_args
arguments for pytest
Optional arguments
-h, --help
show this help message and exit
-H, --pytest-help
show full pytest help, with advanced options
-l, --list
list test filenames
-L, --list-long
list all test functions
-N, --list-names
list full names of all tests
--extension EXTENSION
run test for a given spack extension
-s
print output while tests run (disable capture)
-k EXPRESSION
filter tests by keyword (can also use w/list options)
--showlocals
show local variable values in tracebacks
spack unload¶
remove package from the user environment
spack unload [-ha] [--sh | --csh | --fish | --bat] ...
Positional arguments
- installed_specs
one or more installed package specs
Optional arguments
-h, --help
show this help message and exit
--sh
print sh commands to activate the environment
--csh
print csh commands to activate the environment
--fish
print fish commands to load the package
--bat
print bat commands to load the package
-a, --all
unload all loaded Spack packages.
spack url¶
debugging tool for url parsing
spack url [-h] SUBCOMMAND ...
Optional arguments
-h, --help
show this help message and exit
Subcommands
spack url parse¶
spack url parse [-hs] url
Positional arguments
- url
url to parse
Optional arguments
-h, --help
show this help message and exit
-s, --spider
spider the source page for versions
spack url list¶
spack url list [-hce] [-n | -N | -v | -V]
Optional arguments
-h, --help
show this help message and exit
-c, --color
color the parsed version and name in the urls shown (versions will be cyan, name red)
-e, --extrapolation
color the versions used for extrapolation as well (additional versions will be green, names magenta)
-n, --incorrect-name
only list urls for which the name was incorrectly parsed
-N, --correct-name
only list urls for which the name was correctly parsed
-v, --incorrect-version
only list urls for which the version was incorrectly parsed
-V, --correct-version
only list urls for which the version was correctly parsed
spack url summary¶
spack url summary [-h]
Optional arguments
-h, --help
show this help message and exit
spack url stats¶
spack url stats [-h] [--show-issues]
Optional arguments
-h, --help
show this help message and exit
--show-issues
show packages with issues (md5 hashes, http urls)
spack verify¶
Check that all spack packages are on disk as installed
spack verify [-hlja] [-s | -f] ...
Positional arguments
- specs_or_files
Specs or files to verify
Optional arguments
-h, --help
show this help message and exit
-l, --local
Verify only locally installed packages
-j, --json
Ouptut json-formatted errors
-a, --all
Verify all packages
-s, --specs
Treat entries as specs (default)
-f, --files
Treat entries as absolute filenames. Cannot be used with ‘-a’
spack versions¶
list available versions of a package
spack versions [-h] [-s | --safe-only | -r | -n] [-c CONCURRENCY] package
Positional arguments
- package
package name
Optional arguments
-h, --help
show this help message and exit
-s, --safe
only list safe versions of the package
--safe-only
[deprecated] only list safe versions of the package
-r, --remote
only list remote versions of the package
-n, --new
only list remote versions newer than the latest checksummed version
-c CONCURRENCY, --concurrency CONCURRENCY
number of concurrent requests
spack view¶
project packages to a compact naming scheme on the filesystem.
spack view [-hv] [-e EXCLUDE] [-d {true,false,yes,no}] ACTION ...
Optional arguments
-h, --help
show this help message and exit
-v, --verbose
If not verbose only warnings/errors will be printed.
-e EXCLUDE, --exclude EXCLUDE
exclude packages with names matching the given regex pattern
-d {true,false,yes,no}, --dependencies {true,false,yes,no}
Link/remove/list dependencies.
Subcommands
spack view symlink¶
spack view symlink [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
- path
path to file system view directory
- spec
seed specs of the packages to view
Optional arguments
-h, --help
show this help message and exit
--projection-file PROJECTION_FILE
Initialize view using projections from file.
-i, --ignore-conflicts
spack view hardlink¶
spack view hardlink [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
- path
path to file system view directory
- spec
seed specs of the packages to view
Optional arguments
-h, --help
show this help message and exit
--projection-file PROJECTION_FILE
Initialize view using projections from file.
-i, --ignore-conflicts
spack view copy¶
spack view copy [-hi] [--projection-file PROJECTION_FILE] path spec [spec ...]
Positional arguments
- path
path to file system view directory
- spec
seed specs of the packages to view
Optional arguments
-h, --help
show this help message and exit
--projection-file PROJECTION_FILE
Initialize view using projections from file.
-i, --ignore-conflicts
spack view remove¶
spack view remove [-ha] [--no-remove-dependents] path [spec [spec ...]]
Positional arguments
- path
path to file system view directory
- spec
seed specs of the packages to view
Optional arguments
-h, --help
show this help message and exit
--no-remove-dependents
Do not remove dependents of specified specs.
-a, --all
act on all specs in view
spack view statlink¶
spack view statlink [-h] path [spec [spec ...]]
Positional arguments
- path
path to file system view directory
- spec
seed specs of the packages to view
Optional arguments
-h, --help
show this help message and exit