[問題] 用system功能送job給cluster

作者: hkopee123 (..)   2017-09-14 20:58:14
[問題敘述]:
我有個R script長這樣
檔名是 Rcode.r
裡面包含
system (paste ("qsub /path/test.sh", sep=""), ignore.stdout=T, wait=T )
q("no")
我想使用這個 R script 送 shell script job 給 cluster 執行
我在 terminal 畫面打上
$ rR Rcode.r
執行後卻出現 sh: qsub: command not found 的錯誤訊息
當我在terminal進入R畫面
直接打上一樣的 R script
> system (paste ("qsub /path/test.sh", sep=""), ignore.stdout=T, wait=T )
我卻可以成功把job送出去
並且執行完成
我確定當我打$ qsub test.sh
terminal可以正常的送job出去
但當我透過R 用system這功能送job時
卻回覆command not found的錯誤
為什麼會這樣呢??
ps. 我也試過
system (paste ("/usr/torque/bin/qsub /path/test.sh", sep=""),
ignore.stdout=T, wait=T )
但一樣出現
sh: /usr/torque/bin/qsub: No such file or directory
[程式範例]:
[環境敘述]:
[關鍵字]:
選擇性,也許未來有用

Links booklink

Contact Us: admin [ a t ] ucptt.com