README.md

Build Status

cheopsr - talk to the cheops hpc cluster in R

features

requirements

installation

```R install.packages("devtools") devtools::install_github("bonartm/cheopsr") ?cheopsr


## usage
```R
library(cheopsr)

# set some global options
options(cheopsr.username = "...") # university username to log into the cluster
options(cheopsr.account = "...") # account which should be charged when submitting jobs defaults to "UniKoeln"
options(cheopsr.key = "...") # location of the private key file defaults to "~/.ssh/id_rsa"

# install the snow package and other packages you need on the cluster
cheops_install("snow")

# a template for a script file usning the MPI cluster can be found at:
system.file("examples", "test.R", package = "cheopsr")

# define options and submit the job
opt <- cheops_slurmcontrol(nodes = 2, tasks = 8, mem = "1gb", time = "00:00:20", partition = "devel")
job <- cheops_lapply(rep(100, 1000), function(n){
  mean(rnorm(n))
}, options = opt, jobname = "clustertest")

cheops_jobs()

# read the log file while job is running
cat(cheops_getlog(job$name), sep = "\n")

# wait until job is finished and get the results
res <- cheops_readRDS(job$results)

# visualize the result
hist(unlist(res))


bonartm/cheopsr documentation built on May 3, 2019, 9:37 p.m.