在 SGE/PBS 中,我可以像在本地一样向集群提交二进制可执行文件。例如:
qsub -b y -cwd echo hello
将提交一个名为 echo 的作业,该作业将单词“hello”写入其输出文件。
我如何向 SLURM 提交类似的工作。它期望文件的第一行有一个 hash-bang 解释器。在 SLURM 上我得到
$ sbatch echo hello
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
或使用伪 qsub:
$ qsub echo hello
There was an error running the SLURM sbatch command.
The command was:
'/cm/shared/apps/slurm/14.11.3/bin/sbatch echo hello 2>&1'
and the output was:
'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
'
我不想写脚本,把#!/bin/bash
在顶部和我的命令在下一行,然后将它们提交给 sbatch。有没有办法避免这种额外的工作?必须有一种更有效的方法。
您可以使用 --wrap 参数自动将命令包装在脚本中。
就像是:
sbatch --wrap="echo hello"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)