【问题标题】:Running a binary without a top level script in SLURM在 SLURM 中运行没有顶级脚本的二进制文件
【发布时间】:2015-10-28 20:14:27
【问题描述】:

在 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。有没有办法避免这种额外的工作?必须有一种更有成效的方法。

【问题讨论】:

    标签: bash cluster-computing pbs sungridengine slurm


    【解决方案1】:

    您可以使用 --wrap 参数将命令自动包装到脚本中。

    类似:

    sbatch --wrap="echo hello"

    【讨论】:

      猜你喜欢
      • 2011-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-03
      • 1970-01-01
      • 1970-01-01
      • 2014-08-19
      • 1970-01-01
      相关资源
      最近更新 更多