Spack¶
Spack is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms and environments. It was designed for large supercomputing centers, where many users and application teams share common installations of software on clusters with exotic architectures, using libraries that do not have a standard ABI. Spack is non-destructive: installing a new version does not break existing installations, so many configurations can coexist on the same system.
Most importantly, Spack is simple. It offers a simple spec syntax so that users can specify versions and configuration options concisely. Spack is also simple for package authors: package files are written in pure Python, and specs allow package authors to maintain a single file for many different builds of the same package.
See the Feature Overview for examples and highlights.
Get Spack from the GitHub repository and install your first package:
$ git clone --depth=2 https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install libelf
Note
--depth=2
prunes the git history to reduce the size of the Spack installation.
If you’re new to Spack and want to start using it, see Getting Started, or refer to the full manual below.
Basic Usage
Configuration
- Configuration Files
- Spack Settings (config.yaml)
install_tree:root
projections
build_stage
source_cache
misc_cache
verify_ssl
ssl_certs
checksum
locks
dirty
build_jobs
ccache
shared_linking:type
shared_linking:bind
install_status
aliases
concretization_cache:enable
concretization_cache:url
concretization_cache:entry_limit
concretization_cache:size_limit
- Package Settings (packages.yaml)
- Toolchains (toolchains.yaml)
- Concretization Settings (concretizer.yaml)
- Package Repositories (repos.yaml)
- Mirrors (mirrors.yaml)
- Chaining Spack Installations (upstreams.yaml)
- Modules (modules.yaml)
- Include Settings (include.yaml)
- Environment Variable Settings (env_vars.yaml)
Reference
- Environments (spack.yaml, spack.lock)
- Container Images
- Build Caches
- Bootstrapping
- Command Reference
- spack
- spack add
- spack arch
- spack audit
- spack blame
- spack bootstrap
- spack build-env
- spack buildcache
- spack cd
- spack change
- spack checksum
- spack ci
- spack clean
- spack commands
- spack compiler
- spack compilers
- spack concretize
- spack config
- spack containerize
- spack create
- spack debug
- spack deconcretize
- spack dependencies
- spack dependents
- spack deprecate
- spack dev-build
- spack develop
- spack diff
- spack docs
- spack edit
- spack env
- spack extensions
- spack external
- spack fetch
- spack find
- spack gc
- spack gpg
- spack graph
- spack help
- spack info
- spack install
- spack license
- spack list
- spack load
- spack location
- spack log-parse
- spack logs
- spack maintainers
- spack make-installer
- spack mark
- spack mirror
- spack module
- spack patch
- spack pkg
- spack providers
- spack pydoc
- spack python
- spack reindex
- spack remove
- spack repo
- spack resource
- spack restage
- spack solve
- spack spec
- spack stage
- spack style
- spack tags
- spack test
- spack test-env
- spack tutorial
- spack undevelop
- spack uninstall
- spack unit-test
- spack unload
- spack url
- spack verify
- spack versions
- spack view
- Custom Extensions
- CI Pipelines
- Spack Package Signing
- Using External GPU Support
Contributing
- Packaging Guide: defining a package
- Setting up for package development
- Structure of a package
- Creating and editing packages
- Source code and versions
- Specifying version constraints
- Variants
- Dependencies
- Virtual dependencies
- Language and compiler dependencies
- Conflicts
- Requires
- Patches
- Extensions
- Mixins for common metadata
- Maintainers
- License Information
- Proprietary software
- Grouping directives
home
,command
,headers
, andlibs
- Style guidelines for packages
- Packaging Guide: customizing the build
- Overview of the installation procedure
- Controlling the build process
- What are build systems?
- Configuring the build with spec objects
- Before and after build phases
- Overriding a build phase
- Running build executables
- Package-level parallelism
- Spack’s Python Package API
- The build environment
- Setting package module variables
- Compiler flags
- Compiler wrappers and flags
- Runtime library search paths
- MPI support in Spack
- Packaging workflow and commands
- Packaging Guide: testing installations
- Packaging Guide: advanced topics
- Build Systems
- Contribution Guide
- Developer Guide
Advanced Topics
API Docs
- Spack Package API
- Spack Builtin Repo
- Spack API Docs
get_short_version()
get_spack_commit()
get_version()
min_package_api_version
package_api_version
spack_version_info
- Subpackages
- Submodules
- spack.aliases module
- spack.archspec module
- spack.audit module
- spack.binary_distribution module
- spack.build_environment module
- spack.buildcache_migrate module
- spack.buildcache_prune module
- spack.builder module
- spack.caches module
- spack.concretize module
- spack.config module
- spack.context module
- spack.cray_manifest module
- spack.database module
- spack.dependency module
- spack.deptypes module
- spack.directives module
- spack.directives_meta module
- spack.directory_layout module
- spack.enums module
- spack.error module
- spack.extensions module
- spack.fetch_strategy module
- spack.filesystem_view module
- spack.graph module
- spack.hash_types module
- spack.install_test module
- spack.installer module
- spack.jobserver module
- spack.main module
- spack.mixins module
- spack.multimethod module
- spack.package_base module
- spack.package_completions module
- spack.package_prefs module
- spack.package_test module
- spack.patch module
- spack.paths module
- spack.phase_callbacks module
- spack.projections module
- spack.provider_index module
- spack.relocate module
- spack.relocate_text module
- spack.repo module
- spack.repo_migrate module
- spack.report module
- spack.resource module
- spack.rewiring module
- spack.spec module
- spack.spec_parser module
- spack.stage module
- spack.store module
- spack.subprocess_context module
- spack.tag module
- spack.tengine module
- spack.tokenize module
- spack.traverse module
- spack.url module
- spack.url_buildcache module
- spack.user_environment module
- spack.variant module
- spack.verify module
- spack.verify_libraries module