A simple example for writting parallel code

September 7, 2011

(This article was first published on cloudnumbers.com » R-project, and kindly contributed to R-bloggers)

Today, programmers have to deal with multi-core and multi-computer technologies. Several people claim that software developers are far behind hardware technologies. My two favorite posts for this statement are

Parallel computing is not that simple than writing serial code with loops or classes. But there are several simple tricks and advices available in the web to accelerate your serial code with simple parallelization. Aater Suleman posted a nice hands-on-tutorial for constructing another parallel programming example.

The goal is to implement an algorithm which finds a path from the mouse to the cheese in a 2D maze. What is you favorite and fastest solution? Who comes up with a nice implementation in R or Python?
If you are looking for more tips and tricks for parallel computing you should check the work-in-progress version of the book “Is Parallel Programming Hard, And, If So, What Can You Do” from Paul E. McKenney. He tries to help you to avoid at least some of the pitfalls that have beset parallel projects. The book is so far written very nicely and it concludes, that “Parallel programming is not as hard as it is reputed, and … [the] book makes it even easier for you.” This book an open-source project, and so both review comments and patches are quite welcome. Download the PDF.

All C examples from Aater Suleman and from Paul E. McKenney’s book work at cloudnumbers.com. If you do not have access to HPC resources you can use cloudnumbers.com to accelerate your calculation at a computer cluster in the Cloud.

To leave a comment for the author, please follow the link and comment on their blog: cloudnumbers.com » R-project.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)