[ADMB Users] glitch in tpl2rem (and tpl2cpp) ?

Poos, Jan Jaap janjaap.Poos at wur.nl
Wed Dec 10 05:28:48 PST 2008


reply at bottom of mail ...

> poos001 at D0400736:~/admb$ export
ADMB_HOME=/home/poos001/admb-9.0.65-linux64-gcc3.4.6/

remove the trailing backslash, so that
$ export ADMB_HOME=/home/poos001/admb-9.0.65-linux64-gcc3.4.6

then 
$ export PATH=$ADMB_HOME/bin:$PATH

finally
$ tpl2rem envpref

let me know,
johnoel
----- Original Message -----
From: "Poos, Jan Jaap" <janjaap.Poos at wur.nl>
Date: Tuesday, December 9, 2008 10:49 pm
Subject: Re: [ADMB Users] glitch in tpl2rem (and tpl2cpp) ?
To: users at admb-project.org

>  
> My reply is at bottom...
> 
> -----Original Message-----
> From: users-bounces at admb-project.org [mailto:users-bounces at admb-
> project.org] On Behalf Of John Ancheta
> Sent: Tuesday, December 09, 2008 7:37 PM
> To: users at admb-project.org
> Subject: Re: [ADMB Users] glitch in tpl2rem (and tpl2cpp) ?
> 
> Download and install a current version of ADMB from
> 
> http://admb-project.org/downloads
> 
> Installation guides can be found at
> 
> http://admb-project.org/documentation
> 
> Let me know,
> johnoel
> 
> On Dec 9, 5:53 am, "Poos, Jan Jaap" <janjaap.P... at wur.nl> wrote:
> > Hi,
> >
> > I found a small problem with respect to tpl2rem on linux, 
> using 
> > admb-9.0.9rc2-linux64-gcc3.4. When using tpl2rem on a file on 
> one of 
> > our network disks, this results in:
> >
> > sh: envpref.htp: Permission denied
> > Error executing command  sed -e " "  classdef.tmp > envpref.htp
> > sh: envpref.htp: Permission denied
> > Error executing command sed -n -f
> > /home/poos001/admb-9.0.9rc2-linux64-gcc3.4/bin
> > /seddf1b3 tfile2 >> envpref.htp
> > sh: envpref.htp: Permission denied
> > Error executing command sed -n -f
> > /home/poos001/admb-9.0.9rc2-linux64-gcc3.4/bin
> > /seddf1b4 tfile4 >> envpref.htp
> > sh: envpref.htp: Permission denied
> > Error executing command sed -f
> > /home/poos001/admb-9.0.9rc2-linux64-gcc3.4/bin/se
> > ddf1b2 tfile2 >> envpref.htp
> > etc.
> >
> > Subsequently, the directory in which the tpl file is located 
> looks like:
> >
> > -rw-r--r-- 1 root    imares    1894 2008-12-09 16:36 classdef.tmp
> > -rw-r--r-- 1 root    imares    3817 2008-12-09 16:36 
> envpref.cpp 
> > -rwxrwxrwx 1 poos001 imares 6622965 2008-10-04 22:25 envpref.dat
> > -rw-r--r-- 1 root    imares    1894 2008-12-09 16:36 
> envpref.htp 
> > -rwxrwxrwx 1 poos001 imares    4132 2008-10-04 22:25 
> envpref.pin 
> > -rwxrwxrwx 1 poos001 imares    2308 2008-12-09 14:01 envpref.tpl
> > -rw-r--r-- 1 root    imares       0 2008-12-09 16:36 header.tmp
> > -rw-r--r-- 1 root    imares    1263 2008-12-09 16:36 tfile1
> > -rw-r--r-- 1 root    imares     126 2008-12-09 16:36 tfile2
> > -rw-r--r-- 1 root    imares     383 2008-12-09 16:36 tfile3
> > -rw-r--r-- 1 root    imares     122 2008-12-09 16:36 tfile4
> > -rw-r--r-- 1 root    imares     585 2008-12-09 16:36 xxalloc1.tmp
> > -rw-r--r-- 1 root    imares     179 2008-12-09 16:36 xxalloc2.tmp
> > -rw-r--r-- 1 root    imares     836 2008-12-09 16:36 
> xxalloc3.tmp 
> > -etc.
> >
> > So, all the temporary files remain in the directory. Running 
> tpl2rem 
> > again results in a segmentation fault.
> >
> > This looks like a problem with setting the permissions when 
> the 
> > temporary files are made. The problem disappears when copying 
> the 
> > files to another location (like the users home dir). The same 
> problem 
> > also disappears when running tpl2env as root. Maybe this can 
> be looked 
> > into and fixed in a future version?
> >
> > Cheers, thanks in advance, Jan Jaap
> >
> > _______________________________________________
> > Users mailing list
> > Us... at admb-project.orghttp://lists.admb-
> project.org/mailman/listinfo/u> sers
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
> 
> Hi John,
> 
> Thanks for your swift reaction. However, it appears the problem 
> is not fixed, but has become worse. With v 9.0.65, tpl2rem fails 
> also in a situation where it worked previously:
> 
> poos001 at D0400736:~/admb$ export ADMB_HOME=/home/poos001/admb-
> 9.0.65-linux64-gcc3.4.6/
> poos001 at D0400736:~/admb$ ./tpl2rem envpref
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binseddf1b3: No such file or directory
> Error executing command sed -n -f /home/poos001/admb-9.0.65-
> linux64-gcc3.4.6/binseddf1b3 tfile2 >> envpref.htp
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binseddf1b4: No such file or directory
> Error executing command sed -n -f /home/poos001/admb-9.0.65-
> linux64-gcc3.4.6/binseddf1b4 tfile4 >> envpref.htp
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binseddf1b2: No such file or directory
> Error executing command sed -f /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binseddf1b2 tfile2 >> envpref.htp
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2d: No such file or directory
> Error executing command sed -f /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2d tfile4 >> envpref.htp
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2a: No such file or directory
> Error executing command sed -f /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2a xxalloc3.tmp >> envpref.cpp
> sed: couldn't open file /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2c: No such file or directory
> Error executing command sed -f /home/poos001/admb-9.0.65-linux64-
> gcc3.4.6/binsedf1b2c xxalloc2.tmp >> envpref.cpp
> Error trying to create output file envpref.cpp
> 
> It appears the forward slash between bin and the sed files has 
> disappeared, resulting in similar issues as before, only now in 
> all instances. Mind you I use x86_64 and gcc 4.3.1, with the 
> files for gcc3.4.6, but I don't think this is the issue.  
> 
> All the files in admb-9.0.65-linux64-gcc3.4.6/bin are owned by 
> poos001, and have -rwxrwxrwx permission.
> 
> Kind regards, Jan Jaap  
 
