SGE would not read your .bashrc or .bash_profile when starting jobs.
You need to include -V or -v option.
ex) qsub -V -cwd -j y script.sh

-V
Specifies that all environment variables active within the qsub utility be exported to the context of the job.
  
-v variable[=value],...
Defines or redefines the environment variables to be exported to the execution context of the job. If the -v option is present Grid Engine will add the environment variables defined as arguments to the switch and, optionally, values of specified variables, to the execution context of the job.

You can also set as default option.
> vi /opt/gridengine/default/common/sge_request
(ADD) -V


이옵션을 쓰게 되면 NFS로 물린 각 계정 내에 설정된 설정정보 뿐 아니라 /etc/bashrc 등 마스터에 글로벌하게 설정된 설정정보도 다 가지고 간다. 따라서 각 노드에 직접 접속하여서는 설정이 적용되지 않지만 SGE를 통해서 적용되는 현상이 발생될 수 있다.
Posted by 옥탑방람보
,