在哪里可以找到有关 "batch script" 语法的文档
Where can I find documentation on the syntax of a "batch script"
"batch scripts" for sbatch
的语法(和语义,就此而言)是否在任何地方正式记录?
(我正在寻找正式的文档,而不是示例。)
sbatch
手册页的 DESCRIPTION
部分以这段开头:
sbatch submits a batch script to Slurm. The batch script may be given to sbatch through a file
name on the command line, or if no file name is specified, sbatch will read in a script from
standard input. The batch script may contain options preceded with "#SBATCH" before any exe-
cutable commands in the script.
关于 "batch script".
的语法,这就是我在 sbatch
手册页中所能找到的全部内容
例如,它没有说明此脚本需要以 shebang 行开头这一事实。 (可以 推断 这一要求,但是,根据 EXAMPLES
部分中的所有示例都满足这一要求这一事实。)
它也没有说明应该在命令行上放置什么解释器。同样,从 EXAMPLES
部分中的示例可以推断出 /bin/sh
是合适的,但没有理由认为 /bin/bash
或 /bin/zsh
也合适(让单独,例如 /bin/perl
或 /bin/python
或 /bin/ruby
等)。
文档确实只规定了'batch script',理解为'non-interactive script'。
只有当您尝试提交已编译的程序时,您才会被告知 shebang:
$ sbatch /usr/bin/time
sbatch: error: This does not look like a batch script. The first
sbatch: error: line must start with #! followed by the path to an interpreter.
sbatch: error: For instance: #!/bin/sh
但您可以提交任何支持#
作为评论符号的语言编写的脚本;在这种情况下最常见的是 Bash、Python 和 Perl。您也可以使用 Lua 等实例,但您无法将资源要求与 #SBATCH
指令合并到脚本中。
"batch scripts" for sbatch
的语法(和语义,就此而言)是否在任何地方正式记录?
(我正在寻找正式的文档,而不是示例。)
sbatch
手册页的 DESCRIPTION
部分以这段开头:
sbatch submits a batch script to Slurm. The batch script may be given to sbatch through a file
name on the command line, or if no file name is specified, sbatch will read in a script from
standard input. The batch script may contain options preceded with "#SBATCH" before any exe-
cutable commands in the script.
关于 "batch script".
的语法,这就是我在sbatch
手册页中所能找到的全部内容
例如,它没有说明此脚本需要以 shebang 行开头这一事实。 (可以 推断 这一要求,但是,根据 EXAMPLES
部分中的所有示例都满足这一要求这一事实。)
它也没有说明应该在命令行上放置什么解释器。同样,从 EXAMPLES
部分中的示例可以推断出 /bin/sh
是合适的,但没有理由认为 /bin/bash
或 /bin/zsh
也合适(让单独,例如 /bin/perl
或 /bin/python
或 /bin/ruby
等)。
文档确实只规定了'batch script',理解为'non-interactive script'。
只有当您尝试提交已编译的程序时,您才会被告知 shebang:
$ sbatch /usr/bin/time
sbatch: error: This does not look like a batch script. The first
sbatch: error: line must start with #! followed by the path to an interpreter.
sbatch: error: For instance: #!/bin/sh
但您可以提交任何支持#
作为评论符号的语言编写的脚本;在这种情况下最常见的是 Bash、Python 和 Perl。您也可以使用 Lua 等实例,但您无法将资源要求与 #SBATCH
指令合并到脚本中。