-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.future folder #30
Comments
Could you use a symbolic file link, e.g. $ cd /path/to/project
$ mkdir /scratch/.future
$ ln -s /scratch/.future .future
$ R or from within R: $ cd /path/to/project
$ R
> dir.create("/scratch/.future")
> file.symlink(from = "/scratch/.future", to = ".future")
> |
Just tried it, it still creates the folders for the jobs in /home, rather than /scratch. |
Please try to give more details on exactly what you've done. I don't understand why it should create a folder elsewhere (other than the current directory). Also, if one already exists in the current directory (even a symbol link) it will not remove it and create another one. Reproducible example on Linux: $ mkdir ~/my_project
$ cd ~/my_project
$ mkdir /tmp/.future # Target location
$ ln -s /tmp/.future .future # Local directory location
ls -la
total 20
drwxr-xr-x 2 hb hb 4096 Aug 31 08:46 .
drwxrwxr-x 54 hb hb 12288 Aug 31 08:36 ..
lrwxrwxrwx 1 hb hb 12 Aug 31 08:36 .future -> /tmp/.future
$ R
[...]
> library(future.batchtools)
> plan(batchtools_local)
> dir(".future")
character(0)
> dir("/tmp/.future")
character(0)
> f <- future(42)
> dir(".future")
[1] "20180831_084504-dz0Xfl"
> dir("/tmp/.future")
[1] "20180831_084504-dz0Xfl"
> value(f)
[1] 42
> quit("no")
$ pwd
/home/hb/my_project
$ ls -la
total 20
drwxr-xr-x 2 hb hb 4096 Aug 31 08:46 .
drwxrwxr-x 54 hb hb 12288 Aug 31 08:36 ..
lrwxrwxrwx 1 hb hb 12 Aug 31 08:36 .future -> /tmp/.future |
FYI, you can control the location of the
to your |
Updates in the develop branch: The relative or absolute location of the
|
Woohoo! Finally landed on the right ticket. @HenrikBengtsson maybe add a link to the environment variable configurations in the README? Sadly, To increase visibility of this ticket from a search engine:
|
That's a fair issue-tracker hack :) FWIW, I'll see what I can do for documention. |
Hi Henrik,
do you think it would be possible/worth having auxiliary functions giving more control over the
.future
folder? The problem in my case was/is that I only have a certain quota on our HPC and if .futures is located in my personal drive and I work with spatial data - I reach this quota quite fast.I was not able to figure out how to control this with future.batchtools directly and just relied on .Rprofile to set my working directory to
/scratch
while loading R. This ensured that the default call ofmakeRegistry
from batchtools chooses this directory for the .future folder. However, a more reproducible workflow for that would be nice.Or did I just miss a way to do this with future.batchtools?
Cheers
Marco
The text was updated successfully, but these errors were encountered: