gpt4 book ai didi

mpi - 在 Slurm runscript 中运行 OpenMPI 作业时出现段错误

转载 作者:行者123 更新时间:2023-12-02 03:08:24 34 4
gpt4 key购买 nike

我们正在运行一个小型集群环境,其中英特尔至强节点通过 Infiniband 连接。登录节点未连接到 infiniband 互连。所有节点都运行 Debian Jessie。

我们在登录节点上运行 Slurm 14.03.9。由于系统OpenMPI已经过时,并且不支持MPI3-Interface(我需要),所以我编译了自定义的OpenMPI 2.0.1。

当我通过手动启动 MPI 作业时

mpirun --hostfile hosts -np xx program_name,

它在多个节点上也运行良好,并且充分利用了 Infiniband。很好。

但是,当我从 Slurm 运行脚本内部调用 MPI 应用程序时,它会因奇怪的段错误而崩溃。我编译了支持 Slurm 的 OpenMPI,并且 PMI 似乎也可以工作,所以我可以简单地编写

mpirun program_name

在 Slurm 运行脚本中,它会自动将作业分派(dispatch)到具有正确数量的 CPU 核心的正确节点。但是,我不断遇到这些段错误。

在 Slurm 运行脚本中向 mpirun 显式指定“-np”和“--hostfile”也没有帮助。手动启动时运行良好的完全相同的命令在 Slurm 环境中启动时会导致段错误。

在发生段错误之前,我从 OpenMPI 收到以下错误消息:

--------------------------------------------------------------------------
Failed to create a completion queue (CQ):

Hostname: xxxx
Requested CQE: 16384
Error: Cannot allocate memory

Check the CQE attribute.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Open MPI has detected that there are UD-capable Verbs devices on your
system, but none of them were able to be setup properly. This may
indicate a problem on this system.

You job will continue, but Open MPI will ignore the "ud" oob component
in this run.

Hostname: xxxx
--------------------------------------------------------------------------

我用谷歌搜索了它,但没有找到太多有用的信息。我认为这可能是锁定内存的限制,但在计算节点上执行“ulimit -l”会返回“无限制”,因为它应该是这样。

非常感谢您为我的作业在 Slurm 环境中使用 OpenMPI 运行提供的任何帮助。

最佳答案

终于,我解决了这个问题。

这些段错误确实与上面发布的错误消息有关,这是 Slurm 调度作业的计算节点上的“最大锁定内存”限制的结果。

我花了很长时间才解除这个锁定的内存限制。通过 Google 找到的所有标准程序都不起作用(既没有编辑 /etc/security/limits.conf,也没有编辑 /etc/init.d/slurmd)。原因是我的 Debian Jessie 节点使用 systemd,它不支持这些文件。我必须添加一行

[Service]
LimitMEMLOCK=32768000000

进入我所有节点上的文件/etc/systemd/system/multi-user.target.wants/slurmd.service。它不适用于unlimited,因此我必须使用总系统 RAM(以字节为单位)。修改这个文件后,我执行了

systemctl daemon-reload
systemctl restart slurmd

在所有节点上,最后问题消失了。谢谢 Carles Fenoy 的宝贵意见!

关于mpi - 在 Slurm runscript 中运行 OpenMPI 作业时出现段错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39512931/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com