Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Programming with Big Data in R

From Wikipedia, the free encyclopedia
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
The topic of this articlemay not meet Wikipedia'sgeneral notability guideline. Please help to demonstrate the notability of the topic by citingreliable secondary sources that areindependent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to bemerged,redirected, ordeleted.
Find sources: "Programming with Big Data in R" – news ·newspapers ·books ·scholar ·JSTOR
(June 2013) (Learn how and when to remove this message)
A major contributor to this article appears to have aclose connection with its subject. It may require cleanup to comply with Wikipedia's content policies, particularlyneutral point of view. Please discuss further on thetalk page.(June 2013) (Learn how and when to remove this message)
(Learn how and when to remove this message)
bdrp
ParadigmSPMD andMPMD
Designed byWei-Chen Chen, George Ostrouchov, Pragneshkumar Patel, and Drew Schmidt
DeveloperpbdR Core Team
First appearedSeptember 2012; 13 years ago (2012-09)
Preview release
ThroughGitHub atRBigData
Typing disciplineDynamic
OSCross-platform
LicenseGeneral Public License andMozilla Public License
Websitewww.r-pbd.org
Influenced by
R,C,Fortran,MPI, andØMQ

Programming with Big Data in R (pbdR)[1] is a series ofR packages and an environment forstatistical computing withbig data by using high-performance statistical computation.[2][3] The pbdR uses the same programming language as R withS3/S4 classes and methods which is used amongstatisticians anddata miners for developingstatistical software. The significant difference between pbdR and R code is that pbdR mainly focuses ondistributed memory systems, where data are distributed across several processors and analyzed in abatch mode, while communications between processors are based onMPI that is easily used in largehigh-performance computing (HPC) systems. R system mainly focuses[citation needed] on singlemulti-core machines for data analysis via an interactive mode such asGUI interface.

Two main implementations inR usingMPI are Rmpi[4] and pbdMPI of pbdR.

The idea ofSPMD parallelism is to let every processor do the same amount of work, but on different parts of a large data set. For example, a modernGPU is a large collection of slower co-processors that can simply apply the same computation on different parts of relatively smaller data, but the SPMD parallelism ends up with an efficient way to obtain final solutions (i.e. time to solution is shorter).[5]

Package design

[edit]

Programming with pbdR requires usage of various packages developed by pbdR core team. Packages developed are the following.

GeneralI/OComputationApplicationProfilingClient/Server
pbdDEMOpbdNCDF4pbdDMATpmclustpbdPROFpbdZMQ
pbdMPIpbdADIOSpbdBASEpbdMLpbdPAPIremoter
pbdSLAPhpcvispbdCS
kazaampbdRPC
The images describes how various pbdr packages are correlated.

Among these packages, pbdMPI provides wrapper functions toMPI library, and it also produces ashared library and a configuration file for MPI environments. All other packages rely on this configuration for installation and library loading that avoids difficulty of library linking and compiling. All other packages can directly use MPI functions easily.

  • pbdMPI --- an efficient interface to MPI eitherOpenMPI orMPICH2 with a focus on Single Program/Multiple Data (SPMD) parallel programming style
  • pbdSLAP --- bundles scalable dense linear algebra libraries in double precision for R, based onScaLAPACK version 2.0.2 which includes several scalable linear algebra packages (namelyBLACS,PBLAS, andScaLAPACK).
  • pbdNCDF4 --- interface to Parallel UnidataNetCDF4 format data files
  • pbdBASE --- low-levelScaLAPACK codes and wrappers
  • pbdDMAT --- distributed matrix classes and computational methods, with a focus on linear algebra and statistics
  • pbdDEMO --- set of package demonstrations and examples, and this unifying vignette
  • pmclust --- parallelmodel-based clustering using pbdR
  • pbdPROF --- profiling package for MPI codes and visualization of parsed stats
  • pbdZMQ --- interface toØMQ
  • remoter --- R client with remote R servers
  • pbdCS --- pbdR client with remote pbdR servers
  • pbdRPC --- remote procedure call
  • kazaam --- very tall and skinny distributed matrices
  • pbdML --- machine learning toolbox

Among those packages, the pbdDEMO package is a collection of 20+ package demos which offer example uses of the various pbdR packages, and contains a vignette that offers detailed explanations for the demos and provides some mathematical or statistical insight.

Examples

[edit]

Example 1

[edit]

Hello World! Save the following code in a file called "demo.r"

### Initial MPIlibrary(pbdMPI,quiet=TRUE)init()comm.cat("Hello World!\n")### Finishfinalize()

and use the command

mpiexec-np2Rscriptdemo.r

to execute the code whereRscript is one of command line executable program.

Example 2

[edit]

The following example modified from pbdMPI illustrates the basicsyntax of the language of pbdR.Since pbdR is designed inSPMD, all the R scripts are stored in files and executed from the command line via mpiexec, mpirun, etc. Save the following code in a file called "demo.r"

### Initial MPIlibrary(pbdMPI,quiet=TRUE)init().comm.size<-comm.size().comm.rank<-comm.rank()### Set a vector x on all processors with different valuesN<-5x<-(1:N)+N*.comm.rank### All reduce x using summation operationy<-allreduce(as.integer(x),op="sum")comm.print(y)y<-allreduce(as.double(x),op="sum")comm.print(y)### Finishfinalize()

and use the command

mpiexec-np4Rscriptdemo.r

to execute the code whereRscript is one of command line executable program.

Example 3

[edit]

The following example modified from pbdDEMO illustrates the basic ddmatrix computation of pbdR which performssingular value decomposition on a given matrix.Save the following code in a file called "demo.r"

# Initialize process gridlibrary(pbdDMAT,quiet=T)if(comm.size()!=2)comm.stop("Exactly 2 processors are required for this demo.")init.grid()# Setup for the remaindercomm.set.seed(diff=TRUE)M<-N<-16BL<-2# blocking --- passing single value BL assumes BLxBL blockingdA<-ddmatrix("rnorm",nrow=M,ncol=N,mean=100,sd=10)# LA SVDsvd1<-La.svd(dA)comm.print(svd1$d)# Finishfinalize()

and use the command

mpiexec-np2Rscriptdemo.r

to execute the code whereRscript is one of command line executable program.

Further reading

[edit]

References

[edit]
  1. ^Ostrouchov, G., Chen, W.-C., Schmidt, D., Patel, P. (2012)."Programming with Big Data in R".{{cite web}}: CS1 maint: multiple names: authors list (link)
  2. ^Chen, W.-C. & Ostrouchov, G. (2011)."HPSC -- High Performance Statistical Computing for Data Intensive Research". Archived fromthe original on 2013-07-19. Retrieved2013-06-25.
  3. ^"Basic Tutorials for R to Start Analyzing Data". 3 November 2022.
  4. ^abYu, H. (2002)."Rmpi: Parallel Statistical Computing in R".R News.
  5. ^Mike Houston."Folding@Home - GPGPU". Retrieved2007-10-04.
  6. ^"100 most read R posts in 2012 (stats from R-bloggers) – big data, visualization, data manipulation, and other languages".

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Programming_with_Big_Data_in_R&oldid=1210844463"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp