[torquedev] Different behavior in executing the job-script

Ken Nielson knielson at adaptivecomputing.com
Wed Jul 14 11:37:53 MDT 2010


This is just how the shebang works with Linux.

If you write a script, make it executable and then run it from the 
command line you will get the same results. If the script starts with 
the shebang you will see a process with a description of /bin/sh 
./myscript. If you write the script without the shebang the process will 
have a description of /bin/sh.

Ken

On 07/14/2010 08:31 AM, Dr. Stephan Raub wrote:
> Dear Developers,
>
> We are using Torque 2.3.7 on a cluster with CentOS5.4. We found a quite
> different behavior how the moms (or qnodeds) start the submitted
> job-scripts, depending on if a shebang is given or not.
>
> For example: Have a look at this simple (and useless) job-script:
>
> <script>
> #!/bin/bash
> #PBS -l walltime=00:59:00
> #PBS -l nodes=1:ppn=1
> #PBS -l pmem=1gb
> #PBS -N testjob1
> #PBS -A BenchMark
>
> export RUNDIR=$PBS_O_WORKDIR
> cd $RUNDIR
> sleep 60
> </script>
>
> After submission I can go to the execution host and find the following
> process structure (from pstree –p):
>
> pbs_mom(5320) ->  bash(25743) ->   2919.XXX(25836) ->  sleep(25848)
>
> If I now leave away the shebang I find a completely different situation
> (again pstree –p on the execution host):
>
> pbs_mom(5320) ->  bash(26082) ->   bash(26172) ->   sleep(26184)
>
> The difference is that now not a script named [jobid].[host].SC is executed
> but just an unnamed bash-process.
>
> Is there a reason for this behavior? And how is a script without a shebang
> handled that is not written in bash (but e.g. in c-shell)?
>
> Thank You in advance for an answer.
>
> Best regards!
>
> Stephan
> --
> ---------------------------------------------------------
> | | Dr. rer. nat. Stephan Raub
> | | Dipl. Chem.
> | | Lehrstuhl für IT-Management / ZIM
> | | Heinrich-Heine-Universität Düsseldorf Universitätsstr. 1 /
> | | 25.41.O2.25-2
> | | 40225 Düsseldorf / Germany
> | |
> | | Tel: +49-211-811-3911
> ---------------------------------------------------------
>
> Wichtiger Hinweis: Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse,
> bzw.
> sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail
> irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
> Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte
> benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen
> Dank.
>
> Important Note: This e-mail may contain trade secrets or privileged,
> undisclosed or otherwise confidential information. If you have received this
> e-mail in error, you are hereby notified that any review, copying or
> distribution of it is strictly prohibited. Please inform us immediately and
> destroy the original transmittal. Thank you for your cooperation.
>
>
>
>
> _______________________________________________
> torquedev mailing list
> torquedev at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torquedev
>    



More information about the torquedev mailing list