我可以向SLURM提交"单行"吗?
使用bsubLSF和标准Linux实用程序xargs,我可以轻松地提交一个单独的作业来解压缩目录中的所有文件:
ls *.gz | sed 's/.gz$//g' | xargs -I {} bsub 'gunzip -c {}.gz > {}'
Run Code Online (Sandbox Code Playgroud)
使用SLURM,我认为srun或sbatch将会工作,但无济于事:
ls *.gz | sed 's/.gz$//g' | xargs -I {} srun 'gunzip -c {}.gz > {}'
gzip: srun: error: compute-node-01: task 0: Exited with exit code 1
stdin: unexpected end of file
ls *.gz | sed 's/.gz$//g' | xargs -I {} sbatch 'gunzip -c {}.gz > {}'
sbatch: error: Unable to open file gunzip -c naive_S1_L001_R1_001.fastq.gz > naive_S1_L001_R1_001.fastq
Run Code Online (Sandbox Code Playgroud)
我已经看到了bsub从LSF 列为等同于sbatch从SLURM,但到目前为止,他们似乎只相当于提交脚本文件:
SLURM LSF
-------------------- ------------------
Job Submission sbatch [script_file] bsub [script_file]
Run Code Online (Sandbox Code Playgroud)
还有其他方法可以用SLURM提交"单线"工作吗?
尝试使用wrap选项sbatch.类似于以下内容:
ls *.gz | sed 's/.gz$//g' | xargs -I {} sbatch --wrap="gunzip -c {}.gz > {}"
Run Code Online (Sandbox Code Playgroud)
从手册页sbatch:
--wrap=<command string>
Sbatch will wrap the specified command string in a simple "sh" shell
script, and submit that script to the slurm controller. When --wrap is
used, a script name and arguments may not be specified on the command
line; instead the sbatch-generated wrapper script is used.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3256 次 |
| 最近记录: |