How to write Slurm submit scripts to current working directory?

When launching a SLURMCluster with dask-jobqueue, the SLURM file (i.e. the file that is sbatch-d) is written out to a tmp directory and removed. How can I specify that I want to keep the job submission script in the local working directory, e.g. for testing purposes?

Hi @arosen93, welcome to Dask community!

As you can see in the code here, it is not possible to keep this file or change its directory.

However, if you want to have a look at the script submission file and launch it yourself, you can always use the cluster.job_script() function. See:
https://jobqueue.dask.org/en/latest/debug.html#checking-job-script