MakisH
MakisH

Reputation: 1183

How to change where Spack stores the spack-stage directory?

Spack by default writes (on my system) into a directory spack-stage inside /tmp/. This directory can get full when building something big (e.g. GCC itself), at least in the shared system I am using:

fatal error: error writing to /tmp/ccPlIYSg.s: No space left on device

Is there any way to tell Spack to use a different location for spack-stage?

Upvotes: 3

Views: 2044

Answers (1)

Jannek S.
Jannek S.

Reputation: 407

According to the spack documentation you just need to specify $TMP to point to a directory of your choice.

Builds can be faster in temporary directories on some (e.g., HPC) systems. Specifying $tempdir will ensure use of the default temporary directory (i.e., $TMP or $TMPDIR).
Another option that prevents conflicts and potential permission issues is to specify ~/.spack/stage, which ensures each user builds in their home directory.

Upvotes: 6

Related Questions