SBATCH -n 和 srun -np

发布于 2025-01-10 12:55:41 字数 183 浏览 3 评论 0原文

在下面的 sbatch 脚本中,“np”(48) 优先于“ntasks”还是仅使用 24 个任务来运行。换句话说,当“np”大于“ntasks”或“np”等于“ntasks * N”时会发生什么

#SBATCH --ntasks 24
#SBATCH -N 2
mpirun -np 48 ./run 

In the sbatch script below, does "np" (48) take precedence over "ntasks" or only 24 tasks are used to run. In other words, what happens when "np" is greater than "ntasks" or "np" is equal to "ntasks * N"

#SBATCH --ntasks 24
#SBATCH -N 2
mpirun -np 48 ./run 

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

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

发布评论

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

评论(1

深白境迁sunset 2025-01-17 12:55:41

打印出 slurm 环境变量。您将看到主机列表有 24 个项目长,因此如果您创建 48 个进程,它将使用主机列表中的每个位置两次。根据您的核心数量,这可能会导致效率损失:所有进程同时运行,但如果您的进程多于核心,Unix 将对它们进行时间切片。

Print out the slurm environment variables. You'll see that the hostlist is 24 items long, so if you create 48 processes, it will use each location in the hostlist twice. Depending on your core count that may lead to a loss of efficiency: all process run at the same time, but if you have more processes than cores, Unix will time-slice them.

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