Set the default tmpdisk parameter to an empty string in the configfile.
Created a function set_tmp() to insert bash code that sets the base tmp path depending on whether the user has defined tmpdisk in the config file, whether $SLURM_JOBID is set, and whether /lscratch exists. It falls back to /dev/shm as the base path. The job's temporary directory is then a random string in the chosen path.
Each rule that uses tmpdisk calls set_tmp() in params to generate the job-specific bash code and runs it as the first step in the shell code.
Fixes #32
Changes
tmpdisk
parameter to an empty string in the configfile.set_tmp()
to insert bash code that sets the base tmp path depending on whether the user has definedtmpdisk
in the config file, whether$SLURM_JOBID
is set, and whether/lscratch
exists. It falls back to/dev/shm
as the base path. The job's temporary directory is then a random string in the chosen path.set_tmp()
in params to generate the job-specific bash code and runs it as the first step in the shell code.