Spack is the package manager used by C2SM and MeteoSwiss to install and deploy software on supercomputers, local machines and the cloud.
Infos about c2sm-supported software and machines
-
spack-c2sm v0.18.1.3 [deprecated]
-
spack-c2sm v0.18.1.2 [deprecated]
-
spack-c2sm v0.18.1.1 [deprecated]
General infos about spack
With spack v0.18 we suggest local/individual spack instances and the use of spack environments.
A user clones the spack repo
git clone --depth 1 --recurse-submodules --shallow-submodules -b v0.18.1.10 https://github.com/C2SM/spack-c2sm.git
gets spack in the command line
. spack-c2sm/setup-env.sh
activates an environment
spack env activate <path_to_env>
and starts exploring
spack info <package>
spack spec <spec>
and building
spack install <spec>
spack dev-build <spec>
a package.
Updating spack-c2sm is in the hands of the user.
git pull
git submodule update --recursive
After an update we advice to clean
spack uninstall -a
spack clean -a
rm -rf ~/.spack
and rebuild.
Command | |
---|---|
Clone | git clone --depth 1 --recurse-submodules --shallow-submodules -b <branch/tag> https://github.com/C2SM/spack-c2sm.git |
Load | . spack-c2sm/setup-env.sh autodetects machine or . spack-c2sm/setup-env.sh <machine> forces machineor . spack-c2sm/setup-env.sh unknown uses blank configspack compiler find autodetects compilersspack external find --all autodetects externally installed packages |
Update | git pull git submodule update --recursive |
Clean | spack uninstall -a uninstalls all packagesspack clean -a cleans all misc cachesrm -rf ~/.spack removes user scope data |
Spec syntax: <package>
@<version>
%<compiler>
+<variant> ~<variant>
^<sub-package> +<sub-package-variant>
<compiler flags>
Command | |
---|---|
Find | spack find lists all installed packages. spack find <spec> lists all installed packages that match the spec. |
Info | spack info <package> |
Spec | spack spec <spec> concretizes abstract spec (unspecfied variant = any)Spack is not required to use the default of an unspecified variant. The default value is only a tiebreaker for the concretizer. |
Install | spack install <spec> |
Locate | spack location --install-dir <spec> prints location of all installs that satisfy the spec |
Load env | spack load <spec> loads run environment |
Activate env | spack env activate <env_name> |
Deactivate env | spack deactivate |