The first and only required parameter is a character vector, where each element is an independet shell command.
Then you can submit the job to the SLURM cluster using the $submit()
method of a Job
object. And you can use the $wait()
method to wait until a job is completed or failed.
myJob$submit() myJob$wait() 2018-04-23 18:22:35 --- Cluster Status | PENDING = 1 | 2018-04-23 18:22:40 --- Cluster Status | RUNNING = 1 | 2018-04-23 18:23:30 --- Cluster Status | COMPLETED = 1 |
For convinence you can concatenate methods in a Job object.
myJob$submit()$wait()
If at any point you wish to cancel a submitted job you can use the $cancel()
method.
myJob$submit() myJob$cancel() 2018-04-23 19:17:30 Cancelling 1 job(s) 2018-04-23 19:17:32 Finished sending cancel signal
When you submit a job, rSubmmiter creates a bash script and submits it via sbacth
. This also creates and error and output files from SLURM. The default output folder where these files are saved is current working directory. This can be changed in the outDir paramater of the $new()
constructor method. The prefix of these files is the job name associated to the job, you can also specify it in $new()
, the default is a randomly generated id of the form rSubmitter_job_###. You can also remove these files at any point using the $clean()
method of a job object.
myJob <- Job$new(commandVector = c("echo hola world!", "sleep 30"), jobName = "testJob", outDir = "/tmp/") myJob$submit()$wait() myJob$clean()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.