用于分布式内存集群的 OpenMP 或 MPI 或 OpenMPI?

发布于 2024-10-07 20:54:07 字数 294 浏览 0 评论 0原文

我想在 100 节点分布式内存集群中并行化 C 串行代码。该集群由 25 个刀片组成,每个刀片有 4 个核心,由 infiniband 提供。之前我只是使用 PBS 在不同节点之间传播程序的多次串行运行。现在我想知道:

  1. 在这种情况下,OpenMP 或 MPI 或 OpenMPI 的最佳替代方案是什么(目前我不想尝试混合方法,因为我正在开始学习)?
  2. 在哪里可以找到示例/教程?
  3. 对于带有主 for 循环的简单串行代码,OpenMP/MPI/OpemMPI 是否总是比 PBS 等排队方法表现更好?

I want to parallelize a C serial code in a 100 node distributed memory cluster. The cluster consists of 25 blades with 4 cores each by infiniband. Before I just used PBS to spread several serial runs of the program between the different nodes. Now I wonder:

  1. What is the best alternative in this case OpenMP or MPI or OpenMPI (at the moment I do not wish to try a mixed approach as I am starting to learn)?
  2. Where can I find examples/tutorials?
  3. For a simple serial code with a main for loop, can always a OpenMP/MPI/OpemMPI perform better than a queueing approach like PBS?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷离° 2024-10-14 20:54:07

分布式内存排除了用于共享内存计算的 OpenMP。 MPI 是一个标准,OpenMPI 是该标准的实现(还有其他标准,例如 MPICH 或 LAM-MPI)。所以

  1. MPI,而OpenMPI 是一个完全值得尊敬的实现。但是,我认为在没有安装 MPI 的情况下找到像您这样的集群相对不常见,因此更好的选择可能是您已经安装的 MPI。您当然应该与系统管理员讨论此事。而且,您当然不应该在不知道自己在做什么的情况下尝试在集群上安装 OpenMPI。

  2. 到处都是。这里有一个好地方作为起点。

  3. PBS 是一个作业调度系统。在像您这样的集群上,您通常会同时安装 MPI 和作业调度程序,如果不是 PBS,那么 Grid Engine 是最有可能的。

正如您已经发现的,您可以使用 PBS(或 Grid Engine)将多个串行作业分派到集群。您还可以使用它将单个并行作业分派到集群,以便在您需要的任意多个处理器上执行。不过,您的问题提出了一种可能性,即您的问题是令人尴尬的并行,并且 MPI 对您来说可能有点过分了。在你致力于并行化你的程序之前,谷歌一下斜体字的术语——除非你想获得毫无疑问的纯粹享受。

Distributed memory kind of rules out OpenMP which is for shared-memory computing. MPI is a standard, and OpenMPI is an implementation of that standard (there are others such as MPICH or LAM-MPI). so

  1. MPI, and OpenMPI is a perfectly respectable implementation thereof. However, I think it's relatively unusual to find such clusters as yours without an MPI installation, so a better choice might be the MPI installation you already have. You should certainly speak to the system's managers about this. And you should certainly not try to install OpenMPI on a cluster without knowing what you are doing.

  2. All over the place. Here's one good place to start.

  3. PBS is a job scheduling system. On a cluster such as yours you would typically have both an installation of MPI and an installation of a job scheduler, if not PBS then Grid Engine is the most likely.

As you've already discovered you can use PBS (or Grid Engine for that matter) to dispatch multiple serial jobs to a cluster. You can also use it to dispatch a single parallel job to a cluster for execution on however many processors you ask for. Your question raises the possibility, though, that your problem is embarassingly parallel and that MPI may be overkill for you. Google around for the term in italics before you commit yourself to parallelising your program -- unless you want to for the sheer enjoyment which will undoubtedly result.

苯莒 2024-10-14 20:54:07

OpenMP适用于共享内存计算机,我相信你不能将它与分布式内存一起使用。所以你必须使用 MPI。

一个好的 MPI 教程是:
https://computing.llnl.gov/tutorials/mpi/

OpenMP is for shared memory computers, i believe you can't use it with distributed memory. So you will have to use MPI.

A good MPI tutorial is:
https://computing.llnl.gov/tutorials/mpi/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文