class: center, middle, inverse, title-slide # Remote parallel computation ### Facundo Muñoz
facundo.munoz@cirad.fr
famuvie ### Orléans, Sep. 18, 2018 --- background-image: url(img/remote_computation.png) --- ## Remote computation - You have access to a **Linux** server through **SSH** - You can perform `breedR`'s computations __remotely__ - Take advantage of more **memory** or **faster** processors - **Parallelize** jobs - Free **local resources** while fitting models - See `?remote` for details --- # Configuring a server 1. Windows users: install `cygwin` with `ssh` beforehand (http://cygwin.org/) 1. configure the client and server machines so that password-less [SSH authentication works](http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/) 1. Set breedR options `remote.host`, `remote.user`, `remote.port` and `remote.bin` (see `?breedR.setOption`) - Optionally, set these options permanently in `$HOME/.breedRrc` ```r writeLines( c("remote.host = '147.99.222.196'", "remote.user = 'yourusername'", "remote.bin = '/usr/local/lib/R/site-library/breedR/bin/'"), con = file.path(Sys.getenv('HOME'), '.breedRrc')) ``` --- ## Fitting models remotely ```r res <- remlf90(..., breedR.bin = "remote") ``` - Fit model **remotely** - R-console stays in **stand-by** until job is finished - When job finishes (provided that connection keeps alive), results are automatically **retrieved** ### Identical in use to local computing, but without the processor/memory burden --- ## Submitting jobs ```r res <- remlf90(..., breedR.bin = "submit") ``` - Fit model **remotely** - Connection is **closed** in the meanwhile - R-console is **active** - Typing `res` **queries** the server for the job status (Running/Finished/Aborted) - __Retrieve__ results with `breedR.qget(job_id)` --- ## Parallel computing - After you **submit** a job, you are free to submit more (specially with multiple-processor servers) - Query the **status** of all jobs with `breedR.qstat()` - **Kill** some job with `breedR.qdel(res)` or all jobs with `breedR.qnuke()` --- class: inverse, center, middle background-image: url(img/breedRhex.png) background-position: 50% 90% # Remote parallel computation