TMP temp space for Scientific Computing (SciC) Linux Clusters jobs

FAQ Scope

This FAQ relates to applications for data analysis and processing on the Scientific Computing (SciC) Linux Clusters.

Introduction

Many applications create temporary files as they run, which are deleted after the final output is saved.  Typically the default behavior is for these files to be created in the "current working directory" or the /tmp folder, but the location where they are created can usually be set to a location of your choice.  

Working with temp files

On the SciC Linux Clusters you may not use /tmp as a location for temporary files, because doing so can cause /tmp to run out of space and your job or jobs belonging to other investigators to fail.

/scratch or /data folder

If your lab group has a /scratch or /data folder, these are the best locations for temporary files.  Create your own temp folder inside the /scratch or /data folder and set the application options to write to this folder.  Consult the application manual for how to set this option ( it may be an option like --tmp )

Personal scratch folder

Each cluster account comes with a scratch folder for temporary files at $HOME/scratch which can store up to 600GB for a short period.  Files in personal scratch folders are deleted automatically after 20 days, so this storage space is only suitable for transient files, and tasks that are expected to run for a week or less. 

The location "$HOME/scratch" is a link (shortcut) to your scratch location. If yours is not present, recreate the link with the commands

cd $HOME ; ln -s /scratch/${USER:0:1}/$USER scratch

Check how much remains in your scratch quota with the commands

cd $HOME/scratch; /usr/local/bin/pan_quota 

The columns <GB> <soft>  <hard> refer to current usage and the soft and hard quota for disk space while the columns <files>  <soft>  <hard> refer to the current number of files and the soft and hard quota for number of files. If either hard quota is reached, no more files can be written to scratch.

Reserving space under /tmp through the scheduler

Use this option only at the direction of the Scientific Computing support team. Space in the /tmp folder on compute nodes is a resource that can be reserved through the job scheduler. The scheduler provides a dedicated temp file location under /tmp for each job that is run, passing the location in an environment variable "$TMPDIR". When the job completes this temp folder will be removed even if the job exits prematurely which helps prevent /tmp filling up.  To use this option, set the option of your application to write temporary files to "${TMPDIR}" and also add a scheduler option to reserve the amount of disk space that the job will use under /tmp, for example to reserve 5GB of space, use

 -R "rusage[tmp=1000]" 

The units are MB

 

 

Go to KB0028037 in the IS Service Desk

Related articles