The following runs were generated by the author's 16-node, 64 core, 76.8 GHz. Raspberry Pi3 supercomputer. The runs clearly show the advantage of higher core processing speed, and greater node count. The following two images depict the author's beloved Pi3 supercomputer:
Author's 16-node, 64 cores, 76.8 GHz Raspberry Pi3 Supercomputer:
Close-up of the 16-node Raspberry Pi3 Supercomputer
Let's now have a look at the super cluster execution command syntax, and run results:
alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 1 Calculated pi = 3.141592653590713268840772798285 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000920152842809329741 real 39m34.726s user 39m25.120s sys 0m0.120s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 2 Calculated pi = 3.141592653590711492483933398034 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000918376485969929490 real 19m59.694s user 39m47.750s sys 0m0.410s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 3 Calculated pi = 3.141592653590702610699736396782 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000909494701772928238 real 13m30.216s user 40m2.400s sys 0m0.750s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 4 Calculated pi = 3.141592653590712824751562948222 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000919708753599479678 real 11m9.049s user 42m41.770s sys 0m0.780s
We will now transitioned to the second node or slave1, and, once again we see, from the run time (16m12.707s
) depicted following, the effects of the switching latency between switching port 1, and port 2 or, more precisely, node 1 (master), and node 2 (slave1). Recall that there are four cores per processor. The author has commanded a fifth core, which is core 1 on slave1, to also work on the π equation.
Unfortunately, this latency problem will persist, and accumulate as you add more nodes that are locate at transition ports. The only solution to this issue is to use a faster switch. Currently, fast switches are prohibitively expensive for the hobbyist, or the common man. Indeed, only national governments, and large multi-billion dollar companies, and corporations can afford to play at the highest level in this supercomputing game as they voraciously pursue the holy grail of infinite processing speed. Infinite? Just kidding of course - no one really knows when or how the maddening quest ends. However, after observing the Pi2, and Pi3 runs, it is quite clear that the Pi3 supercomputer (with it more capable processors) significantly outperforms the Pi2.
The good news for hobbyist of a future generation, is that they will be able to build a relatively cheap supercomputer (provided the chip, and switching technology continue to advance) that will have the same processing power as today's super machines – similar to your current effort in building a Pi supercomputers that, in most instances, exceeds the processing power of yesteryear supercomputers.
One more item before we proceed. The author used the relatively cheap 16-port fiber optic cable capable HP 1920-16G Managed Gigabit Switch
with his 16-node Pi3 supercomputer. This switch is a big brother to the 8-port HP managed switch used on his Pi2 supercomputer. Feel free to use any other brand of managed switch with your supercomputer, just make sure you carefully read the instructions on how to implement static MAC, and static IP configurations:
alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 5 Calculated pi = 3.141592653590706163413415197283 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000913047415451728739 real 16m12.707s user 46m36.170s sys 15m57.120s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 6 Calculated pi = 3.141592653590706163413415197283 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000913047415451728739 real 14m7.660s user 39m43.840s sys 14m24.510s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 7 Calculated pi = 3.141592653590710604305513697909 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000917488307550229365 real 12m26.877s user 34m47.440s sys 13m3.220s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 8 Calculated pi = 3.141592653590715045197612198535 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000921929199648729991 real 11m31.987s user 31m52.810s sys 12m36.590s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 10 Calculated pi = 3.141592653590717265643661448848 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000924149645697980304 real 9m27.184s user 25m35.720s sys 10m47.060s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 12 Calculated pi = 3.141592653590720374268130399287 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000927258270166930743 real 8m49.813s user 22m46.090s sys 10m56.390s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 14 Calculated pi = 3.141592653590719486089710699162 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000926370091747230617 real 7m41.531s user 20m6.740s sys 9m28.510s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 16 Calculated pi = 3.141592653590720818357340249349 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000927702359376780805 real 7m5.758s user 17m47.660s sys 9m27.860s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 18 Calculated pi = 3.141592653590719930178920549224 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000926814180957080680 real 6m12.352s user 15m26.270s sys 8m26.940s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 20 Calculated pi = 3.141592653590722594714179649600 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000929478716216181056 real 6m18.800s user 15m6.500s sys 9m11.310s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 22 Calculated pi = 3.141592653590722150624969799537 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000929034627006330993 real 5m40.196s user 13m42.310s sys 8m10.410s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 24 Calculated pi = 3.141592653590721262446550099412 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000928146448586630868 real 5m51.449s user 13m30.780s sys 8m30.330s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5,Slv6,Slv6 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 26 Calculated pi = 3.141592653590720818357340249349 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000927702359376780805 real 6m0.078s user 13m27.300s sys 9m10.070s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5,Slv6,Slv6,Slv6,Slv6 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 28 Calculated pi = 3.141592653590721262446550099412 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000928146448586630868 real 5m24.701s user 12m31.440s sys 8m15.760s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5,Slv6,Slv6,Slv6,Slv6,Slv7,Slv7 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 30 Calculated pi = 3.141592653590719930178920549224 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000926814180957080680 real 5m12.151s user 11m34.040s sys 8m24.120s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5,Slv6,Slv6,Slv6,Slv6,Slv7,Slv7,Slv7,Slv7 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 32 Calculated pi = 3.141592653590720374268130399287 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000927258270166930743 real 5m8.955s user 11m23.230s sys 8m13.930s alpha@Mst0:/beta/gamma $ time mpiexec -H Mst0,Mst0,Mst0,Mst0,Slv1,Slv1,Slv1, Slv1,Slv2,Slv2,Slv2,Slv2,Slv3,Slv3,Slv3,Slv3,Slv4,Slv4,Slv4,Slv4,Slv5,Slv5, Slv5,Slv5,Slv6,Slv6,Slv6,Slv6,Slv7,Slv7,Slv7,Slv7,Slv8,Slv8,Slv8,Slv8,Slv9, Slv9,Slv9,Slv9,Slv10,Slv10,Slv10,Slv10,Slv11,Slv11,Slv11,Slv11,Slv12,Slv12, Slv12,Slv12,Slv13,Slv13,Slv13,Slv13,Slv14,Slv14,Slv14,Slv14,Slv15,Slv15,Slv15,Slv15 MPI_08_b ####################################################### Master node name: Mst0 Enter the number of intervals: 300000 *** Number of processes: 64 Calculated pi = 3.141592653590720374268130399287 M_PI = 3.141592653589793115997963468544 Relative Error = 0.000000000000927258270166930743 real 3m51.196s user 7m30.340s sys 7m9.180s
You can further refine the user experience in operating the super cluster by coding simple convenience
commands into bash
files depicted on the following pages. Create the files/programs on the master node by entering the command; vim ~/xx.sh
, replacing
xx
with an appropriate name, for example; update
, upgrade
, and so on. Then insert the text for each convenience bash
command as depicted in the following figure, then save, and quit.
Execute the convenience
programs using the bash
commands. Note that the bash
term should precede the filename, which begins with ~/
. As the program runs its course, it will ask for the Pi2 or Pi3 password except for the ssh.sh
file, whereby just enter exit
, until you arrive at the appropriate node. This file might not be as useful to you, but you can play around with it, if you so desire. A word of caution, using the upgrade
command after you've successfully configured your supercomputer, could result in changes to the internal settings of the Pi's operating system, and thus resulting in your machine not work as you intended. This would mean, unfortunately, that you will have to redo the entire effort. So use this command only if you have no other choice.
3.22.101.97