简体   繁体   English

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

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

In SGE/PBS, I can submit binary executables to the cluster just like I would locally. 在SGE / PBS中,我可以像在本地一样向集群提交二进制可执行文件。 For example: 例如:

qsub -b y -cwd echo hello

would submit a job named echo, which writes the word "hello" to its output file. 将提交一个名为echo的作业,该作业将“hello”一词写入其输出文件。

How can I submit a similar job to SLURM. 我如何向SLURM提交类似的工作。 It expects the file to have a hash-bang interpreter on the first line. 它希望文件在第一行有一个hash-bang解释器。 On SLURM I get 在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

or using the pseuodo qsub: 或使用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
'

I don't want to write script, put #!/bin/bash at the top and my command in the next line and then submit them to sbatch. 我不想编写脚本,将#!/bin/bash放在顶部,将我的命令放在下一行,然后将它们提交给sbatch。 Is there a way to avoid this extra work? 有没有办法避免这项额外的工作? There has to be a more productive way. 必须有一种更有成效的方式。

you can use the --wrap parameter to automatically wrap the command in a script. 您可以使用--wrap参数自动将命令包装在脚本中。

something like: 就像是:

sbatch --wrap="echo hello"

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

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