【发布时间】:2014-01-05 12:37:48
【问题描述】:
我在我的主文件夹下安装了 R,我想使用新的 R 在我向集群提交作业时被调用。集群节点都安装了 CentOS。
这是我在 .bash_profile 和 .bashrc 中所做的配置:
if [ `lsb_release -i|cut -c17-20` == 'Cent' ] ; then
alias R='/home/XXX/R-3.0.2/bin/R'
alias Rscript='/home/XXX/R-3.0.2/bin/Rscript'
fi
我在 .bash_profile 中添加了以下内容:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
我还将它添加到提交的脚本中。
source $HOME/.bash_profile
我用 qsub -I 试过了,效果很好。
但是,在我提交作业后,which R 仍然显示原来的路径!
如何正确设置环境?
【问题讨论】: