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

 

Posted by 옥탑방람보
,