Users submitting job scripts with sbatch that run Singularity containers may notice this error:
mktemp: failed to create file via template ‘/scratch/[jobid]/tmp.XXXXXXXXXX’: No such file or directory
With sbatch, the environment variable TMPDIR gets set to be /scratch/[jobid], so when mktemp tries to execute, it looks for /scratch/[jobid], but the singularity container may not have a /scratch directory.
Recommended solution:
At the beginning of the job script, unset TMPDIR to clear that variable, which allows the Singularity container to use whatever directory is the default for it.