[ADMB Users] New Linux user

Iago Mosqueira iago.mosqueira at gmail.com
Mon Feb 15 04:08:00 PST 2010


On Thu, Feb 11, 2010 at 10:57 PM, Arni Magnusson <arnima at hafro.is> wrote:
> Welcome aboard, Iago! Coming from R and C, I'm sure you will find ADMB
> useful. For me, they form a triangle covering just about all my
> number-crunching needs.
>
> To install ADMB inside /usr/local/admb, you shouldn't need to modify the
> 'admb' script, since tpl2cpp should create the tmp files in the current
> directory.
>
> Until now, I have installed ADMB inside ~/admb, but I just tried installing
> inside /usr/local/admb (on my home computer running Kubuntu 8.04) and it
> works fine. This is how I do it:
>
>  sudo mkdir /usr/local/admb
>  cd /usr/local/admb
>  sudo wget \
>  http://admb-project.googlecode.com/files/admb-9.1-linux-gcc4.1-64bit.zip
>  sudo unzip admb-9.1-linux-gcc4.1-64bit.zip
>
> Now all that remains is to set two environment variables:
>
>  export ADMB_HOME=/usr/local/admb/admb-9.1-linux-gcc4.1-64bit
>  export PATH=$ADMB_HOME/bin:$PATH
>
> Now test it:
>
>  cp -r $ADMB_HOME/examples/admb/simple ~
>  chmod 755 ~/simple
>  cd ~/simple
>  admb simple
>  ./simple
>  cat simple.par
>
> Hope this helps,
>
> Arni

Hello,

Thanks for your help. I'll try your suggestion, but my experience was
that having ADMB_HOME pointing towards a folder where normal users had
no write persmissions, such as /usr/local/*, forced me to use sudo as
tpl2cpp was trying to write tmp files over there. Having to chmod
folders inside /usr/local is not ideal, and maybe imposible in
multi-user systems where admins do not allow it.

Cheers,


Iago

>
>
> On Mon, 8 Feb 2010, Iago Mosqueira wrote:
>
>> Hello,
>>
>> I am a new user of ADMB, coming mostly from R and C. I use Linux and tried
>> to find a good way of installing it in my machine, either from the
>> executables or the compiled source code.
>>
>> I wanted to have the contents lib, include and bin folders into my
>> /usr/local/, a typical way in Linux to get this installed for all users. The
>> only problem I found was that tpl2cpp tries to create the tmp files and the
>> cpp file in the location marked by ADMB_HOME. But in my case that is
>> somewhere where only su can write.
>>
>> The solution I found, to get admb to run in whatever folder I happen to
>> have the tpl file, is to add
>>
>> export ADMB_HOME=$PWD
>>
>> to the admb script, in my case in line 31. This seems to do the trick.
>> Would be useful to streamline the instalation procedure for Linux, though,
>> with an install option to the makefile maybe?
>>
>> Cheers,
>>
>> Iago
>>
>



More information about the Users mailing list