How to change the prefix to SAGE_TMP?

asked 2015-03-13 17:42:18 -0600

ikol gravatar image

updated 2015-03-13 17:43:56 -0600

SAGE_TMP looks something like this by default: /tmp/tmpGMP2PR. My /tmp is full but I have plenty of space in a different tmp directory on another disk. How can I change the default prefix in SAGE_TMP from /tmp to, say, /raid/scratch?


edit retag flag offensive close merge delete


Which version of Sage are you using? For me the temporary directory is in home/.sage/temp/... This is what you can see from

sage: from sage.misc.misc import SAGE_TMP
sage: SAGE_TMP

On the other hand, if you are using the Sage notebook it does also uses some temporary directory which is I guess in /tmp/ by default.

vdelecroix gravatar imagevdelecroix ( 2015-03-14 03:56:46 -0600 )edit

I am using v6.4.1.~/.sage/temp/ is different. If I run a Notebook session, its files are stored under ~/.sage/notebook/... but while a Sage calculation is running all the files there are just links to /tmp/something where /tmp/something is the value of SAGE_TMP in that session. I am saving large objects via the save() command and that's where I have the problem, because they can't fit in /tmp. There has got to be a way in Sage to set the prefix for SAGE_TMP from /tmp to something else.

ikol gravatar imageikol ( 2015-03-17 11:33:14 -0600 )edit