Built in shell command not working


I’m new to pbs and coming from SGE.
I’m trying to use the source command when I submit jobs and I get error message:
pbs_mom, exec of source failed with error: No such file or directory
I understand it related some how to that its built in shell commands and don’t have real path on the system, there is any option to use the source command?

Please share your script.
source command or . should work when used in a script.

something like that not working:

  1. qsub -q servers_q -V – source /home/chagai/test.sh
  2. qsub -q servers_q -V – echo 1

~> cat STDIN.e244
pbs_mom, exec of source failed with error: No such file or directory
~> cat STDIN.e245
pbs_mom, exec of echo failed with error: No such file or directory

~> qrsh -q servers.q echo 1 SUNGRID
~> qsub -I -q servers_q -V – echo 1 PBS
qsub: waiting for job 280.pbs-ce7 to start
qsub: job 280.pbs-ce7 ready

qsub: job 280.pbs-ce7 completed

why the output not goes to the screen like in qrsh?

Please try this:

qsub -q servers_q -V -- /bin/hostname

echo "hello" | qsub -V -q servers_q

Please check the standard out and error files created

qsub -q server_q -V -I  
Once you get a remote console of the compute node 
echo "hello"
exit to come out of the interactive job

Please check the man page for qsub

~> qsub -q servers_q -V – /bin/hostname – working fine
~> cat STDIN.o298
~> echo “hello” | qsub -V -q servers_q
~> cat STDIN.e299
Usage: grep [OPTION]… PATTERN [FILE]…
Try ‘grep --help’ for more information.
/var/spool/pbs/mom_priv/jobs/299.pbs-ce7.SC: line 1: hello: command not found
~> cat STDIN.o299
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
3. its working

The problem only with built in shell commands, it can be related to installation?

Please try this

make sure /home/chagai/test.sh has executable permissions and is available across all the compute nodes in the same location. ( chmod +x /home/chagai/test.sh)

qsug -q servers_q -V -- /home/chagai/test.sh

qsub -V -q servers_q -- /bin/echo "hello"

First of all big thx for all support!!
qsub -V -q servers_q – /bin/echo “hello” → with executable permissions its working
qsub -V -q servers_q – /bin/echo “hello” → working too

what about source command something like this (before we loading some tool in interactive job, we need to source some file):
qsub -V -q servers_q – “source /home/chagain/tool.sh;tool” → not working
in SGE that’s what i used:
qrsh -q servers.q -V -cwd “source /home/chagain/tool.sh;tool”

You can try this

qsub -V   -q servers_q   <press return>
source /home/chagain/tool.sh

it possible to work in one line? and not with multiple actions

Hi thx for all help I found a solution