cluster_config | R Documentation |
Generates a remote configuration for launching daemons using an HPC cluster resource manager such as Slurm sbatch, SGE and Torque/PBS qsub or LSF bsub.
cluster_config(command = "sbatch", options = "", rscript = "Rscript")
command |
[default "sbatch"] for Slurm. Replace with "qsub" for SGE / Torque / PBS, or "bsub" for LSF. See examples below. |
options |
[default ""] options as would be supplied inside a script
file passed to |
rscript |
[default "Rscript"] assumes the R executable is on the
search path. Replace with the full path of the Rscript executable on the
remote machine if necessary. If launching on Windows, |
A list in the required format to be supplied to the remote
argument
of daemons()
or launch_remote()
.
ssh_config()
for SSH launch configurations, or remote_config()
for generic configurations.
# Slurm Config:
cluster_config(
command = "sbatch",
options = "#SBATCH --job-name=mirai
#SBATCH --mem=10G
#SBATCH --output=job.out
module load R/4.5.0",
rscript = file.path(R.home("bin"), "Rscript")
)
# SGE Config:
cluster_config(
command = "qsub",
options = "#$ -N mirai
#$ -l mem_free=10G
#$ -o job.out
module load R/4.5.0",
rscript = file.path(R.home("bin"), "Rscript")
)
# Torque/PBS Config:
cluster_config(
command = "qsub",
options = "#PBS -N mirai
#PBS -l mem=10gb
#PBS -o job.out
module load R/4.5.0",
rscript = file.path(R.home("bin"), "Rscript")
)
# LSF Config:
cluster_config(
command = "bsub",
options = "#BSUB -J mirai
#BSUB -M 10000
#BSUB -o job.out
module load R/4.5.0",
rscript = file.path(R.home("bin"), "Rscript")
)
## Not run:
# Launch 2 daemons using the Slurm sbatch defaults:
daemons(
n = 2,
url = host_url(),
remote = cluster_config())
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.