A simple example for writting parallel code
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
- Editor’s Desk: Software Lags Behind Hardware, But That’s a Good Thing
- A Hacker’s Craic -Why is software so far behind hardware?
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. hands-on-tutorial for constructing another parallel programming example.
posted a niceThe 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
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.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.