Dear SLURM users, I am IT Administrator of a small scientific computing center. We recently installed SLURM as a job scheduler on our Cluster and everything seems to be working fine. I just have a question about how to create temporary directories with SLURM.
We use some programs for scientific calculation (such as Gromacs, Gaussian, NAMD, etc.). So, the process is the following: When we need to launch a calculation the first step is to copy all the necessary files from the local "$SLURM_SUBMIT_DIR" directory to the "/scratch" of the remote node, second step is to access the "/scratch" of the remote node and then run the program. Finally, when the program finishes we copy all the output files from the remote node's "/scratch" back to the local "$SLURM_SUBMIT_DIR" directory. So, is there any way to automatically generate a temporary directory inside the "/scratch" of the remote node? At the moment I am creating that directory manually as follows: "export HOMEDIR=$SLURM_SUBMIT_DIR export SCRATCHDIR=/scratch/job.$SLURM_JOB_ID.$USER export WORKDIR=$SCRATCHDIR mkdir -p $WORKDIR cp $HOMEDIR/* $WORKDIR cd $WORKDIR $NAMD/namd2 +idlepoll +p11 run_eq.namd > run_eq.log wait cp $WORKDIR/* $HOMEDIR" The main problem when you create the "/scratch" manually is that in case the calculation ends (successfully or unsuccessfully), users have to check the "/scratch" and remove the directory manually. I know I could include a line at the end of my script to delete that directory when the calculation is done, but I'm sure there must be a better way to do this. Thanks in advance for the help. best regards, Alain