Specs

Specs are descriptors used to provide more information while installing spack packages. For example, package name, providing a specific version of the package using @, compiler using % and compiler options etc.

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

Above command can be described as, install package mpileaks of version in between 1.2 and 1.4 built using gcc of version 4.7.5 for architecture x86_64 with debug option enabled and Qt option disabled. Additionally using dependency callpath of version 1.1 built using gcc of version 4.7.2.

Spec consists of following pieces.

  1. package name which is mandatory.
  2. version using @ which works for both package and compiler.
  3. % to specify the compiler for both package and dependencies. It sould come just after the package name and whatever dependencies.
  4. +, -, or ~ variant specifiers.
  5. name=<value> optional compiler flags.
  6. target=<value> or os=<value> for architecture information.
  7. ^ to specify dependencies.

References

  1. https://spack.readthedocs.io/en/latest/basic_usage.html#sec-specs