【发布时间】:2018-03-22 18:10:15
【问题描述】:
我正在 PBS 集群 (PBSpro) 上部署蛇形工作流。我遇到了一个问题,在集群节点上运行的 shell 命令由于缺少 shell 命令的参数/操作数而失败。下面是一个可以重现我所看到的行为的最小示例:
rule all:
input: 'foo.txt'
rule run_foo:
output: 'foo.txt'
shell: 'touch {output}'
从命令行运行:
snakemake all
工作流程运行完成,没有任何错误。但是,从命令行运行:
snakemake all --jobs 1 --cluster "qsub -l select=1:ncpus=1 -l walltime=00:05:00 -A $PROJECT -q share -j oe"
工作流失败,并生成如下集群日志:
Error: Image not found
Error in job run_foo while creating output file foo.txt.
RuleException:
CalledProcessError in line 7 of /glade2/scratch2/jhamman/Snakefile:
Command 'touch foo.txt' returned non-zero exit status 1.
File "/glade2/scratch2/jhamman/Snakefile", line 7, in __rule_run_foo
File "/glade/u/home/jhamman/anaconda/envs/storylines/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Exiting because a job execution failed. Look above for error message
似乎正在发生的事情是命令的参数(在本例中为 touch)未应用,尽管列出了回溯。
有没有我遗漏的通过snakemake将shell命令传递给集群的技巧?
【问题讨论】:
-
您能否通过 ssh 进入集群上的节点并确认
touch foo.txt在那里工作?另外,如果您只使用--cluster "qsub"运行会发生什么? -
@Chris_Rands - 在这个集群上,qsub 需要上面显示的参数。没有他们,工作就会被拒绝。是的,
touch foo.txt通过直接 ssh 连接到计算节点。 -
你能检查一下如果你在
touch命令之前echo会发生什么吗?它是否至少为echo产生输出?仅供参考,我使用 LSF 集群,此代码按预期工作。 -
@JeeYem - 好建议,回显 shell 行会导致空字符串。换句话说,没有其他要执行的操作。
-
你可能想检查discussion here
标签: python shell cluster-computing pbs snakemake