Closed yimyom closed 4 years ago
Yes, the folder .future/
is used by {batchtools} to "communicate" (exports, results, logs, ...) with workers, so yes, that folder need to be accessible from the "launch" machine as well as all workers (=compute nodes).
The default location of this folder is the current working directory, so it depends where you run future.batchtools from. In your example, it looks like you were running from your home directory.
You can customize the location of this root folder by setting R option future.cache.path
or environment variable R_FUTURE_CACHE_PATH
so that it is on globally-shared file system, e.g.
options(future.cache.path = "/global/path/alice/.future")
Assuming this is resolved/answered, so closing
Hi,
I'm sure I've read something about it somewhere but I can't find this information again. I've set up a small Slurm cluster with a few machines for testing purposes. Then in R, I do:
And this does not work with the following error message:
Now, a close inspection of what's happening under the hood tells me that
sbatch
(from Slurm) will run an sbatch script (preprocessed bybrew
, etc...) which ends up with the line:And that's where I'm a bit surprised: this script, including the last line, will be executed on a Slurm node. The R script inside (
doJobCollection
) makes a reference to a file on my master node home directory!Does it mean I can run
future
on Slurm only if the home directory is shared?EDIT: it appears the answer is yes. As far as I can tell:
sbatch
(the command in Slurm to submit batch jobs) does not transfer any files except for the submitted script (this was clear from theman
page),batchtools
and a fortiori infuture.batchtools
andfuture
transfer the files. It's not really a problem though as soon as a shared directory is set up.As far as I can tell, there is a need for a shared directory between the master node and the nodes. It doesn't need to be the home directory if the name of the registry directory is specified.
(Google, please help yourself and index my answer, as it was not obvious from the docs in
batchtools
)