Difference between revisions of "R/Example"

From ScientificComputing
Jump to: navigation, search
(Created page with "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. [sfu...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
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.
 
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.
  
  [sfux@euler01 test]$ module load new gcc/4.8.2 r/3.3.0
+
  [leonhard@euler01 test]$ '''module load new gcc/4.8.2 r/3.3.0'''
 
  Using OpenBLAS build of R-3.3.0
 
  Using OpenBLAS build of R-3.3.0
  [sfux@euler01 test]$ wget http://r.research.att.com/benchmarks/R-benchmark-25.R >& /dev/null
+
  [leonhard@euler01 test]$ '''wget http://r.research.att.com/benchmarks/R-benchmark-25.R >& /dev/null'''
  [sfux@euler01 test]$ ls
+
  [leonhard@euler01 test]$ '''ls'''
 
  R-benchmark-25.R
 
  R-benchmark-25.R
  [sfux@euler01 test]$ bsub -n 1 -W 0:10 -R "rusage[mem=1024]" "R --vanilla --slave < R-benchmark-25.R > result.out"     
+
  [leonhard@euler01 test]$ '''bsub -n 1 -W 0:10 -R "rusage[mem=1024]" "R --vanilla --slave < R-benchmark-25.R > result.out"'''      
 
  Generic job.
 
  Generic job.
 
  Job <22467786> is submitted to queue <normal.4h>.
 
  Job <22467786> is submitted to queue <normal.4h>.
  [sfux@euler01 test]$ bjobs
+
  [leonhard@euler01 test]$ '''bjobs'''
  JOBID      USER   STAT  QUEUE      FROM_HOST  EXEC_HOST  JOB_NAME  SUBMIT_TIME
+
  JOBID      USER       STAT  QUEUE      FROM_HOST  EXEC_HOST  JOB_NAME  SUBMIT_TIME
  22467786  sfux   PEND  normal.4h  euler01                *esult.out Jul  6 14:49
+
  22467786  leonhard   PEND  normal.4h  euler01                *esult.out Jul  6 14:49
  [sfux@euler01 test]$ bjobs
+
  [leonhard@euler01 test]$ '''bjobs'''
  JOBID      USER   STAT  QUEUE      FROM_HOST  EXEC_HOST  JOB_NAME  SUBMIT_TIME
+
  JOBID      USER       STAT  QUEUE      FROM_HOST  EXEC_HOST  JOB_NAME  SUBMIT_TIME
  22467786  sfux   RUN  normal.4h  euler01    e1173      *esult.out Jul  6 14:49
+
  22467786  leonhard   RUN  normal.4h  euler01    e1173      *esult.out Jul  6 14:49
  [sfux@euler01 test]$ bjobs
+
  [leonhard@euler01 test]$ '''bjobs'''
 
  No unfinished job found
 
  No unfinished job found
  [sfux@euler01 test]$ ls
+
  [leonhard@euler01 test]$ '''ls'''
 
  lsf.o22467786  R-benchmark-25.R  result.out
 
  lsf.o22467786  R-benchmark-25.R  result.out
  
 
R code examples can be found at [https://cran.r-project.org/doc/contrib/Owen-TheRGuide.pdf CRAN]
 
R code examples can be found at [https://cran.r-project.org/doc/contrib/Owen-TheRGuide.pdf CRAN]

Latest revision as of 10:45, 27 October 2016

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