Changing temporary directory
zslastman opened this issue · comments
So I'm using this over here on the cluster at EMBL (with my own ~/.batchjobs.R file) and it works perfectly except for one thing - I had to modify it to use an alternative tempdir()
function, because our cluster needs to write things to a different directory ('scratch'), and will fail if given a '/tmp/' path.
Hi Dermot (I assume?),
Happy to see this gets used over at the main site as well! 👍
tempdir()
respects the TMPDIR
environment variable. If you set it to /scratch/...
in your environment, a call to tempdir()
will return a directory there instead of /tmp
- so there is no need to change the call.
Note that we will phase out BatchJobs
in favour of an rzmq
solution because the former starts an R session per function call, which kills the file system for a lot of short-running calls (see this bug report and the hpc_2.0 branch). After this change, there will be no more temporary directories.
Should have thought of that, thanks Michael - and yes, konrad gave me access. Can I invite other predocs here? I actually think we should vastly expand what you guys have done here. Even access to other people's buggy, uncommented code would have saved me a lot of time during my PhD - e.g. code for ggplot2 plots.
Contributions always welcome! (for the main repositories please fork/branch and send a pull request)
Feel free to invite other predocs, I have (I think, please check) just given you the rights to add people to the "Predocs" group.