如何解决使用 Slurm 和 Singularity 时缺少“stdout”文件
我想使用 Nextflow 创建将由 Slurm 作业调度程序执行的奇异组件管道。 我创建了一个简单的工作来运行一个任务:
#!/usr/bin/env nextflow
process createGroups {
executor = 'slurm'
queue = 'upgrade'
memory = '10 GB'
time = '30 min'
cpus = 8
clusterOptions = '--workdir /path/to/the/singularity/image'
"""
singularity run ...
"""
}
作业成功执行并给出退出状态 0,但 Nextflow 出现“缺少‘stdout’文件”错误。有完整的输出:
Error executing process > 'createGroups'
Caused by:
Missing 'stdout' file: .../work/89/449f849ffc77a967be91ed994da860/.command.out for process > createGroups
Command executed:
executor > slurm (1)
[89/449f84] process > createGroups [100%] 1 of 1,failed: 1 ✘
Error executing process > 'createGroups'
Caused by:
Missing 'stdout' file: .../work/89/449f849ffc77a967be91ed994da860/.command.out for process > createGroups
Command executed:
singularity run ...
Command exit status:
0
Command output:
(empty)
Work dir:
.../work/89/449f849ffc77a967be91ed994da860
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
我找不到解决此错误的任何解决方案:(
更新: 使用 slurm 的 --workdir 参数会导致该错误。我只是使用“cd”命令来更改路径,它解决了我的问题。
解决方法
最好避免手动调用 Singularity,就像在脚本块中一样。假设 Singularity 将位于队列中每个执行/计算节点的 $PATH 中,那么,例如,您只需要:
在您的 nextflow.config
中:
process {
executor = 'slurm'
}
singularity {
enabled = true
cacheDir = '/path/to/containers'
}
然后,您的 nextflow 脚本将如下所示:
process bwa_mem {
container = 'quay.io/biocontainers/bwa:0.7.17--h5bf99c6_8'
queue = 'upgrade'
cpus = 8
memory = '10 GB'
time = '30.m'
"""
bwa mem
"""
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。