User avatar
gearspec
Posts: 8
Joined: Tue Aug 27, 2013 3:49 am
Location: Dhaka, Bangladesh
Contact: Website

Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Sun Jul 03, 2016 5:11 pm

1503277_10152892878441420_4133980502810337957_n.jpg
Work
1503277_10152892878441420_4133980502810337957_n.jpg (48.65 KiB) Viewed 5116 times
This project was done as classwork for
Independent University Bangladesh
CSC 470: Introduction to Parallel Programming.

In this step by step tutorial we shall learn how to setup a couple of Raspberry Pi's to create a small cluster.
It will discuss the hardware details, the process, basic OpenMP and Parallel how to connect them and write a basic C++ program to make them work together. We assume you already have the C++ knowledge necessary to take it further. Hope it helps.

Link: (with download PDF)
http://libregarage.com/tutorials/raspi_openMP.html
Programming to free my soul.

ejolson
Posts: 5477
Joined: Tue Mar 18, 2014 11:47 am

Re: Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Mon Jul 04, 2016 4:06 pm

gearspec wrote:In this step by step tutorial we shall learn how to setup a couple of Raspberry Pi's to create a small cluster.
It will discuss the hardware details, the process, basic OpenMP and Parallel how to connect them and write a basic C++ program to make them work together. We assume you already have the C++ knowledge necessary to take it further. Hope it helps.
Thank you for posting a nice writeup and link. As there is no forum topic focusing on parallel processing it is difficult to know where to post results and questions where people can find then. As a result such posts tend to get lost. We have separate topics on ballooning, Mathematica and many others that are much lower in volume than parallel processing would be. My view is that important topics that would get lost by mixing with the other topics should have their own topic and that "parallel processing and multithreaded programming" is such a topic. Again thanks for posting and good luck with the course.

User avatar
gearspec
Posts: 8
Joined: Tue Aug 27, 2013 3:49 am
Location: Dhaka, Bangladesh
Contact: Website

Re: Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Tue Jul 05, 2016 1:56 pm

Thanks for the suggestions, I really hope the forum moderator can create a new category for "parallel processing and multithreaded programming". The university course is over, and I have enjoyed Raspberry Pi and its capabilities. Its too great to be true. Love the Pi Guys.
Programming to free my soul.

ejolson
Posts: 5477
Joined: Tue Mar 18, 2014 11:47 am

Re: Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Sun Jul 10, 2016 5:09 pm

gearspec wrote:Thanks for the suggestions, I really hope the forum moderator can create a new category for "parallel processing and multithreaded programming". The university course is over, and I have enjoyed Raspberry Pi and its capabilities. Its too great to be true. Love the Pi Guys.
I asked for a "parallel processing and multithreaded programming" category a couple years ago. The response was that, since new posts on this topic aren't overwhelming the forum, there is no need. After thinking about it, I believe the problem is more that the posts on parallel processing get lost when they are mixed with the other topics. Like the ballooning, classroom use, code club, educational resources, Mathematica and other low volume categories, maybe parallel processing is important enough to be separated out so the relevant posts aren't lost.

User avatar
gearspec
Posts: 8
Joined: Tue Aug 27, 2013 3:49 am
Location: Dhaka, Bangladesh
Contact: Website

Re: Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Wed Jul 13, 2016 1:17 am

ejolson wrote:
gearspec wrote:Thanks for the suggestions, I really hope the forum moderator can create a new category for "parallel processing and multithreaded programming". The university course is over, and I have enjoyed Raspberry Pi and its capabilities. Its too great to be true. Love the Pi Guys.
I asked for a "parallel processing and multithreaded programming" category a couple years ago. The response was that, since new posts on this topic aren't overwhelming the forum, there is no need. After thinking about it, I believe the problem is more that the posts on parallel processing get lost when they are mixed with the other topics. Like the ballooning, classroom use, code club, educational resources, Mathematica and other low volume categories, maybe parallel processing is important enough to be separated out so the relevant posts aren't lost.
I currently work at a Lab where one of our primary goal is to achieve Parallelism using Multitude of devices.
http://ccse.secs.iub.edu.bd

I am sure its time for such category to be created.
Programming to free my soul.

ejolson
Posts: 5477
Joined: Tue Mar 18, 2014 11:47 am

Re: Beginner Raspberry Pi Cluster for C++ and OpenMP Guide

Wed Jul 13, 2016 3:25 am

gearspec wrote:I currently work at a Lab where one of our primary goal is to achieve Parallelism using Multitude of devices.
http://ccse.secs.iub.edu.bd

I am sure its time for such category to be created.
That CCSE website looks nice.

Last year I compiled a version of gcc for the Raspberry Pi which included the Intel/MIT Cilkplus extensions for the C and C++ programming languages. Cilkplus is similar to OpenMP, as it also provides language extensions for threaded parallel processing on SMP systems. However, Cilkplus has a more advanced work scheduling algorithm that often makes it more efficient.

Only a few modifications were needed to the runtime library and build system for it to work. While Cilkplus is currently most useful on multi-core Xeon Phi architectures, it also worked pretty well on a stand-alone 4-core Raspberry Pi 2B.

The picture of your cluster looks like it was created from the original single-core Raspberry Pi computers. If you had a similar cluster made using the 2B or 3B models, maybe it would be possible to run hybrid Cilkplus/MPI jobs that executed multi-core MPI ranks on each node. This would be similar to a hybrid OpenMP/MPI job. I've not tried this, but think it might be interesting.

Return to “C/C++”