SBATCH -n 和 srun -np
在下面的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
打印出 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.