2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Snakemake 普通に動いていたのに、ジョブスケジューラになげたらエラーになるとき

Last updated at Posted at 2021-03-09

概要

以下のことができるが、ジョブスケジューラにジョブが投入できない時

  • 実行しようとしているコマンドは単独で実行できる
  • ジョブスケジューラにジョブを投げることができ、正常に実行される
  • snakemakeでも、ローカル実行は正常に実行される

以下のメッセージが行っていることが自分の今の状況と合わない気がした時。

(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

結論

ジョブスケジューラで使われるデフォルトのシェルが /bin/sh とか /bin/bash でない可能性があるので、それを強制的に変更する

snakemake -j 999 --cluster "qsub -S /bin/sh"

エラーログの例

$ snakemake -j 999 --cluster "qsub"
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cluster nodes: 999
Job counts:
        count   jobs
        1       create_finish
        1

[Sat Jan  9 15:48:47 2021]
rule create_finish:
    output: /home/manabu/test/finish
    jobid: 0

/home/manabu/test/touch_finish.sh
Submitted job 0 with external jobid 'Your job 275 ("snakejob.create_finish.0.sh") has been submitted'.
[Sat Jan  9 15:48:57 2021]
Error in rule create_finish:
    jobid: 0
    output: /home/manabu/test/finish
    shell:
        /home/manabu/test/touch_finish.sh
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
    cluster_jobid: Your job 275 ("snakejob.create_finish.0.sh") has been submitted

Error executing rule create_finish on cluster (jobid: 0, external: Your job 275 ("snakejob.create_finish.0.sh") has been submitted, jobscript: /home/manabu/test/.snakemake/tmp.ptnx9ol2/snakejob.create_finish.0.sh). For error details see the cluster log and the log files of the involved rule(s).
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/manabu/test/.snakemake/log/2021-03-09T154847.033852.snakemake.log

公式FAQ

Frequently Asked Questions — Snakemake 6.0.3 documentation

他の解決策

POSIX準拠に書いたら問題ないのかもしれない。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?