Hi Tim: Thanks a lot for suggeting "exec" in my shell script. It really works under both shell and PBS; however, the running was just terminated right after "exec ${DIR}/lx_mapman" was excutated. I am not sure why this happens:-(
Hailiang > Hello Hailiang, > > On Wed, Jun 23, 2010 at 10:01:04PM -0400, Hailiang Zhang wrote: >> Hi there: >> >> I downloaded the binary files of UPPSALA-mapman and they run smoothly >> under linux. However, when I write it into a shell script and run under >> PBS queue, it cannot be excuated. A simple test turned out to be: >> >> (1) >> ******* >> [Linux] ./lx_mapman ----->works >> >> (2) >> ******* >> [Linux]source ${ABSDIR}/lx_mapman ----->-bash:ELF: command not found > I do not know the PBS syntax, but this line cannot work: the bash command > 'source' instructs bash to read in the content of the next argument and > execute > it as though it were a shell-script. That's the reason for the error > message: > The first word in a linux-binary is 'ELF' and that's not a bash command > (luckily, who knows what might have happened if the rest of the binary had > been > interpreted by bash). > > Try replacing 'source' with 'exec'. If PBS forces you to have the 'source' > keyword there (which I would find odd) create a wrapper script 'mapman.sh' > into > which you write 'exec ${ABSDIR}/lx_mapman $*'. > > Tim > >> >> It seems that only (2) can be directly implemented under PBS >> environment. >> I am wondering whether there is a way to circumstance this problem. >> >> Best Regards, Hailiang > > -- > -- > Tim Gruene > Institut fuer anorganische Chemie > Tammannstr. 4 > D-37077 Goettingen > > GPG Key ID = A46BEE1A > >