Hi Iago,<br><br>The installation procedure that Arni has written below<br>is the typical way to install ADMB in read only folder<br>like /usr/local.&nbsp; I'm not too sure why tpl2cpp is trying<br>to write to ADMB_HOME.&nbsp; Can you show the output<br>for the following commands?<br><br>$ echo $ADMB_HOME<br>$ which admb<br>$ ls -lh $ADMB_HOME/bin<br>$ admb <span style="font-style: italic;">your-tpl-file<br><br></span>This should help find the problem.<br><br>Thanks,<br>Johnoel<span style="font-style: italic;"><br></span>&nbsp;<br>----- Original Message -----<br>From: Iago Mosqueira &lt;iago.mosqueira@gmail.com&gt;<br>Date: Monday, February 15, 2010 2:08 am<br>Subject: Re: [ADMB Users] New Linux user<br>To: Arni Magnusson &lt;arnima@hafro.is&gt;<br>Cc: users@admb-project.org<br><br>&gt; On Thu, Feb 11, 2010 at 10:57 PM, Arni Magnusson <br>&gt; &lt;arnima@hafro.is&gt; wrote:<br>&gt; &gt; Welcome aboard, Iago! Coming from R and C, I'm sure you will <br>&gt; find ADMB<br>&gt; &gt; useful. For me, they form a triangle covering just about all my<br>&gt; &gt; number-crunching needs.<br>&gt; &gt;<br>&gt; &gt; To install ADMB inside /usr/local/admb, you shouldn't need to <br>&gt; modify the<br>&gt; &gt; 'admb' script, since tpl2cpp should create the tmp files in <br>&gt; the current<br>&gt; &gt; directory.<br>&gt; &gt;<br>&gt; &gt; Until now, I have installed ADMB inside ~/admb, but I just <br>&gt; tried installing<br>&gt; &gt; inside /usr/local/admb (on my home computer running Kubuntu <br>&gt; 8.04) and it<br>&gt; &gt; works fine. This is how I do it:<br>&gt; &gt;<br>&gt; &gt; &nbsp;sudo mkdir /usr/local/admb<br>&gt; &gt; &nbsp;cd /usr/local/admb<br>&gt; &gt; &nbsp;sudo wget \<br>&gt; &gt; &nbsp;http://admb-project.googlecode.com/files/admb-9.1-linux-<br>&gt; gcc4.1-64bit.zip<br>&gt; &gt; &nbsp;sudo unzip admb-9.1-linux-gcc4.1-64bit.zip<br>&gt; &gt;<br>&gt; &gt; Now all that remains is to set two environment variables:<br>&gt; &gt;<br>&gt; &gt; &nbsp;export ADMB_HOME=/usr/local/admb/admb-9.1-linux-gcc4.1-64bit<br>&gt; &gt; &nbsp;export PATH=$ADMB_HOME/bin:$PATH<br>&gt; &gt;<br>&gt; &gt; Now test it:<br>&gt; &gt;<br>&gt; &gt; &nbsp;cp -r $ADMB_HOME/examples/admb/simple ~<br>&gt; &gt; &nbsp;chmod 755 ~/simple<br>&gt; &gt; &nbsp;cd ~/simple<br>&gt; &gt; &nbsp;admb simple<br>&gt; &gt; &nbsp;./simple<br>&gt; &gt; &nbsp;cat simple.par<br>&gt; &gt;<br>&gt; &gt; Hope this helps,<br>&gt; &gt;<br>&gt; &gt; Arni<br>&gt; <br>&gt; Hello,<br>&gt; <br>&gt; Thanks for your help. I'll try your suggestion, but my <br>&gt; experience was<br>&gt; that having ADMB_HOME pointing towards a folder where normal <br>&gt; users had<br>&gt; no write persmissions, such as /usr/local/*, forced me to use <br>&gt; sudo as<br>&gt; tpl2cpp was trying to write tmp files over there. Having to chmod<br>&gt; folders inside /usr/local is not ideal, and maybe imposible in<br>&gt; multi-user systems where admins do not allow it.<br>&gt; <br>&gt; Cheers,<br>&gt; <br>&gt; <br>&gt; Iago<br>&gt; <br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; On Mon, 8 Feb 2010, Iago Mosqueira wrote:<br>&gt; &gt;<br>&gt; &gt;&gt; Hello,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I am a new user of ADMB, coming mostly from R and C. I use <br>&gt; Linux and tried<br>&gt; &gt;&gt; to find a good way of installing it in my machine, either <br>&gt; from the<br>&gt; &gt;&gt; executables or the compiled source code.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I wanted to have the contents lib, include and bin folders <br>&gt; into my<br>&gt; &gt;&gt; /usr/local/, a typical way in Linux to get this installed for <br>&gt; all users. The<br>&gt; &gt;&gt; only problem I found was that tpl2cpp tries to create the tmp <br>&gt; files and the<br>&gt; &gt;&gt; cpp file in the location marked by ADMB_HOME. But in my case <br>&gt; that is<br>&gt; &gt;&gt; somewhere where only su can write.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; The solution I found, to get admb to run in whatever folder I <br>&gt; happen to<br>&gt; &gt;&gt; have the tpl file, is to add<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; export ADMB_HOME=$PWD<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; to the admb script, in my case in line 31. This seems to do <br>&gt; the trick.<br>&gt; &gt;&gt; Would be useful to streamline the instalation procedure for <br>&gt; Linux, though,<br>&gt; &gt;&gt; with an install option to the makefile maybe?<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Cheers,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Iago<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; Users@admb-project.org<br>&gt; http://lists.admb-project.org/mailman/listinfo/users