rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
165 stars 35 forks source link

rstudioapi does not inherit `queue`/`queues` parameter from `launcherSubmitJob` into `launcherSubmitR` on a Slurm cluster. #254

Open michaelmayer2 opened 2 years ago

michaelmayer2 commented 2 years ago

Submitting a job to the Slurm Launcher via launcherSubmitJob() works fine:

> rstudioapi::launcherSubmitJob(exe="/usr/bin/Rscript", args="/scratch/mm/test.R", name="Test", cluster = "Slurm", queue="mpi")
[1] "U2x1cm06MTk="

Submitting the same via launcherSubmitR() fails

> rstudioapi::launcherSubmitR(script="/scratch/mm/test.R", cluster = "Slurm", queue="mpi")
Error in rstudioapi::launcherSubmitR(script = "/scratch/mm/test.R", cluster = "Slurm",  : 
  unused argument (queue = "mpi")

Fix is probably very easy and straightforward.

On a related note: In the package documentation the parameter queues it is stated: "A list of available submission queues for the cluster. Only applicable to batch systems like LSF."

I wonder if it would be better to rename queues to queue in the documentation as well in the code and allow only one queue to be specified to bring it closer to typical HPC usage ?