Site icon R-bloggers

A simple example for writting parallel code

[This article was first published on cloudnumbers.com » R-project, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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.

A Hacker’s Craic

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 about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.