Learn R Programming

mirai (version 2.6.0)

remote_config: Generic Remote Launch Configuration

Description

Provides a flexible generic framework for generating the shell commands to deploy daemons remotely.

Usage

remote_config(
  command = NULL,
  args = c("", "."),
  rscript = "Rscript",
  quote = FALSE
)

Value

A list in the required format to be supplied to the remote argument of daemons() or launch_remote().

Arguments

command

(character) shell command for launching daemons (e.g. "ssh"). NULL returns shell commands for manual deployment without launching.

args

(character vector) arguments to command, must include "." as placeholder for the daemon launch command. May be a list of vectors for multiple launches.

rscript

(character) Rscript executable. Use full path if needed, or "Rscript.exe" on Windows.

quote

(logical) whether to quote the daemon launch command. Required for "sbatch" and "ssh", not for "srun".

See Also

ssh_config(), cluster_config() and http_config() for other types of remote configuration.

Examples

Run this code
# Slurm srun example
remote_config(
  command = "srun",
  args = c("--mem 512", "-n 1", "."),
  rscript = file.path(R.home("bin"), "Rscript")
)

# SSH requires 'quote = TRUE'
remote_config(
  command = "/usr/bin/ssh",
  args = c("-fTp 22 10.75.32.90", "."),
  quote = TRUE
)

# can be used to start local daemons with special configurations
remote_config(
  command = "Rscript",
  rscript = "--default-packages=NULL --vanilla"
)

Run the code above in your browser using DataLab