Skip to content
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

WISH: Add option for specifying architecture in makeClusterFunctionsLocal() #110

Open
HenrikBengtsson opened this issue Dec 20, 2015 · 0 comments

Comments

@HenrikBengtsson
Copy link
Contributor

On (at least) Windows, the R installation comes with both 32-bit and 64-bit binaries, i.e. architectures i386 and x64. The makeClusterFunctionsLocal() function uses the binary of the currently running R session;

file.path(R.home("bin"), "Rscript")

However, there might be circumstances where you wish to run the job using a specific architecture. For instance, http://stackoverflow.com/questions/13070706/how-to-connect-r-with-access-database-in-64-bit-window.

Thus, it could be useful to support:

makeClusterFunctionsLocal(arch="i386")

where makeClusterFunctionsLocal() looks something like:

## Validate during setup
if (is.null(arch)) {
  bin <- file.path(R.home("bin"), "Rscript")
} else {
  path <- file.path(R.home(), "bin", arch)
  if (!file_test("-d", path)) stop("Non-supported architecture: ", arch)
  bin <- file.path(path, "Rscript")
}

submitJob = function(conf, reg, job.name, rscript, log.file, job.dir, resources, arrayjobs) {
   system2(bin, ...)
}

This might apply to other backends as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant