最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

cluster computing - Is --nodes 2 (without '=') accepted way of requesting nodes in slurm? - Stack Overflow

programmeradmin3浏览0评论

I just realized that I have been always using a slurm script, where in the first line I specify number of nodes in a wrong way. I see two options are either #SBATCH N 2 or #SBATCH --nodes=2. Instead I have been using #SBATCH --nodes 2 (missing '=') in my script all the time (of course I change 2 to other values as well as per need). However I have looked at all my finished jobs using sacct and running jobs, and it used number of nodes I requested correctly. But I couldn't find anywhere in official documentation if #SBATCH --node 2 is right way, and I am worried if it causes some issues which are hidden from me now. Is there any assurance that #SBATCH --nodes 2 is accepted same way as #SBATCH --nodes=2?

I just realized that I have been always using a slurm script, where in the first line I specify number of nodes in a wrong way. I see two options are either #SBATCH N 2 or #SBATCH --nodes=2. Instead I have been using #SBATCH --nodes 2 (missing '=') in my script all the time (of course I change 2 to other values as well as per need). However I have looked at all my finished jobs using sacct and running jobs, and it used number of nodes I requested correctly. But I couldn't find anywhere in official documentation if #SBATCH --node 2 is right way, and I am worried if it causes some issues which are hidden from me now. Is there any assurance that #SBATCH --nodes 2 is accepted same way as #SBATCH --nodes=2?

Share Improve this question asked Mar 17 at 14:03 fahdfahd 1739 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

While the Slurm documentation consistently uses the form --nodes=2, the code uses the getopt_long function from unistd.h to parse arguments. The manpage of that function says:

A long option may take a parameter, of the form --arg=param or --arg param

So the version without the =, i.e. --nodes 2, will most probably always be valid. Note that you can check that at submission time by using the --verbose argument of sbatch, which makes sbatch output a summary of the options that were found in the submission script.

Note that #SBATCH N 2 is a mistake and should be #SBATCH -N 2.

发布评论

评论列表(0)

  1. 暂无评论