Getting Help¶
spack help¶
If you don’t find what you need here, the help subcommand will print out a list of all of Spack’s options and subcommands:
$ spack help
usage: spack [-hkV] [-e ENV] [--color {always,never,auto}] COMMAND ...
A flexible package manager that supports multiple versions,
configurations, platforms, and compilers.
Common spack commands:
build, install, and test packages:
install build and install packages
uninstall remove installed packages
gc remove specs that are now no longer needed
spec show what would be installed, given a spec
configuration:
arch print architecture information about this machine
compilers list available compilers
external manage external packages in Spack configuration
environments:
env manage environments
view manipulate view directories in the filesystem
create packages:
create create a new package file
edit open package files in ``$EDITOR``
audit audit configuration files, packages, etc.
query packages:
find list and search installed packages
info get detailed information on a particular package
list list and search available packages
user environment:
load add package to the user environment
module generate/manage module files
unload remove package from the user environment
Options:
general:
--color {always,never,auto}
when to colorize output (default: auto)
-V, --version show version number and exit
-h, --help show this help message and exit
-k, --insecure do not check ssl certificates when downloading
configuration and environments:
-e, --env ENV run with an environment
More help:
spack help --all list all commands and options
spack help <command> help on a specific command
spack help --spec help on the package specification syntax
spack docs open https://spack.rtfd.io/ 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 [-h] [--only {package,dependencies}] [-u UNTIL] [-p CONCURRENT_PACKAGES] [-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] [-n] [-v] [--fake]
[--only-concrete] [--add | --no-add] [--clean | --dirty] [--test {root,all}]
[--log-format {junit,cdash}] [--log-file LOG_FILE] [--help-cdash] [-y] [-f] [-U] [--reuse]
[--fresh-roots] [--deprecated]
...
build and install packages
positional arguments:
spec package spec
options:
--add (with environment) add spec to the environment as a root
--cache-only only install package from binary mirrors
--clean unset harmful variables in the build environment (default)
--dirty preserve user environment in spack's build environment (danger!)
--dont-restage if a partial install is detected, don't delete prior state
--fail-fast stop all builds if any build fails (default is best effort)
--fake fake install for debug purposes
--help-cdash show usage instructions for CDash reporting
--include-build-deps include build deps when installing from cache, useful for CI pipeline troubleshooting
--keep-prefix don't remove the install prefix if installation fails
--keep-stage don't remove the build stage if installation succeeds
--log-file LOG_FILE filename for the log file
--log-format {junit,cdash}
format to be used for log files
--no-add (with environment) do not add spec to the environment as a root
--no-cache do not check for pre-built Spack packages in mirrors
--no-check-signature do not check signatures of binary packages (override mirror config)
--only {package,dependencies}
select the mode of installation
default is to install the package along with all its dependencies. alternatively, one can decide to install only the package or only the dependencies
--only-concrete (with environment) only install already concretized specs
--overwrite reinstall an existing spec, even if it has dependents
--show-log-on-error print full build log to stderr if build fails
--source install source files in prefix
--test {root,all} run tests on only root packages or all packages
--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
--use-cache check for pre-built Spack packages in mirrors (default)
-h, --help show this help message and exit
-j, --jobs JOBS explicitly set number of parallel jobs
-n, --no-checksum do not use checksums to verify downloaded files (unsafe)
-p, --concurrent-packages CONCURRENT_PACKAGES
maximum number of packages to build concurrently
-u, --until UNTIL phase to stop after when installing (default None)
-v, --verbose display verbose build output while installing
-y, --yes-to-all assume "yes" is the answer to every confirmation request
concretizer arguments:
--deprecated allow concretizer to select deprecated versions
--fresh-roots, --reuse-deps
concretize with fresh roots and reused dependencies
--reuse reuse installed packages/buildcaches when possible
-U, --fresh do not reuse installed deps; build newest configuration
-f, --force allow changes to concretized specs in spack.lock (in an env)
Alternatively, you can use spack --help in place of spack help, or spack <subcommand> --help to get help on a particular subcommand.