R/Example

From ScientificComputing
Jump to: navigation, search

As an example for running R we use the R-25-Benchmark, which can be downloaded from http://r.research.att.com/benchmarks/. It consists of the R script R-benchmark-25.R.

[leonhard@euler01 test]$ module load new gcc/4.8.2 r/3.3.0
Using OpenBLAS build of R-3.3.0
[leonhard@euler01 test]$ wget http://r.research.att.com/benchmarks/R-benchmark-25.R >& /dev/null
[leonhard@euler01 test]$ ls
R-benchmark-25.R
[leonhard@euler01 test]$ bsub -n 1 -W 0:10 -R "rusage[mem=1024]" "R --vanilla --slave < R-benchmark-25.R > result.out"     
Generic job.
Job <22467786> is submitted to queue <normal.4h>.
[leonhard@euler01 test]$ bjobs
JOBID      USER        STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
22467786   leonhard    PEND  normal.4h  euler01                 *esult.out Jul  6 14:49
[leonhard@euler01 test]$ bjobs
JOBID      USER        STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
22467786   leonhard    RUN   normal.4h  euler01     e1173       *esult.out Jul  6 14:49
[leonhard@euler01 test]$ bjobs
No unfinished job found
[leonhard@euler01 test]$ ls
lsf.o22467786  R-benchmark-25.R  result.out

R code examples can be found at CRAN