[问题] 用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