In my previous blog, I mentioned that Platform Symphony can be used in statistical computing. “R” is a programming language and software environment for statistical computing and graphics. The R language has become a de facto standard among statisticians for developing statistical software, and is widely used for statistical software development and data analysis. R is an implementation of the S programming language combined with lexical scoping semantics inspired by Scheme. Below is an example of how R can be used to speed calculations:
Sample code of R:
func <- function(x, y, z) { some operations }
data1 <- c(1:20000)
data2 <- c(20000:1)
result <- data1
for (i in 1:500)
{
iresult <- mapply(func, data1, data2, i) # Time-consuming operation
result <- result + iresult
}
Problem:
One of our customers was running that on single node and it took around 5 minutes to
complete on single core. Is there a way to parallelize the above code and make use of multiple cores to speed up the calculation?
Solution:
We integrated “R” with Symphony and ran the same script that took five minutes on single core, now took around 30 seconds on 10 cores. With Platform Symphony, one gets linear speedup and virtually unlimited scale.
A New Chapter In My Life; Google
7 years ago
0 comments:
Post a Comment