[GE users] qsub -cwd and SLES 9.0 and a bit of DRMAA

Reuti reuti at staff.uni-marburg.de
Tue Apr 25 11:02:18 BST 2006


Hi,

Am 25.04.2006 um 11:01 schrieb Andreas Haas:

> On Mon, 24 Apr 2006, Dev wrote:
>
>> HI,
>>
>>    I think this should have been answered somewhere
>> before. I tried searching for it but couldn't get to
>> it.
>> When I use -cwd with qsub why does my PWD always get
>> reset to the HOME directory and not to the directory
>> from which I try to run the job? This is on SLES 9.0.
>>
>> when I try to submit the job script
>>
>> echo $PWD ( contents of test.sh )
>>
>> using qsub -cwd test.sh I get the out as my $HOME and
>> not the dir from which I'm running qsub.
>>

maybe it's a matter when $PWD is updated by the shell. I mean: you  
can set $PWD to anything on your own, and it will be synchronized by  
the next `cd`:

reuti at host:~> echo $PWD
/home/reuti
reuti at host:~> PWD="blabla"
reuti at host:blabla> echo $PWD
blabla
reuti at host:blabla> cd cmd
reuti at host:~/cmd> echo $PWD
/home/reuti/cmd
reuti at host:~/cmd>

maybe you can use `pwd` instead:

reuti at host:~/cmd> PWD="blabla"
reuti at host:blabla> pwd
/home/reuti/cmd
reuti at host:blabla>

-- Reuti


>>
>> Does this in any way effect jobs submitted using DRMAA
>> with the nativespecification set as -b no -shell yes ?
>
> I can't say for sure, yet it can't be ruled out, once
> a shell is used to start binary jobs.
>
>>
>> On the other hand if I have my script as
>>
>> #$ -s /bin/sh
>> #$ -cwd
>> echo $PWD
>>
>> things seem to work fine.
>>
>> is it something to do with whats being set in
>> /etc/bash.bashrc of SLES 9.0 ?
>
> Very likely.
>
> Regards,
> Andreas
>
> ---------------------------------------------------------------------
> 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