[GE users] back to the basics... 6.2beta

Reuti reuti at staff.uni-marburg.de
Fri Jul 4 18:19:17 BST 2008


Am 04.07.2008 um 18:51 schrieb Alexandre Racine:

>> But I don't understand why the PATH should be responsible for this
>> behaviour, I'd rather say the pwd is not correct and I guess you are
>> looking for the "-cwd" option:
>> # qrsh -cwd ./script.sh
>> should do the trick.
>
>
> (quoted back from the bottom)
>
> I actually have those commands in my script file and according to the
> man page, these should work with qrsh.
>
> #$-cwd
> #$-V

qrsh will not process this options in the script which you give as  
"command". You can only give them on the command line:

qrsh -cwd -V echo '$PATH'
qrsh -cwd -V echo '$HOSTNAME'

-- Reuti


> Doing a "echo $PATH" gives me a
> "/tmp/72.1.all.q:/usr/local/bin:/bin:/usr/bin"
>
>
>
> Alexandre Racine
> alexandre.racine at mhicc.org
> 514-461-1300 poste 3304
>
>> -----Original Message-----
>> From: Harald.Pollinger at Sun.COM [mailto:Harald.Pollinger at Sun.COM]
>> Sent: 3 juillet 2008 07:36
>> To: users at gridengine.sunsource.net
>> Subject: Re: [GE users] back to the basics... 6.2beta
>>
>> Hi Alexandre and Reuti,
>>
>> please see my comments below:
>>
>> Reuti wrote:
>>> Am 01.07.2008 um 17:12 schrieb Alexandre Racine:
>>>
>>>>> -----Original Message-----
>>>>> From: Reuti [mailto:reuti at Staff.Uni-Marburg.DE]
>>>>> Sent: 1 juillet 2008 10:40
>>>>> To: users at gridengine.sunsource.net
>>>>> Subject: Re: [GE users] back to the basics... 6.2beta
>>>>>
>>>>> Hi,
>>>>>
>>>>> Am 01.07.2008 um 16:27 schrieb Alexandre Racine:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I am trying to run a simple interactive job with the new qrsh.
> See
>>>>>> below for the content of the file. Running it on the command line
>>>>>> work very well, but with qrsh I get a not found error. Did I
>> forget
>>>>>> something? Thanks.
>>>>>>
>>>>>> TORQUE1 programmeinteractif # qstat -f
>>>>>> queuename                      qtype resv/used/tot. load_avg
>>>>>> arch          states
>>>>>>
>>>>
> --------------------------------------------------------------------
>> -
>>>>> -
>>>>>> -----------
>>>>>> all.q at torque1.rg.local         BIP   0/0/1          -NA-
> lx24-
>>>>>> x86      au
>>>>>>
>>>>
> --------------------------------------------------------------------
>> -
>>>>> -
>>>>>> -----------
>>>>>> all.q at torque2.statgen.local    BIP   0/0/2          0.00
>>>> lx24-x86
>>>>>> TORQUE1 programmeinteractif # qrsh script.sh
>>>>>> bash: script.sh: command not found
>>>>>
>>>>> seems the $PATH is not set like with a plain login. Can you
> specify
>>>>> the complete PATH to the script?
>>>>>
>>>>> -- Reuti
>>>>
>>>>
>>>> Yep, this was it. Is this a normal behavior? I even try it with
>> another
>>>> user, and the result was the same.
>>>
>>> Mmhh - isn't this behavior the same as before - no PATH is set for a
>>> non-interactive qrsh? You can issue just qrsh and the ./script as an
>>> input on its own?
>>
>> The $PATH should be set.
>>
>> When I do a
>> # qrsh -l h=host env | grep -w PATH
>> I get nearly the same PATH as with
>> # rsh host env | grep -w PATH
>>
>> The qrsh path just contains "/tmp/port8104/290.1.all.q"  
>> additionally -
>> 8104 is my QMaster port, 290 is the job id.
>>
>> (Don't run "rsh host echo $PATH", except you are a quoting expert! It
>> will trick you.)
>>
>>
>> But I don't understand why the PATH should be responsible for this
>> behaviour, I'd rather say the pwd is not correct and I guess you are
>> looking for the "-cwd" option:
>> # qrsh -cwd ./script.sh
>> should do the trick.
>>
>>
>>
>>>> Just to let you know, since this is a beta... running the script
>> gave me
>>>> another error. See the differences locally and with qrsh...
>>>>
>>>> ---------locally-----------
>>>> TORQUE1 programmeinteractif #
>> /opt/test/programmeinteractif/script.sh
>>>> .
>>>> Je roule sur le serveur TORQUE1...
>>>>
>>>> Enter something: gg
>>>> You typed: gg
>>>> Hit any key to continue....
>>>> Fin du programme
>>>> ---------with qrsh-----------
>>>> TORQUE1 programmeinteractif # qrsh
>>>> /opt/test/programmeinteractif/script.sh
>>>> .
>>>> Je roule sur le serveur TORQUE2...
>>>>
>>>> Enter something: gg
>>>> stty: standard input: Invalid argument
>>>> You typed: gg
>>>
>>> Maybe the -icanon isn't working as there is no real terminal
>> connected.
>>> Can you try with a "Please press return to continue..." and a simple
>>> "read" and disregard the stty commands?
>>
>> Yes, the stty command can't work, because there is no tty 'beneath'
> the
>> job. Use "qrsh -pty yes script.sh" to enforce the creation of a pty
>> (pseudo tty), then the stty command will work.
>>
>> But right now I'm not sure if "-pty yes" was already supported in
>> 6.2beta1...
>>
>> Regards,
>> Harald
>>
>>
>>
>>>
>>> -- Reuti
>>>
>>>> Hit any key to continue....
>>>> stty: standard input: Invalid argument
>>>> Fin du programme
>>>>
>>>> ----------------------
>>>>
>>>>
>>>> Have a nice day.
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> -------File-------
>>>>>> #!/bin/sh
>>>>>>
>>>>>> #$-cwd
>>>>>> #$-V
>>>>>>
>>>>>>
>>>>>> echo .
>>>>>> echo "Je roule sur le serveur `hostname`..."
>>>>>> sleep 3
>>>>>>
>>>>>> Pause()
>>>>>> {
>>>>>>     key=""
>>>>>>     echo -n Hit any key to continue....
>>>>>>     stty -icanon
>>>>>>     key=`dd count=1 2>/dev/null`
>>>>>>     stty icanon
>>>>>> }
>>>>>>
>>>>>> # Simple input
>>>>>> echo
>>>>>> echo -n "Enter something: "
>>>>>> read ANSWER
>>>>>> echo You typed: "$ANSWER"
>>>>>> Pause                           # invoke the function Pause.
>>>>>>
>>>>>>
>>>>>>
>>>>>> echo "Fin du programme"
>>>>>>
>>>>>> exit
>>>>>>
>>>>>> #FIN
>>>>>>
>>>>>>
>>>>>> --------FIN---------
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Alexandre Racine
>>>>>> alexandre.racine at mhicc.org
>>>>>> 514-461-1300 poste 3303
>>>>>>
>>>>>
>>>>>
>>>>>
> -------------------------------------------------------------------
>> --
>>>>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>>>>> For additional commands, e-mail: users-
>> help at gridengine.sunsource.net
>>>>
>>>>
>>>>
> --------------------------------------------------------------------
>> -
>>>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>>>> For additional commands, e-mail:
> users-help at gridengine.sunsource.net
>>>>
>>>
>>>
>>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>>>
>>
>>
>> --
>> Sun Microsystems GmbH         Harald Pollinger
>> Dr.-Leo-Ritter-Str. 7         N1 Grid Engine Engineering
>> D-93049 Regensburg            Phone: +49 (0)941 3075-209  (x60209)
>> Germany                       Fax: +49 (0)941 3075-222  (x60222)
>> http://www.sun.com/gridware
>> mailto:harald.pollinger at sun.com
>> Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten
>> Amtsgericht Muenchen: HRB 161028
>> Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland
> Boemer
>> Vorsitzender des Aufsichtsrates: Martin Haering
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list