Running out of disk space

Hello,
When running jobs using deeptools (this has also happened using java picard), I get an error message [IOError: [Errno 28] No space left on device. This can be solved by setting up a temporary directory when loading modules before running the deeptools operation (or picard).
For example “export TMPDIR=/scratch2/bweekley/tmp”

Is there a way to fix this so I don’t have to reset the TMPDIR every time?
Thanks for your help in advance.

@bweekley Yes, you can add that export line to your ~/.bash_profile and then it will automatically be set every time you log in and for jobs.

Thank you that makes sense.
Can this support multiple jobs at once?
Or do you need multiple tmp directories?

Yes, it can support multiple jobs at once. Setting the TMPDIR variable will redirect temporary files from being stored in the local /tmp directory on compute nodes to a user-specified directory. In rare cases conflicts could occur, in which case you could create job-based temporary directories if needed (such as including a different export TMPDIR=... statement in the job script).