在SGE/PBS中,我可以像在本地一样提交二进制可执行文件到集群。例如:
qsub -b y -cwd echo hello
我想提交一个名为echo的作业,它会将单词"hello"写入其输出文件。
我该如何向SLURM提交类似的作业?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。有没有办法避免这个额外的工作?一定有更高效的方法。