-------------
 
Removing the trailing slash from ADMB_HOME and explicitly adding
$ADMB_HOME/bin to the path did indeed return the behaviour of tpl2rem as
previously. This means it is still not able to properly function at the
specified location. Running tpl2rem results in:
 
poos001 at D0400736:/media/n/Projecten/Computing desktop Texel/admb$ export
PATH=$ADMB_HOME/bin:$PATH
poos001 at D0400736:/media/n/Projecten/Computing desktop Texel/admb$
./tpl2rem envpref
sh: envpref.htp: Permission denied
Error executing command  sed -e " "  classdef.tmp > envpref.htp
sh: envpref.htp: Permission denied
Error executing command sed -n -f
/home/poos001/admb-9.0.65-linux64-gcc3.4.6/bin/seddf1b3 tfile2 >>
envpref.htp
sh: envpref.htp: Permission denied
etc.
 
he problem is that envpref is owned by root, and does not get write
permissions by anybody else but root: 
 
ls -la envpref.htp results in:
 
-rw-r--r-- 1 root imares    1894 2008-12-10 13:18 envpref.htp

Thus, appending of the results of sed (that is done by poos001) cannot
be done because poos001 does not have permission to write the file. The
problem could be solved by making sure that envpref.htp and envpref.cpp
get permission -rw-rw-rw- when they are created. Alternatively, the .cpp
and .htp file can be created somewhere differently and copied into the
directory in one go. I realize this problem is partly the result of our
hardware and using smbfs. That results in the owner of the file being
"root" and not the current user.   
 
Cheers, Jan Jaap 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20081210/f28c8da0/attachment.html>


More information about the Users mailing list