mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
169 stars 51 forks source link

WISH: Don't override R_FUTURE_CACHE_PATH if already set #253

Closed HenrikBengtsson closed 4 years ago

HenrikBengtsson commented 4 years ago

Would you mind updating:

https://github.com/mllg/batchtools/blob/75a5b701341c6937c779ce395fe9367dbee99c15/tests/testthat/test_future.R#L5

so that it does not override env var R_FUTURE_CACHE_PATH in case it is already set? Something like:

  path <- Sys.getenv("R_FUTURE_CACHE_PATH")
  if (!nzchar(path)) Sys.setenv(R_FUTURE_CACHE_PATH = fs::path(fs::path_temp(), ".future"))

The reason is that the current setup prevents me from running reverse dependency checks (on future.batchtools) on HPC systems where TMPDIR (that fs::path_temp() picks up) points to a local drive unique to each compute node, meaning that the batchtools registries need to be written to a different path that is accessible from all compute nodes. So, I already set to something like R_FUTURE_CACHE_PATH=/global/tmp/, which unfortunately is overridden by the above.

PS. I could override TMPDIR temporarily but that'll be rather complicated.

mllg commented 4 years ago

I applied the proposed change. I'll run some tests and upload the package to CRAN.

HenrikBengtsson commented 4 years ago

Thanks. No need to rush it to CRAN bc of this.

On Fri, Jan 10, 2020, 01:31 Michel Lang notifications@github.com wrote:

I applied the proposed change. I'll run some tests and upload the package to CRAN.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mllg/batchtools/issues/253?email_source=notifications&email_token=AAMKXUTC6VOS7M3OP4R6BLTQ5A52LA5CNFSM4KE7TCVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEITIDVA#issuecomment-572948948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMKXUTRCVG5GTKQB2XOOMTQ5A52LANCNFSM4KE7TCVA .