Ticket 2664

Summary: Configure a TMPDIR other than /tmp
Product: Slurm Reporter: UAB Research Computing <RC_LICENSES>
Component: SchedulingAssignee: Alejandro Sanchez <alex>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: alex
Version: 15.08.6   
Hardware: Linux   
OS: Linux   
Site: UAB Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description UAB Research Computing 2016-04-25 16:05:38 MDT
How do we configure Slurm to use a directory other than /tmp for $TMPDIR?

Our users are routinely filling up /tmp. In our environment we'd like for the default temporary directory for users jobs to point to /scratch/local or even better something like /scratch/local/${SLURM_JOB_ID}

Any suggestions on how to accomplish this on the server configuration side?
Comment 1 Alejandro Sanchez 2016-04-25 23:52:06 MDT
Hi,

could you try writing a Prolog and a TaskProlog[1] scripts. In the Prolog script, as it is executed in the compute node by SlurmdUser (usually root), you could create your desired dir and chown/chmod it to the submitting user. Take into account that SLURM_JOB_ID and SLURM_JOB_USER can provide you with this information. Then in the TaskProlog script you could export TMPDIR env var to the desired created dir. Please, let me know if this work for you.

[1] http://slurm.schedmd.com/prolog_epilog.html
Comment 2 Alejandro Sanchez 2016-05-09 01:22:07 MDT
Hi, were you finally able to use /scratch/local/${SLURM_JOB_ID} through the prolog scripts? Is there anything more that we can help you or can we close this bug? Thanks.
Comment 3 UAB Research Computing 2016-05-09 03:01:48 MDT
Unfortunately, I haven't had time to work on this. Based on your description I should have enough information to go on once I get some free cycles. We can close the ticket.
Comment 4 Alejandro Sanchez 2016-05-09 03:23:20 MDT
All right, please reopen if you have any more doubts.