translated

This commit is contained in:
geekpi 2023-03-08 08:38:51 +08:00
parent 55c79b0299
commit 82cee055bd
2 changed files with 66 additions and 66 deletions

View File

@ -1,66 +0,0 @@
[#]: subject: "Parallel and distributed computing with Raspberry Pi clusters"
[#]: via: "https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters"
[#]: author: "Peter Cheer https://opensource.com/users/visimpscot2"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Parallel and distributed computing with Raspberry Pi clusters
======
Since the Raspberry Pi's launch, creators have based countless computer science education projects on the humble pocket-sized system on a chip. These have included many projects exploring low-cost Raspberry Pi clusters to introduce parallel and distributed computing (PDC) concepts.
The UK Open University (OU) provides distance education to students of diverse ages, experiences, and backgrounds, which raises some issues not faced in more traditional universities. The OU experiment using Raspberry Pi clusters to introduce PDC concepts to distance learning students began in 2019 and has been featured in an [academic paper][1] but deserves to be known more widely.
The project uses Raspberry Pi clusters based on the [OctaPi instructions][2], released under a Creative Commons Licence by GCHQ. Eight Raspberry Pis are connected in a private network using a router and a switch. One of the Raspberry Pis acts as the lead, while the others are servers providing results back to the lead device. Programs written in Python run on the lead Pi, and the `dispy` package distributes activities across cores in the cluster.
Three programs have been developed for the clusters, and you can download them from the [Git repository][3].
Two of the programs are text-based and linked to search problems: The traveling salesperson and password hashing. As complete search problems, these are ideal for teaching PDC concepts. The third program is graphical. The image combiner takes three images as input, with non-overlapping obstructions. It constructs an image without any obstructions by comparing the RGBA values pixel-by-pixel across the three images and selecting the median.
### Using the cluster
The Open University is a distance learning institution, so students access the clusters through a web interface. Remote access to the clusters uses the OpenSTEM Labs infrastructure at the university. Ten clusters (eight built with Pi 4, two built with Pi 3B+) are installed into racks, with webcams pointed at each cluster.
The students select which program to run, the number of cores to use, and the parameters for the selected program. As output, they see the time the program takes to run on an individual Raspberry Pi compared to the cluster using the number of cores selected. The student also sees the output from the program, either the password hashing result, the minimal and maximal traveling salesperson route, or the non-occluded image.
![Generating a fourth image from information in three images][4]
A webcam shows a live stream of the cluster. The lead Pi has an LED display to show the program's state as it runs. The webcam makes it clear to students that they are experimenting with real dedicated hardware rather than getting simulated or pre-recorded results.
![Raspberry Pi cluster][5]
Each program has two activities associated with it, illustrating different aspects of program design and PDC operations. One of the main learning points is that PDC computing can provide significant performance advantages but at a cost in the time and resources taken to divide and distribute a problem and, in reverse, to recombine the results. The second learning point is that efficiency is significantly affected by the program design.
### Students like it
Currently, the use of the Raspberry Pi clusters is optional. Based on the findings so far, though, students enjoy it and are motivated by having remote access to physical hardware.
One student has said, "It was really interesting to be able to use real clusters instead of having it virtualized."
Another adds, "It was really exciting to be able to actually see a cluster working and see the real effects of working with multiple cores. It was great to be able to try this out for myself, not just to read the theory about it!"
Students are using the clusters to undertake learning activities designed to teach the principles of PDC rather than writing and running their own programs. The experience of developing a low-cost Raspberry Pi cluster for use with open-distance university students demonstrates the benefits remote practical activities can have for teaching PDC concepts and engaging students.
When I asked Daniel Gooch, one of the team members behind the project, about it, he said: "For me, where we differ is that we've taken an existing set of Raspberry Pi instructions and worked on integrating in additional wrap-around material to ensure it can cope with the distance and scale we operate on."
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters
作者:[Peter Cheer][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/visimpscot2
[b]: https://github.com/lkxed/
[1]: https://doi.org/10.1080/02680513.2022.2118573
[2]: https://projects.raspberrypi.org/en/projects/build-an-octapi
[3]: https://github.com/dg7692/TM129
[4]: https://opensource.com/sites/default/files/2023-02/image-project.png
[5]: https://opensource.com/sites/default/files/2023-02/cluster.png

View File

@ -0,0 +1,66 @@
[#]: subject: "Parallel and distributed computing with Raspberry Pi clusters"
[#]: via: "https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters"
[#]: author: "Peter Cheer https://opensource.com/users/visimpscot2"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
用树莓派集群进行并行和分布式计算
======
自从树莓派推出以来创造者们已经在这个简陋的袖珍芯片系统上开展了无数的计算机科学教育项目。其中包括许多探索低成本树莓派集群的项目以介绍并行和分布式计算PDC概念。
英国开放大学OU为不同年龄、经历和背景的学生提供远程教育这就提出了一些在更传统的大学中没有面临的问题。开放大学使用树莓派集群向远程教育学生介绍 PDC 概念的实验始于 2019 年,并在一篇[学术论文][1]中进行了介绍,但值得更广泛地了解。
该项目使用基于 [OctaPi 指令][2]的树莓派集群,该指令由 GCHQ 在知识共享许可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头,而其他的是服务器,将结果反馈给可协议下发布。八个树莓派使用一个路由器和一个交换机连接在一个私人网络中。其中一个树莓派充当领导,而其他的是服务器,将结果反馈给领导设备。用 Python 编写的程序在领头设备。用 Python 编写的程序在领头的树莓派上运行,`dispy` 包将活动分布在集群的各个核心上。
已经为集群开发了三个程序,你可以从 [Git 仓库][3]下载它们。
其中两个程序是基于文本的,并与搜索问题有关:旅行推销员和密码散列。作为完整的搜索问题,这些是教授 PDC 概念的理想选择。第三个程序是图形化的。图像组合器将三幅图像作为输入,其中有不重叠的障碍物。它通过对三幅图像的 RGBA 值进行逐个像素的比较并选择中位数来构建一个没有任何障碍物的图像。
### 使用集群
开放大学是一个远程学习机构,所以学生通过网络界面访问集群。对集群的远程访问使用大学的 OpenSTEM 实验室的基础设施。10 个集群8 个用树莓派 4 构建2 个用树莓派 3B+ 建造)被安装在机架上,用网络摄像头对准每个集群。
学生们选择要运行的程序,使用的核心数量,以及所选程序的参数。作为输出,他们可以看到该程序在单个树莓派上运行的时间与使用所选核数的集群的时间相比。学生还可以看到程序的输出,要么是密码散列结果,要么是最小和最大的旅行推销员路线,或未遮挡的图像。。
![Generating a fourth image from information in three images][4]
网络摄像头显示了集群的实时流。领头的树莓派有一个 LED 显示屏,显示程序运行时的状态。网络摄像头让学生清楚地知道,他们是在用真正的专用硬件做实验,而不是得到模拟的或预先录制的结果。
![Raspberry Pi cluster][5]
每个程序都有两个与之相关的活动,说明了程序设计和 PDC 操作的不同方面。其中一个主要的学习点是PDC 计算可以提供显著的性能优势,但代价是划分和分配问题以及反过来重新组合结果所花费的时间和资源。第二个学习点是,效率受程序设计的影响很大。
### 学生喜欢
目前,树莓派集群的使用是可选的。不过根据目前的研究结果,学生们很喜欢它,并因能远程接触到物理硬件而受到激励。
一位学生说:“能够使用真正的集群,而不是让它虚拟化,这真的很有趣”。
另一名学生补充说:“能够真正看到集群的工作,看到多核工作的真实效果,这真的很令人兴奋。能够亲自尝试,而不仅仅是阅读有关理论,这真是太好了!”
学生们正在使用集群开展旨在教授 PDC 原理的学习活动,而不是编写和运行他们自己的程序。开发低成本的树莓派集群供远程大学学生使用的经验表明,远程实践活动对教授 PDC 概念和吸引学生有好处。
当我向该项目背后的团队成员之一 Daniel Gooch 询问时,他说:"对我来说,我们的不同之处在于,我们采用了一套现有的树莓派指令,并致力于整合额外的环绕材料,以确保它能够应对我们操作的距离和规模。"
--------------------------------------------------------------------------------
via: https://opensource.com/article/23/3/parallel-distributed-computing-raspberry-pi-clusters
作者:[Peter Cheer][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/visimpscot2
[b]: https://github.com/lkxed/
[1]: https://doi.org/10.1080/02680513.2022.2118573
[2]: https://projects.raspberrypi.org/en/projects/build-an-octapi
[3]: https://github.com/dg7692/TM129
[4]: https://opensource.com/sites/default/files/2023-02/image-project.png
[5]: https://opensource.com/sites/default/files/2023-02/cluster.png