繁体   English   中英

在SLURM中运行没有顶级脚本的二进制文件

[英]Running a binary without a top level script in SLURM

在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

或使用pseuodo 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"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM