在SLURM中运行没有顶级脚本的二进制文件 [英] Running a binary without a top level script in SLURM

查看:92
本文介绍了在SLURM中运行没有顶级脚本的二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SGE/PBS中,我可以像在本地一样将二进制可执行文件提交到群集.例如:

In SGE/PBS, I can submit binary executables to the cluster just like I would locally. For example:

qsub -b y -cwd echo hello

将提交一个名为echo的作业,该作业会将单词"hello"写入其输出文件.

would submit a job named echo, which writes the word "hello" to its output file.

我如何提交与SLURM类似的工作.它期望该文件在第一行上具有hash-bang解释器.在SLURM上我得到了

How can I submit a similar job to SLURM. It expects the file to have a hash-bang interpreter on the first line. On SLURM I get

$ 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:

or using the 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.有办法避免这种额外的工作吗?必须有一种更有生产力的方式.

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. Is there a way to avoid this extra work? There has to be a more productive way.

推荐答案

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

you can use the --wrap parameter to automatically wrap the command in a script.

类似:

sbatch --wrap ="echo hello"

这篇关于在SLURM中运行没有顶级脚本的二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